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

[Request] Only let some people pass door

Nevalopo

Demigod
Joined
Jul 21, 2008
Messages
5,165
Reaction score
68
Location
Sweden, Landskrona
Hi! Im looking for a door that lets everyone pass except the ones with name : Druid - Paladin - Sorcerer - Knight
Thoose names can NOT pass the door.. Rest can past ^^ Is this possible?
 
Well.... No errors now but the door wont open.. And it doesnt say locked.. It doesnt say anything :S

That means you used the wrong door overall from map editor, you used a door which is always looked does not matter which script you use.
I suggest you to use another kind of door via your map editor because it's to much work to make the script work for this one since you can easily change to the unlocked door...

kind regards, Evil Hero
 
You can use "Gates of Expertise". Marcinek just forgot that the player has to be moved away from the door if the name of the player does contain the name of the names which are not able to pass.

this should work just change the coordinates for the exit...

Code:
funciton onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=, y=, z=}
    if isInArray(names, getCreatureName(cid)) == TRUE then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
        doTeleportThing(cid, exit)
    end
    return TRUE
end

I didnt forget about this, Ive made there a comment, meaning he can write there his own idea to pass the door, either teleport or pushmove.
 
Hmm

Hmm... I have been trying ALOT of diffrent doors now.... Seems like no1 is working :/ What is wrong? Here is the code i use:

function onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=1095, y=1218, z=6}
if isInArray(names, getCreatureName(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
doTeleportThing(cid, exit)
end
return TRUE
end

It doesnt say "it is locked" or anything... And i tryed hell loads of diffrent doors.. Same on all
 
Nope...

I tryed changing the doTeleportThing(cid, exit, 0) but it still wont open... Im using a normal door (id 5098) for this :S

The 2 diffrent codes looks like this:

function onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=1099, y=1216, z=6}
if isInArray(names, getCreatureName(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
doTeleportThing(cid, exit, 0)
end
return TRUE
end

and

function onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=1095, y=1218, z=6}
if isInArray(names, getCreatureName(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
doTeleportThing(cid, exit, 1095, 1218, 6)
end
return TRUE
end


I try em both but noone of em work....
 
Last edited:
@up

Your script at the moment is that is if any of those names, say it's lock and then tp pass. So try it with a char called Druid and see what you get.
 
Hmm

function onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=1099, y=1216, z=6}
if isInArray(names, getCreatureName(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
doTeleportThing(cid, exit, 0)
end
return TRUE
end

The local exit = {x=1099, y=1216, z=6} is where the door is at? Or where it should teleport when u click the door? or the squaremeter behind the door?
 
Last edited:
behind the door,

function onUse(cid, item)
local names = {"Druid", "Paladin", "Knight", "Sorcerer"}
local exit = {x=1099, y=1216, z=6}
if isInArray(names, getCreatureName(cid)) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
else
doTeleportThing(cid, exit, 0)
end
return TRUE
end

use that ^
 
Back
Top