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

[GM] acces onley

Kippetjee

Member
Joined
Jun 17, 2009
Messages
1,197
Reaction score
11
Location
The Netherlands
Is it possible to make a script for this?
that onley gamemasters can acces

so yes?
can u give me:$

pwnedt.png
 
LUA:
local port = {x = 100, y = 100, z = 7}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerGroupId(cid) >= 2 then
doTeleportThing(cid, port)
end
return true
end

try that.

Edit: put aid/uid on the counter and then in action.xml.
 
data/actions/scripts/gmteleport.lua

LUA:
local enter = {x=1000, y=1000, z=7} -- set this to the first black tile where you get tped

function onUse(cid, item, fromPosition, itemEx, toPosition)
          if getPlayerGroupId(cid) >= 2 then
     doTeleportThing(cid, enter)
   end


data/actions/actions.xml

XML:
<action itemid="ID OF THE RED MARK ON YOUR PICTURE" script="gmteleport.lua"/
 
Dont works :D

LUA:
[23/01/2011 18:57:32] [Error - LuaScriptInterface::loadFile] data/actions/scripts/gmteleport.lua:8: 'end' expected (to close 'function' at line 3) near '<eof>'
[23/01/2011 18:57:32] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/gmteleport.lua)
[23/01/2011 18:57:32] data/actions/scripts/gmteleport.lua:8: 'end' expected (to close 'function' at line 3) near '<eof>'
 
Try now,edited post :D

Well it's not edited so here is script:

LUA:
local enter = {x=1000, y=1000, z=7} -- set this to the first black tile where you get tped
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if getPlayerGroupId(cid) >= 2 then
      doTeleportThing(cid, enter)
   end
return 1
end

XML:
<action itemid="ID OF THE RED MARK ON YOUR PICTURE" script="gmteleport.lua"/>
 
LUA:
local pos = {
	enter = {x=1000, y=1000, z=7},
	out = {x=1000, y=1000, z=7}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local p = getThingPos(cid)
	if getPlayerGroupId(cid) >= 2 then
		if p.y >= getThingPos(item.uid).y then
			doTeleportThing(cid, pos.enter)
		else
			doTeleportThing(cid, pos.out)
		end
		doSendMagicEffect(getThingPos(cid), 10)
	end
	return true
end
 
data/actions/scripts/gmteleport.lua

LUA:
local enter = {x=1000, y=1000, z=7} -- set this to the first black tile where you get tped

function onUse(cid, item, fromPosition, itemEx, toPosition)
          if getPlayerGroupId(cid) >= 2 then
     doTeleportThing(cid, enter)
   end


data/actions/actions.xml

XML:
<action itemid="ID OF THE RED MARK ON YOUR PICTURE" script="gmteleport.lua"/

and the else?
 
LUA:
local pos = {
	enter = {x=1000, y=1000, z=7},
	out = {x=1000, y=1000, z=7}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local p = getThingPos(cid)
	if getPlayerGroupId(cid) >= 2 then
		if p.y >= getThingPos(item.uid).y then
			doTeleportThing(cid, pos.enter)
		else
			doTeleportThing(cid, pos.out)
		end
		doSendMagicEffect(getThingPos(cid), 10)
	end
	return true
end



Works perfect thanks!!

is it maby possible to make it uniq idD? becouse nouw there is Duplication ID
 
Back
Top