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
And when it ends
Help-me eace:
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 eace: