Blysco
New Member
- Joined
- Oct 12, 2013
- Messages
- 163
- Reaction score
- 2
Server runs on The Forgotten Server 0.3.7 SVN Crying Damson.
I have no Errors in my Console but when i try to use the Lever it wont work.
Please help me i dont know where the Problem is.
http://imageshack.us/photo/my-images/33/m04b.png/
I have no Errors in my Console but when i try to use the Lever it wont work.
Please help me i dont know where the Problem is.
http://imageshack.us/photo/my-images/33/m04b.png/
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 = 541, y = 827, z = 7}
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
Last edited: