scope BurningWaves initializer Init
//===========================================================================
//=============================SETUP START===================================
//===========================================================================
globals
private constant integer SPELL_ID = 'A026' //the rawcode of the spell
private constant integer DUMMY_ID = 'e00C' //rw of the dummy unit my omnidummy is used in all my spells :)
private constant string AOE_EFFECT = "pivot.mdl" //effect that will be created when we cast the spell on the AOE
private constant string AOE2_EFFECT = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl"// another thing used to make this spell cool
private constant damagetype D_TYPE = DAMAGE_TYPE_FIRE //the attack type of the spell
private constant attacktype A_TYPE = ATTACK_TYPE_MAGIC
private constant real RAY_R1 = 0.75 //Red color of the ray
private constant real RAY_G1 = 0.5 //Green color
private constant real RAY_B1 = 0.0 //blue color
private constant real RAY_A1 = 1.0 //Alpha of color 1=no transparency 0=FULL transparency
private constant string RAY_ID2 = "FORK" //The rw of ligthing used for the waves
private constant real RAY_R2 = 1.0 //Red color of the ray
private constant real RAY_G2 = 0.2 //Green color
private constant real RAY_B2 = 0.05// blue color
private constant real RAY_A2 = 1.0 //Alpha of color 1=no transparency 0=FULL transparency
private constant real Spellaoe = 150. //not sugested to be more than 200 for balance things but whatever
private unit ForFilter1
endglobals
private function Range takes integer level returns real
return 150.
endfunction
private function Waves takes integer level returns real
return level * 2.
endfunction
private function Delay takes integer level returns real
return 0.1
endfunction
private function Damage takes integer level returns real
return level * 25.
endfunction
//===========================================================================
//=============================SETUP END=====================================
//===========================================================================
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
function EnemiesFilter takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(ForFilter1)) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.045 and GetUnitAbilityLevel(GetFilterUnit(), 'Avul') == 0 and not IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
endfunction
function DamageUnitsInRange takes unit source, real x, real y, real range, real damage, attacktype at returns nothing
local unit victim
local group g = CreateGroup()
set ForFilter1 = source
call GroupEnumUnitsInRange(g, x, y, range, Filter(function EnemiesFilter))
loop
exitwhen(FirstOfGroup(g) != null)
set victim = FirstOfGroup(g)
call UnitDamageTarget(source, victim, damage, true, false, at, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(g, victim)
endloop
call GroupClear(g)
call DestroyGroup(g)
set g = null
set victim = null
endfunction
private function Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local real point_x
local real point_y
local integer level = GetUnitAbilityLevel(caster, SPELL_ID)
local real facing = GetUnitFacing(caster)
local integer Loopspell = 0
set Loopspell = 0
call TriggerSleepAction( .1 )
set facing = GetUnitFacing(caster)
loop
exitwhen Loopspell == (Waves(level) + 3.)
set point_x = GetUnitX(caster) + ((Range(level) * (Loopspell + 1.50 )) * Cos(facing * bj_DEGTORAD))
set point_x = GetUnitY(caster) + ((Range(level) * (Loopspell + 1.50 )) * Sin(facing * bj_DEGTORAD))
call DestroyEffect(AddSpecialEffect(AOE_EFFECT, point_x, point_y))
call TriggerSleepAction( Delay(level) )
call DestroyEffect(AddSpecialEffect(AOE2_EFFECT, point_x, point_y))
set Loopspell = (Loopspell + 1)
call DamageUnitsInRange(caster, point_x, point_y, Spellaoe, Damage(level), A_TYPE)
endloop
set caster = null
endfunction
private function Init takes nothing returns nothing
local trigger BurningWavesTrg = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(BurningWavesTrg, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition(BurningWavesTrg, Condition( function Conditions ) )
call TriggerAddAction( BurningWavesTrg, function Actions )
call Preload(AOE_EFFECT)
call Preload(AOE2_EFFECT)
set bj_lastCreatedUnit = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), DUMMY_ID, 0, 0, 0)
call UnitAddAbility(bj_lastCreatedUnit, SPELL_ID)
call KillUnit(bj_lastCreatedUnit)
endfunction
endscope
Такое сделать МОЖНО, но со всеми этими редакторами доты и неактуальностью варика уже НЕ НУЖНО. Есть полно серверов и даже хост-ботов развелось немеренно.
А вообще тут полно пвпгн серверов, и 99% из них пусты.
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Типы атаки и брони
» Dota 2 / Установка Workshop Tools
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Карта не работает на некоторых машинах
» WarCraft 3 / Карта не работает на некоторых машинах
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Карта не работает на некоторых машинах
» WarCraft 3 / Сложный рут + проблема дамми-каста
» WarCraft 3 / Сложный рут + проблема дамми-каста
А вообще возможно даммика не настроили должным образом
» Оборона Рощи/Defense of the Grove / Новости
» WarCraft 3 / Сложный рут + проблема дамми-каста
» Оборона Рощи/Defense of the Grove / Новости
» WarCraft 3 / Способности и алгоритмы на заказ
» WarCraft 3 / Новичку
» WarCraft 3 / Нетриггерные муки с разносом абилок по уровням
» WarCraft 3 / Русификатор триггеров для JNGP
» WarCraft 3 / Триггерное нанесение урона только врагам
» WarCraft 3 / Кратные в условии триггеров
Ред. Tobi123
» Администрация XGM / Сервер warcraft3 XGM
А вообще тут полно пвпгн серверов, и 99% из них пусты.
» WarCraft 3 / Добавление объектов из одной карты в другую
» WarCraft 3 / Можно ли больше 8 мб