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

Avesta Rope.Lua

Veterana

Oldschool Player
Joined
May 4, 2010
Messages
194
Reaction score
7
I am using this rope.lua for my avesta server, but it doesnt allow players to attack monsters or other players when they are standing on the rope spot.

The players can only attack monsters/players standing on the rope spot if they use the Battle window.

Anyone know how to fix this?




Here is the rope.lua:

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
 
Back
Top