• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

monster respawn with timer

Tarielle

New Member
Joined
Nov 4, 2007
Messages
214
Reaction score
0
Location
Sweden
Hi, I have this script that if you kill a monster it spawns another one (if you made something wrong) but I want it to spawn at the same spot, but as it reacts exactly whe nthe mosnter dies it still counts as there is a monster there, so I'd like a timer of like 1 second that starts when the monster dies and after that second the new monster spawns.

I give you some code if it would make the help easier:
Code:
if(isMonster(target) == TRUE) then 
if getCreatureName(target) == config.monstername then
local monsterpos = getCreaturePosition(target) 
if monsterpos.x == 5123 and monsterpos.y == 4933 and monsterpos.z == 15 then
if getGlobalStorageValue(1000) == 1 then
setGlobalStorageValue(1000, 2)
else
setGlobalStorageValue(1000, -1)

---------------------HEEEERE--------------------------

local monsterpos = {x=5123, y=4933, z=15, stackpos= STACKPOS_TOP_CREATURE} 
local getmonster = getThingfromPos(monsterpos) 
if getmonster.itemid > 0 then
else
doCreateMonster('NAME', {x=5123, y=4933, z=15})
end

--------------------- TO HEEEERE-----------------------


end
end
end
end

at the "here" to "to here" is where I'd like the timer

thanks in advance
 
Back
Top