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

Player teleported in front of every second

icaro1988

New Member
Joined
Jul 1, 2009
Messages
63
Reaction score
1
I need a function that enables the player it will be teleported automatically every second for one tile forward.


I really need it, give REP + +
 
Every single tile?
If you just want it for a quest or something, use doMoveCreature, I cant make it now though
 
Every single tile?
If you just want it for a quest or something, use doMoveCreature, I cant make it now though

It's almost that santigggg,
I really want is the following,
I did a system of boat, where a boat moves alone and makes a defined route.

I wanted the player to activate this script from the boat, the same player was up and so the boat was moving under the boat to get to your destination!

I already got the part of the boat ready, just can not put the player teleporting to go along with the boat!

If you can help me would be grateful!
 
Uhm, as a onUse function you can try this
Assuming boats move north
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
while isInArray({0,1,2,3},getCreatureLookDirection(cid)) do
      doMoveCreature(cid,0)
end
return true
end

But it wont stop moving creature, and I dont know how to make it stop, unless when it reaches a position it stops (I think i can make that with storages)
 
Last edited:
Lua:
local list = {1,2,0,3,1,2,3,2,1,3,3,3,3,3}
local delay = 1000 -- 1 second

function onUse(cid, item, fromPosition, itemEx, toPosition)
	for i = 1, #list do
		addEvent(doMoveCreature, (i-1)*delay, cid, list[i]
	end

return true
end

list is a list of directions. For example the boat just moves north 5 times -> {0,0,0,0,0}

Make sure player can't logout or you need an other function
 
Thanks for the help, I will now try and come back with the answer,
back in minutes!

Edited :
Fine, Fine, Fine, was exactly what I wanted the player to move from here I add in my script and I make my way, thanks for the help. REP + +, for everyone who helped me.

And again, thank you!
 
Last edited:
Back
Top