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

9.6 animated text.

Werewolf

Forbidden Ascension
Joined
Jul 15, 2012
Messages
886
Reaction score
123
Okay so, i know animated text was removed from The common tibia Client, But i am currently using an updated version of the OTclient, and i added
Lua:
function doSendAnimatedText(pos, value, color, player)
    if(not tonumber(value))then
        return error("arg #2 in doSendAnimatedText is not a number")
    end
    
    if(isPlayer(player))then
        doPlayerSendTextMessage(player, MESSAGE_EXPERIENCE, "", value, color, pos)
    else
        for _, v in ipairs(getSpectators(pos, 7, 5, true)) do
            if(isPlayer(v))then
                doPlayerSendTextMessage(v, MESSAGE_EXPERIENCE, "", value, color, pos)
            end
        end
    end
end

to my 050-functions.lua. but i still cannot see animated text, am i missing something?
 
use this

Lua:
function doSendAnimatedText(pos, text, color, cid)
	if tonumber(text) then
		text = tonumber(text)
		if cid and isPlayer(cid) then
			doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE_OTHERS, '', text, color, pos)
		else
			local t = getSpectators(pos, 7, 5, false)
			if t then
				for _, cid in ipairs(t) do
					if isPlayer(cid) then
						doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE_OTHERS, '', text, color, pos)
					end
				end
			end
		end
	else
		if cid and isCreature(cid) then
			doCreatureSay(cid, text, TALKTYPE_MONSTER)
		else
			local t = getSpectators(pos, 7, 5, false)
			if t then
				for _, cid in ipairs(t) do
					if isPlayer(cid) then
						doCreatureSay(cid, text, TALKTYPE_MONSTER, false, cid, pos)
					end
				end
			end
		end
	end
end
 
Lua:
function doSendAnimatedText(pos, text, color, cid)
	if tonumber(text) then
		text = tonumber(text)
		if cid and isPlayer(cid) then
			doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE_OTHERS, '', text, color, pos)
		else
			local t = getSpectators(pos, 7, 5, false)
			if t then
				for _, cid in ipairs(t) do
					if isPlayer(cid) then
						doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE_OTHERS, '', text, color, pos)
					end
				end
			end
		end
	else
		if cid and isCreature(cid) then
			doCreatureSay(cid, text, TALKTYPE_MONSTER)
		else
			local t = getSpectators(pos, 7, 5, false)
			if t then
				for _, cid in ipairs(t) do
					if isPlayer(cid) then
						doCreatureSay(cid, text, TALKTYPE_MONSTER, false, cid, pos)
					end
				end
			end
		end
	end
end

Did not seem to do anything, every time i try to do a doanimated text i get this in my consul

doSendAnimatedText is now a deprecated function.
 
change the name of your function to something like: doNewSendAnimatedText

Then, replace all the occurrences of the string: doSendAnimatedText with doNewSendAnimatedText. There are several ways to make the modifications on several files in seconds. It depends if you use linux or windows.
 
Alright its working but, its TALKTYPE_MONSTER and orange text, is it impossible to get that lovable color animated text that floats ever upward?
 
You need to add the sources of animated text from older version like 8.6 (luascript.cpp,luascript.h,protocolgame.cpp,protocolgame.h,game.cpp,game.h)
 
Back
Top