||| OmniSpawn
#Turbo 40
Sub Main
/echo ====================
/echo -- Initiating OmniSpawn --
/echo ====================
/declare cur int outer
/declare sc int outer
/declare i int outer
/declare t timer outer
/declare cz int outer
/declare spn int outer 1
/declare spid[2000] int outer 0
/declare spname[2000] string outer 0
/declare x int local
/declare y int local
/varset cz ${Zone.ID}
:MainLoop
/doevents
/if (${Zone.ID} != ${cz}) {
/echo >> Zoned
/call spReset
}
/echo >> Starting scan...
/varset t 240s
/varset sc ${SpawnCount[npc]}
/if (${sc} > 0) {
/for i 2 to ${sc}
/ini mobs.ini Data ${NearestSpawn[${i}, npc].ID} ${NearestSpawn[${i}, npc].CleanName}
/next i
/echo >> ${Math.Calc[${t.OriginalValue}-${t}]} ${sc} current mobs ${spn} total
}
/goto :MainLoop
/return
Sub spReset
/declare x int local
/echo >> Spawn information for Zone ID ${cz}
/for x 1 to ${spn}
/echo ${spid[${x}]} ${spname[${x}]}
/next x
/echo >> Resetting spawn information
/deletevar spid
/deletevar spname
/varset spn 1
/declare spid[2000] int outer 0
/declare spname[2000] string outer 0
/varset cz ${Zone.ID}
/return