justikar
Active Member
- Joined
- Oct 28, 2013
- Messages
- 149
- Reaction score
- 35
i have the following error, when i use rope on itself, or itens, objcts in bp..I saw some assunts related to rope. lua but not a solution.
im using avesta 7.6 0.6.3
data/actions/scripts/tools/rope.lua
nUse
Description:
(luaGetThingFromPos) Tile not found
im using avesta 7.6 0.6.3
data/actions/scripts/tools/rope.lua
Description:
(luaGetThingFromPos) Tile not found
Code:
function onUse(cid, item, frompos, item2, topos)
newPos = {x = topos.x, y = topos.y, z = topos.z, stackpos = 0}
groundItem = getThingfromPos(newPos)
if (isInArray(ROPE_SPOT, groundItem.itemid) == TRUE) then
newPos.y = newPos.y + 1
newPos.z = newPos.z - 1
doTeleportThing(cid, newPos)
elseif (isInArray(OPENED_HOLE, groundItem.itemid) == TRUE or isInArray(OPENED_TRAP, groundItem.itemid) == TRUE or isInArray(DOWN_LADDER, groundItem.itemid) == TRUE) then
newPos.y = newPos.y + 1
downPos = {x = topos.x, y = topos.y, z = topos.z + 1, stackpos = 255}
downItem = getThingfromPos(downPos)
if (downItem.itemid > 0) then
doTeleportThing(downItem.uid, newPos)
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end
else
return FALSE
end
return TRUE
end
Last edited: