[Encerrado] CDbar e Pokebar - OtClient PDA

zedarosquinha
em Tópicos Sem Resposta

zedarosquinha

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/11/12Posts: 72

Editado:

 

Daew pessoal,

 

Então, aqui estou usando o otclient do Slicer 1.8, mas só ta funcionando o "CDBAR".

 

Tem como ativar o "POKEBAR" ?????

 

O script em data/talkactions/scripts/cdbar.lua está assim:

 

 

 

local function ChangeBalls(cid, param, cancelequal)
local balls = getPlayerPokeballs(cid)
for a = 1, #balls do
local item = balls[a]
if not getItemAttribute(item.uid, "ballorder") then return doPlayerSendTextMessage(cid, 27, "Do update your pokemon bar!") end --alterado v1.6
local name = getItemAttribute(item.uid, "poke") .. getItemAttribute(item.uid, "ballorder")
if name == param then
if cancelequal and item.uid == getPlayerSlotItem(cid, 8).uid then return true end
doChangeBalls(cid, getPlayerSlotItem(cid, 8), item)
return 0
end
end
end
function onSay(cid, words, param)
if not useKpdoDlls then return true end
if words == "!code64" then
return 0
end
if words == "/pokeread" then
if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6
local pokemon = getCreatureSummons(cid)[1]
local pokelife = (getCreatureHealth(pokemon) / getCreatureMaxHealth(pokemon))
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pokelife)
end
doUpdatePokemonsBar(cid)
end
if words == "/goaction" then
if param == "null" then return 0 end
if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end
if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 then return true end
--alterado v1.8
if #getCreatureSummons(cid) >= 1 then
if not getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ballorder") then return doPlayerSendTextMessage(cid, 27, "Do update your pokemon bar!") end
--alterado v1.6
addEvent(doReturnPokemon, 100, cid, getCreatureSummons(cid)[1], false, pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)
if param ~= getItemAttribute(getPlayerSlotItem(cid, 8).uid, "poke") .. getItemAttribute(getPlayerSlotItem(cid, 8).uid, "ballorder") then
addEvent(ChangeBalls, 1200, cid, param, true)
end
else
addEvent(ChangeBalls, 100, cid, param)
end
exhaustion.set(cid, 6666, 2)
return 0
end
if words == "/reloadCDs" then --alterado v1.7
doUpdateMoves(cid)
return true
end
return 0
end

 

obrigado aew, se alguém me ensinar e passar certinho como que faz dou repppp, pq ta fazendo falta aqui

 

Tem a "COOLDOWNBAR.LUA" na pasta "DATA/LIB/SCRIPTS/COOLDOWN BAR.LUA"

 

 

 

