Postado Janeiro 21, 2015 10 anos Autor Excelente mais qnd o treinador tem 5 o menos pokes o barra sigue alhi E posivele arrumar iso? Obrigado mto obrigado. http://Pokexmortal.com/ ONLINE! Todo mondo Bienvenido ! Serv serio 24/7 comunidade Latina!
Postado Janeiro 21, 2015 10 anos acho que assim deve funcionar local barPoke = nil local icons = {} -- Public functions function init() barPoke = g_ui.displayUI('barpoke', modules.game_interface.getRootPanel()) barPoke:setVisible(false) barPoke:move(250,50) connect(g_game, 'onTextMessage', getParams) connect(g_game, { onGameEnd = hide } ) connect(g_game, { onGameStart = show } ) createIcons() end function terminate() disconnect(g_game, { onGameEnd = hide }) disconnect(g_game, 'onTextMessage', getParams) destroyIcons() barPoke:destroy() end function getParams(mode, text) if not g_game.isOnline() then return end if mode == MessageModes.Failure then if string.sub(text, 1, 9) == "BarClosed" then hide() elseif string.sub(text, 1, 7) == "Pokebar" then atualizarBar(text) elseif string.find(text, 'Pokehp/') then onPokes(text) end end end function atualizarBar(text) if not g_game.isOnline() then return end local talk = "/pokamon" show() cleanAllPokes() local t = string.explode(text, "/") for i=2, #t do x= i-1 local poke = t[i] local zafrada = i-1 local progress = icons['Icon'..x].progress changeIconPoke(x, poke) progress.onClick = function() g_game.talk(talk.." "..poke..""..zafrada.."") end end end function changeIconPoke(i, poke) if not g_game.isOnline() then return end local icon = icons['Icon'..i].icon local image = "pokes/"..poke..".png" icon:setImageSource(image) end function createIcons() local d = 36 local image = "pokes/portait.png" for i = 1, 6 do local icon = g_ui.createWidget('IconPoke', barPoke) local icon1 = g_ui.createWidget('HealthBar', icon) local progress = g_ui.createWidget('Poke', barPoke) icon:setId('Icon'..i) progress:setId('Progress'..i) icons['Icon'..i] = {icon = icon, progress = progress, dist = (i == 1 and -5 or i == 2 and 35 or d + ((i-2)*38)), event = nil} icon:setMarginLeft(icons['Icon'..i].dist) icon:setImageSource(image) icon:setMarginTop(-5) icon1:setMarginTop(30) icon1:setMarginLeft(-3) icon1:setMarginRight(-6) icon1:setId('HealthBar'..i) progress:fill(icon:getId()) end end function cleanAllPokes() local image = "pokes/portait.png" for i = 1, 6 do local icon = icons['Icon'..i].icon local icon1 = barPoke:recursiveGetChildById('HealthBar'..i) icon.onClick = function() end icon:setImageSource(image) local progress = icons['Icon'..i].progress progress.onClick = function() g_game.talk("") end icon1:hide() end end function onPokes(text) if not g_game.isOnline() then return end local t = text:explode('/') table.remove(t, 1) for i = 1, #t do barPoke:recursiveGetChildById('HealthBar'..i):show() barPoke:recursiveGetChildById('HealthBar'..i):setValue(t[i], 0, 100) end end function hide() barPoke:setVisible(false) end function show() barPoke:setVisible(true) end -- End public functions
Postado Agosto 20, 2015 9 anos En mi cliente aparecen (12/12/12/12/12/12/121/12//12/12/21) asi e vez de la barra de cooldown. Que puede ser??
Postado Fevereiro 22, 2018 7 anos Autor Velhos tempos http://Pokexmortal.com/ ONLINE! Todo mondo Bienvenido ! Serv serio 24/7 comunidade Latina!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.