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

Need exchaust

V0rTeX

New Member
Joined
Feb 7, 2018
Messages
31
Reaction score
2
Hi i have 2 scripts
i need exhaust and effect on character can you help me ?
tibia 8.54

60minut exhaust+ effect 32:

Lua:
 local scroll = 11585
local temple = {x=1022, y=1023, z=7}
local level = 200

function onUse(cid, item, frompos, item2, topos)
   if getPlayerSkill(cid,0) >= 70 then
   if item.itemid == scroll and getPlayerLevel(cid) >= level then
       doTeleportThing(cid, temple, TRUE)
       doSendMagicEffect(temple,10)
       doSendAnimatedText(temple, "Temple!", 12)
      return 0
end
   else
       doPlayerSendCancel(cid, "Sorry, you need 200lvl and 70 Strength")
   end

return 1
end

5 second exhaust+ effect 32:
Lua:
function onUse(cid, item, frompos, item2, topos)
if getPlayerSkill(cid,0) >= 70 then
if item.uid == 11111 then
local tekst = "You are teleported."
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , tekst)
pos = {x=1655, y=877, z=7}
doTeleportThing(cid, pos)
else
return 0
end
else
doPlayerSendTextMessage(cid, 22, "Your strength is too low! (70)")
end
return 1
end
 
Last edited:
Solution
S
Lua:
 local scroll = 11585
local temple = {x=1022, y=1023, z=7}
local level = 200
function onUse(cid, item, frompos, item2, topos)
    local storage = 54073 -- Make sure to select non-used storage.
    local cooldown = 3600 -- in seconds.
    if getPlayerStorageValue(cid, storage) <= os.time() then
        setPlayerStorageValue(cid, storage, os.time() + cooldown)
   if getPlayerSkill(cid,0) >= 70 then
   if item.itemid == scroll and getPlayerLevel(cid) >= level then
       doTeleportThing(cid, temple, TRUE)
       doSendMagicEffect(temple,10)
       doSendAnimatedText(temple, "Temple!", 12)
      return 0
end
   else
       doPlayerSendCancel(cid, "Sorry, you need 200lvl and 70 Strength")
   end
         else
    doPlayerSendCancel(cid...
First :
Lua:
 local scroll = 11585
local temple = {x=1022, y=1023, z=7}
local level = 200
function onUse(cid, item, frompos, item2, topos)
    local storage = 54073 -- Make sure to select non-used storage.
    local cooldown = 3600 -- in seconds.

    if getPlayerStorageValue(cid, storage) <= os.time() then
        setplayerStorageValue(cid, storage, os.time() + cooldown)
   if getPlayerSkill(cid,0) >= 70 then
   if item.itemid == scroll and getPlayerLevel(cid) >= level then
       doTeleportThing(cid, temple, TRUE)
       doSendMagicEffect(temple,10)
       doSendAnimatedText(temple, "Temple!", 12)
      return 0
end
   else
       doPlayerSendCancel(cid, "Sorry, you need 200lvl and 70 Strength")
   end
         else
    doPlayerSendCancel(cid, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. getPlayerStorageValue(cid, storage) - os.time())
       doSendMagicEffect(32)
       end  
return 1
end

Second :
Lua:
function onUse(cid, item, frompos, item2, topos
local storage = 54074 -- Make sure to select non-used storage.
local cooldown = 3600 -- in seconds.

if getPlayerStorageValue(cid, storage) <= os.time() then
setplayerStorageValue(cid, storage, os.time() + cooldown)
if getPlayerSkill(cid,0) >= 70 then
if item.uid == 11111 then
local tekst = "You are teleported."
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , tekst)
pos = {x=1655, y=877, z=7}
doTeleportThing(cid, pos)
else
return 0
end
else
doPlayerSendTextMessage(cid, 22, "Your strength is too low! (70)")
end
else
doPlayerSendCancel(cid, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. getPlayerStorageValue(cid, storage) - os.time())
doSendMagicEffect(32)
end  
return 1
end
 
@Shadow_

First error:
Code:
[02/08/2018 11:23:55] [Error - Action Interface] 
[02/08/2018 11:23:55] data/actions/scripts/kinto.lua:onUse
[02/08/2018 11:23:55] Description: 
[02/08/2018 11:23:55] data/actions/scripts/kinto.lua:9: attempt to call global 'setplayerStorageValue' (a nil value)
[02/08/2018 11:23:55] stack traceback:
[02/08/2018 11:23:55]     data/actions/scripts/kinto.lua:9: in function <data/actions/scripts/kinto.lua:4>

Second error:
Code:
[02/08/2018 11:25:52] [Error - LuaScriptInterface::loadFile] data/actions/scripts/mountainkrysztal.lua:2: ')' expected near 'local'
[02/08/2018 11:25:52] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/mountainkrysztal.lua)
[02/08/2018 11:25:52] data/actions/scripts/mountainkrysztal.lua:2: ')' expected near 'local'
 
Lua:
 local scroll = 11585
local temple = {x=1022, y=1023, z=7}
local level = 200
function onUse(cid, item, frompos, item2, topos)
    local storage = 54073 -- Make sure to select non-used storage.
    local cooldown = 3600 -- in seconds.
    if getPlayerStorageValue(cid, storage) <= os.time() then
        setPlayerStorageValue(cid, storage, os.time() + cooldown)
   if getPlayerSkill(cid,0) >= 70 then
   if item.itemid == scroll and getPlayerLevel(cid) >= level then
       doTeleportThing(cid, temple, TRUE)
       doSendMagicEffect(temple,10)
       doSendAnimatedText(temple, "Temple!", 12)
      return 0
end
   else
       doPlayerSendCancel(cid, "Sorry, you need 200lvl and 70 Strength")
   end
         else
    doPlayerSendCancel(cid, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. getPlayerStorageValue(cid, storage) - os.time())
       doSendMagicEffect(32)
       end 
return 1
end

Lua:
function onUse(cid, item, frompos, item2, topos)
local storage = 54074 -- Make sure to select non-used storage.
local cooldown = 3600 -- in seconds.
if getPlayerStorageValue(cid, storage) <= os.time() then
setplayerStorageValue(cid, storage, os.time() + cooldown)
if getPlayerSkill(cid,0) >= 70 then
if item.uid == 11111 then
local tekst = "You are teleported."
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE , tekst)
pos = {x=1655, y=877, z=7}
doTeleportThing(cid, pos)
else
return 0
end
else
doPlayerSendTextMessage(cid, 22, "Your strength is too low! (70)")
end
else
doPlayerSendCancel(cid, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. getPlayerStorageValue(cid, storage) - os.time())
doSendMagicEffect(32)
end 
return 1
end

typo lol xD
 
Solution

Similar threads

Back
Top