• 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 [Movement] Remove Wall

russogracie

New Member
Joined
Sep 9, 2010
Messages
205
Reaction score
2
I have this script to remove wall on stepin:

Code:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		doRemoveItem(getTileItemById({x=988, y=805, z=14}, 1049).uid)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have removed the wall.')
		doTransformItem(item.uid, 425)
	end
end
 
function onStepOut(cid, item, pos, fromPos)
	if isPlayer(cid) then
		doCreateItem(1049, 1, {x=988, y=805, z=14})
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Wall is back.')
		doTransformItem(item.uid, 426)
	end
end

But, Now, if a player is on the same wall sqm, he sits atop the wall would be possible to make the player was moved to where there is a wall or have sqm down?
 
Mabye this might help you, this is not a movement, this is an action (In the map editor put in Unique ID:4507)
LUA:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=988, y=805, z=14, stackpos=1}
getgate = getThingfromPos(gatepos)

if item.uid == 4507 and item.itemid == 1945 and getgate.itemid == 1049 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 4507 and item.itemid == 1946 and getgate.itemid == 0 then
doCreateItem(1049,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
  return 1
  end

I hope it works :)
 
Friend, my script is already running but do not want the wall to appear emcima be the player I want the player is not moved to lie on her.
 
Back
Top