;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Trigset which counts sorcerer masteries ;; ;; You are supposed to wear you sorcerer ;; robes in 'robes 1' or 'robes 2', ;; if you have more robes, trig doesnt work ;; properly. ;; ;; USAGE: ;; Type: /sor_mastery ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Initial value for count /set sormode=5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Activates trigger /def -i sor_mastery = /set sorskills=0%;\ /set sorspells=0%;\ /set sorskillsall=0%;\ /set sorspellsall=0%;\ /set sormode=1%;\ /sor_mastery_count ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Actual counting /def -p99 -i -F -mregexp -t'^\| ([a-z ]+) \|([0-9 ]+)\|\| ([a-z ]+) \|([0-9 ]+)\|' sor_mastery0 = \ /set sorcount=$[{sorcount}+%P2]%;/set sorcount=$[{sorcount}+%P4] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Moves to next round /def -p99 -i -F -t'+----------------------------------+' sor_mastery1 = \ /set sormode=$[{sormode}+1]%;/sor_mastery_count ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Handles rounds /def -i sor_mastery_count = /if /test %sormode = 1%;/then \ /set sorcount=0%;\ !wear robes%;!wear robes 2%;!skills -gsorcerer%;/send%;/send%;\ /elseif /test %sormode = 2%;/then \ /set sorskillsall=%sorcount%;\ /set sorcount=0%;\ !remove robes%;!remove robes 2%;!skills -gsorcerer%;/send%;/send%;\ /elseif /test %sormode = 3%;/then \ /set sorskills=%sorcount%;\ /set sorcount=0%;\ !spells -gsorcerer%;/send%;/send%;\ /elseif /test %sormode = 4%;/then \ /set sorspells=%sorcount%;\ /set sorcount=0%;\ !wear robes%;!wear robes 2%;!spells -gsorcerer%;/send%;/send%;\ /elseif /test %sormode = 5%;/then \ /set sorspellsall=%sorcount%;\ /repeat -1 1 /sor_mastery_show%;\ /endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Shows your masteries /def -i sor_mastery_show = /echo Sorcerer spells: %sorspellsall - %sorspells = $[{sorspellsall}-{sorspells}] skills: %sorskillsall - %sorskills = $[{sorskillsall}-{sorskills}]