Ir para conteúdo

Featured Replies

Postado
  • Diretor

qual a tag do xml  que vc usa???

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

  • Respostas 34
  • Visualizações 1.8k
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado
  • Autor
1 minuto atrás, L3K0T disse:

qual a tag do xml  que vc usa???

 

<talkaction words="!stats;/stats;!status;/status" event="script" value="stats.lua"/>

 

 

@Reds tem como me ajudar ainda???

Editado por tetheuscunha (veja o histórico de edições)

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Postado
  • Diretor
18 minutos atrás, tetheuscunha disse:

<talkaction words="!stats;/stats;!status;/status" event="script" value="stats.lua"/>

 

 

@Reds tem como me ajudar ainda???

 

function onSay(cid, words, param)

local level = getPlayerLevel(cid)
local vocation = getPlayerVocationName(cid)
local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid)
local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid)
local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3)
local distance, shield, fishing, magic =  getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid)
function getCritical(cid)
crit = getPlayerStorageValue(cid, 48913)
  if crit < 0 then
            crit = 0
          end
return crit * 0.3
end
function getResets(cid)
resets = getPlayerStorageValue(cid, 378378)
  if resets < 0 then
            resets = 0
          end
return resets
end
function getItemAbsorve(itemuid)
return getItemAttribute(itemuid, "absorbPercentAll")
end
function getItemMagicIncrease(itemuid)
return getItemAttribute(itemuid, "increaseMagic")
end
local max = 50
local dodgePercent = math.floor(0)
local all, increasemagic = 0, 0


for i = 1, 9 do
if getPlayerSlotItem(cid, i).uid > 1 then



function getItemDodgePercent(itemuid)
return getItemAttribute(itemuid, "dodgePercent")
end
function doPlayerAddDodgeItem(cid, itemid, percent)
local item = doPlayerAddItem(cid, itemid)
doItemSetAttribute(item, "description", "[Dodge: "..percent.."%]")
doItemSetAttribute(item, "dodgePercent", percent)
end

if getItemDodgePercent(getPlayerSlotItem(cid, i).uid) then
dodgePercent = dodgePercent + getItemDodgePercent(getPlayerSlotItem(cid, i).uid)
end


if getItemAbsorve(getPlayerSlotItem(cid, i).uid) then
all = all + getItemAbsorve(getPlayerSlotItem(cid, i).uid)
end
if getItemMagicIncrease(getPlayerSlotItem(cid, i).uid) then
increasemagic = increasemagic + getItemMagicIncrease(getPlayerSlotItem(cid, i).uid)
end
end

if dodgePercent >= max then dodgePercent = max end
dodgeTotal = math.floor(dodgePercent*10)/10


local cap = getPlayerFreeCap(cid)
local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nReset(s): "..getResets(cid).."\nCapacity: ".. cap .."\n\nDodge Percent: ".. (dodgeTotal) .."%\nCritical: ".. getCritical(cid) .."%\nProtection: ".. all .."%\nMagic Increase: ".. increasemagic .."%\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing ..""
doShowTextDialog(cid, 5808, text)
return true
end
end

tente e espero ter ajudado

Editado por L3K0T (veja o histórico de edições)

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

Postado

pior que o increaseMagic não tem como sem alterar as sources, achei que o luaGetInfo poderia trazer ML ou inc Magic, porém não traz, se quiser mesmo isso tem que alterar as sources, pelo menos no tfs 0.4 não tem nada para que isso funcione (ou eu to vendo mt errado..)

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Postado
  • Autor
6 horas atrás, L3K0T disse:

function onSay(cid, words, param)

local level = getPlayerLevel(cid)
local vocation = getPlayerVocationName(cid)
local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid)
local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid)
local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3)
local distance, shield, fishing, magic =  getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid)
function getCritical(cid)
crit = getPlayerStorageValue(cid, 48913)
  if crit < 0 then
            crit = 0
          end
return crit * 0.3
end
function getResets(cid)
resets = getPlayerStorageValue(cid, 378378)
  if resets < 0 then
            resets = 0
          end
return resets
end
function getItemAbsorve(itemuid)
return getItemAttribute(itemuid, "absorbPercentAll")
end
function getItemMagicIncrease(itemuid)
return getItemAttribute(itemuid, "increaseMagic")
end
local max = 50
local dodgePercent = math.floor(0)
local all, increasemagic = 0, 0


for i = 1, 9 do
if getPlayerSlotItem(cid, i).uid > 1 then



function getItemDodgePercent(itemuid)
return getItemAttribute(itemuid, "dodgePercent")
end
function doPlayerAddDodgeItem(cid, itemid, percent)
local item = doPlayerAddItem(cid, itemid)
doItemSetAttribute(item, "description", "[Dodge: "..percent.."%]")
doItemSetAttribute(item, "dodgePercent", percent)
end

if getItemDodgePercent(getPlayerSlotItem(cid, i).uid) then
dodgePercent = dodgePercent + getItemDodgePercent(getPlayerSlotItem(cid, i).uid)
end


if getItemAbsorve(getPlayerSlotItem(cid, i).uid) then
all = all + getItemAbsorve(getPlayerSlotItem(cid, i).uid)
end
if getItemMagicIncrease(getPlayerSlotItem(cid, i).uid) then
increasemagic = increasemagic + getItemMagicIncrease(getPlayerSlotItem(cid, i).uid)
end
end

if dodgePercent >= max then dodgePercent = max end
dodgeTotal = math.floor(dodgePercent*10)/10


local cap = getPlayerFreeCap(cid)
local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nReset(s): "..getResets(cid).."\nCapacity: ".. cap .."\n\nDodge Percent: ".. (dodgeTotal) .."%\nCritical: ".. getCritical(cid) .."%\nProtection: ".. all .."%\nMagic Increase: ".. increasemagic .."%\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing ..""
doShowTextDialog(cid, 5808, text)
return true
end
end

tente e espero ter ajudado

 

Não deu certo, não esta mostrando o Protection e nem o Magic Increase

2 horas atrás, Reds disse:

pior que o increaseMagic não tem como sem alterar as sources, achei que o luaGetInfo poderia trazer ML ou inc Magic, porém não traz, se quiser mesmo isso tem que alterar as sources, pelo menos no tfs 0.4 não tem nada para que isso funcione (ou eu to vendo mt errado..)

 

Como que eu edito isso na sources???

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo