[Spells] Life Rune

0maximo
em Scripts

0maximo

Mapper
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/10/09Posts: 14

Bom, eu tentei fazer uma life rune. Mas não deu muito certo por que eu quero um valor exato de healing.

Quero que heale somente 15k, tanto pra mage quanto pra kina. A life rune de antes tava healando por ml, em kina: 6k. Em mage: 70k.

Poderiam me ajudar com isso?

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_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onCastSpell(cid, var)
doPlayerAddHealth(cid, 15000)
return doCombat(cid, combat, var)
end

 

rep+ pra quem ajudar '-'

 

----

Já consegui arrumar lendo alguns tutoriais, podem fechar.

PsyMcKenzie

Grounder
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/05/11Posts: 1106Gênero: Masculino

Substitua por isso:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_SLEEP)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0,  15000, 0, 15000)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

 

Onde está 15000/15000 é o minimo

e o máximo que vai healar.

Espero ter ajudado.

T+, Abraços!!

Atenciosamente,

PsyMcKenzie.

 

 

Meus Trabalhos.

 

 

DooMBreaK

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 01/02/12Posts: 10Char no Tibia: Retired Lv :321

Aff's Nenhum dos 2

Luiiz1

Fight Now
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/11Posts: 75Char no Tibia: Goddess kimber

data/actions/scripts/arkivo.lua

 

 

function onUse(cid, item, frompos, item2, topos)

playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}

player = getThingfromPos(playerpos)

ml = getPlayerMagLevel(cid)

lvl = getPlayerLevel(cid)

formula = 15000

if item2.itemid == 1 and ml >= 2 then

doSendMagicEffect(playerpos,14)

doCreatureAddHealth(player.uid,formula)

if item.type > 1 then

doChangeTypeItem(item.uid,item.type-1)

else

end

end

if item2.itemid == 1 and ml <= 1 then

doSendMagicEffect(frompos,2)

doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")

end

if item2.itemid >= 2 then

doPlayerSendCancel(cid,"You can only use this rune in you or in players.")

doSendMAgicEffect(frompos,2)

end

return 1

end

 

 

Actions.xml

 

<action itemid="ID DA RUNA" script="arkivo.lua" />