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

MoveEvent Jump over gaps

Summ

(\/)(;,,;)(\/) Y not?
Staff member
Global Moderator
Joined
Oct 15, 2008
Messages
4,152
Solutions
12
Reaction score
1,107
Location
Germany :O
Hello Guys.

•¤•Description:•¤•
With this scripts you can make players just over special gaps in mountains.
Only if the player uses speed editing items or utani gran hur.
Script like : Troll Sabotage Quest/Spoiler - TibiaWiki - Quests, Items, Spells, and more

•¤•The Code:•¤•

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local actionid = {first=110,second=111}
	if isPlayer(cid) == TRUE then
		local constants = {getPlayerLevel(cid),getCreatureSpeed(cid)} -- don't change (actually no constants lol xD)
		local config = {from={x=1035,y=1042,z=8,id=actionid.first},to={x=1035,y=1046,z=8,id=actionid.second}} --enter the position where to jump(to) and back(from)
		local formula = 220+(2*(tonumber(constants[1])-1)) --don't change
		if formula < constants[2] then
			if (config.from.x == config.to.x or config.from.y == config.to.y) and config.from.z == config.to.z then
				if item.actionid == config.from.id then
					doTeleportThing(cid,config.to)
				else
					doTeleportThing(cid,config.from)					
				end
				doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You jumped over the gap.")
				doSendMagicEffect({x=config.from.x, y=config.from.y, z=config.from.z}, CONST_ME_POFF)
				if config.from.x == config.to.x then
					for a = config.from.x,config.to.x do
						for b = config.from.y+1,config.to.y-1 do
							doSendMagicEffect({x=a,y=b,z=config.to.z}, CONST_ME_POFF)
						end
					end
				else
					for a = config.from.x+1,config.to.x-1 do
						for b = config.from.y,config.to.y do
							doSendMagicEffect({x=a,y=b,z=config.to.z}, CONST_ME_POFF)
						end
					end
				end
			else
				doPlayerSay(cid,"Something is wrong with the positions.They must be on the same floor and the need to be on 1 line.",1)
			end
		else
			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You didn't dare to jump.")
			doTeleportThing(cid, fromPosition, false)
			doSendMagicEffect(fromPosition, CONST_ME_POFF)
		end
	end
	return true
end

•¤•Setting up:•¤•
33abhfl.jpg


The picture shows how the gap must be organized. The point you want to jump from may not be diagonal to the other point.

Place a item 460 ([red sqaures]) next to the two positions yellow and blue squares. The item 460 which is more north or more west in the map you add the actionid which you set in "actionid.first" and the item 460 which is more south or more east you add the actionid which you set to "actionid.second".

•¤•Example:•¤•
Code:
[/SIZE]
local actionid = {first=110,second=111}

So you need to add actionid 110 to the grey-circled one and actionid 111 to the green-circled one.

•¤•Configuration:•¤•

local config = {from={x=1035,y=1042,z=8,id=actionid.first},to=x=1035,y=1046,z=8,id=actionid.second}}

The position next to "actionid.first", you set in "config.from" and the position next to the item, which you added "actionid.second" to, you set as "config.to".

•¤•Look(Effect):•¤•
quest2hf7.png

Effects look similar to this.
Effects appear automatically if everything is set up right.

•¤•Modifications:•¤•
If you don't want it to be necessary to the player to have speed up items or spells use this part:

Replace:
Code:
if formula < constants[2] then
with:
Code:
if formula < (formula+1) then

Of course this is not the best way to solve this problem, you could just leave this condition out, but for beginners it's easier this way.

•¤•Credits:•¤•
~Me
~Real Tibia as always xD
~TibiaWiki - Quests, Items, Spells, and more regarding the picture of the jump

•¤•Rep+ if you like it or use it.•¤•
 
Last edited:
@frankfarmer
Ye, I would agree to you if Balanar wasn't me.. But I am Balanar.
If you don't trust me go to the post of Balanar at ot*ans and read the last line of the code there.
It will be:
Code:
end --RhuX
to prove that I am him.
 
movement

movement type please?

PHP:
<movevent type="StepIn" actionid="110" event="script" value="troll_sabotage.lua"/>
<movevent type="StepIn" actionid="111" event="script" value="troll_sabotage.lua"/>

give error in console[error - movemeents::executestep] call stack overlow

Debug Why?please reply

using tfs 0.3.6
 
