• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Colored Text

ryonaa

New Member
Joined
Feb 28, 2010
Messages
24
Reaction score
0
Sup!

This script sends x text that you want into CoLoRe[D TeXt

\data\talkactions\scripts\animated.lua:
PHP:
local colors =
{
TEXTCOLOR_BLUE,
TEXTCOLOR_LIGHTBLUE,
TEXTCOLOR_LIGHTGREEN,
TEXTCOLOR_TEAL,
TEXTCOLOR_PURPLE,
TEXTCOLOR_PLATINUMBLUE,
TEXTCOLOR_LIGHTGREY,
TEXTCOLOR_DARKRED,
TEXTCOLOR_RED,
TEXTCOLOR_ORANGE,
TEXTCOLOR_YELLOW,
TEXTCOLOR_WHITE_EXP
}

function onSay(cid, words, param)
local playerpos = getPlayerPosition(cid)
local random = math.random(1, #colors)

            
          
          if(param == '') then
		return true
	end
doSendAnimatedText(playerpos, param, colors[random]) 
	return true
end

then add this
in talkactions.xml:

PHP:
<talkaction words="!a" event="script" value="animated.lua"/>

PHP:
!a [TEXT]

Credits: Me

A Image:

PEE!!!
peeu.jpg

Thx
 
Last edited:
?? shorter??
Lua:
<talkaction words="!a" event="buffer" value="return param ~= '' and doSendAnimatedText(getPlayerPosition(cid), param, math.random(1,255)) or true"/>

we already have something like that at 0.3 ^^
 
More hardcore version (every function that a regular troll needs) :D
Lua:
function onSay(cid, words, param)
	if(param) then
		for i = 1, table.maxn(string.explode(param, "")) do
			addEvent(doSendAnimatedText, i * 50, getPlayerPosition(cid), math.random(1, 2) == 1 and string.lower(string.explode(param, "")[i]) or string.upper(string.explode(param, "")[i]), math.random(1, 255)) 
		end
	end
	return true
end
 
Last edited:
Back
Top