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

"password" wall switch

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1
<_< i am having problem i was wondering if some one could make me a script the would
remove a wall when storage id = (NUMBER#)and correct word are said
elseif
doplayermessage(sorry you have no right to pass);)

if some one can make it i would be pleased
 
Code:
local pos = [COLOR="SandyBrown"]{x = 000, y = 000, z = 0}[/COLOR]
function onSay(cid, words, param, channel)
    if getCreatureStorage(cid, [COLOR="SandyBrown"]STORAGE_NUMBER_HERE[/COLOR]) ~= 1 then
        doPlayerSendCancel(cid, "Sorry, you have no right to pass.")
        return false
    else
        local wall = getThingFromPos(pos)
        doRemoveItem(wall)
    end
    return true
end
should work

and to talkactions.xml
Code:
<talkaction words="[COLOR="SandyBrown"]YOUR_WORDS_HERE[/COLOR]" event="script" value="[COLOR="SandyBrown"]FILE_NAME_HERE[/COLOR].lua" />
 
Last edited:
local pos = {x = 000, y = 000, z = 0}
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
local wall = getThingFromPos(pos)
doRemoveItem(wall)then
local timer = ()
docreateitem(wall)
end
return true
end
 
Code:
[Error - TalkAction Interface]
data/talkactions/scripts/Password.lua:onSay
Description:
(luaDoRemoveItem) Item not found
 
.
LUA:
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
 
Back
Top