Last edited:
It doesn't look like in this pic! It look's like this:

firsty.png


To make it look like :
secondk.png


you need to add

Code:
doSendMagicEffect({x=config.from.x,y=config.from.y,z=config.from.z,},2)

after :
Code:
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You jumped over the gap.")
 
Last edited:
Just checked my old posts :D
Thanks for small tweak.
 
you can also place invicible ground and make it teleport you anywhere + onStep function that shows puffs anywhere you want. Simpler, faster and you don't need to run into it.
 
As you may notice there is invisible ground, also it is like 2 years old and certainly I was kind of begginer at that time.
 
even if its an old script that can be updated its still cool. I know its not a hard script but this is the first time iv seen it coded for an OT
 
It is even cool if it is not updated ;>
 
Hello Guys.

•¤•Description:•¤•
With this scripts you can make players just over special gaps in mountains.
Only if the player uses speed editing items or utani gran hur.
Script like : Troll Sabotage Quest/Spoiler - TibiaWiki - Quests, Items, Spells, and more

•¤•The Code:•¤•

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local actionid = {first=110,second=111}
    if isPlayer(cid) == TRUE then
        local constants = {getPlayerLevel(cid),getCreatureSpeed(cid)} -- don't change (actually no constants lol xD)
        local config = {from={x=1035,y=1042,z=8,id=actionid.first},to={x=1035,y=1046,z=8,id=actionid.second}} --enter the position where to jump(to) and back(from)
        local formula = 220+(2*(tonumber(constants[1])-1)) --don't change
        if formula < constants[2] then
            if (config.from.x == config.to.x or config.from.y == config.to.y) and config.from.z == config.to.z then
                if item.actionid == config.from.id then
                    doTeleportThing(cid,config.to)
                else
                    doTeleportThing(cid,config.from)                   
                end
                doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You jumped over the gap.")
                doSendMagicEffect({x=config.from.x, y=config.from.y, z=config.from.z}, CONST_ME_POFF)
                if config.from.x == config.to.x then
                    for a = config.from.x,config.to.x do
                        for b = config.from.y+1,config.to.y-1 do
                            doSendMagicEffect({x=a,y=b,z=config.to.z}, CONST_ME_POFF)
                        end
                    end
                else
                    for a = config.from.x+1,config.to.x-1 do
                        for b = config.from.y,config.to.y do
                            doSendMagicEffect({x=a,y=b,z=config.to.z}, CONST_ME_POFF)
                        end
                    end
                end
            else
                doPlayerSay(cid,"Something is wrong with the positions.They must be on the same floor and the need to be on 1 line.",1)
            end
        else
            doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You didn't dare to jump.")
            doTeleportThing(cid, fromPosition, false)
            doSendMagicEffect(fromPosition, CONST_ME_POFF)
        end
    end
    return true
end

•¤•Setting up:•¤•
33abhfl.jpg


The picture shows how the gap must be organized. The point you want to jump from may not be diagonal to the other point.

Place a item 460 ([red sqaures]) next to the two positions yellow and blue squares. The item 460 which is more north or more west in the map you add the actionid which you set in "actionid.first" and the item 460 which is more south or more east you add the actionid which you set to "actionid.second".

•¤•Example:•¤•
Code:
[/SIZE]
local actionid = {first=110,second=111}

So you need to add actionid 110 to the grey-circled one and actionid 111 to the green-circled one.

•¤•Configuration:•¤•

local config = {from={x=1035,y=1042,z=8,id=actionid.first},to=x=1035,y=1046,z=8,id=actionid.second}}

The position next to "actionid.first", you set in "config.from" and the position next to the item, which you added "actionid.second" to, you set as "config.to".

•¤•Look(Effect):•¤•
quest2hf7.png

Effects look similar to this.
Effects appear automatically if everything is set up right.

•¤•Modifications:•¤•
If you don't want it to be necessary to the player to have speed up items or spells use this part:

Replace:
Code:
if formula < constants[2] then
with:
Code:
if formula < (formula+1) then

Of course this is not the best way to solve this problem, you could just leave this condition out, but for beginners it's easier this way.

•¤•Credits:•¤•
~Me
~Real Tibia as always xD
~TibiaWiki - Quests, Items, Spells, and more regarding the picture of the jump

•¤•Rep+ if you like it or use it.•¤•

Awesome script!
Please can you upgrade it to 1.x tfs?
 
Back
Top