Hello, this is a simple teleport for GM, which GM can easily move between cities / places. Positions and the names of these places is set to add to the same table. This command is useful for Gamemaster's! The idea is to MessixX.
in talkactions.xml:
in talkactions/scripts/gmtp.lua:
Using a script is very easy form GameMastera
type:
/tp "place
Yours,
ersiu.
in talkactions.xml:
Code:
<talkaction words="/tp" script="gmtp.lua"/>
Code:
function onSay(cid, words, param)
local cities = {
["city"] = {x=1337, y=666, z=7},
["carlin"] = {x=164, y=216, z=6},
["orshabaal"] = {x=264, y=941, z=8}
-- example
-- ["NAME OF CITY"] = {x=POSITION X, y=POSITION Y, z=POSITION Z}
}
local access = 3 -- ACCESS CAN USING TELEPORT
local city = cities[string.lower(param)]
if city then
if(getPlayerAccess(cid) >= access)then
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid, city)
doPlayerSendTextMessage(cid, 20, "Welcome to the "..param)
doSendMagicEffect(city, 10)
return 1
else
doPlayerSendCancel(cid, "You cannot execute this command!")
return 0
end
else
doPlayerSendCancel(cid, "City Not Found!")
return 0
end
end
Using a script is very easy form GameMastera
type:
/tp "place
Yours,
ersiu.
Last edited: