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

Step On Tile To Remove Wall

VJ2354

New Member
Joined
Jan 17, 2013
Messages
39
Reaction score
0
Hello I'm in need of some help with a script where 2 players have to step on tiles to remove a wall. If only 1 person steps on a tile the wall will remain intact. Any suggestions? I tried to edit a script where 1 person steps on a tile to remove a wall but I found it pretty difficult add the other player.
 

Limos

Senator
Premium User
Joined
Jun 7, 2010
Messages
10,018
Solutions
8
Reaction score
3,017
Location
Netherlands
Lua:
local config = {
	wall = {id = 1039, pos = {x = 94, y = 132, z = 7}},
	playerpos = {
		{x = 94, y = 130, z = 7},
		{x = 94, y = 131, z = 7}
	}
}

function onStepIn(cid, item, position, fromPosition)

	if(getTileItemById(config.wall.pos, config.wall.id).uid > 0) then
		local n = 0
		for pos = 1, #config.playerpos do
			if(isPlayer(getTopCreature(config.playerpos[pos]).uid)) then
				n = n + 1
			end
		end
		if(n == 2) then
			doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED)
			doRemoveItem(getTileItemById(config.wall.pos, config.wall.id).uid,1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.")
		end
	end
	return true
end
When should the wall come back, after a certain time or when stepping out of the tile?
 
OP
V

VJ2354

New Member
Joined
Jan 17, 2013
Messages
39
Reaction score
0
Thank you so much for your help! ID like the wall to appear after 10 minutes. I've also noticed that the tiles I'm using, ID "426", don't depress to ID "425" when I stand on them. Is there any way I can make that happen aswell?
 

Spo teh pro

New Member
Joined
Jan 3, 2008
Messages
319
Reaction score
1
is the script that after you leave the tile, the wall comes back?
I'm requesting that script for about 2 weeks now but nobody gave me an answer
 

Limos

Senator
Premium User
Joined
Jun 7, 2010
Messages
10,018
Solutions
8
Reaction score
3,017
Location
Netherlands
Lua:
local config = {
	wall = {id = 1039, pos = {x = 94, y = 132, z = 7}},
	transformid = 425,
        time = 10, -- time in minutes
	playerpos = {
		{x = 94, y = 130, z = 7},
		{x = 94, y = 131, z = 7}
	}
}

function onStepIn(cid, item, position, fromPosition)

	if(getTileItemById(config.wall.pos, config.wall.id).uid > 0) then
		local n = 0
		for pos = 1, #config.playerpos do
			if(isPlayer(getTopCreature(config.playerpos[pos]).uid)) then
				n = n + 1
			end
		end
		if(n == #config.playerpos) then
			doSendMagicEffect(config.wall.pos, CONST_ME_MAGIC_RED)
			doRemoveItem(getTileItemById(config.wall.pos, config.wall.id).uid,1)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Wall is removed.")
			addEvent(doCreateItem, config.time * 60 * 1000, config.wall.id, 1, config.wall.pos)
		end
	end
	doTransformItem(item.uid, config.transformid)
	return true
end

@Spo teh pro
Should it be with more players or just 1?
 
Last edited:

Spo teh pro

New Member
Joined
Jan 3, 2008
Messages
319
Reaction score
1
2 would be good. one is also okay, no more effort for you, you already helped me enough
with one I can just add two walls.


thank you and rep ofcourse <3

- - - Updated - - -

cant rep u alrdy did :D
ill try this script tomorow im at my gf place atm I'll just post news here then

thank you :)
 
Top