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

GlobalEvent Talking Tp/signs/tiles for TFS 0.3+

Shawak

Intermediate OT User
Joined
Sep 11, 2008
Messages
1,984
Solutions
2
Reaction score
119
Location
Germany
GitHub
Shawak
Hey all,

Here a script for TFS 0.3.4.
Idea from Teleport Effects.

-> Let ur fields talk :)
-> Send effects on fields :)


Globalevents.xml

HTML:
	<globalevent name="effects" interval="2" event="script" value="effects.lua"/>
"interval="2"" = Send all 2 secs, change it to whatever you want.

Effects.lua
Lua:
--[[ 
	Talking Tp/signs/tiles for TFS 0.3+
	by Maxi (Shawak)
]]--

	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, text = {"text 1"}},
	[2] = {pos = {1096,1217,7}, text = {"text 2"}},
	[3] = {pos = {1097,1217,7}, text = {"text 3"}},
	[4] = {pos = {1098,1217,7}, text = {"text 4"}}
	}

	local effects = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, effect = {18}},
	[2] = {pos = {1096,1217,7}, effect = {19}},
	[3] = {pos = {1097,1217,7}, effect = {21}},
	[4] = {pos = {1098,1217,7}, effect = {22}}
	}

function onThink(interval, lastExecution)
	for _, area in pairs(text) do
		doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
	end
	for _, area in pairs(effects) do
		doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
	end
	return TRUE
end

Tutorial

You can easy add more fields / texts, just change
Lua:
	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, text = {"text 1"}},
	[2] = {pos = {1096,1217,7}, text = {"text 2"}},
	[3] = {pos = {1097,1217,7}, text = {"text 3"}},
	[4] = {pos = {1098,1217,7}, text = {"text 4"}}
	}
to
Lua:
	local text = {
	--X pos,Y pos, Z pos, text
	[1] = {pos = {1095,1217,7}, text = {"text 1"}},
	[2] = {pos = {1096,1217,7}, text = {"text 2"}},
	[3] = {pos = {1097,1217,7}, text = {"text 3"}},
	[4] = {pos = {1098,1217,7}, text = {"text 4"}},
	[5] = {pos = {1099,1217,7}, text = {"text 5"}}
	}
And so on...

Testet, it work.

Regards,
Shawak
 
Last edited:
Thanks, although there are so many of these. :thumbup:
 
Wow another one

Thanks for.. making the exact same script thats been released x20

Why does it matter if it has been posted before? He's just reposting it cleaner and more organized, correctly stating the respective idea credits and all, and he's not even asking reputation every 3 lines like many other posters do. This is only someone sharing something for free for people to enjoy. Isnt that one of the points of this (or any) forum?

For me, this script is the easiest to understand and use for newbies in lua (and not so newbies) Ive seen so far, and we're all (or most) here to learn so whats up with the bashing?

Geez.

+Repped ya Shawak, keep it up.
 
Last edited:
Where did you post talking teleports script for tfs 0,2?!!

Forgot, but here again:

Its a talkaction Script.
Lua:
--[[ 
	Talking Tp/signs/tiles for TFS 0.2
	50% by Marki, 50% 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 = {"text 1"}},
	[2] = {pos = {133,93,7}, text = {"text 2"}}
	}      
	
	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

Regards,
Shawak
 
Nah the Mystic spirit dont use global events for 8.5 i use the Stylerr Distro cuz its Crying~ and use my map and stuff so when 8.5 crying offical comes out I dont got to redo all my scripts and stuff just transfer them over :)...


Edit:: ok i got a problem here
Im using this tfs [04/08/2009 20:51:46] The Forgotten Server, version 0.3.4 (Crying Damson)

and i get this error
[04/08/2009 20:59:31] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/Text.lua)
[04/08/2009 20:59:31] data/globalevents/scripts/Text.lua:13: '}' expected (to close '{' at line 6) near '['
[04/08/2009 20:59:32] Reloaded global events.

--[[
Talking Tp/signs/tiles for TFS 0.3+
by Maxi (Shawak)
]]--

