guiismiti
Well-Known Member
- Joined
- May 19, 2014
- Messages
- 315
- Solutions
- 3
- Reaction score
- 68
Hello,
I have a weird issue...
My code randomly works.
I have a creaturescript to remove raid bosses, so they won't duplicate
It is registered like this
In the monster file, I added this to the monsters that should be removed after some time
And here is the script.
So, sometimes it works, sometimes it doesn't (more often, it does).
Any ideas?
Can I change the type in creatures.xml? I'm using "think" because I don't know if I can use "spawn" or something like that.
I have a weird issue...
My code randomly works.
I have a creaturescript to remove raid bosses, so they won't duplicate
It is registered like this
Code:
<event type="think" name="RemoveBoss" script="others/removeboss.lua"/>
Code:
<script>
<event name="RemoveBoss" />
</script>
Code:
seconds = 3600
function onThink(cid)
addEvent(killboss,1000*seconds, {cid=cid})
return true
end
function killboss(cid)
local cid = cid.cid
if isCreature(cid) then
doRemoveCreature(cid)
end
return true
end
Any ideas?
Can I change the type in creatures.xml? I'm using "think" because I don't know if I can use "spawn" or something like that.