warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I have this rope system made by Zothion...
It's just like old tibia... You can not use rope if some player trash the hole, with gps,worms,potions...
I love it to PvP but it beeing sick to normal playing
I have to add 2 execeptions:
1- If player is in the hole can get up, on this system if i'm on the hole i can not use rope in myserlf, i need to get out to use
2- Add a list of items that rope can ignore de get up, i'll add some grass border, stones, so i can get my maps beatifull with this system running
For example if i bleed on hole
11:21 You see a pool of blood.
ItemID: [2018].
DecayTo: [0].
I can not get up, i need to change this stuffs...
Anybody know how to do it? or one of it?
It's just like old tibia... You can not use rope if some player trash the hole, with gps,worms,potions...
I love it to PvP but it beeing sick to normal playing
I have to add 2 execeptions:
1- If player is in the hole can get up, on this system if i'm on the hole i can not use rope in myserlf, i need to get out to use
2- Add a list of items that rope can ignore de get up, i'll add some grass border, stones, so i can get my maps beatifull with this system running
For example if i bleed on hole
11:21 You see a pool of blood.
ItemID: [2018].
DecayTo: [0].
I can not get up, i need to change this stuffs...
Anybody know how to do it? or one of it?
Code:
-- Rope Like was on 7x tibia version (credits: https://otland.net/members/zothion.201437/)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(toPosition.x == CONTAINER_POSITION) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end
local tmp = getTileThingByPos({x = toPosition.x, y = toPosition.y, z = toPosition.z, stackpos = 1})
if tmp and tmp.itemid ~= 0 and tmp.uid < 125000 or isPlayer(tmp.uid) then
return false
end
toPosition.stackpos = STACKPOS_GROUND
local itemGround = getThingFromPos(toPosition)
if(isInArray(SPOTS, itemGround.itemid)) then
doTeleportThing(cid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z - 1}, false)
return true
elseif(isInArray(ROPABLE, itemEx.itemid)) then
local hole = getThingFromPos({x = toPosition.x, y = toPosition.y, z = toPosition.z + 1, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE})
if(hole.itemid > 0) then
doTeleportThing(hole.uid, {x = toPosition.x, y = toPosition.y + 1, z = toPosition.z}, false)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
return true
end
return false
end