MorganaSacani
Active Member
- Joined
- Sep 20, 2022
- Messages
- 87
- Solutions
- 1
- Reaction score
- 32
Do you remember when people could use the rope to pull other people as well as objects?
Or better yet. Do you remember when people could use rope to pull monsters?
This is a script I made based on Tibia's old rope system.
Or better yet. Do you remember when people could use rope to pull monsters?
This is a script I made based on Tibia's old rope system.
Lua:
local holeId = { 294, 369, 386, 370, 385, 394, 411, 412, 413, 432, 433, 435, 8709, 594, 595, 615, 609, 610, 615, 1156,
482, 483,
868, 874, 4824, 7768, 433, 432, 413, 7767, 411, 370, 369, 7737, 7755, 7768, 7767, 7515, 7516, 7517, 7518, 7519, 7520,
7521, 7522, 7762, 8144, 8690, 8709, 12203, 12961, 17239, 19220, 23364 }
local ropeSpots = { 386, 421, 386, 7762, 12202, 12936, 14238, 17238, 23363, 21965, 21966, 21967, 21968 }
local specialRopeSpots = { 12935 }
local rope = Action()
function rope.onUse(player, item, fromPosition, target, toPosition, isHotkey)
newPos = { x = toPosition.x, y = toPosition.y, z = toPosition.z, stackpos = 0 }
target = getThingfromPos(newPos)
blockingItem = getThingfromPos({ x = toPosition.x, y = toPosition.y, z = toPosition.z,
stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
if ((isInArray(ropeSpots, target.itemid)) or (isInArray(specialRopeSpots, target.itemid))) then
newPos.y = newPos.y + 1
newPos.z = newPos.z - 1
if ((blockingItem.itemid > 0) or (isCreature(target.uid) == true)) then
player:sendTextMessage(MESSAGE_FAILURE, "Sorry, not possible.")
else
player:teleportTo(newPos)
end
elseif isInArray(holeId, target.itemid) then
newPos.y = newPos.y + 1
downPos = { x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = 255 }
downItem = getThingfromPos(downPos)
if (downItem.itemid > 0) then
doTeleportThing(downItem.uid, newPos)
else
player:sendTextMessage(MESSAGE_FAILURE, "Sorry, not possible.")
end
end
return true
end
rope:id(3003, 646)
rope:register()