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

Lua Solo Anni correct script ?

Blysco

New Member
Joined
Oct 12, 2013
Messages
163
Reaction score
2
This is my Script but it wont work.
I get no Errors but i cannt use the Lever.

Code:
  local config = {
    daily = "no", -- allow only one enter per day? (like in global Tibia)
    level = 100,
    storage = 11014
}
config.daily = getBooleanFromString(config.daily)

local newPosition = {x = 32232, y = 32136, z = 15}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 1946) then
        if(config.daily) then
            doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
            return true
        end
     
        doTransformItem(item.uid, item.itemid - 1)
    end

    if(item.itemid ~= 1945) then
        return true
    end

    if getPlayerStorageValue(cid, config.storage) > 0 then
        doPlayerSendCancel(cid, "You already completed this quest.")
        return true
    end
 
    if getPlayerLevel(cid) < config.level then
        doPlayerSendCancel(cid, "Your level is too low.")
        return true
    end
 

    doSendMagicEffect(getThingPos(cid), 10)
    doTeleportThing(cid, newPosition, false)
    doSendMagicEffect(newPosition, 10)

    doTransformItem(item.uid, item.itemid + 1)
    return true
end
 
Back
Top