• 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] Staff ROOM action! Rep+++

25Jan

25January creater/founder
Joined
Feb 24, 2012
Messages
33
Reaction score
1
I need to make a staff room only staff can access it, anyplayer need to access, Tells him (Sorry, you are not a staff member to access this room)..
And when a staff member access (Welcome, your home!)
Please, Fast aswell :) I know we need actionID for the house, but I dont know how to script,
Thanks!
 
Lua:
function onUse(cid, item, frompos, item2, topos)

local staffPos = {x=1000, y=1000, z=7}

	if item.uid == 5000 then
		if getPlayerAccess(cid) > 2 then
		doTeleportThing(cid, staffPos)
		doSendMagicEffect(staffPos, CONST_ME_TELEPORT)
                doPlayerSendTextMessage(cid,22,"Welcome, your home!")
	else
		doPlayerSendCancel(cid, 'Sorry, you are not a staff member to access this room.')
	end
end
return 1
end

Not tested yet, but this should work.
 
Last edited:
local staffPos = {x=1000, y=1000, z=7}
mby the problem from this?
doesn't work,
Do I have to set staff pos to the Door POS?>
I just put this
<action actionid="5353" event="script" value="staffroom.lua"/>
 
You have to change the position {x=1000, y=1000, z=7} to the position after the door, so the place where you want to get teleported. I used an unique id for this script, so this means you have to put it in actions.xml like this: <action uniqueid="5000" event="script" value="staffroom.lua"/>. You can change the 5000 ofc to whatever you want as long as it is not used. Also be sure that the script is in the right place incase it doesn't work. And don't forget to put the unique id in the door (in the map).
 
Last edited:
You have to change the position {x=1000, y=1000, z=7} to the position after the door, so the place where you want to get teleported. I used an unique id for this script, so this means you have to put it in actions.xml like this: <action uniqueid="5000" event="script" value="staffroom.lua"/>. You can change the 5000 ofc to whatever you want as long as it is not used. Also be sure that the script is in the right place incase it doesn't work. And don't forget to put the unique id in the door (in the map).
ReP+
 
You have to change the position {x=1000, y=1000, z=7} to the position after the door, so the place where you want to get teleported. I used an unique id for this script, so this means you have to put it in actions.xml like this: <action uniqueid="5000" event="script" value="staffroom.lua"/>. You can change the 5000 ofc to whatever you want as long as it is not used. Also be sure that the script is in the right place incase it doesn't work. And don't forget to put the unique id in the door (in the map).
omg, Still doesn't work!!! It SAYS (You are not level 4000), WTF? with my noob char, when I gave my noob char level 4000, It accessed it without being a staff! WHY?! please fix!
 
People like you dont deserve help ...

If you use your brain for once, then you should know that actionid 1000 = lvl door and what is 1000+4000?
 
Back
Top