XGM Forum
Сайт - Статьи - Проекты - Ресурсы - Блоги

Форуме в режиме ТОЛЬКО ЧТЕНИЕ. Вы можете задать вопросы в Q/A на сайте, либо создать свой проект или ресурс.
Вернуться   XGM Forum > Warcraft> Академия: форум для вопросов> Jass
Ник
Пароль
Войти через VK в один клик
Сайт использует только имя.

Ответ
 
Zombak2500

offline
Опыт: 1,855
Активность:
Скилл
» Code
function Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local integer lua = GetUnitAbilityLevel(caster,'A000')
local unit target = GetSpellTargetUnit()
local string SE1 = "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl"
local string SE2 = "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl"
local integer i = 1
local location p
local group g
local real R = lua *100
local location ra = GetSpellTargetLoc()
local real x = GetLocationX(ra)
local real y = GetLocationY(ra)
local unit u
if lua == 1 then
if target == caster then
else
call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) + lua*100 ) )
call AddSpecialEffect (SE1,GetUnitX(target),GetUnitY(target))
loop
exitwhen i > 6
set p = PolarProjectionBJ(GetUnitLoc(target), 150.00, i*60)
call AddSpecialEffectLoc(SE2,p)
set i = i + 1
endloop
endif
endif
if lua == 2 or lua == 3 then
call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) + lua*100 ) )
call AddSpecialEffect (SE1,GetUnitX(target),GetUnitY(target))
loop
exitwhen i > 6
set p = PolarProjectionBJ(GetUnitLoc(target), 150.00, i*60)
call AddSpecialEffectLoc(SE2,p)
set i = i + 1
endloop
endif
if lua == 4 or lua == 5 or lua == 6 then
call GroupEnumUnitsInRange(g,x,y,R,null)
set u = FirstOfGroup(g)
loop
exitwhen u == null
call GroupRemoveUnit(g,u)
if IsPlayerAlly(GetOwningPlayer(caster), GetOwningPlayer(u)) and IsUnitType(u, UNIT_TYPE_STRUCTURE) != true and IsUnitAliveBJ(u) == true then
call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) + lua*100 ) )
call AddSpecialEffect (SE1,GetUnitX(u),GetUnitY(u))
endif
set u = FirstOfGroup(g)
endloop
endif
if lua == 7 or lua == 8 or lua == 9 then
call GroupEnumUnitsInRange(g,GetUnitX(caster),GetUnitY(caster),9000,null)
set u = FirstOfGroup(g)
loop
exitwhen u == null
call GroupRemoveUnit(g,u)
if not IsPlayerAlly(GetOwningPlayer(caster), GetOwningPlayer(u)) and IsUnitType(u, UNIT_TYPE_STRUCTURE) != true and IsUnitAliveBJ(u) == true then
call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) + lua*100 ) )
call AddSpecialEffect (SE1,GetUnitX(u),GetUnitY(u))
endif
set u = FirstOfGroup(g)
endloop
loop
exitwhen i > 6
set p = PolarProjectionBJ(GetUnitLoc(caster), 150.00, i*60)
call AddSpecialEffectLoc(SE2,p)
set i = i + 1
endloop
endif
set caster = null
set lua = 0
set target = null
set SE1 = null
set SE2 = null
set i =0
set p = null
set g = null
set R = 0
set ra = null
set x = 0
set y = 0
set u =null
endfunction
===========================================================================
function InitTrig_Dark_Heal takes nothing returns nothing
set gg_trg_Dark_Heal = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dark_Heal, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dark_Heal, Condition( function Conditions ) )
call TriggerAddAction( gg_trg_Dark_Heal, function Actions )
endfunction
Скилл типа канал . на первом-3 уровне юнит. на 4-6 область. на 7-9 нет цели.
скилл ничего не делает на 4-9 уровне способности.
Старый 27.03.2010, 17:59
Elf_Stratigo

offline
Опыт: 4,699
Активность:
не вижу инициализации переменной g
Старый 27.03.2010, 20:36
Чебурашка

offline
Опыт: 5,460
Активность:
local group g = CreateGroup()
сам на этом сгорал не раз )
Старый 27.03.2010, 21:29
Zombak2500

offline
Опыт: 1,855
Активность:
спс тему офф
Старый 27.03.2010, 21:50
Ответ

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск

Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы можете скачивать файлы

BB-коды Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход



Часовой пояс GMT +3, время: 00:20.