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

MagicWallEntrance teleport

Daxu

Banned User
Joined
Jun 18, 2010
Messages
336
Reaction score
9
Location
Poland
hey i need script look

poias.jpg


function onStepIn(cid, item, pos)
local position = {x=412, y=1414, z=9}
local position2 = {x=398, y=1380, z=9}

if (getPlayerItemCount(cid, 1970) < 1) then
doTeleportThing(cid, position)
doSendMagicEffect(position,10)
else

doTeleportThing(cid, position2)
doSendMagicEffect(position2,10)
end
end
this is sucks script because i have holy tible in bp and teleport me i do not want this xD
only in ground

rep++
 
This scripts work fine.

XML:
<movement type="StepIn" actionid="xxxx" event="script" value="scriptname.lua" />

LUA:
function onStepIn(cid, item, pos)
	local position = {x=x, y=x, z=x}
	local position2 = {x=x, y=x, z=x}
	
		if (getPlayerItemCount(cid, 1970) < 1) then
			doTeleportThing(cid, position)
			doSendMagicEffect(position,10)
		else

			doTeleportThing(cid, position2)
						doSendMagicEffect(position2,10)
		end
end
 
is this for a quest?
anyways here:
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local position = {x=412, y=1414, z=9}
	if getPlayerStorageValue(cid, 34343) == -1 then
		--doPlayerSetStorageValue(cid, 34343, 1)
		doTeleportThing(cid, position)
		doSendMagicEffect(position,10)
	else
		doTeleportThing(cid, fromPosition, true)
		doPlayerSendCancel(cid, "You've been here already!"
	end
end
 
is this for a quest?
anyways here:
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local position = {x=412, y=1414, z=9}
	if getPlayerStorageValue(cid, 34343) == -1 then
		--doPlayerSetStorageValue(cid, 34343, 1)
		doTeleportThing(cid, position)
		doSendMagicEffect(position,10)
	else
		doTeleportThing(cid, fromPosition, true)
		doPlayerSendCancel(cid, "You've been here already!"
	end
end

lol weak!

Piltrafa this is the same :/
 
yes but this is teleport me when i have holy tible in backpack but i do not want this ! :PP
i want to work only on the ground
:):):):):)
 
yes but this is teleport me when i have holy tible in backpack but i do not want this ! :PP
i want to work only on the ground
:):):):):)
Do you want this to work like if you put the Tible on that tile you automatically teleport or that you put on the tile then you move to that tile and teleport?
 
ee u dont understand me !! xDD
i want: player have book in backpack and can not go but when put and stay on book may go ok ? :p
 
Yes, I test it and have book on backpack and can go intro teleport wall. Don't have to put book on floor.

He wants it so you HAVE to put the book on the floor to get tped.
LUA:
local position = {x=x, y=x, z=x}
local position2 = {x=x, y=x, z=x}
function onStepIn(cid, item, position, fromPosition)
if getThingfromPos(position).itemid == HOLY_TIBLE then ---- instead of holy_tible put itemid of the item
   doTeleportThing(cid, position2)
   doSendMagicEffect(position, 10)
else
    doTeleportThing(cid, fromPosition)
end
return true
end
 
LUA:
local new = {x=100, y=100, z=100}

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) then
		local v = getTileItemById(position, 1970).uid
		if v ~= 0 then
			doTeleportThing(cid, new)
			doSendMagicEffect(new, 10)
			return doRemoveItem(v)
		else
			doCreatureSay(cid, 'You must put the Holy Tible on the tile.', TALKTYPE_ORANGE_1, false, cid)
		end
	end
	doTeleportThing(cid, fromPosition, true)
end
 
Last edited:
teleport.lua
LUA:
function onAddItem(moveItem, tileItem, position, cid)
local position = {x=412, y=1414, z=9}
	if moveItem.itemid == 1970 then	
		doTeleportThing(cid, position)
		doSendMagicEffect(position,10)
		doRemoveItem(moveItem.uid, 1)
	else
		doPlayerSendCancel(cid, "You need the Tible to get past this barrier!")
	end
end
go to movements.xml and put this line:
XML:
<movevent type="AddItem" tileitem="1" itemid="xxxx" event="script" value="teleport.lua"/>
change the "xxxx" to the itemid of the ground.

what you do is move the Tible to that ground and you will teleport.
 

Similar threads

Back
Top