local text = {


[1] = {pos = {1196,994,7}, text = {"!aol"}},
[2] = {pos = {998,993,7}, text = {"Hail"}},
[3] = {pos = {1002,993,7}, text = {"Hausch"}},
[4] = {pos = {1004,993,7}, text = {"Quests!"}}
[5] = {pos = {996,993,7}, text = {"Monster TPs"}}
[6] = {pos = {995,994,6}, text = {"RotWorms!"}}
[7] = {pos = {995,996,6}, text = {"Dragons!"}}
[8] = {pos = {995,998,6}, text = {"Hydra!"}}
[9] = {pos = {995,1000,6}, text = {"Heros!"}}
[10] = {pos = {995,1002,6}, text = {"Giant Spiders!"}}
[11] = {pos = {1005,994,6}, text = {"Vampires!"}}
[12] = {pos = {1005,996,6}, text = {"Demon!"}}
[13] = {pos = {1005,998,6}, text = {"600+"}}
[14] = {pos = {1005,1000,6}, text = {"1,000+"}}
[15] = {pos = {1005,1005,6}, text = {"1,200+"}}
[16] = {pos = {995,994,5}, text = {"2,000+"}}
[17] = {pos = {995,996,5}, text = {"2,500+"}}
[18] = {pos = {995,998,5}, text = {"3,500+"}}
[19] = {pos = {995,1000,5}, text = {"4,200+"}}
[20] = {pos = {995,1002,5}, text = {"5,000+"}}
[21] = {pos = {995,1005,5}, text = {"7,200+"}}
[22] = {pos = {1005,998,5}, text = {"8,200+"}}
[23] = {pos = {1005,1000,5}, text = {"10,000+"}}
[25] = {pos = {1005,1002,5}, text = {"12,000+"}}
[26] = {pos = {995,994,4}, text = {"15,000+"}}
[27] = {pos = {995,996,4}, text = {"20,000+"}}
[28] = {pos = {995,998,4}, text = {"22,000"}}
[29] = {pos = {995,1000,4}, text = {"25,000"}}
[30] = {pos = {995,1002,4}, text = {"30,000"}}
[31] = {pos = {1005,994,3}, text = {"35,000"}}


}

local effects = {
--X pos,Y pos, Z pos, text
[1] = {pos = {1095,1217,7}, effect = {18}},
[2] = {pos = {1096,1217,7}, effect = {19}},
[3] = {pos = {1097,1217,7}, effect = {21}},
[4] = {pos = {1098,1217,7}, effect = {22}}
}

function onThink(interval, lastExecution)
for _, area in pairs(text) do
doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
end
for _, area in pairs(effects) do
doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
end
return TRUE
end
Code:
--[[ 
        Talking Tp/signs/tiles for TFS 0.3+
        by Maxi (Shawak)
]]--

        local text = {
		
		
        [1] = {pos = {1196,994,7}, text = {"!aol"}},
        [2] = {pos = {998,993,7}, text = {"Hail"}},
        [3] = {pos = {1002,993,7}, text = {"Hausch"}},
        [4] = {pos = {1004,993,7}, text = {"Quests!"}}
		[5] = {pos = {996,993,7}, text = {"Monster TPs"}}
		[6] = {pos = {995,994,6}, text = {"RotWorms!"}}
		[7] = {pos = {995,996,6}, text = {"Dragons!"}}
		[8] = {pos = {995,998,6}, text = {"Hydra!"}}
		[9] = {pos = {995,1000,6}, text = {"Heros!"}}
		[10] = {pos = {995,1002,6}, text = {"Giant Spiders!"}}
		[11] = {pos = {1005,994,6}, text = {"Vampires!"}}
		[12] = {pos = {1005,996,6}, text = {"Demon!"}}
		[13] = {pos = {1005,998,6}, text = {"600+"}}
		[14] = {pos = {1005,1000,6}, text = {"1,000+"}}
		[15] = {pos = {1005,1005,6}, text = {"1,200+"}}
		[16] = {pos = {995,994,5}, text = {"2,000+"}}
		[17] = {pos = {995,996,5}, text = {"2,500+"}}
		[18] = {pos = {995,998,5}, text = {"3,500+"}}
		[19] = {pos = {995,1000,5}, text = {"4,200+"}}
		[20] = {pos = {995,1002,5}, text = {"5,000+"}}
		[21] = {pos = {995,1005,5}, text = {"7,200+"}}
		[22] = {pos = {1005,998,5}, text = {"8,200+"}}
		[23] = {pos = {1005,1000,5}, text = {"10,000+"}}
		[25] = {pos = {1005,1002,5}, text = {"12,000+"}}
	    [26] = {pos = {995,994,4}, text = {"15,000+"}}
		[27] = {pos = {995,996,4}, text = {"20,000+"}}
		[28] = {pos = {995,998,4}, text = {"22,000"}}
		[29] = {pos = {995,1000,4}, text = {"25,000"}}
		[30] = {pos = {995,1002,4}, text = {"30,000"}}
		[31] = {pos = {1005,994,3}, text = {"35,000"}}
		
		
        }

        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1095,1217,7}, effect = {18}},
        [2] = {pos = {1096,1217,7}, effect = {19}},
        [3] = {pos = {1097,1217,7}, effect = {21}},
        [4] = {pos = {1098,1217,7}, effect = {22}}
        }

function onThink(interval, lastExecution)
        for _, area in pairs(text) do
                doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
        end
        for _, area in pairs(effects) do
                doSendMagicEffect({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.effect[1])
        end
        return TRUE
end
 
Last edited:
hah ok thanks :) i will test it out do u gota msn that u can pm me i needa ask u something and i aint one of them annoying Egyptian ppl lol im from new york :)
 
Back
Top