Postado Fevereiro 10, 2019 6 anos Olá, eu utilizo esse script, só que ele esta com 2 erros, ele não mostra o MAGIC INCREASE e nem o PROTECTION (energy, physical, holy, earth, fire ..... = all) function onSay(cid, words, param) ------------------------------------------------- -- new in this script -- this will convert the number to a format using a seperator of your choosing, where n is the number and f is the format seperator function formatNumber(n, f) while true do n, k = string.gsub(n, "^(-?%d+)(%d%d%d)", '%1'..f..'%2') if (k==0) then break end end return n end -- this is the character you will use to seperator the formated number; Example 123456789 becomes 123.456.789 local numberFormatCharacter = '.' local level = getPlayerLevel(cid) local mag = getPlayerMagLevel(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 * 1.5 end function getDodge(cid) dog = getPlayerStorageValue(cid, 48913) if dog < 0 then dog = 0 end return dog * 0.5 end function getItemAbsorve(item.uid) return getItemAttribute(item.uid, 'absorbpercentall') end function getItemMagicIncrease(item.uid) return getItemAttribute(item.uid, "magiclevelpoints") 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 if getItemAbsorve(getPlayerSlotItem(cid, i).uid) then all = 0 + getItemAbsorve(getPlayerSlotItem(cid, i).uid) end if getItemMagicIncrease(getPlayerSlotItem(cid, i).uid) then increasemagic = increasemagic + getItemMagicIncrease(getPlayerSlotItem(cid, i).uid) end end end if dodgePercent >= max then dodgePercent = max end dodgeTotal = math.floor(dodgePercent*10)/10 local cap = getPlayerFreeCap(cid) local text = "Vocation: "..vocation.."\nLevel: "..formatNumber(getPlayerLevel(cid), numberFormatCharacter).."\nMagicLevel: "..mag.."\nHP: ".. health .."/".. maxhealth .." \MP: ".. mana .."/".. maxmana .."\nDodge Percent: ".. getDodge(cid) .."%\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 .."" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, text) return true end OT: 8.6 TFS : 0.4 Editado Março 4, 2019 6 anos 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 Março 5, 2019 6 anos qual a mensagem de erro? 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 Março 5, 2019 6 anos Autor 1 hora atrás, Reds disse: qual a mensagem de erro? Não tem mensagem de erro. Ele somente não consegue "pegar" as informações e mostrar pra mim. 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 Março 5, 2019 6 anos Não mostra nada no console? 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 Março 5, 2019 6 anos Autor Não! 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.