Blackcody
RiseOfTibia Owner
- Joined
- Aug 31, 2008
- Messages
- 136
- Reaction score
- 1
Code:
local pos = {x = 000, y = 000, z = 0} -- pos of wall
local id = --id of wall
local time = -- time to create the wall again
function onSay(cid, words, param, channel)
if getCreatureStorage(cid, STORAGE_NUMBER_HERE) ~= 1 then
doPlayerSendCancel(cid, "Sorry, you have no right to pass.")
return false
else
doCleanTile(pos,false)
doPlayerSendTextMessage(cid,22,"You are allowed to pass.")
addEvent(doCreateItem,time * 1000, id,1,pos)
end
return true
end
I Wanna Make It So That You Need To Be Infront Of The Wall On The Tile Before It Removes The Wall
So Like
Code:
local pos = {x = 000, y = 000, z = 0} -- pos of wall
local id = --id of wall
local time = -- time to create the wall again
function onSay(cid, words, param, channel)
if getCreatureStorage(cid, 1032) ~= 1 then
doPlayerSendCancel(cid, "Sorry, you have no right to pass.")
return false
else
dogetplayerposition(cid, x = 1040, y = 1130, z = 8) ~= 1 then
doCleanTile(pos,false)
doPlayerSendTextMessage(cid,22,"You are allowed to pass.")
addEvent(doCreateItem,time * 1000, id,1,pos)
end
return true
end
i want the player with the storage id that is able to open the wall
at the moment they can open the the wall any where on the map i wanna have it so he has to stand infront of the wall so like
getCreatureStorage(cid, 1032)
dogetplayerposition(cid, x = 1040, y = 1130, z = 8) then
if true remove the wall and make the script work the same just have to be on the position