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
980
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: 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
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: 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
Edited Junho 28 by gahgah
28 de junho de 2012 às 20:48
tópico reportado







info
Group: Campones
Joined: 22/07/08
Posts: 56
Reputation: +5
RESOLVIDO.
Edited Junho 28 by gahgah