Anarchia
Dołączył: 17 Kwi 2009
Posty: 3
Przeczytał: 0 tematów
Ostrzeżeń: 0/5
|
Wysłany: Wto 12:57, 21 Kwi 2009 Temat postu: Anarchia-Czary Mary |
|
|
Siemka all tym temacie będe dodawał moje czary.
Pierwszy czyli Czar Kierunkowy (to znaczy w każdą stronę inny efekt)
A wiec zaczynamy.
spells/script/kierunek.lua
------------------------------------------------------------------------------
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.7, 0)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 19)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.7, 0)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 28)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.7, 0)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, 41)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.7, 0)
arr1 = {
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 3, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
setCombatArea(combat2, area1)
setCombatArea(combat3, area1)
setCombatArea(combat4, area1)
function onCastSpell(cid, var)
playerpos = getCreaturePosition(cid)
if getPlayerLookDir(cid) == 0 then
local pos = {x = playerpos.x, y = playerpos.y - 1, z = playerpos.z}
doCombat(cid, combat1, var)
else
end
if getPlayerLookDir(cid) == 2 then
local pos = {x = playerpos.x, y = playerpos.y + 1, z = playerpos.z}
doCombat(cid, combat2, var)
else
end
if getPlayerLookDir(cid) == 1 then
local pos = {x = playerpos.x + 1, y = playerpos.y, z = playerpos.z}
doCombat(cid, combat3, var)
else
end
if getPlayerLookDir(cid) == 3 then
local pos = {x = playerpos.x - 1, y = playerpos.y, z = playerpos.z}
doCombat(cid, combat4, var)
else
end
end
--------------------------------------------------------------------
noi deklaracja do spells.xml
--------------------------------------------------------------------
<instant name="kierunek" words="kierunek" lvl="120" mana="800" exhaustion="2000" direction="1" script="kierunek.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
<vocation id="8"/>
</instant>
---------------------------------------------------------------------
Myślę że się spodoba
Post został pochwalony 0 razy
|
|