• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

Wentylacja

Status
Zamknięty.

GrimoN

User
Zarejestrowany
Dołączył
Grudzień 21, 2010
Posty
12
Liczba reakcji
2
Witam chcia?bym zaprezentowa? m?j pierwszy czar.
W ots/data/spells/scripts tworzymy notatnik o nazwie Wentylacja.lua do niego wklejamy to
Kod:
local atk1 = createCombatObject()
local atk2 = createCombatObject()
local atk3 = createCombatObject()
local atk4 = createCombatObject()
local atk5 = createCombatObject()
local atk6 = createCombatObject()
local atk7 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SNOWBALL )
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 26)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL )
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT,CONST_ME_HEARTS)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, LARGEROCK)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, ENERGY)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, POISON)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat6, COMBAT_PARAM_EFFECT, CONST_ME_GIFT_FRAPS)
setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, WHIRLWINDAXE)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
local combat7 = createCombatObject()
setCombatParam(combat7, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat7, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat7, COMBAT_PARAM_DISTANCEEFFECT, ENERGYBALL)
setCombatFormula(combat7, COMBAT_FORMULA_LEVELMAGIC, -1.5, -19000, -1.6, -19000)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 2, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 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, 1},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1},
{1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1},
}
local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
local area4 = createCombatArea(arr4)
local area5 = createCombatArea(arr5)
local area6 = createCombatArea(arr6)
local area7 = createCombatArea(arr7)
setCombatArea(atk1, area1)
setCombatArea(atk2, area2)
setCombatArea(atk3, area3)
setCombatArea(atk4, area4)
setCombatArea(atk5, area5)
setCombatArea(atk6, area6)
setCombatArea(atk7, area7)
function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end
function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end
function onTargetTile3(cid, pos)
doCombat(cid,combat3,positionToVariant(pos))
end
function onTargetTile4(cid, pos)
doCombat(cid,combat4,positionToVariant(pos))
end
function onTargetTile5(cid, pos)
doCombat(cid,combat5,positionToVariant(pos))
end
function onTargetTile6(cid, pos)
doCombat(cid,combat6,positionToVariant(pos))
end
function onTargetTile7(cid, pos)
doCombat(cid,combat7,positionToVariant(pos))
end
setCombatCallback(atk1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(atk2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(atk3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
setCombatCallback(atk4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")
setCombatCallback(atk5, CALLBACK_PARAM_TARGETTILE, "onTargetTile5")
setCombatCallback(atk6, CALLBACK_PARAM_TARGETTILE, "onTargetTile6")
setCombatCallback(atk7, CALLBACK_PARAM_TARGETTILE, "onTargetTile7")
local function onCastSpell1(parameters)
doCombat(parameters.cid, atk1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, atk2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, atk3, parameters.var)
end
local function onCastSpell4(parameters)
doCombat(parameters.cid, atk4, parameters.var)
end
local function onCastSpell5(parameters)
doCombat(parameters.cid, atk5, parameters.var)
end
local function onCastSpell6(parameters)
doCombat(parameters.cid, atk6, parameters.var)
end
local function onCastSpell7(parameters)
doCombat(parameters.cid, atk7, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 100, parameters)
addEvent(onCastSpell2, 250, parameters)
addEvent(onCastSpell3, 490, parameters)
addEvent(onCastSpell4, 600, parameters)
addEvent(onCastSpell5, 710, parameters)
addEvent(onCastSpell6, 890, parameters)
addEvent(onCastSpell7, 1000, parameters)
end

Potem w spells.xml wklejamy to
<instant name="Wentylacja" words="wentylacja" lvl="2000" maglv="10" mana="5000" soul="0" exhaustion="1" prem="1" enabled="1" script="Wentylacja.lua"><vocation id="2"/></instant>

Mam nadzieje, ?e si? przyda.:lol:

To najwyrazniej dziala i na 8.54 bo robi?em i testowa?em go na 8.10 wiec na 8.10 dzia?a r?wnie?.

A oto scenery
[IMG=http://img218.imageshack.us/img218/4886/beztytuupk.jpg][/IMG]

[IMG=http://img407.imageshack.us/img407/2412/beztytuuwho.jpg][/IMG]

[IMG=http://img801.imageshack.us/img801/736/beztytuuldr.jpg][/IMG]


____________________________________

Chcia?bym zostac MODERATOREM
 
Odp: Wentylacja

Zajebiaszcza Magia
Polecam
GAJESMEN
Najlepsza Jaka widzia?em
 
Status
Zamknięty.
Back
Do góry