Postado Julho 13, 2015 9 anos Solução Lembrando que preciso do script da spell de heal... São todos em data/creaturescripts/scripts: crie sorcererskill.lua com o seguinte: function onStatsChange(cid, target, type, combat, value) if not getPlayerStorageValue(cid, 19235) >= 1 then return false end if math.abs(value) ~= 0 and getCreatureTarget(cid) ~= false then value = 10 * value / 100 + value --10 é a porcentagem end return true end depois knightskill.lua com: function onStatsChange(cid, target, type, combat, value) if not getPlayerStorageValue(cid, 19236) >= 1 then return false end if math.abs(value) ~= 0 and getCreatureTarget(cid) ~= false then value = 5 * value / 100 + value --5 é a porcentagem end return true end e por ultimo skills.lua: function onLogin(cid) local vocations = { [1] = {19235}, [3] = {19236} } if getCreatureOutfit(cid, lookAddons) ~= 3 and getPlayerStorageValue(cid, {19235, 19236}) >= 1 then setPlayerStorageValue(cid, 19235, -getPlayerStorageValue(cid, 19235)) setPlayerStorageValue(cid, 19236, -getPlayerStorageValue(cid, 19236)) end if getCreatureOutfit(cid, lookAddons) == 3 and getPlayerVocation(cid) == {1,2} then setPlayerStorageValue(cid, vocations[getPlayerVocation(cid)], 1) end return true end tags para colocar em creaturesscripts.xml (data/creaturescripts): <event type="login" name="skills1" event=" script" value="skills.lua"/> <event type="statschange" name="skills2" event=" script" value="knightskill.lua"/> <event type="statschange" name="skills3" event=" script" value="sorcererskill.lua"/> Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
Postado Julho 13, 2015 9 anos Autor Bom, apenas adicionei no server e liguei, não apresento nenhum erro, mais tarde vejo se deu diferença nos ataque realmente! Agora me explica umas coisinhas, desculpe a chatice rsrsPq tem só Knighskill e Sorcerer Skill ?Aquele Skills é o que?Onde mostra a porcentagem que vai tirar a mais? Se quiser por 200 de life a mais pode ser, caso n encontre por porcentagem! Editado Julho 13, 2015 9 anos por brendoonh (veja o histórico de edições)
Postado Julho 13, 2015 9 anos Bem no script esta escrito, "--5 é a porcentagem","--10 é a porcentagem" agora sobre o health eu preciso do script de heal que o knight e o paladin utilizam . E sobre o pq de knightskill e sorcererskill basta adicionar as vocações que faltam exemplo: local vocations = { [1] = {19235}, [2] = {19235}, [3] = {19236}, [4] = {19236} } Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
Postado Julho 13, 2015 9 anos Autor Bem no script esta escrito, "--5 é a porcentagem","--10 é a porcentagem" agora sobre o health eu preciso do script de heal que o knight e o paladin utilizam . E sobre o pq de knightskill e sorcererskill basta adicionar as vocações que faltam exemplo: local vocations = { [1] = {19235}, [2] = {19235}, [3] = {19236}, [4] = {19236} } Atah, entendi.. rsrsrs Heal do Knight: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function getCombatFormulas(cid, lv, maglv) local formula_min = ((lv*1 + maglv*3) * 0.72) local formula_max = ((lv*1 + maglv*3) * 0.82) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Heal do Paladin: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function getCombatFormulas(cid, lv, maglv) local formula_min = ((lv*0.4 + maglv*3) * 3.3) local formula_max = ((lv*0.4 + maglv*3) * 3.6) if(formula_max < formula_min) then local tmp = formula_max formula_max = formula_min formula_min = tmp end return formula_min, formula_max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Editado Julho 13, 2015 9 anos por brendoonh (veja o histórico de edições)
Postado Julho 13, 2015 9 anos Paladin: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function getCombatFormulas(cid, lv, maglv) local formula_min = ((lv*0.4 + maglv*3) * 3.3) local formula_max = ((lv*0.4 + maglv*3) * 3.6) local tmp = formula_max if(formula_max < formula_min) then if getPlayerStorageValue(cid, 19236) >= 1 then formula_min = ((0.4*lv/100 + maglv*3) * 3.3) formula_max = ((0.4*lv/100 + maglv*3) * 3.6) end formula_max = formula_min formula_min = tmp end return formula_min, formula_max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Knight: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) function getCombatFormulas(cid, lv, maglv) local formula_min = ((lv*1 + maglv*3) * 0.72) local formula_max = ((lv*1 + maglv*3) * 0.82) local tmp = formula_max if(formula_max < formula_min) then if getPlayerStorageValue(cid, 19236) >= 1 then formula_min = ((5*lv/100 + maglv*3) * 0.72) formula_max = ((5*lv/100 + maglv*3) * 0.82) end formula_max = formula_min formula_min = tmp end return formula_min, formula_max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas") function onCastSpell(cid, var) return doCombat(cid, combat, var) end Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
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.