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

Lloyd teleport not working.

dashe

New Member
Joined
Jul 14, 2010
Messages
8
Reaction score
1
[C]: in function 'getExhaustion'
...scripts/quests/forgotten knowledge/servants teleport.lua:6: in function <...scripts/quests/forgotten knowledge/servants teleport.lua:1>


what is wrong?

if player:getExhaustion(Storage.ForgottenKnowledge.LloydTimer) > 0 then
player:teleportTo(Position(32815, 32872, 13))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
position:sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait to challenge this enemy again!")
return true
end


anyone can help me?
 
Add this at the end of your global.lua
Lua:
function Player.setExhaustion(self, value, time)
    self:setStorageValue(value, time + os.time())
end

function Player.getExhaustion(self, value)
    local storage = self:getStorageValue(value)
    if not storage or storage <= os.time() then
        return 0
    end
    return storage - os.time()
end

function Player:hasExhaustion(value)
    return self:getExhaustion(value) >= os.time() and true or false
end
and get sure Storage.ForgottenKnowledge.LloydTimer exist in your Storages file
 
Back
Top