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

Animated Text!

lillen128

New Member
Joined
Mar 3, 2009
Messages
12
Reaction score
0
Im looking for a Animated text like above a tp that says War Zone!
like every 4sec. Can anyone help me with this?:D
 
globalevents/scripts/teleport.lua
Lua:
function onThink(interval, lastExecution, thinkInterval)
	doSendAnimatedText({x=1000, y=1000, z=7}, "WarZone", TEXTCOLOR_YELLOW)
end

globalevents.xml
PHP:
<globalevent name="teleport" interval="4" event="script" value="teleport.lua"/>
 
Add this to globalevents\scripts\animatedtext.lua :
Lua:
function talk()
	local warPos = {x = 1000, y = 1000, z = 7, stackpos = 2}
	doSendAnimatedText(warPos, "War Zone", TEXTCOLOR_RED)
	
	local safePos = {x = 997, y = 997, z = 7, stackpos = 2}
	doSendAnimatedText(safePos, "Safe!", TEXTCOLOUR_BLUE)
	
	return true
end

function onThink(cid, interval)
	addEvent(talk, 0)
	return true
end

And add this to globalevents\globalevents.xml :
Code:
<globalevent name="animatedtext" interval="4" event="script" value="animatedtext.lua"/>

Made this a while ago, same basis as Niska's script but it will work better if you want to have more than one place with animated text.
 
Code:
local t = {
	["War Zone"] = { {x = 1000, y = 1000, z = 7}, TEXTCOLOR_RED},
	["Safe"] = { {x = 997, y = 997, z = 7}, TEXTCOLOR_BLUE}
}
function onThink(interval, lastExecution, thinkInterval)
	for text, v in pairs(t) do
		doSendAnimatedText(v[1], text, v[2])
	end
	return true
end
 
PHP:
  --[[
        Talking Tp/signs/tiles for TFS 0.3+
        by Nemo
]]--

        local text = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1000,1000,7}, text = {"War Zone"}},
        }

        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1095,1217,7}, effect = {18}},
        }

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

Rep++ its tested and work :D
 
PHP:
  --[[
        Talking Tp/signs/tiles for TFS 0.3+
        by Nemo
]]--

        local text = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1000,1000,7}, text = {"War Zone"}},
        }

        local effects = {
        --X pos,Y pos, Z pos, text
        [1] = {pos = {1095,1217,7}, effect = {18}},
        }

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

Rep++ its tested and work :D
It's not yours, you lame credit-stealer. Shawak made that.

http://otland.net/f82/talking-tp-signs-tiles-forgotten-server-0-3-a-39408/#post396457
 
Code:
local t = {
	["War Zone"] = { {x = 1000, y = 1000, z = 7}, TEXTCOLOR_RED},
	["Safe"] = { {x = 997, y = 997, z = 7}, TEXTCOLOR_BLUE}
}
function onThink(interval, lastExecution, thinkInterval)
	for text, v in pairs(t) do
		doSendAnimatedText(v[1], text, v[2])
	end
	return true
end

Damn you optimizing my script XD
 
Back
Top