How to add a line here that the lever will start only when the player has eg lvl 120 ??
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
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