pugamoline
uint32_t patch_mem(char *
- Joined
- Nov 15, 2011
- Messages
- 189
- Reaction score
- 19
hi otlanders i have this script, for Pythius the rotten quest (Firewalker Boots)
need help to create a function to remove teleport
this is my script
Rep++ For Help
need help to create a function to remove teleport
this is my script
Lua:
local last = 0
local delay = 60 * 60 * 3
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (itemEx.uid <= 65535 or itemEx.actionid > 0) and (not (itemEx.actionid == 3602)) and (itemEx.itemid == 1304 or itemEx.itemid == 354 or itemEx.itemid == 355 or itemEx.itemid == 9024 or itemEx.itemid == 9025) then
doTransformItem(itemEx.uid, 383)
doDecayItem(itemEx.uid)
elseif itemEx.uid == 60001 then
doTeleportThing(cid, {x=32551, y=31376, z=10})
doSendMagicEffect({x=32551, y=31376, z=10}, 10)
elseif (itemEx.actionid == 3602) then
if ((os.time() - last) >= delay) and getGlobalStorageValue(33503, 0) then
local teleport = doCreateTeleport(1387, {x=32564, y=31406, z=15, stackpos=1}, {x=32551, y=31376, z=15, stackpos=2})
doItemSetAttribute(teleport, "aid", 101)
setGlobalStorageValue(33503, 1)
last = os.time()
else
doPlayerSendTextMessage(cid, 25, "Once every 3 hours...")
end
elseif (itemEx.actionid == 3602) then
if ((os.time() - last) >= delay) and getGlobalStorageValue(33503, 1) then
local teleport = doCreateTeleport(1387, {x=32564, y=31406, z=15, stackpos=1}, {x=32551, y=31376, z=15, stackpos=2})
doItemSetAttribute(teleport, "aid", 101)
last = os.time()
else
doPlayerSendTextMessage(cid, 25, "Once every 3 hours...")
end
else
return false
end
return true
end
Rep++ For Help