function getPlayerPokeballs(cid) --alterado v1.9 \/ TUDO!!
local ret = {}
local container = 0
if isCreature(cid) then
container = getPlayerSlotItem(cid, 3).uid
local myball = getPlayerSlotItem(cid, 8)
if myball.uid > 0 then
table.insert(ret, myball)
end
else
container = cid
end
if isContainer(container) and getContainerSize(container) > 0 then
for slot = 0, (getContainerSize(container) - 1) do
local item = getContainerItem(container, slot)
if isContainer(item.uid) then
local itemsbag = getPlayerPokeballs(item.uid)
if itemsbag and #itemsbag > 0 then
for i = 0, #itemsbag do
table.insert(ret, itemsbag)
end
end
elseif isPokeball(item.itemid) then
table.insert(ret, item)
end
end
end
return ret
end
function doUpdatePokemonsBar(cid)
if not isCreature(cid) then return true end
if getPlayerStorageValue(cid, 656494) > 0 then
return true
end
setPlayerStorageValue(cid, 656494, 1000)
addEvent(setPlayerStorageValue, 100, cid, 656494, -1)
local ret = {}
table.insert(ret, "p#,")
local balls = getPlayerPokeballs(cid)
local times = 0
for a = 1, #balls do
local 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 then
times = times + 1
local foto = fotos[name] - 911
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
elseif fotos[name] >= 12605 then
times = times + 1
local foto = fotos[name] - 1178 --alterado v1.9
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
else
times = times + 1
local foto = fotos[name] - 928
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
end
end
doPlayerSendCancel(cid, table.concat(ret))
end
function getNewMoveTable(table, n)
if table == nil or not n then return false end
local 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 false
end
function doUpdateMoves(cid)
if not isCreature(cid) then return true end
local summon = getCreatureSummons(cid)[1]
local ret = {}
table.insert(ret, "12&,")
if not summon then
for a = 1, 12 do
table.insert(ret, "n/n,")
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
return true
end
if isTransformed(summon) then --alterado v1.9
moves = movestable[getPlayerStorageValue(summon, 1010)]
else
moves = movestable[getCreatureName(summon)]
end
for a = 1, 12 do
local b = getNewMoveTable(moves, a)
if b then
table.insert(ret, b.name..",")
else
table.insert(ret, "n/n,")
end
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
end
function doUpdateCooldowns(cid)
if not isCreature(cid) then return true end
local a = getPlayerSlotItem(cid, 8)
local ret = {}
table.insert(ret, "12|,")
if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then
for cds = 1, 12 do
if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end
end
doPlayerSendCancel(cid, table.concat(ret))
return true
end
for cds = 1, 12 do
----
local summon = getCreatureSummons(cid)[1]
if summon and getPlayerStorageValue(summon, 212123) >= 1 then
cdzin = "cm_move"..cds
else
cdzin = "move"..cds
end
----
if isTransformed(summon) then --alterado v1.9
moves = movestable[getPlayerStorageValue(summon, 1010)]
else
moves = movestable[getCreatureName(summon)]
end
local b = getNewMoveTable(moves, cds)
if not b then
for cds = 1, 12 do
if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end
end
doPlayerSendCancel(cid, table.concat(ret))
return true
end
----
if getCD(a.uid, cdzin) > 0 then
if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..b.level..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end
else
if (useOTClient and b) then table.insert(ret, "0|"..b.level..",") else table.insert(ret, "0,") end
end
end
doPlayerSendCancel(cid, table.concat(ret))
end
function 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 do
if getItemAttribute(item, t[a]) == "hands" then
return
end
ret[t[a]] = getItemAttribute(item, t[a]) or false
end
return ret
end
function doChangeBalls(cid, item1, item2)
if not isCreature(cid) then return true end
if item1.uid == item2.uid then
if #getCreatureSummons(cid) <= 0 then
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)
end
return true
end
if item1.uid > 0 and item2.uid > 0 then
local io = getBallsAttributes(item1.uid)
local it = getBallsAttributes(item2.uid)
for a, b in pairs (io) do
if b then
doItemSetAttribute(item2.uid, a, b)
else
doItemEraseAttribute(item2.uid, a)
end
end
for a, b in pairs (it) do
if b then
doItemSetAttribute(item1.uid, a, b)
else
doItemEraseAttribute(item1.uid, a)
end
end
local id = item2.itemid
doTransformItem(item2.uid, item1.itemid)
doTransformItem(item1.uid, id)
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
local id = item2.itemid
local b = getBallsAttributes(item2.uid)
local a = doPlayerAddItem(cid, 2643, false)
for c, d in pairs (b) do
if d then
doItemSetAttribute(a, c, d)
else
doItemEraseAttribute(a, c)
end
end
doRemoveItem(item2.uid, 1)
doTransformItem(a, id)
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
end
end

 

 

 

 

vlw abraçoo

kttallan

Lord Sorte
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 06/03/13Posts: 1574Gênero: MasculinoChar no Tibia: Lord Sorte

Mnan tipo o erondino fica pro erondino mais tipo o otclient do erondino não ia bater bem no do pda por temos de diferenta use um que foi editado com base do pda tem alguns so você ir na area.

                                                                Scripter em Treinamento

 

Codigos

 

Simples Pet Sistema < New

 

Assim que possivel mais codigos, com criatividade.

zedarosquinha

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/11/12Posts: 72

