Postado Agosto 22, 2017 7 anos local config = {maxlvl = 150, trys = 30, skilltype = 3} function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerSkill(cid, skilltype) <= config.maxlvl then doPlayerAddSkillTry(cid, SKILL_AXE, config.trys) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid,TALKTYPE_BROADCAST, "CONGRATULATIONS!!") else doPlayerSendCancel(cid, "Your skill level is too high.") end return TRUE end Galeta Tenho Este Script Action ele aumenta o Skill em 30 Tries.. Queria que ele leva-se em consideração o level da Skill.. por exemplo: upar skill 11 é mais facil que upar level 99 mesmo estando skill 99 de Axe ele upa 30 tries quero que ele leve em consideração o nivel da skill.. Nao sei se expliquei bem...
Postado Agosto 22, 2017 7 anos Spoiler local config = {maxlvl = 150, trys = 30, skilltype = SKILL_AXE, rates = { {level = {1, 30}, rate = 1.0}, {level = {31,60}, rate = 0.5}, {level = {61,100}, rate = 0.1}} } function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerSkill(cid, config.skilltype) if level > config.maxlvl then doPlayerSendCancel(cid, "Your skill level is too high.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end for i, k in pairs(config.rates) do if level >= k.level[1] and level <= k.level[2] then doPlayerAddSkillTry(cid, config.skilltype, k.rate*config.trys) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid,TALKTYPE_BROADCAST, "CONGRATULATIONS!!") return true end end return true end Nessa parte, configure o level e a rate: {level = {1, 30}, rate = 1.0}, --- Do skill 1 até o 30, será adicionado 1.0*config.trys = 30 {level = {31,60}, rate = 0.5}, -- Do skill 31 até o 60: 0.5*30 = 15 {level = {61,100}, rate = 0.1}} -- Do skill 61 até o 100: 0.1*30 = 3 Editado Agosto 22, 2017 7 anos por Dwarfer (veja o histórico de edições) Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Novembro 17, 2017 7 anos Autor @Dwarfer eae, me ajuda a alterar novamente este script ? quero que ele aumente tbm o skilltype2 - shield mais o script vai ter que verificar o level do shield antes de dar as Trys.. nao sei se expliquei bem local config = {maxlvl = 150, trys = 10, trys2 = 20, skilltype = SKILL_SWORD, skilltype2 = SKILL_SHIELD, rates = { {level = {1, 30}, rate = 10}, {level = {31,40}, rate = 85}, {level = {41,50}, rate = 45}, {level = {51,70}, rate = 35}, {level = {71,80}, rate = 25}, {level = {81,90}, rate = 7}, {level = {91,100}, rate = 5}, {level = {101,110}, rate = 4}, {level = {111,130}, rate = 3}, {level = {131,150}, rate = 1}} } function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerSkill(cid, config.skilltype) if level > config.maxlvl then doPlayerSendCancel(cid, "Your skill level is too high.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end for i, k in pairs(config.rates) do if level >= k.level[1] and level <= k.level[2] then doPlayerAddSkillTry(cid, config.skilltype, k.rate*config.trys) doPlayerAddSkillTry(cid, config.skilltype2, k.rate*config.trys2) doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 18, "Congratulations!!") return true end end return true end
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.