Notes - this code assumes that you are also updating a Skill Gained display menu, if not you do not need to use the Whole2Dec sub and can comment out the menu lines in the Skillcheck sub. I left them there for reference.
RoT Timer not fully tested.
;####################
;SUB XIIxSkillCheck
;####################
; Checks skill, updates menu, and engages RoT Timer if applicable
; %1 Required = Skill to check
; %2 Required = Skill last time visited sub, used to determine if RoT (!LastSkill)
; %3 Required = #TRUE/#FALSE to update menu
; %4 Required if %3 is #TRUE = Starting skill level, used to update Menu (!StartSkill)
; Returns Skill Level
sub XIIxSkillCheck
Namespace Push
NameSpace Local nsXIIxSkillCheck
set !SkillName %1
set !LastSkill %2
set !ToMenu %3
set !StartSkill %4
set !RoTShards Siege_Perilous_Mugen_
chooseskill !SkillName
set !CurrentSkill #skill
if !ToMenu = #TRUE
{
set !GainedSkill !CurrentSkill - !StartSkill
gosub XIIxWhole2Dec !CurrentSkill
Menu set M_Skill_Current #RESULT
gosub XIIxWhole2Dec !GainedSkill
Menu set M_Skill_Gained #RESULT
}
if #Shard in !RoTShards && !CurrentSkill >= 700 && !CurrentSkill > !LastSkill
gosub XIIxRoTimer !CurrentSkill
set #RESULT !CurrentSkill
namespace clear
namespace Pop
return #RESULT
;####################
;SUB XIIxRoTimer
;####################
; %1 Skill Level
Sub XIIxRoTimer
Namespace Push
Namespace Local nsXIIxRoTimer
set !Skill %1
If !Skill > 699 && !Skill < 800
Set !Timer #SCNT + 300
If !Skill > 799 && !Skill < 900
Set !Timer #SCNT + 480
If !Skill > 899 && !Skill < 1000
Set !Timer #SCNT + 720
If !Skill > 999 && !Skill < 1200
Set !Timer #SCNT + 900
Repeat
wait 1220
Set #LobjectID #BackpackID
Event Macro 17 0
Until #SCNT >= !Timer
Namespace Pop
Return
;#######################
;SUB XIIxWhole2Dec
;#######################
; %1 Whole number value to convert to Decimal form
; Returns Decimal value
sub XIIxWhole2Dec
Namespace Push
Namespace Local nsXIIxWhole2Dec
set !Int %1 / 10
set !Dec %1 % 10
set #RESULT !Int , #dot , !Dec
Namespace Pop
return #RESULT