0M

[Spells] Life Rune

Por 0maximo, 10 de mai. de 2012 em Scripts

4
1.1k
0maximo0
10 de maio de 2012 às 11:37

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.

Editado Maio 10 por 0maximo

PsyMcKenzieP
10 de maio de 2012 às 13:12

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!!

Editado Maio 10 por PsyMcKenzie

1 mês depois...
DooMBreaKD
22 de junho de 2012 às 17:58

Aff's Nenhum dos 2

1 mês depois...
Luiiz1L
27 de julho de 2012 às 18:21

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" />

Editado Julho 28 por Luiiz1