Kippetjee
Member
Is it possible to make a script for this?
that onley gamemasters can acces
so yes?
can u give me:$
that onley gamemasters can acces
so yes?
can u give me:$
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
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
<action itemid="ID OF THE RED MARK ON YOUR PICTURE" script="gmteleport.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![]()
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
<action itemid="ID OF THE RED MARK ON YOUR PICTURE" script="gmteleport.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"/
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