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

End Storage

ka9

New Member
Joined
Jul 25, 2009
Messages
32
Reaction score
0
Hi, I made a script that when a guild kills a monster, the monster just add a storage for 7 days.

Ae made a script that when these ends 7 days teleportaa guild for the temple, more so going ta a player, the rest of the guild is in normal position without storage.

Here Is

to add a storage
local gid = getGuildId(topGuild)
setGlobalStorageValue(11557, gid)
setGlobalStorageValue(11559, os.time() + 1*60)

And when it ends

function onLogin(cid)
local guild = getGuildId(topGuild)
if(getGlobalStorageValue(cid, 11559) >= 1) then
if getGlobalStorageValue(cid, 11559) >= os.time() then
db.executeQuery("UPDATE `global_storage` SET `value` = ".. (getGlobalStorageValue(cid, 11559) - os.time()) / 86400 .." WHERE `key` = 11559 AND `key_id` = "..getPlayerGUID(cid)..";")

else
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getCreaturePosition(cid), 10)
setGlobalStorageValue(guild, 11559, -1)
setGlobalStorageValue(guild, 11557, -1)
end
doPlayerSave(cid)
end
registerCreatureEvent(cid, "WarTime")
return true
end

Help-me :peace:
 
Back
Top