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

TalkAction GM Town teleport

Azi

Banned User
Joined
Aug 12, 2007
Messages
1,167
Reaction score
53
Location
Włocławek
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:
Code:
<talkaction words="/tp" script="gmtp.lua"/>
in talkactions/scripts/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:
Can you modify it to use without -> " <-? I know it is possible. Then it will be worthy script to copy'n'paste :>

[EGO]PS. Gogo! Fill up OTLand with lots of small nooby scripts :p[/EGO]
 
The reason I posted this, is to show you, that maybe use search before posting something that was released two times already.

Simple as that.

Ciao.
 
The reason I posted this, is to show you, that maybe use search before posting something that was released two times already.

Simple as that.

Ciao.

Hmm, that there was no script yet, it was only your version, as far as I know, anyone can give his. Besides
You also wrote about this type of script, when he was already published, you wrote that there are two versions, so What's the problem?
 
@up
Just add there options that can't be seen in those two versions :p
 
[24/11/2008 17:05:09] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/gmtp.lua
[24/11/2008 17:05:09] data/talkactions/scripts/gmtp.lua:3: unexpected symbol near '['

Somebody help me with this error please...
 
If you have added your own places, make sure there is a comma(,) after them, but not on the last.
 
Back
Top