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

Remove stair PVP tibia 0.4

zabuzo

Well-Known Member
Joined
Jun 10, 2016
Messages
238
Reaction score
54
Remove stair PVP tibia 0.4

I really love tibia PVP...
But there is only one thing i HATE and so much other people rates...

Stair PVP... A noob stay up and down stairs to dont die...
It is detestable...


I was thinking to how block it and get free to this plage.

That's my ideias:

1- to rope need use only upside rope hole
Like is on tibianic, like was on old tibia...
If have only one thing upside the rope hole, u cant get up...

2- When you move upside a stair like
latest

latest

latest


You lose 50% your speed or get a paralyze

How to do it guys? It's so good to all servers!



========================================

Thats my actions/scripts/tools/rope.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if(toPosition.x == CONTAINER_POSITION) then
     doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
     return true
   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

That's is my player.cpp
http://hastebin.com/dukisoyayi.cpp
 
Last edited:
Ty @Zothion
Ty so much!!!

If anyone want use rope like was on 7x on 0.4 sources
thats is the script:
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

Now just left the sources stair thing, you could create a new topic to be more clean
 

What i made worng?

Code:
<movevent type="StepIn" toid="1394;1390;1392;1388" event="script" value="antistairpvp.lua"/>

Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500)
setCombatCondition(combat, condition)

function onStepIn(cid, item, position, fromPosition)
   
end
 
What i made worng?

Code:
<movevent type="StepIn" toid="1394;1390;1392;1388" event="script" value="antistairpvp.lua"/>

Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500)
setCombatCondition(combat, condition)

function onStepIn(cid, item, position, fromPosition)
  
end

It's will work? There is a way to fix?
 
Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500)
setConditionFormula(condition, -0.5, 0, -0.5, 0)


function onStepIn(cid, item, position, fromPosition)
if not getCreatureCondition(cid, CONDITION_PARALYZE) then
doAddCondition(cid, condition)
end
end
try this
 
Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500)
setConditionFormula(condition, -0.5, 0, -0.5, 0)


function onStepIn(cid, item, position, fromPosition)
if not getCreatureCondition(cid, CONDITION_PARALYZE) then
doAddCondition(cid, condition)
end
end
try this

No errors / no work
 
try adding print(1) to the onstepin and check if it prints 1

No prints:

Code:
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 500)
setConditionFormula(condition, -0.5, 0, -0.5, 0)


function onStepIn(cid, item, position, fromPosition)
print(1)
if not getCreatureCondition(cid, CONDITION_PARALYZE) then
doAddCondition(cid, condition)
end
end

Code:
<movevent type="StepIn" toid="1394;1390;1392;1388" event="script" value="antistairpvp.lua"/>
 
Back
Top Bottom