Twine Perception (script)

From Elanthipedia
Jump to navigation Jump to search
Twine Perception (script)
Category training,survival
Front-end Genie
Author Aliselyn

Description

Using the braided silvery twine from the Estate Holder's gift, trains perception. If more than 5 mistakes are made, it reverts to the previous difficulty. Has messaging for perception being too low, and trains until either locked or all shapes are completed.


Script

##Twine script v1.0
##This script uses the Estate Holder gift of "braided silvery twine." This script WILL NOT WORK
##without this item being worn. This trains the Perception skill.

##======ARRAYS
var difficulty simple|skilled|expert|master
var simple lace|pull
var skilled push|poke|lace
var expert turn|nibble|tilt|pry
var master pull|turn|flip|lace|push
var ending lace|turn|flip|pull|push|poke|raise|pry|tilt|nibble
##======ORDINALS
var simpleOrdinal 0
var skilledOrdinal 0
var expertOrdinal 0
var masterOrdinal 0
##((Change difficultyOrdinal to change the starting difficulty))
var difficultyOrdinal 0
var endingOrdinal 0
eval simpleOrdinalMax count("%simple", "|")
eval skilledOrdinalMax count("%skilled", "|")
eval expertOrdinalMax count("%expert", "|")
eval masterOrdinalMax count("%master", "|")
eval difficultyOrdinalMax count("%difficulty", "|")
eval endingOrdinalMax count("%ending", "|")
##======OTHER
counter set 0

start:
send shake my twine
pause .5
goto %difficulty(%difficultyOrdinal)

simple:
send %simple(%simpleOrdinal) my twine
pause 1
if (%simpleOrdinal == %simpleOrdinalMax) then {
	var simpleOrdinal 0
	goto ending
}
else if (%simpleOrdinal =< %simpleOrdinalMax) then {
	math simpleOrdinal add 1
	goto simple
}

skilled:
send %skilled(%skilledOrdinal) my twine
pause 1
if (%skilledOrdinal == %skilledOrdinalMax) then {
	var skilledOrdinal 0
	goto ending
}
else if (%skilledOrdinal =< %skilledOrdinalMax then {
	math skilledOrdinal add 1
	goto skilled
}

expert:
send %expert(%expertOrdinal) my twine
pause 1
if (%expertOrdinal == %expertOrdinalMax) then {
	var expertOrdinal 0
	goto ending
}
else if (%expertOrdinal =< %expertOrdinalMax) then {
	math expertOrdinal add 1
	goto expert
}

master:
send %master(%masterOrdinal) my twine
pause 1
if (%masterOrdinal == %masterOrdinalMax) then {
	var masterOrdinal 0
	goto ending
}
else if (%masterOrdinal =< %masterOrdinalMax) then {
	math masterOrdinal add 1
	goto master
}

ending:
match mistake You attempt
send %ending(%endingOrdinal) my twine
math endingOrdinal add 1
matchwait 8
pause 2
send shake my twine
pause .5
goto endCheck

endCheck:
counter add 1
if ($Perception.LearningRate == 34) then goto locked
else if (%difficultyOrdinal > %difficultyOrdinalMax) then goto mastered
else if (%endingOrdinal < 0) then {
	var endingOrdinal 0
	var difficultyOrdinal 0
	goto %difficulty(%difficultyOrdinal)
}
else if (%endingOrdinal > %endingOrdinalMax) then {
	var endingOrdinal 0
	math difficultyOrdinal add 1
	goto %difficulty(%difficultyOrdinal)
}
else if (%endingOrdinal =< %endingOrdinalMax) then goto %difficulty(%difficultyOrdinal)

mistake:
send shake my twine
pause 1.5
math mistakeCounter add 1
echo *** Made %mistakeCounter out of 5 mistakes before a restart at the previous difficulty level. ***
##Change the number on mistakeCounter in the below logic to choose the number of mistakes you deem okay
if (%mistakeCounter > 4) then {
	if (%difficultyOrdinal == 0) then {
		echo *** Learn Perception elsewhere for a bit, then try again. ***
		goto notenough
	}
	else {
		math difficultyOrdinal subtract 1
		var mistakeCounter 0
		var endingOrdinal 0
		echo *** Restarting at the previous difficulty level. ***
		goto %difficulty(%difficultyOrdinal)
	}
}
else goto %difficulty(%difficultyOrdinal)

locked:
echo *** Locked after tying %c shapes! Way to go! ***
exit

mastered:
echo *** You've mastered the string after %c shapes! You're amazing! ***
exit

notenough: