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

Set player speed to XXX when entering title with itemID X?

Flipparn

I like horses
Joined
Feb 19, 2008
Messages
89
Reaction score
21
I'm going to have a race event on my server, and I was wondering if it is possible to set someones speed to, say, 100 when entering, for example, itemID 231?

Example;
Player1 is level 250.
Player2 is level 175.
Player3 is level 20.
Player 1&2&3 walks on itemID 231 and they are now at the same speed as eachother.

It would also, obviously, have to reset their speed to normal on stepout.

Any ideas?
 
Sorry for reviving an old thread, but to avoid creating a new thread, i will use that.
I have the same problem that this guy.. and the search results only show me THIS thread..

If you dont want to do this script for me, please post the function to set velocity X and to return to original velocity, without bugs when player step on the tile with HASTE

Thanks, and sorry for my bad english :/
 
keep in mind on doing that :
Lua:
doChangeSpeed(cid, 12)  -- will add 12 more speed on his current speed

doChangeSpeed(cid , 12 - getCreatureSpeed(cid)  -- this will set player speed to 12
 
Code:
<movevent event="StepIn" itemid="415" script="speed.lua"/>
<movevent event="StepOut" itemid="415" script="speed.lua"/>

Lua:
function onStepIn(cid, item, position, fromPosition)
	doChangeSpeed(cid, 150)
end

function onStepOut(cid, item, position, fromPosition)
	doChangeSpeed(cid, -150)
end
 
Code:
<movevent event="StepIn" itemid="415" script="speed.lua"/>
<movevent event="StepOut" itemid="415" script="speed.lua"/>

Lua:
function onStepIn(cid, item, position, fromPosition)
	doChangeSpeed(cid, 150)
end

function onStepOut(cid, item, position, fromPosition)
	doChangeSpeed(cid, -150)
end

Nop try again that script will not work.
 
Back
Top