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

Lua A newbie script

Wezza

lua nOOb
Joined
May 31, 2008
Messages
2,278
Reaction score
31
There's a place on my ot where it can be blocked by haters, this place where players can get their runes from, I want a script that automatically make players enter inside each others on these two tiles, help appreciated.



Here's a pic. (The two dark tiles) is where I want players can go through each others. (Even if it can be done as creature script, STEPIN, auto move.) I can accept it rather way, but I prefer going inside each others way.


edit; forgot to add photo.
zwkx39.jpg


help appreciated.
 
you could use a script like this. Step in and teleport to place.



just make a Teleport in and a Teleport out where my arrows point and the other 2 blocks are where you will end up after stepping on the block.


1679kp.jpg


PHP:
<movevent event="StepIn" uniqueid="41010" script="BlueSquare.lua" /> 
  <movevent event="StepIn" uniqueid="41011" script="RedSquare.lua" />

PHP:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and getPlayerLevel(cid) >= 1 then
		doTeleportThing(cid, {x=32791, y=32327, z=10})
		doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
		doSendMagicEffect({x=32791, y=32327, z=10}, CONST_ME_MAGIC_BLUE)
	end
end
 
Back
Top