pra que serve isso...pode me explicar..nao sei bem o que é insignas
- Fórum
- OTServ
- Tutoriais
- Tutoriais de Clients
- Insignias em Otclient
info
Grupo: Artesão
Registrado: 10/06/13
Posts: 126
Reputação: +5
Char no Tibia: You Are Dead

info
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino

/\ Isso é pra OT Pokemon
E se eu não usar PDA? Esse sistema já existe, aqui no xtibia.
info
Grupo: Artesão
Registrado: 18/03/13
Posts: 149
Reputação: +19
Gênero: Masculino
Char no Tibia: Cachero

Smix o sistema é para qualquer servidor...ira ser usado na talkactions.
Smix o sistema é para qualquer servidor...ira ser usado na talkactions.
Não é. Só funciona em servidores que tem a seguinte tabela:
gymbadges
E no meu não tem ela. ^^ Só funciona em PDA mesmo...
info
Grupo: Artesão
Registrado: 18/03/13
Posts: 149
Reputação: +19
Gênero: Masculino
Char no Tibia: Cachero

Entendi, vou estar editando para você.
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

@smix
como se fosse dificil pegar ela da lib e por dentro da talk neh? u,U
-soh teria q mudar os ids provavelmente-
info
Grupo: Artesão
Registrado: 18/03/13
Posts: 149
Reputação: +19
Gênero: Masculino
Char no Tibia: Cachero

/\ Certinho rep slicer.
info
Grupo: Artesão
Registrado: 10/06/13
Posts: 126
Reputação: +5
Char no Tibia: You Are Dead

ainda nao intendi com ele funciona ![]()
info
Grupo: Campones
Registrado: 06/11/13
Posts: 1
Reputação: 0






