Hello so this script doesnt send entire text it looks like it cant go above x amount characters because it cuts only longer text but shorter text sends just fine.
LUA:
local config = {
--[skillType] = { "text", textColour, animationEffect}
[SKILL_LEVEL] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_CLUB] = { "Attack Tested!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE }, --cuts this part, sends only Attack Te (and it cuts other part of text)
[SKILL_AXE] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_SWORD] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_DISTANCE] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_SHIELD] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_FISHING] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_FIST] = { "Test!", TEXTCOLOR_LIGHTGREEN, CONST_ME_NONE },
[SKILL_MAGLEVEL] = { "Testl!", TEXTCOLOR_LIGHTBLUE, CONST_ME_NONE }
}
local imageEffect = {
{0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0}
}
function onAdvance(player, skill, oldLevel, newLevel)
if oldLevel < newLevel then
local info = config[skill]
if info then
local position = player:getPosition()
Game.sendAnimatedText(info[1], position, info[2])
local diff = math.ceil(#imageEffect[1] / 2)
position = position + Position(-diff, -diff, 0)
if info[3] == CONST_ME_NONE then
return true
end
for k, v in pairs(imageEffect) do
for l, b in pairs(v) do
if b ~= 0 then
(position + Position(l, k, 0)):sendMagicEffect(info[3])
end
end
end
end
end
return true
end