BrunooMaciell 85 Postado Fevereiro 18, 2016 Share Postado Fevereiro 18, 2016 (editado) Estou com um erro na bar de atacks do otclient!!PokeTibiaQuando uso meu otclient a barra de atack fica escura e nao consigo usa.Ta sem print mais qualquer coisa se alguem nao sobe eu edito aqui e posto uma print!Mais a barra de atacks nao funciona fica escura.Se alguem puder me ajuda ^^ @Edited \/ com a imagem do erro como que ta! Editado Fevereiro 18, 2016 por Brunnoo Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/ Compartilhar em outros sites More sharing options...
0 Aberos 71 Postado Fevereiro 21, 2016 Share Postado Fevereiro 21, 2016 @ se seu server for pda normalmente os pda na some functions.lua eles tem uma variavel global useOTClient que fika assim useOTClient = true verifica se o seu tem se e se esta assim , senao e so vc add Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686535 Compartilhar em outros sites More sharing options...
0 Aberos 71 Postado Fevereiro 18, 2016 Share Postado Fevereiro 18, 2016 poste um print para poder entender melhor. Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686323 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 18, 2016 Autor Share Postado Fevereiro 18, 2016 poste um print para poder entender melhor. ok vou edita aqui!! Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686355 Compartilhar em outros sites More sharing options...
0 Aberos 71 Postado Fevereiro 19, 2016 Share Postado Fevereiro 19, 2016 vc Prescisa verificar como ta sendo enviada a informação para o client? a sendcance ou opcode Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686361 Compartilhar em outros sites More sharing options...
0 icaro201094 2 Postado Fevereiro 19, 2016 Share Postado Fevereiro 19, 2016 Também estou com o mesmo problema, só que o meu se clicar no lugar que ficaria a spell solta normal, só não reconhece a imagem e o cooldown.. Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686378 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 19, 2016 Autor Share Postado Fevereiro 19, 2016 @@Aberos mais como eu vejo isto porque nem seionde ou qual script o server eo PDA!! Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686421 Compartilhar em outros sites More sharing options...
0 valakas 90 Postado Fevereiro 19, 2016 Share Postado Fevereiro 19, 2016 vc Prescisa verificar como ta sendo enviada a informação para o client? a sendcance ou opcode provavelmente é sendcancel, porque pda pelo que me lembro n tem opcode Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686427 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 19, 2016 Autor Share Postado Fevereiro 19, 2016 mais sabe como arruma bom alguem pode me ajuda arruma ?? Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686429 Compartilhar em outros sites More sharing options...
0 Aberos 71 Postado Fevereiro 20, 2016 Share Postado Fevereiro 20, 2016 poste seu cooldownbar.lua da lib Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686477 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 20, 2016 Autor Share Postado Fevereiro 20, 2016 Aii \/ function getPlayerPokeballs(cid) --alterado v1.9 \/local ret = {}local container = 0if isCreature(cid) thencontainer = getPlayerSlotItem(cid, 3).uidlocal myball = getPlayerSlotItem(cid, 8)if myball.uid > 0 thentable.insert(ret, myball)endelsecontainer = cidendif isContainer(container) and getContainerSize(container) > 0 thenfor slot = 0, (getContainerSize(container) - 1) dolocal item = getContainerItem(container, slot)if isContainer(item.uid) thenlocal itemsbag = getPlayerPokeballs(item.uid)if itemsbag and #itemsbag > 0 thenfor i = 0, #itemsbag dotable.insert(ret, itemsbag)endendelseif isPokeball(item.itemid) thentable.insert(ret, item)endendendreturn retendfunction doUpdatePokemonsBar(cid)if not isCreature(cid) then return true endif getPlayerStorageValue(cid, 656494) > 0 thenreturn trueendsetPlayerStorageValue(cid, 656494, 1000)addEvent(setPlayerStorageValue, 100, cid, 656494, -1)local ret = {}table.insert(ret, "p#,")local balls = getPlayerPokeballs(cid)local times = 0for a = 1, #balls dolocal item = balls[a]local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100)local name = getItemAttribute(item.uid, "poke")local port = getPlayerSlotItem(cid, CONST_SLOT_LEGS)if fotos[name] >= 11137 and fotos[name] <= 11387 thentimes = times + 1local foto = fotos[name] - 911doItemSetAttribute(item.uid, "ballorder", times)table.insert(ret, foto..","..name..""..times..","..hp..",")elseif fotos[name] >= 12605 thentimes = times + 1local foto = fotos[name] - 1178 --alterado v1.9doItemSetAttribute(item.uid, "ballorder", times)table.insert(ret, foto..","..name..""..times..","..hp..",")elsetimes = times + 1local foto = fotos[name] - 928doItemSetAttribute(item.uid, "ballorder", times)table.insert(ret, foto..","..name..""..times..","..hp..",")endenddoPlayerSendCancel(cid, table.concat(ret))endfunction getNewMoveTable(table, n)if table == nil or not n then return false endlocal moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9,table.move10, table.move11, table.move12}return moves[n] or falseendfunction doUpdateMoves(cid)if not isCreature(cid) then return true endlocal summon = getCreatureSummons(cid)[1]local ret = {}table.insert(ret, "12&,")if not summon thenfor a = 1, 12 dotable.insert(ret, "n/n,")enddoPlayerSendCancel(cid, table.concat(ret))addEvent(doUpdateCooldowns, 100, cid)return trueendif isTransformed(summon) then --alterado v1.9moves = movestable[getPlayerStorageValue(summon, 1010)]elsemoves = movestable[getCreatureName(summon)]endfor a = 1, 12 dolocal b = getNewMoveTable(moves, a)if b thentable.insert(ret, b.name..",")elsetable.insert(ret, "n/n,")endenddoPlayerSendCancel(cid, table.concat(ret))addEvent(doUpdateCooldowns, 100, cid)endfunction doUpdateCooldowns(cid)if not isCreature(cid) then return true endlocal a = getPlayerSlotItem(cid, 8)local ret = {}table.insert(ret, "12|,")if a.uid <= 0 or #getCreatureSummons(cid) <= 0 thenfor cds = 1, 12 doif useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") endenddoPlayerSendCancel(cid, table.concat(ret))return trueendfor cds = 1, 12 do----local summon = getCreatureSummons(cid)[1]if summon and getPlayerStorageValue(summon, 212123) >= 1 thencdzin = "cm_move"..cdselsecdzin = "move"..cdsend----if isTransformed(summon) then --alterado v1.9moves = movestable[getPlayerStorageValue(summon, 1010)]elsemoves = movestable[getCreatureName(summon)]endlocal b = getNewMoveTable(moves, cds)if not b thenfor cds = 1, 12 doif useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end --alterado v1.9enddoPlayerSendCancel(cid, table.concat(ret))return trueend----if getCD(a.uid, cdzin) > 0 thenif (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..b.level..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") endelseif (useOTClient and b) then table.insert(ret, "0|"..b.level..",") else table.insert(ret, "0,") endendenddoPlayerSendCancel(cid, table.concat(ret))endfunction getBallsAttributes(item)local t = {"poke", "gender", "nick", "boost", "happy", "hp", "description", "transBegin", "hunger", "transLeft", "transTurn", "transOutfit", "transName","trans", "light", "blink", "move1", "move2", "move3", "move4", "move5", "move6", "move7", "move8", "move9", "move10", "move11", "move12", "ballorder","hands", "aura", "burn", "burndmg", "poison", "poisondmg", "confuse", "sleep", "miss", "missSpell", "missEff", "fear", "fearSkill", "silence","silenceEff", "stun", "stunEff", "stunSpell", "paralyze", "paralyzeEff", "slow", "slowEff", "leech", "leechdmg", "Buff1", "Buff2", "Buff3", "Buff1skill","Buff2skill", "Buff3skill", "control", "unique", "task", "lock"}local ret = {}for a = 1, #t doif getItemAttribute(item, t[a]) == "hands" thenreturnendret[t[a]] = getItemAttribute(item, t[a]) or falseendreturn retendfunction doChangeBalls(cid, item1, item2)if not isCreature(cid) then return true endif item1.uid == item2.uid thenif #getCreatureSummons(cid) <= 0 thendoGoPokemon(cid, getPlayerSlotItem(cid, 8))elsedoReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)endreturn trueendif item1.uid > 0 and item2.uid > 0 thenlocal io = getBallsAttributes(item1.uid)local it = getBallsAttributes(item2.uid)for a, b in pairs (io) doif b thendoItemSetAttribute(item2.uid, a, b)elsedoItemEraseAttribute(item2.uid, a)endendfor a, b in pairs (it) doif b thendoItemSetAttribute(item1.uid, a, b)elsedoItemEraseAttribute(item1.uid, a)endendlocal id = item2.itemiddoTransformItem(item2.uid, item1.itemid)doTransformItem(item1.uid, id)doGoPokemon(cid, getPlayerSlotItem(cid, 8))elselocal id = item2.itemidlocal b = getBallsAttributes(item2.uid)local a = doPlayerAddItem(cid, 2643, false)for c, d in pairs (b) doif d thendoItemSetAttribute(a, c, d)elsedoItemEraseAttribute(a, c)endenddoRemoveItem(item2.uid, 1)doTransformItem(a, id)doGoPokemon(cid, getPlayerSlotItem(cid, 8))endend Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686510 Compartilhar em outros sites More sharing options...
0 Aberos 71 Postado Fevereiro 20, 2016 Share Postado Fevereiro 20, 2016 posta tbm o lua da cdbar (modulo) que fika no client Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686515 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 21, 2016 Autor Share Postado Fevereiro 21, 2016 Pronto \/ ^^ -- Privates variableslocal cdBarWin = nillocal isIn = 'H' --[[ 'H' = horizontal; 'V' = vertical ]]--local namesAtks = ''local icons = {}-- End privates variables-- Public functionsfunction init()cdBarWin = g_ui.displayUI('cdBar', modules.game_interface.getRootPanel())cdBarWin:setVisible(false)cdBarWin:move(250,50)connect(g_game, 'onTextMessage', getParams)connect(g_game, { onGameEnd = hide } )connect(LocalPlayer, { onLevelChange = onLevelChange })g_mouse.bindPress(cdBarWin, function() createMenu() end, MouseRightButton)createIcons()endfunction terminate()disconnect(g_game, { onGameEnd = hide })disconnect(g_game, 'onTextMessage', getParams)disconnect(LocalPlayer, { onLevelChange = onLevelChange })destroyIcons()cdBarWin:destroy()endfunction onLevelChange(localPlayer, value, percent)g_game.talk("/reloadCDs")endfunction getParams(mode, text)if not g_game.isOnline() then return endif mode == MessageModes.Failure thenif string.find(text, '12//,') thenif string.find(text, 'hide') then hide() else show() endelseif string.find(text, '12|,') thenatualizarCDs(text)elseif string.find(text, '12&,') thenFixTooltip(text)endendendfunction atualizarCDs(text)if not g_game.isOnline() then return endif not cdBarWin:isVisible() then return endlocal t = text:explode(",")table.remove(t, 1)for i = 1, 12 dolocal t2 = t:explode("|")barChange(i, tonumber(t2[1]), tonumber(t2[2]), tonumber(t2[3]))endendfunction changePercent(progress, icon, perc, num, init)if not cdBarWin:isVisible() then return endif init thenprogress:setPercent(0)elseprogress:setPercent(progress:getPercent()+perc)endif progress:getPercent() >= 100 thenprogress:setText("")returnendprogress:setText(num)icons[icon:getId()].event = scheduleEvent(function() changePercent(progress, icon, perc, num-1) end, 1000)endfunction barChange(ic, num, lvl, lvlPoke)if not g_game.isOnline() then return endif not cdBarWin:isVisible() then return endlocal icon = icons['Icon'..ic].iconlocal progress = icons['Icon'..ic].progressif not progress:getTooltip() then return endlocal player = g_game.getLocalPlayer()local pathOn = "moves_icon/"..progress:getTooltip().."_on.png"icon:setImageSource(pathOn)if num and num >= 1 thencleanEvents('Icon'..ic)changePercent(progress, icon, 100/num, num, true)elseif (lvlPoke and lvlPoke < lvl) or player:getLevel() < lvl thenprogress:setPercent(0)progress:setText('L.'.. lvl)progress:setColor('#FF0000')elseprogress:setPercent(100)progress:setText("")endendendfunction FixTooltip(text)cdBarWin:setHeight(isIn == 'H' and 416 or 40)cdBarWin:setWidth(isIn == 'H' and 40 or 416)if not text then text = namesAtks else namesAtks = text endlocal t2 = text:explode(",")local count = 0for j = 2, 13 dolocal ic = icons['Icon'..(j-1)]ic.icon:setMarginLeft(isIn == 'H' and 4 or ic.dist)ic.icon:setMarginTop(isIn == 'H' and ic.dist or 4)if t2[j] == 'n/n' thenic.icon:hide()count = count+1elseic.icon:show()ic.progress:setTooltip(t2[j])ic.progress:setVisible(true)endendif count > 0 and count ~= 12 thenif isIn == "H" thencdBarWin:setHeight(416 - (count*34))elsecdBarWin:setWidth(416 - (count*34))endelseif count == 12 thencdBarWin:setHeight(40)cdBarWin:setWidth(40)local p = icons['Icon1'].progressp:setTooltip(false)p:setVisible(false)endendfunction createIcons()local d = 38for i = 1, 12 dolocal icon = g_ui.createWidget('SpellIcon', cdBarWin)local progress = g_ui.createWidget('SpellProgress', cdBarWin)icon:setId('Icon'..i)progress:setId('Progress' ..i)icons['Icon'..i] = {icon = icon, progress = progress, dist = (i == 1 and 5 or i == 2 and 38 or d + ((i-2)*34)), event = nil}icon:setMarginTop(icons['Icon'..i].dist)icon:setMarginLeft(4)progress:fill(icon:getId())progress.onClick = function() g_game.talk('m'..i) endendendfunction destroyIcons()for i = 1, 12 doicons['Icon'..i].icon:destroy()icons['Icon'..i].progress:destroy()endcleanEvents()icons = {}endfunction cleanEvents(icon)local e = icons[icon]if icon thenif e and e.event ~= nil thenremoveEvent(e.event)e.event = nilendelsefor i = 1, 12 doe = icons['Icon'..i]cleanEvents('Icon'..i)e.progress:setPercent(100)e.progress:setText("")endendendfunction createMenu()local menu = g_ui.createWidget('PopupMenu')menu:addOption("Set "..(isIn == 'H' and 'Vertical' or 'Horizontal'), function() toggle() end)menu:display()endfunction toggle()if not cdBarWin:isVisible() then return endcdBarWin:setVisible(false)if isIn == 'H' thenisIn = 'V'elseisIn = 'H'endFixTooltip()show()endfunction hide()cleanEvents()cdBarWin:setVisible(false)endfunction show()cdBarWin:setVisible(true)end-- End public functions Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686529 Compartilhar em outros sites More sharing options...
0 BrunooMaciell 85 Postado Fevereiro 21, 2016 Autor Share Postado Fevereiro 21, 2016 (editado) ok! mexi aqui vou testa ^^ Era isto mesmo - vlw consegui ^^ Rep+ Editado Fevereiro 21, 2016 por Brunnoo Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686536 Compartilhar em outros sites More sharing options...
0 Furabio 258 Postado Fevereiro 22, 2016 Share Postado Fevereiro 22, 2016 Tópico Movido Este tópico foi movido de "OTServ → Clients → Suporte Clientes" para "OTServ → Clients → Suporte Clientes → Tópicos Resolvidos | Clientes". Link para o comentário https://xtibia.com/forum/topic/239514-bar-atacks/#findComment-1686636 Compartilhar em outros sites More sharing options...
Pergunta
BrunooMaciell 85
Estou com um erro na bar de atacks do otclient!!
PokeTibia
Quando uso meu otclient a barra de atack fica escura e nao consigo usa.
Ta sem print mais qualquer coisa se alguem nao sobe eu edito aqui e posto uma print!
Mais a barra de atacks nao funciona fica escura.
Se alguem puder me ajuda ^^
@Edited \/ com a imagem do erro como que ta!
Editado por BrunnooLink para o comentário
https://xtibia.com/forum/topic/239514-bar-atacks/Compartilhar em outros sites
14 respostass a esta questão
Posts Recomendados