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

Looking For Staff Door Script

rusty90

New Member
Joined
Jul 9, 2010
Messages
26
Reaction score
0
Hey im looking for a staff door script. So only Tut, Gm's, CM's Can only use the door. And if a player clicks on the door i would like it to say "Staff Only Noob" please help me giving Rep ++
 
Try this:
data/actions/scripts/staffdoor.lua
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) >= 2 then
doTransformItem(item.uid, item.itemid + 1)
		local dir = getDirectionTo(getPlayerPosition(cid), topos)
		doMoveCreature(cid, dir)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only staff here noob!")
	end
return true
end

Or try:

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) >= 2 then
if getCreaturePosition(cid).y < toPosition.y then
			doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
		else
			doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
		end
elseif getPlayerGroupId(cid) < 2 then
                       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only staff here!")
end
return true
end

actions.xml
XML:
<action actionid="5788" script="staffdoor.lua"/>

Set the actionid 5788 in RME

Use a door < to >
2nd basicly is from Shawak's vip system. Credits to him.
 
Last edited:
Hey i got a console error
[24/11/2010 11:01:11] >> Loading script systems
[24/11/2010 11:01:11] [Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/staffdoor.lua: No such file or directory
[24/11/2010 11:01:11] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/staffdoor.lua)
[24/11/2010 11:01:11] cannot open data/actions/scripts/staffdoor.lua: No such file or directory

I'm using Naxed OT 8.54
 
@Up: You either did not add the file with the correct name, or in the correct place where you stated it at actions.xml
 
I just copy pasted the script that u told me.. and im still getting the error. Everything is in the right place
[24/11/2010 11:01:11] >> Loading script systems
[24/11/2010 11:01:11] [Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/staffdoor.lua: No such file or directory
[24/11/2010 11:01:11] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/staffdoor.lua)
[24/11/2010 11:01:11] cannot open data/actions/scripts/staffdoor.lua: No such file or directory
 
i used
<action actionid="5788" event="script" value="staffdoor.lua"/>


And i got this error


[24/11/2010 13:08:55] >> Loading script systems
[24/11/2010 13:08:56] [Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/staffdoor.lua: No such file or directory
[24/11/2010 13:08:56] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/staffdoor.lua)
[24/11/2010 13:08:56] cannot open data/actions/scripts/staffdoor.lua: No such file or directory
 
Back
Top