my script :
player use lever, if he have storage value (cid, 69999, 1) say sorry not posible.
and if he have (cid, 69999, -1) and(cid,65049, -1) and execute
doPlayerAddItem(cid,8300,1)
doPlayerSendTextMessage(cid, 25, "Kill 1000 dragons.")
setPlayerStorageValue(cid,65049,0)
setPlayerStorageValue(cid,69999,1)
i need a script iffunction onUse (cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,65049) == -1 then
if getPlayerStorageValue(cid,69999) == -1 then
doPlayerAddItem(cid,8300,1)
doPlayerSendTextMessage(cid, 25, "Kill 1000 dragons.")
setPlayerStorageValue(cid,65049,0)
setPlayerStorageValue(cid,69999,1)
elseif getPlayerStorageValue(cid,65049) >= 999 then
doPlayerSendTextMessage(cid,25,"Congratulations")
setPlayerStorageValue(cid,65049,-1)
setPlayerStorageValue(cid,69999,-1)
doTeleportThing(cid, {x=32235,y=31902,z=7})
end
return true
end
end
player use lever, if he have storage value (cid, 69999, 1) say sorry not posible.
and if he have (cid, 69999, -1) and(cid,65049, -1) and execute
doPlayerAddItem(cid,8300,1)
doPlayerSendTextMessage(cid, 25, "Kill 1000 dragons.")
setPlayerStorageValue(cid,65049,0)
setPlayerStorageValue(cid,69999,1)