info
Grupo: Artesão
Registrado: 18/03/13
Posts: 149
Reputação: +19
Gênero: Masculino
Char no Tibia: Cachero
-Muitas pessoas devem querer as insignias no Ot Client, eu estava procurando na net e achei esse sistema, fui logo colocar no meu Ot Client, porém deu erro e fui caçar o erro...está 100% funcional, bora começar?
1º Edições no server:
Vá em: talkactions/scripts...crie um arquivo lua com o nome: talkGym.lua: e coloque isso dentro do arquivo:
function onSay(cid, words, param) if gymbadges[param] then doPlayerSendCancel(cid, "#getBadges# "..param.." "..getPlayerItemCount(cid, gymbadges[param])) end return true endEm Xml:
PARA QUEM QUISER QUE ATUALIZE NA HORA QUE GANHAR O GYM
npc/scripts/todos os npcs de gym:
Embaixo dessa linha
Ficando assim:
local function doWinDuel(cid, npc) if not isCreature(cid) then return true end local this = npc local a = gymbadges[getCreatureName(this)] + 8 doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(a - 8).." as a prize.", 1) local b = getPlayerItemById(cid, true, a) if b.uid > 0 then doTransformItem(b.uid, b.itemid - 8) end doPlayerSendCancel(cid, "#getBadges# "..getCreatureName(this).." "..getPlayerItemCount(cid, gymbadges[getCreatureName(this)])) endNo server é apenas isso, agora vamos em: Otclient>modules>game_skills:
Skills Otui:
Em baixo de tudo la em ultimo coloque
SkillButton id: pokeGym size: 143 69 margin-top: 8 UIButton id: gymBrock size: 32 32 anchors.top: parent.top anchors.right: parent.right margin-right: 120 UIButton id: gymMisty anchors.top: gymBrock.top anchors.left: gymBrock.right margin-left: 3 UIButton id: gymSurge anchors.top: gymBrock.top anchors.left: gymMisty.right margin-left: 3 UIButton id: gymErika anchors.top: gymBrock.top anchors.left: gymSurge.right margin-left: 3 UIButton id: gymSabrina anchors.top: gymBrock.bottom anchors.left: gymBrock.left margin-top: 6 UIButton id: gymKoga anchors.top: parent.top anchors.top: gymBrock.bottom anchors.left: gymMisty.left margin-top: 6 UIButton id: gymBlaine anchors.top: parent.top anchors.top: gymBrock.bottom anchors.left: gymSurge.left margin-top: 6 UIButton id: gymKira anchors.top: parent.top anchors.top: gymBrock.bottom anchors.left: gymErika.left margin-top: 6Skills.Lua:
Inicio do Script:
local gyms = { ["Brock0"] = "/images/game/pokemon/clan/brock", ---- terminados em 0 apagado, terminados em 1 aceso ["Brock1"] = "/images/game/pokemon/clan/brock", ["Misty0"] = "/images/game/pokemon/clan/misty", ["Misty1"] = "/images/game/pokemon/clan/misty", ["Surge0"] = "/images/game/pokemon/clan/surge", ["Surge1"] = "/images/game/pokemon/clan/surge", ["Erika0"] = "/images/game/pokemon/clan/erika", ["Erika1"] = "/images/game/pokemon/clan/erika", ["Sabrina0"] = "/images/game/pokemon/clan/sabrina", ["Sabrina1"] = "/images/game/pokemon/clan/sabrina", ["Koga0"] = "/images/game/pokemon/clan/koga", ["Koga1"] = "/images/game/pokemon/clan/koga", ["Blaine0"] = "/images/game/pokemon/clan/blaine", ["Blaine1"] = "/images/game/pokemon/clan/blaine", ["Kira0"] = "/images/game/pokemon/clan/kira", ["Kira1"] = "/images/game/pokemon/clan/kira", }Em baixo de:
connect(g_game, { onGameStart = refresh, onGameEnd = offline })Coloque:
Ficando:
connect(g_game, { onGameStart = refresh, onGameEnd = offline }) connect(g_game, 'onTextMessage', getGym)Em baixo de:
g_keyboard.unbindKeyDown('Ctrl+S') skillsWindow:destroy() skillsButton:destroy() endColoque:
function autoUpdateTalks() local player = g_game.getLocalPlayer() if not player then return end ---------- g_game.talk("#getGym# Brock") g_game.talk("#getGym# Misty") g_game.talk("#getGym# Surge") g_game.talk("#getGym# Erika") g_game.talk("#getGym# Sabrina") g_game.talk("#getGym# Koga") g_game.talk("#getGym# Blaine") g_game.talk("#getGym# Kira") ---------- end function getGym(mode, text) local t = string.explode(text, " ") local badges = skillsWindow:recursiveGetChildById("gym"..t[2]) if not g_game.isOnline() then return end if mode == MessageModes.Failure then if text:find("#getBadges#") then badges:setImageSource(gyms[t[2]..""..tonumber(t[3])]) end end endFicando:
g_keyboard.unbindKeyDown('Ctrl+S') skillsWindow:destroy() skillsButton:destroy() end function autoUpdateTalks() local player = g_game.getLocalPlayer() if not player then return end ---------- g_game.talk("#getGym# Brock") g_game.talk("#getGym# Misty") g_game.talk("#getGym# Surge") g_game.talk("#getGym# Erika") g_game.talk("#getGym# Sabrina") g_game.talk("#getGym# Koga") g_game.talk("#getGym# Blaine") g_game.talk("#getGym# Kira") ---------- end function getGym(mode, text) local t = string.explode(text, " ") local badges = skillsWindow:recursiveGetChildById("gym"..t[2]) if not g_game.isOnline() then return end if mode == MessageModes.Failure then if text:find("#getBadges#") then badges:setImageSource(gyms[t[2]..""..tonumber(t[3])]) end end endEm baixo de:
Coloque:
Ficando:
Espero que gostem.
PS: O erro que dava no meu era que não aparecia a opção skills no OTC.
Créditos: