• 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!

Globalstorage with addEvent problem

Tuchol

falania.com
Joined
Nov 21, 2008
Messages
387
Reaction score
13
Location
Uzbekistan
Hi,
I do not know if I wrote it right but it doesn't work... 0 errors in console can you help me?
Code:
 function onUse(cid, item, frompos, item2, topos)
if item.uid == 44423 and item.itemid == 8539 then
doSummonCreature("Bat", {x = 1459, y = 227, z = 7})
setGlobalStorageValue(200, 1)
addEvent(setGlobalStorageValue, 1 * 60 * 60 * 1000, 200, -1)
else
doPlayerSendTextMessage(cid, 22, "You must wait 10 minutes to next boss")
end
return TRUE
end
 
Code:
function onUse(cid, item, frompos, item2, topos)
  if item.uid == 44423 and item.itemid == 8539 then
    if getGlobalStorageValue(200) ~= 1 then
       doSummonCreature("Bat", {x = 1459, y = 227, z = 7})
       setGlobalStorageValue(200, 1)
       addEvent(setGlobalStorageValue, 600000, 200, -1)
    else
       doPlayerSendTextMessage(cid, 22, "You must wait 10 minutes to next boss")
    end
  end
  return TRUE
end
 
Back
Top