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

Talking Teleports TFS 0.2.2

Bunna

Z-Team
Joined
May 27, 2008
Messages
131
Reaction score
0
Location
Sweden
Hello i need talking teleport script/lua for Real map project server v0.8, TFS 0.2.2
I really need it, I hope anyone have it out there.

Thank you :)
 
talkactions.xml
HTML:
	<talkaction words="/talk" script="talk.lua"/>
talk.lua
Commands:
/talk "on -- talking start
/talk "off -- talking end
Lua:
--[[ 
	Talking Tp/signs/tiles for TFS 0.2
	By 40% by Marki, 60% by Shawak
]]--

	local time = 2    -- 1 = 1 sec, 2 = 2 sec, ...

	local config = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {132,93,7}, text = {"Work"}},
	[2] = {pos = {133,93,7}, text = {"Yeah!"}}
	}      
	
	local say_events = {}

local function SayText(cid)
	if isPlayer(cid) == TRUE then
	     if say_events[getPlayerGUID(cid)] ~= nil then
		     for _, area in pairs(config) do
			     doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
		     end
		     say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)       
          end                                                       
	end
	return TRUE
end

function onSay(cid, words, param, channel) 
	if param == "on" then
		for _, area in pairs(config) do
			doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
		end
		say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
		doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> ON.")
	elseif param == "off" then
		stopEvent(say_events[getPlayerGUID(cid)])
		say_events[getPlayerGUID(cid)] = nil
		doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> OFF.")
	end
	return TRUE
end

//Tested on TFS 0.3.4 (work with 0.2~)

Regards,
Shawak
 
Back
Top