These Subs and the associated call lines are for setting up skill gain scripts to account for Siege Perilous RoT skill gain delays. My RoT check and wait are only triggered if you are on Siege Perilous, so these subs can be incorporated into any script to incorporate RoT training on Siege. The wait sub hides you if you are not already hidden, and opens your backpack every two minutes to keep you from being logged off. Hiding is optional, its the second parameter. If you are working a skill that uses objects, you may need to account for this when it hits RoT. In a crafting script, for example, you should probably re-initiate use of the tool.
Before you perform the skill activity you need to set a variable to track skill gain:
If Siege in #Shard
{
chooseskill blac real
Set %CurrentSkill #Skill
}
After actuating the skill you check to see if you gained skill and then go to RoT wait. If you are doing something difficult enough to gain skill in RoT on Siege, you gain every time.
If Siege in #Shard && #skill >= 700
{
chooseskill *SKILLYOUARETRAINING* real
If %CurrentSkill < #Skill
{
Gosub RoT_Timer *SKILLYOUARETRAINING* Y
}
And here is the ROT wait sub:
Sub RoT_Timer ; Sets the RoT timer
If %2 = Y || %2 = N/A
Set %Hide Yes
Else
Set %Hide No
Chooseskill %1 Real
If #Skill < 700
Set %ROTSkillTimer #SCNT + 2
If #Skill >= 700 && #Skill < 800 ; 5 Minute Interval
Set %ROTSkillTimer #SCNT + 300
If #Skill >= 800 && #Skill < 900 ; 8 Minute Interval
Set %ROTSkillTimer #SCNT + 480
If #Skill >= 900 && #Skill < 1000 ; 12 Minute Interval
Set %ROTSkillTimer #SCNT + 720
If #Skill >= 1000 && #Skill <= 1200 ; 15 Minute Interval
Set %ROTSkillTimer #SCNT + 900
Repeat
{
If %ROTSkillTimer - #SCNT > 120
{
If H notin #CharStatus && %Hide = Yes
Event Macro 13 21 ; Hide
Set #LobjectID #BackpackID
Event Macro 17 0
Wait 2400
}
Wait 50
}
Until #SCNT >= %ROTSkillTimer
Return