Hello, how to convert this script to:
Monster disappeared automatically after leaving the arena? so that another person can enter
np :
local nazwyPotworow = {"Pirate Corsair"} -- Nazwy potworów, jakie skrypt może robić
local exh = 2 -- Ile sekund exhaused
local storage = 10016
function onUse(cid, item, frompos, item2, topos)
local monster = nazwyPotworow[math.random(1,#nazwyPotworow)]
if(getPlayerStorageValue(cid,storage) <= os.time()) then
local summon = doSummonCreature(monster,getPlayerPosition(cid))
doChallengeCreature(cid, summon)
doChallengeCreature(summon, cid)
setPlayerStorageValue(cid,storage,os.time()+exh)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Czeka cie walka z ".. monster .."!")
else
doPlayerSendCancel(cid,"You are exhausted.")
end
return TRUE
end
Monster disappeared automatically after leaving the arena? so that another person can enter
np :
local nazwyPotworow = {"Pirate Corsair"} -- Nazwy potworów, jakie skrypt może robić
local exh = 2 -- Ile sekund exhaused
local storage = 10016
function onUse(cid, item, frompos, item2, topos)
local monster = nazwyPotworow[math.random(1,#nazwyPotworow)]
if(getPlayerStorageValue(cid,storage) <= os.time()) then
local summon = doSummonCreature(monster,getPlayerPosition(cid))
doChallengeCreature(cid, summon)
doChallengeCreature(summon, cid)
setPlayerStorageValue(cid,storage,os.time()+exh)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Czeka cie walka z ".. monster .."!")
else
doPlayerSendCancel(cid,"You are exhausted.")
end
return TRUE
end