Ir para conteúdo
  • 0

Pergunta

galera fiz um modules de distruiçãod e ponto que recebe atraves de sendcancel os valores do modules , so que qunado o setText atribui os valores o numeros fikam meio cortados , alguem poderia me ajudar ^^

 

post-365437-0-56197900-1396188988_thumb.png

 

otui

 

  Mostrar conteúdo oculto

lua
  Mostrar conteúdo oculto
skills = {}
topButton = nil
skillWindow = nil
function skills.init()
topButton = modules.client_topmenu.addRightGameToggleButton('Botao', 'Barra Skill', '/Barra Skills/botao.png', skills.toggle)
skillWindow = g_ui.displayUI('Barra Skills.otui')
skillWindow:setVisible(false)
g_keyboard.bindKeyDown('Ctrl+A', skills.toggle)
connect(g_game, {
onGameStart = refresh,
onGameEnd = offline
})
connect(g_game, 'onTextMessage', getPoints)
refresh()
end
function skills.terminate()
skillWindow:destroy()
skillWindow = nil
topButton:destroy()
topButton = nil
end
function autoUpdateTalks()
local player = g_game.getLocalPlayer()
if not player then return end
----------
g_game.talk("#getPoints#")
----------
end
function refresh()
local player = g_game.getLocalPlayer()
if not player then return end
autoUpdateTalks()
end
function getPoints(mode, text)
if not g_game.isOnline() then return end
if mode == MessageModes.Failure then
if string.find(text, "#getPoints#") then
local t = string.explode(text, ",")
local level = skillWindow:recursiveGetChildById("totalNumber")
local skill01 = skillWindow:recursiveGetChildById("Skilld01")
local skill02 = skillWindow:recursiveGetChildById("Skilld02")
local skill03 = skillWindow:recursiveGetChildById("Skilld03")
local skill04 = skillWindow:recursiveGetChildById("Skilld04")
local skill05 = skillWindow:recursiveGetChildById("Skilld05")
local skill06 = skillWindow:recursiveGetChildById("Skilld06")
level:setText(tonumber(t[2]))
skill01:setText(tonumber(t[3]))
skill02:setText(tonumber(t[4]))
skill03:setText(tonumber(t[5]))
skill04:setText(tonumber(t[6]))
skill05:setText(tonumber(t[7]))
skill06:setText(tonumber(t[8]))
end
end
end
function skills.toggle()
if g_game.isOnline() then
if skillWindow:isVisible() then
skillWindow:hide()
else
skillWindow:show()
end
end
end
function skills.online()
if not g_game.isOnline() then
skillWindow:hide()
end
end
function skills.offline()
skillWindow:hide()
end

Link para o comentário
https://xtibia.com/forum/topic/231003-bug-settext/
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

×
×
  • Criar Novo...