Postado Março 5, 2019 6 anos Então antes de cada return coloca um print para verificar o que ele está retornando. 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 2 minutos atrás, Reds disse: Então antes de cada return coloca um print para verificar o que ele está retornando. print('mensagem')?? É assim né? 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 antes do text, coloca print(increasemagic) e todas as outras variáveis que não estao sendo carregadas 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 Coloquei assim. 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(uid) return getItemAttribute(uid,'absorbpercentall') end function getItemMagicIncrease(uid) return getItemAttribute(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) print('increasemagic') return true end Pra você entender melhor da uma olhada nesse tópico aqui do tk, quero igual esse, porem não quero que aparece como esse MODALWINDOW ero 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 tira os apostrofos, deixa como eu coloquei acima 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/
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.