- Joined
- Mar 27, 2009
- Messages
- 195
hey everyone
WE said it got about 80 compile error caused by my first jass script ever done. is it just a WE bug (whole map got about 460^^) or is it my fault?
WE said it got about 80 compile error caused by my first jass script ever done. is it just a WE bug (whole map got about 460^^) or is it my fault?
JASS:
//===================== Spell Condition ===============================
function SpellCondition takes nothing returns boolean
return GetSpellAbilityId()=='A001'
endfunction
//===================== Data Initialization ===============================
function Effect1 takes nothing returns string
return "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
endfunction
function Effect2 takes nothing returns string
return "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl"
endfunction
function Wait1 takes nothing returns real
return 0.10
endfunction
function Wait2 takes nothing returns real
return 0.70
endfunction
function Radius takes nothing returns real
return 400.00
endfunction
function Damage takes nothing returns real
return 1000.00
endfunction
//===================== Spell Filter ===============================
function TargetCheck takes nothing returns boolean
local unit u = GetFilterUnit()
local boolean b = not(IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE) or IsUnitType(u,UNIT_TYPE_STRUCTURE))
set u = null
return b
endfunction
//===================== Spell Action ===============================
function Illuminaten_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local location target = GetUnitLoc(caster)
local real x = GetLocationX(target)
local real y = GetLocationY(target)
local group g = CreateGroup()
local unit u
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait1())
call DestroyEffect(AddSpecialEffect(Effect1(), x, y))
call PolledWait(Wait2())
call DestroyEffect(AddSpecialEffect(Effect2(), x, y))
call GroupEnumUnitsInRange(g, x, y, Radius(), Filter(function TargetCheck))
// Issue Unit to deal Damage
loop
set u = FirstOfGroup(g)
exitwhen u == null
call GroupRemoveUnit(g, u)
call UnitDamageTarget(caster, u, Damage(), true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS)
endloop
// Destroy the Group
call DestroyGroup(g)
set u = null
set g = null
endfunction
//===================== Event Setup ===============================
function ReturnTrue takes nothing returns boolean
return true
endfunction
function InitTrig_Illuminaten takes nothing returns nothing
set gg_trg_Illuminaten = CreateTrigger( )
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(0), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(1), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(2), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(3), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(4), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(5), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(6), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(7), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(8), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerRegisterPlayerUnitEvent( gg_trg_Illuminaten, Player(9), EVENT_PLAYER_UNIT_SPELL_EFFECT, Condition (function ReturnTrue))
call TriggerAddCondition( gg_trg_Illuminaten, Condition( function SpellCondition ) )
call TriggerAddAction( gg_trg_Illuminaten, function Illuminaten_Actions )
endfunction