sick
Member
I got this script: when you walk on tile it summons monster, but how to make it so the tile would have delay for summoning again,
Lets say i step on it and monsters are spawned, if i step again it doesn't summon them, but after 1min it works again.
Lets say i step on it and monsters are spawned, if i step again it doesn't summon them, but after 1min it works again.
Code:
local config = {
tile = 354,
uniqueid= 1663,
monster = "Vampire",
spawn = {
{ x = 830, y = 901, z = 7, stackpos = 1 },
{ x = 828, y = 899, z = 7, stackpos = 1 },
{ x = 828, y = 902, z = 7, stackpos = 1 },
{ x = 832, y = 899, z = 7, stackpos = 1 }
}
}
function onStepIn(cid, item, frompos, item2, topos)
if item.uid == config.uniqueid and item.itemid == config.tile then
for i = 1, table.maxn(config.spawn) do
doSummonCreature(config.monster, config.spawn[i])
end
else
doPlayerSendCancel(cid, "Grrrr.")
end
return TRUE
end