Sherman - 2010-08-14 11:26:18

Skrypt nie mój!

Inne Forum[/quote napisał:


Witam Was wszystkich :P Zrobiłem czar, który układa się w krzyż. Gotowi?
Ok, to zaczynamy ;) W data/spells/scripts robimy plik .lua o nazwie krzyz. Piszemy w nim ten oto kod:

Spoiler:

                            -----Krzyz by Caliber64-----

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 1000, 1000, 500, 500)

local arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

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

Następnie w data/spells/spells.xml dodajemy linijke:

Spoiler:

<instant name="Krzyz" words="alleluja" lvl="200" maglv="60" mana="2000" soul="0" exhaustion="1" prem="1" enabled="1" script="krzyz.lua"><vocation id="1"/><vocation id="5"/></instant>

www.hos.pun.pl www.hardtruck18.pun.pl www.darkbleach.pun.pl www.gtiteamlebork.pun.pl www.fragoria.pun.pl