Lbtg
Intermediate OT User
- Joined
- Nov 22, 2008
- Messages
- 2,321
- Reaction score
- 136
Hello i added this
and in game after i try click thing to remove the wall it says "The statue appears to already be missing. " , but its not removed at all.. so the script aint working . can someone help ? i tryed changing stackpos but didint help
the ids are all set good i checked it like 100x times
Lua:
local cfg = {
ClickHere = 8669, -- Item you click.
GATE_ID = 8836, -- The gate item id.
ClickUID = 5074, -- Item you click, unique ID.
gateTime = 60, -- Minutes to leave gate open.
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local gatePosition = {x=2114, y=458, z=11, stackpos=1} -- Position of the gate.
local getGate = getThingFromPos(gatePosition)
if (item.itemid == cfg.ClickHere) and (getGate.itemid == cfg.GATE_ID) then
doRemoveItem(getGate.uid)
doSendMagicEffect(fromPosition, 6)
addEvent(doCreateItem, cfg.gateTime * 60 * 1000, cfg.GATE_ID, 1, gatePosition)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The statue appears to already be missing.")
end
return true
end
and in game after i try click thing to remove the wall it says "The statue appears to already be missing. " , but its not removed at all.. so the script aint working . can someone help ? i tryed changing stackpos but didint help
the ids are all set good i checked it like 100x times