Fui lá em clients e não tem....pelo menos não achei.....

Tem outros ots pra baixar com o otclient, mas tão com defeito, tipo, um não da pra abrir mais de uma página de bags, outro as barras não funfam, outro.....

esse do erondino só não funfou a imagem do sexo dos pokemons, que aparecem como redskull ou witeskull.

 

Se alguém tiver e puder disponibilizar, dou rep sem problema nenhummm.

akumah

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 28/09/10Posts: 146

O pda by slicer, em toda modificação em toda atualização, coloca um "-- alterado v1.X", o que pode te ajudar bastante, se estiver empenhado em pegar as alterações dele

Eu fiz isso no meu, pois usei como base o 1.6, se nao me engano, e como tava beem alterado já, não quis substituir tudo, e fui pegano o importante

Você tem o cdbar.lua na pasta lib, certo?

Se tem, veja que erro ocorre no otclient do pda quando tentar usá-lo, pois creio que é o melhor a se fazer se tiver uma noção de como editá-lo.

zedarosquinha

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/11/12Posts: 72

Não tem nada de cdbar na "DATA/LIB/SCRIPTS"

 

Tem a "COOLDOWNBAR.LUA"

 

 

 

function getPlayerPokeballs(cid) --alterado v1.9 \/ TUDO!!
local ret = {}
local container = 0
if isCreature(cid) then
container = getPlayerSlotItem(cid, 3).uid
local myball = getPlayerSlotItem(cid, 8)
if myball.uid > 0 then
table.insert(ret, myball)
end
else
container = cid
end
if isContainer(container) and getContainerSize(container) > 0 then
for slot = 0, (getContainerSize(container) - 1) do
local item = getContainerItem(container, slot)
if isContainer(item.uid) then
local itemsbag = getPlayerPokeballs(item.uid)
if itemsbag and #itemsbag > 0 then
for i = 0, #itemsbag do
table.insert(ret, itemsbag)
end
end
elseif isPokeball(item.itemid) then
table.insert(ret, item)
end
end
end
return ret
end
function doUpdatePokemonsBar(cid)
if not isCreature(cid) then return true end
if getPlayerStorageValue(cid, 656494) > 0 then
return true
end
setPlayerStorageValue(cid, 656494, 1000)
addEvent(setPlayerStorageValue, 100, cid, 656494, -1)
local ret = {}
table.insert(ret, "p#,")
local balls = getPlayerPokeballs(cid)
local times = 0
for a = 1, #balls do
local 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 then
times = times + 1
local foto = fotos[name] - 911
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
elseif fotos[name] >= 12605 then
times = times + 1
local foto = fotos[name] - 1178 --alterado v1.9
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
else
times = times + 1
local foto = fotos[name] - 928
doItemSetAttribute(item.uid, "ballorder", times)
table.insert(ret, foto..","..name..""..times..","..hp..",")
end
end
doPlayerSendCancel(cid, table.concat(ret))
end
function getNewMoveTable(table, n)
if table == nil or not n then return false end
local 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 false
end
function doUpdateMoves(cid)
if not isCreature(cid) then return true end
local summon = getCreatureSummons(cid)[1]
local ret = {}
table.insert(ret, "12&,")
if not summon then
for a = 1, 12 do
table.insert(ret, "n/n,")
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
return true
end
if isTransformed(summon) then --alterado v1.9
moves = movestable[getPlayerStorageValue(summon, 1010)]
else
moves = movestable[getCreatureName(summon)]
end
for a = 1, 12 do
local b = getNewMoveTable(moves, a)
if b then
table.insert(ret, b.name..",")
else
table.insert(ret, "n/n,")
end
end
doPlayerSendCancel(cid, table.concat(ret))
addEvent(doUpdateCooldowns, 100, cid)
end
function doUpdateCooldowns(cid)
if not isCreature(cid) then return true end
local a = getPlayerSlotItem(cid, 8)
local ret = {}
table.insert(ret, "12|,")
if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then
for cds = 1, 12 do
if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end
end
doPlayerSendCancel(cid, table.concat(ret))
return true
end
for cds = 1, 12 do
----
local summon = getCreatureSummons(cid)[1]
if summon and getPlayerStorageValue(summon, 212123) >= 1 then
cdzin = "cm_move"..cds
else
cdzin = "move"..cds
end
----
if isTransformed(summon) then --alterado v1.9
moves = movestable[getPlayerStorageValue(summon, 1010)]
else
moves = movestable[getCreatureName(summon)]
end
local b = getNewMoveTable(moves, cds)
if not b then
for cds = 1, 12 do
if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end
end
doPlayerSendCancel(cid, table.concat(ret))
return true
end
----
if getCD(a.uid, cdzin) > 0 then
if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..b.level..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end
else
if (useOTClient and b) then table.insert(ret, "0|"..b.level..",") else table.insert(ret, "0,") end
end
end
doPlayerSendCancel(cid, table.concat(ret))
end
function 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 do
if getItemAttribute(item, t[a]) == "hands" then
return
end
ret[t[a]] = getItemAttribute(item, t[a]) or false
end
return ret
end
function doChangeBalls(cid, item1, item2)
if not isCreature(cid) then return true end
if item1.uid == item2.uid then
if #getCreatureSummons(cid) <= 0 then
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)
end
return true
end
if item1.uid > 0 and item2.uid > 0 then
local io = getBallsAttributes(item1.uid)
local it = getBallsAttributes(item2.uid)
for a, b in pairs (io) do
if b then
doItemSetAttribute(item2.uid, a, b)
else
doItemEraseAttribute(item2.uid, a)
end
end
for a, b in pairs (it) do
if b then
doItemSetAttribute(item1.uid, a, b)
else
doItemEraseAttribute(item1.uid, a)
end
end
local id = item2.itemid
doTransformItem(item2.uid, item1.itemid)
doTransformItem(item1.uid, id)
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
else
local id = item2.itemid
local b = getBallsAttributes(item2.uid)
local a = doPlayerAddItem(cid, 2643, false)
for c, d in pairs (b) do
if d then
doItemSetAttribute(a, c, d)
else
doItemEraseAttribute(a, c)
end
end
doRemoveItem(item2.uid, 1)
doTransformItem(a, id)
doGoPokemon(cid, getPlayerSlotItem(cid, 8))
end
end

 

