• 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 TFS 0.2.14 Teleport Talkaction v1.1 - With destinations by array

Launian

Tsuki~
Joined
Jul 7, 2008
Messages
34
Reaction score
1
So, here's a little teleport talkaction I put together using various scripts: Cykotitan's script, and part of a script I had on a backup dvd with some OT files (I couldn't find the name of the scriptter, tho :( )

Anyways, this script, besides easy access to the destinations, lets you see the possible parameters you can use, reading them from the array itself. Also, since this is for TFS 2.14, i added a little something so it can only be used by players whos group is 3 (can't figure out how to restrict talkactions from the xml file itself).

Well, here's the script. Enjoy:

Lua:
	local teleport = {
	['gm island'] = {x=130, y=330, z=13},
	['temple'] = {x = 159, y = 388, z = 7},
}

function onSay(cid, words, param, channel)

if (param == "list") then
local str = ""
str = str .. "Travel List:\n\n"
for name, pos in pairs(teleport) do
str = str..name.."\n"
end
str = str .. "" 
doShowTextDialog(cid, 2113, str)
return false
end


	local s = teleport[param:lower()]
	if getPlayerGroupId(cid) == 3 then
		if s then
				doTeleportThing(cid, s)
				doSendMagicEffect(s, CONST_ME_TELEPORT)
		else
			doPlayerSendCancel(cid, 'Use !tp "lista to see all the places you can go to.')
		end
		return false
	else
		return false
	end
end

If you have any suggestions, please feel free to post them. And if you know how I should go about restricting talkactions from the xml file on TFS 2.14, please, PLEASE tell me xD Good day.
 
Back
Top