local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_POISON) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) local removeRune = true -- (true/false) function onCastSpell(cid, var) if removeRune then doPlayerRemoveItem(cid, itemid, 1) -- põe o id da rune ali em itemid end local heal = hitLevelMl(cid, 0.5) -- 0.5, será a base do hit você pode alterar e ir testando doPlayerAddMana(cid, heal) doCreatureAddHealth(cid, heal) return doCombat(cid, combat, var) end function hitLevelMl(cid, base) local heal = (getPlayerLevel(cid)*base + getPlayerMagLevel(cid)*base + math.random(1,25)) return heal end
7
960
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort

28 de junho de 2012 às 10:32
28 de junho de 2012 às 11:05
Perfeito, so nao esta removendo a Runa apos o uso.
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort

28 de junho de 2012 às 11:24
Colocase o id da runa e não apareceu erro nenhum?
Era pra ta removendo então. Mais testa assim, sem o controlador lógico:
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_POISON) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) local removeRune = "true" -- (true/false) function onCastSpell(cid, var) if removeRune == "true" then doPlayerRemoveItem(cid, itemid, 1) -- põe o id da rune ali em itemid end local heal = hitLevelMl(cid, 0.5) -- 0.5, será a base do hit você pode alterar e ir testando doPlayerAddMana(cid, heal) doCreatureAddHealth(cid, heal) return doCombat(cid, combat, var) end function hitLevelMl(cid, base) local heal = (getPlayerLevel(cid)*base + getPlayerMagLevel(cid)*base + math.random(1,25)) return heal end
28 de junho de 2012 às 11:42
Agora deu certo.. mto obrigado, como sempre +REP
Editado Junho 28 por gahgah
28 de junho de 2012 às 20:48
tópico reportado







info
Grupo: Campones
Registrado: 22/07/08
Posts: 56
Reputação: +5
RESOLVIDO.
Editado Junho 28 por gahgah