Hey everyone! How's your day? =P
Something is driving me insane.
I currently have a problem with a very, very old script, that used to work just fine back in the days (or maybe I fooled myself all this time?!
)
Code:
[function rareSpawn]
if (0<var.rareSpawn.l1>)
try uid.<var.rareSpawn.l1>.remove
endif
if (0<var.rareSpawn.l1.uid>)
try uid.<var.rareSpawn.l1.uid>.remove
endif
newitem i_rareSpawn_l1
new.p 5448,1079
new.timer 1
[ITEMDEF i_rareSpawn_l1]
ID=01ed2
TYPE=t_eq_script
Name=Rare Spawn Level 1 Manager
ON=@CREATE
timer = 5
attr=08090
var.rareSpawn.l1.uid = <uid>
ON=@TIMER
if (0<var.rareSpawn.l1>)
try uid.<var.rareSpawn.l1>.remove
endif
dorand 5
tag.pos = 4171,3697
tag.pos = 4290,752
tag.pos = 3333,333,4
tag.pos = 1274,534,30
tag.pos = 1162,2906
enddo
dorand 3
tag.type = horse
tag.type = llama
tag.type = ostard
enddo
dorand 3
tag.race = frost
tag.race = earth
tag.race = fire
enddo
newitem i_worldgem_bit
var.rareSpawn.l1 = <new.uid>
new.p = <tag.pos>
new.type 34
new.amount 1
new.more c_<tag.race>_<tag.type>
new.morep 1440 1441 15
new.attr 00b0
new.timer 1
timer = 86400 // 24 HOURS
return 1
As you can see, it is a random spawner. It picks a POS, TYPE and RACE and spawns. After the timer in the manager, it removes the spawn and picks another POS, TYPE and RACE.
Problem is: Apparently, it is working, but it's not!
When I check locations, they have the same mount as the day before after the 24 hours have passed.
I then, check the manager with .tweak/.info and the time for the next spawn is exactly and always the 86400 (24 hours).
Alright, I go back to the locations and boom, a new POS/TYPE/RACE was picked...
But the weirdest thing is that if you test with lower times, it will work just fine, without me having to .info it!
Now I wonder, why is .info triggering it? Why does it work with low times and not with high times?
Thanks everyone for reading!