Tem cdbar na pasta "DATA/TALKACTIONS/SCRIPTS/CDBAR.LUA"

 

edit:

 

Baixei o otclient do Slicer e somente funciona a CDBAR, mas o Pokebar não.

akumah

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 28/09/10Posts: 146

Se eu não me engano (quase certeza) não tem Pokebar no otclient do Slicer, e sim só a CDBar.

A pokebar só tem nos clientes de tibia com a otal.dll

zedarosquinha

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/11/12Posts: 72

hummmmmm, pode ser, pq o CDbar funcionou beleza aqui, só mesmo o POKEbar que não.

 

Tem um otclient que tem pokebar, ela aparece, mas não reconhece os pokemons, é o do WORD POKEMON, acho que é esse:

 

http://www.xtibia.com/forum/topic/221041-pda-pwo-v1/

 

Será que dá pra adaptar e fazer reconhecer os pokemons no otclient do slicer?

 

vlw

akumah

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 28/09/10Posts: 146

Para funcionar a função do OTClient, você tem que, também, importar as funções do servidor referentes às da pokebar e tal.

Veja o que o jogador, por exemplo, fala ao clicar em um pokémon no cliente, e procure essa talkaction no servidor.

zedarosquinha

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/11/12Posts: 72

E como faço para importar isso?

Pq a talkaction que tem no servidor é aquela do primeiro post deste tópico.

 

obrigado

Gabrieltxu

O Héroi
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 12/06/12Posts: 2180Gênero: MasculinoChar no Tibia: Supreme Player

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Canal do facebook de lives!! cola la galera me ajudar seguindo a pagina hehe ! ❤️

 

               https://www.facebook.com/Tuxao0

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel