mirror of
https://github.com/suchmememanyskill/TegraScript.git
synced 2025-04-29 14:19:28 -04:00
TE 2.0.0 changes
This commit is contained in:
parent
240f2e4788
commit
dce81c523c
6 changed files with 102 additions and 77 deletions
11
README.md
11
README.md
|
@ -22,7 +22,7 @@ Function | Args | Description | Output
|
|||
`setStringIndex(int in, $svar out)` | looks up earlier defined strings in order. User defined strings start at index 1. $svar is a string variable | Copies string table index to out | returns 0
|
||||
`combineStrings(string s1, string s2, $svar out)` | $svar is a string variable | combines s1 and s2 (as s1s2) and copies it into out | returns 0
|
||||
`compareStrings(string s1, string s2)` | - | compares s1 to s2. If they are the same, the function returns 1, else 0 | returns 0 or 1
|
||||
`pause()` | - | pauses the script until it recieves user input. result will be copied into `@BTN_POWER`, `@BTN_VOL+` and `@BTN_VOL-` | returns >0
|
||||
`pause()` | - | pauses the script until it recieves user input. result will be copied into `@BTN_POWER`, `@BTN_VOL+`, `@BTN_VOL-`, `@BTN_A`, `@BTN_B`, `@BTN_X`, `@BTN_Y`, `@BTN_UP`, `@BTN_DOWN`, `@BTN_LEFT` and `@BTN_RIGHT` | returns >0
|
||||
`wait(int arg1)` | arg1: amount that it waits | waits for the given amount of time, then continues running the script | returns 0
|
||||
`exit()` | - | exits the script | -
|
||||
`fs_exists(string path)` | path: full path to file | check if a file exists. 1 if it exists, 0 if it doesn't | returns 0 or 1
|
||||
|
@ -56,7 +56,6 @@ Note though that the int variables can't be assigned negative values
|
|||
There are some built in variables:
|
||||
- `@EMUMMC`: 1 if an emummc was found, 0 if no emummc was found
|
||||
- `@RESULT`: result of the last ran function
|
||||
- `@BTN_POWER`, `@BTN_VOL+`, `@BTN_VOL-`: result of the `pause()` function, represents which button got pressed during the `pause()` function
|
||||
- `$CURRENTPATH`: Represents the current path
|
||||
|
||||
(if `fs_readdir()` got ran)
|
||||
|
@ -64,6 +63,9 @@ There are some built in variables:
|
|||
- `$FILENAME`: Represents the current filename
|
||||
- `@ISDIR`: 1 if the last read file is a DIR, otherwise 0
|
||||
|
||||
(if `pause()` got ran)
|
||||
- `@BTN_POWER`, `@BTN_VOL+`, `@BTN_VOL-`, `@BTN_A`, `@BTN_B`, `@BTN_X`, `@BTN_Y`, `@BTN_UP`, `@BTN_DOWN`, `@BTN_LEFT`: result of the `pause()` function, represents which button got pressed during the `pause()` function
|
||||
|
||||
## Flow control
|
||||
|
||||
You can use `if()`, `goto()` and `math()` functions to control the flow of your program. Example:
|
||||
|
@ -102,6 +104,11 @@ pause()
|
|||
|
||||
# Changelog
|
||||
|
||||
#### 03/05/2020
|
||||
*God fucking dammit it's 2am again*
|
||||
|
||||
With the release of TegraExplorer v2.0.0, the pause() function changed. It adds some buttons from controllers if they are connected. See the pause() section above to see what buttons are mapped. Note that if no joycons are connected, power = a, up = vol+, down = vol-. Also note that the screen dimentions have changed, so your text might not fit anymore.
|
||||
|
||||
#### 26/04/2020
|
||||
With the release of TegraExplorer v1.5.2, there has been 1 new feature implemented.
|
||||
|
||||
|
|
|
@ -97,28 +97,31 @@ setString("10.0.2", $1002_version)
|
|||
|
||||
printf("FVI script edition")
|
||||
printf("")
|
||||
printf("Press vol+ to read from SYSMMC")
|
||||
printf("Press A to read from SYSMMC")
|
||||
if (@EMUMMC){
|
||||
printf("Press vol- to read from EMUMMC")
|
||||
printf("Press Y to read from EMUMMC")
|
||||
}
|
||||
printf("Press power to exit")
|
||||
printf("Press any other button to exit")
|
||||
printf("")
|
||||
|
||||
pause()
|
||||
@checkInput = setInt(0);
|
||||
|
||||
if (@BTN_VOL+){
|
||||
if (@BTN_A){
|
||||
printf("Mounting SYSMMC...")
|
||||
mmc_connect("SYSMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_VOL-){
|
||||
@noemu = invert(@EMUMMC)
|
||||
if (@noemu){
|
||||
if (@BTN_Y){
|
||||
if (@EMUMMC, == , 0){
|
||||
exit()
|
||||
}
|
||||
printf("Mounting EMUMMC...")
|
||||
mmc_connect("EMUMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_POWER){
|
||||
|
||||
if (@checkInput, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
@ -163,5 +166,8 @@ if (@checkexfat, "==", 0){
|
|||
printf("Non-Exfat edition")
|
||||
}
|
||||
|
||||
printf("")
|
||||
printf("Press any key to exit")
|
||||
|
||||
pause()
|
||||
exit()
|
|
@ -100,27 +100,31 @@ setString("10.0.2", $1002_version)
|
|||
|
||||
printf("TegraScript firmware dumper")
|
||||
printf("")
|
||||
printf("Press vol+ to dump from SYSMMC")
|
||||
printf("Press A to dump from SYSMMC")
|
||||
if (@EMUMMC){
|
||||
printf("Press vol- to dump from EMUMMC")
|
||||
printf("Press Y to dump from EMUMMC")
|
||||
}
|
||||
printf("Press power to exit")
|
||||
printf("Press any other button to exit")
|
||||
printf("")
|
||||
|
||||
pause()
|
||||
@checkInput = setInt(0);
|
||||
|
||||
if (@BTN_VOL+){
|
||||
if (@BTN_A){
|
||||
printf("Mounting SYSMMC...")
|
||||
mmc_connect("SYSMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_VOL-){
|
||||
if (@BTN_Y){
|
||||
if (@EMUMMC, == , 0){
|
||||
exit()
|
||||
}
|
||||
printf("Mounting EMUMMC...")
|
||||
mmc_connect("EMUMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_POWER){
|
||||
|
||||
if (@checkInput, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
@ -134,11 +138,11 @@ setString("emmc:/Contents/registered/", $basePath)
|
|||
@LOOP = getPosition()
|
||||
if (@i, ">=", 97){
|
||||
printf("No valid firmware version found")
|
||||
printf("Press Power to dump anyway")
|
||||
printf("Press vol+/- to exit")
|
||||
printf("Press A to dump anyway")
|
||||
printf("Press any other button to exit")
|
||||
pause()
|
||||
|
||||
if (@BTN_POWER, == , 0){
|
||||
if (@BTN_A, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
@ -195,9 +199,8 @@ if (@ISDIRVALID){
|
|||
}
|
||||
|
||||
setPrintPos(0, 16)
|
||||
printInt(@count)
|
||||
@count = math(@count, "+", 1)
|
||||
printf($FILENAME)
|
||||
printf(@count, ": ", $FILENAME)
|
||||
|
||||
combineStrings($sdBasePath, $FILENAME, $sdPath)
|
||||
|
||||
|
|
|
@ -1,42 +1,54 @@
|
|||
printf("TegraScript save dumper")
|
||||
printf("What mmc would you like to dump from")
|
||||
printf("Press + for sysnand")
|
||||
printf("Press A for sysmmc")
|
||||
if (@EMUMMC) {
|
||||
printf("Or press - for emummc")
|
||||
printf("Or press Y for emummc")
|
||||
}
|
||||
printf("Press power to cancel")
|
||||
|
||||
printf("Press any other button to exit")
|
||||
pause()
|
||||
@checkInput = setInt(0);
|
||||
|
||||
if (@BTN_VOL+){
|
||||
if (@BTN_A){
|
||||
printf("Mounting SYSMMC...")
|
||||
mmc_connect("SYSMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_VOL-){
|
||||
if (@BTN_Y){
|
||||
if (@EMUMMC, == , 0){
|
||||
exit()
|
||||
}
|
||||
printf("Mounting EMUMMC...")
|
||||
mmc_connect("EMUMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_POWER) {
|
||||
|
||||
if (@checkInput, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
printf("Which partition do you want to dump from? + for SYSTEM - for USER")
|
||||
printf("Which partition do you want to dump from? X for SYSTEM, Y for USER")
|
||||
pause()
|
||||
|
||||
if (@BTN_VOL+) {
|
||||
@checkInput = setInt(0);
|
||||
|
||||
if (@BTN_X) {
|
||||
printf("Mounting SYSTEM...")
|
||||
mmc_mount("SYSTEM")
|
||||
setString("systemSaves", $folder)
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
|
||||
if (@BTN_VOL-) {
|
||||
if (@BTN_Y) {
|
||||
printf("Mounting USER....")
|
||||
mmc_mount("USER")
|
||||
setString("userSaves", $folder)
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
|
||||
if (@checkInput, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
combineStrings("sd:/tegraexplorer/", $folder, $path)
|
||||
fs_mkdir($path)
|
||||
combineStrings("Copying saves to ", $path, $out)
|
||||
|
|
|
@ -68,19 +68,19 @@ if (@current, "<=", @maxSelection){
|
|||
|
||||
pause()
|
||||
|
||||
if (@BTN_VOL-){
|
||||
if (@BTN_DOWN){
|
||||
if (@selection, "<", @maxSelection){
|
||||
@selection = math(@selection, "+", 1)
|
||||
}
|
||||
}
|
||||
|
||||
if (@BTN_VOL+){
|
||||
if (@BTN_UP){
|
||||
if (@selection, ">", 7){
|
||||
@selection = math(@selection, "-", 1)
|
||||
}
|
||||
}
|
||||
|
||||
if (@BTN_POWER, "==", 0){
|
||||
if (@BTN_A, "==", 0){
|
||||
goto(@optionLoop)
|
||||
}
|
||||
|
||||
|
@ -163,25 +163,22 @@ printf("Ready!")
|
|||
setColor("RED")
|
||||
printf("")
|
||||
printf("WARNING!!!")
|
||||
printf("If you do not know exactly what this does")
|
||||
printf(" STOP!")
|
||||
printf("If you do not know exactly what this does. STOP!!!")
|
||||
printf("")
|
||||
printf("This will fuck with your system!")
|
||||
printf("Only do this as")
|
||||
printf(" a last ditch recovery effort!")
|
||||
printf("Only do this as a last ditch recovery effort!")
|
||||
printf("")
|
||||
setColor("GREEN")
|
||||
printf("For help go here:")
|
||||
printf("https://discord.gg/C29hYvh")
|
||||
printf("For help go here: https://discord.gg/C29hYvh")
|
||||
setColor("WHITE")
|
||||
printf("")
|
||||
wait(10)
|
||||
printf("Vol+ to continue")
|
||||
printf("Vol- or power to exit")
|
||||
printf("X to continue")
|
||||
printf("Any other button to exit")
|
||||
|
||||
pause()
|
||||
|
||||
if (@BTN_VOL+, "==", 0){
|
||||
if (@BTN_X, "==", 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +1,30 @@
|
|||
printf("TegraScript system wiper")
|
||||
printf("")
|
||||
printf("Press vol+ to wipe from SYSMMC")
|
||||
printf("Press A to wipe from SYSMMC")
|
||||
if (@EMUMMC){
|
||||
printf("Press vol- to wipe from EMUMMC")
|
||||
printf("Press Y to wipe from EMUMMC")
|
||||
}
|
||||
printf("Press power to exit")
|
||||
printf("")
|
||||
|
||||
pause()
|
||||
@checkInput = setInt(0);
|
||||
|
||||
if (@BTN_VOL+){
|
||||
if (@BTN_A){
|
||||
printf("Mounting SYSMMC...")
|
||||
mmc_connect("SYSMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_VOL-){
|
||||
if (@BTN_Y){
|
||||
if (@EMUMMC, == , 0){
|
||||
exit()
|
||||
}
|
||||
printf("Mounting EMUMMC...")
|
||||
mmc_connect("EMUMMC")
|
||||
@checkInput = setInt(1);
|
||||
}
|
||||
if (@BTN_POWER){
|
||||
|
||||
if (@checkInput, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
@ -47,15 +51,12 @@ printf("")
|
|||
setColor("YELLOW")
|
||||
wait(10)
|
||||
|
||||
printf("Press vol+ to continue")
|
||||
printf("Press vol- or power to exit")
|
||||
printf("Press X to continue")
|
||||
printf("Press any other button to exit")
|
||||
|
||||
pause()
|
||||
|
||||
if (@BTN_POWER){
|
||||
exit()
|
||||
}
|
||||
if (@BTN_VOL-){
|
||||
if (@BTN_X, == , 0){
|
||||
exit()
|
||||
}
|
||||
|
||||
|
@ -70,8 +71,6 @@ if (@ISDIRVALID){
|
|||
combineStrings($basePath, $FILENAME, $path)
|
||||
|
||||
setPrintPos(0, 20)
|
||||
printInt(@count)
|
||||
@count = math(@count, "+", 1)
|
||||
|
||||
@check = compareStrings($FILENAME, "8000000000000120")
|
||||
|
||||
|
@ -91,7 +90,8 @@ if (@ISDIRVALID){
|
|||
goto(@LOOP)
|
||||
}
|
||||
|
||||
printf($FILENAME)
|
||||
@count = math(@count, "+", 1)
|
||||
printf(@count, ": ", $FILENAME)
|
||||
fs_del($path)
|
||||
|
||||
goto(@LOOP)
|
||||
|
|
Loading…
Add table
Reference in a new issue