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

A dorr

Snow

New Member
Joined
Jan 16, 2008
Messages
381
Reaction score
0
A door requiring x storage to pass, if you don't have that storage you'll receive a msg like: you didn't complete the inquisiton quest.

Thanks in advance!
 
LUA:
function onUse(cid, item, frompos, item2, topos)
local storage = xxxx -- This number you will imput into map editor for the door you wish
area = {x=995, y=993, z=7}
queststatus = getPlayerStorageValue(cid,storage) 

if item.uid == storage then 
if queststatus == -1 then
doCreatureSay(cid, "Text when cannot enter :D:D ", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, area,0)
doSendMagicEffect(topos, 12)
doCreatureSay(cid, "Text if can enter:D", TALKTYPE_ORANGE_1)
end
end
return 1
end

Code:
	<action uniqueid="xxxx" script="VIP Door.lua"/>

xxx is the storage value and you have t owrite it in ur map editor

rep if I helped :)
 
I'm sorry but I don't want the player to be teleported...
I just want him to be able to open the door(the red nob one)
 
Ok, here you are
LUA:
  function onUse(cid, item, frompos, item2, topos)
local storage = xxxx -- This number you will imput into map editor for the door you wish
area = {x=frompos.x, y=frompos.y+1, z=.frompos.z}
queststatus = getPlayerStorageValue(cid,storage)

	if queststatus == -1 then
doCreatureSay(cid, "Text when cannot enter :D:D ", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, area,0)
doSendMagicEffect(topos, 12)
doCreatureSay(cid, "Text if can enter:D", TALKTYPE_ORANGE_1)
end
return 1
end
and just manage this line:
Code:
area = {x=frompos.x, y=frompos.y+1, z=.frompos.z}
 
You know the door can get abused if you don't get telported?
Like, the one that already have the storage, opens the door for players that don't have it.
Code:
local storage = 1234
local doorPos = {x = 1234, y = 1234, z = 7} -- The position of the door
local door_open = 1234 -- Id of the door OPEN!

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid,storage) ~= 1 then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
    else
        doTeleportThing(cid, doorPos, FALSE)
        doTransformItem(item.uid, door_open)
    end
return true
end
 
Back
Top