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

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

Ответ
 
Warden
:::...
offline
Опыт: 26,106
Активность:
Warden's simple spells
Три простых, но качественных JASS спеллов.
Жду ваших мнений.
Прикрепленные файлы
Тип файла: w3x burning shield.w3x (19.5 Кбайт, 232 просмотров )
Тип файла: w3x lightning shield.w3x (18.1 Кбайт, 203 просмотров )
Тип файла: w3x nova.w3x (18.0 Кбайт, 232 просмотров )
Старый 29.07.2007, 11:46
YellowStar
poon
offline
Опыт: 15,144
Активность:
Так вроде нормально работают. Мну понравилось.
Старый 29.07.2007, 12:06
Nerzul

offline
Опыт: 3,234
Активность:
Отличные спелы, особенно понравился тот, что с огнём; просто зашибись!!!!!!
Старый 29.07.2007, 22:12
Warden
:::...
offline
Опыт: 26,106
Активность:
Nova тоже красиво смотриться =)
Старый 30.07.2007, 13:45
Alibek
Choops
offline
Опыт: 12,699
Активность:
Warden
круто
класс)))
особенно огненный
Старый 30.07.2007, 14:19
Vanguard
Оборотень модмэйкер
offline
Опыт: 3,011
Активность:
мне огненный больше всего понравился.
Старый 30.07.2007, 17:22
Еркебулан

offline
Опыт: 3,584
Активность:
Мне тоже.
Старый 30.07.2007, 18:29
J
expert
offline
Опыт: 48,447
Активность:
Warden спелы не оптимальные... только один вызов новы тормозит игру, хотя можно сделать чтобы при 5-ти одновременых вызовов вообще никапли не тормозило...

Jon добавил:
баг с огненым спелом если его запускать во впадине рельефа, шары остаются на прежнем уровне
Старый 30.07.2007, 19:16
Warden
:::...
offline
Опыт: 26,106
Активность:
Цитата:
Warden спелы не оптимальные... только один вызов новы тормозит игру, хотя можно сделать чтобы при 5-ти одновременых вызовов вообще никапли не тормозило...


Не знаю, как можно еще оптимальней... - у меня даже не одной точки нет потеряной...

Цитата:
баг с огненым спелом если его запускать во впадине рельефа, шары остаются на прежнем уровне


Напомни мне как это исправить... (Делать высоту юнита по LocationZ? или как?)
[+] замечание от nazarpunk: 1.2 Безграмотность и сленг в количестве, не позволяющем понять написанное.
Старый 31.07.2007, 15:01
J
expert
offline
Опыт: 48,447
Активность:
Warden достаточно поставить ему тип передвижения наземный =/

Jon добавил:
оптимальность это не отсутсвие утечек, это правельность алгоритма
Старый 31.07.2007, 15:22
aS Emon

offline
Опыт: 274
Активность:
Красиво
Старый 31.07.2007, 20:05
Pavlo

offline
Опыт: 190
Активность:
Это реально красиво я уже видел по типу такого
Старый 01.08.2007, 12:11
Kelen
Blood Knight
offline
Опыт: 1,022
Активность:
Nice!!!
Старый 01.08.2007, 13:00
Warden
:::...
offline
Опыт: 26,106
Активность:
Цитата:
Warden достаточно поставить ему тип передвижения наземный =/

А если отключать collisons - прокатит?

Цитата:
оптимальность это не отсутсвие утечек, это правельность алгоритма

Ну в нове согласен, а вот про алгоритмы burning shield я могу поручиться...

P.S
спс. - щас попробую наземный...
Старый 01.08.2007, 15:19
Зевс
Адская Зверюга
offline
Опыт: 152,154
Активность:
Жаль что огненный нельзя кинуть в карту где уже есть custom code((
Старый 06.08.2007, 19:22
DFlyer
<3 MJ
offline
Опыт: 42,879
Активность:
Зевс
Можно. Вставляешь этот код ниже и всё.
Старый 06.08.2007, 20:10
Зевс
Адская Зверюга
offline
Опыт: 152,154
Активность:
Понял. Че-то я тупанул и пытался вставлять код с scv триггера)))

Зевс добавил:
Да нет ошибку выдает всеравно..(
Старый 06.08.2007, 20:21
Зевс
Адская Зверюга
offline
Опыт: 152,154
Активность:
Короче надоело париться. Вроде сделано как надо. В общем не знаю в чем проблема, но спелл не работает.

Вот Custom Code моей карты. Это и есть код из триггера scv system:

» Код
function I2TM takes integer i returns timer
return i
return null
endfunction
function I2FX takes integer i returns effect
return i
return null
endfunction
function I2LG takes integer i returns lightning
return i
return null
endfunction
function I2L takes integer i returns location
return i
return null
endfunction
function I2P takes integer i returns player
return i
return null
endfunction
function I2U takes integer i returns unit
return i
return null
endfunction
function H2I takes handle h returns integer
return h
return 0
endfunction

function setcfg takes string key, string val returns nothing
call StoreString(udg_cache,"config",key,val)
endfunction

function cfg takes string key returns string
return GetStoredString(udg_cache,"config", key)
endfunction
function cfgr takes string key returns real
return S2R(cfg(key))
endfunction
function cfgi takes string key returns integer
return S2I(cfg(key))
endfunction

function get_object_iparam takes handle h, string key returns integer
return GetStoredInteger(udg_cache,I2S(H2I(h)),key)
endfunction
function set_object_iparam takes handle h, string key, integer val returns nothing
call StoreInteger(udg_cache,I2S(H2I(h)),key, val)
endfunction

function get_object_rparam takes handle h, string key returns real
return GetStoredReal(udg_cache,I2S(H2I(h)),key)
endfunction
function set_object_rparam takes handle h, string key, real val returns nothing
call StoreReal(udg_cache,I2S(H2I(h)),key,val)
endfunction

function flush_object takes handle h returns nothing
call FlushStoredMission(udg_cache,I2S(H2I(h)))
endfunction

function InitTrig_scv_system takes nothing returns nothing
call FlushGameCache(InitGameCache("temp.w3v"))
set udg_cache=InitGameCache("temp.w3v")
endfunction

Вот код самой спеллы в триггере с названием Saron Burning Web:

//###########################################################################
function Trig_Saron_Burning_Web_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A068' ) ) then
return false
endif
return true
endfunction

//###########################################################################
function bs_reset takes unit caster, integer lvl returns nothing
local integer i=1
local unit sphere
loop
exitwhen i>cfgi("bs_sphere_count"+I2S(lvl))
set sphere=I2U(get_object_iparam(caster,"sphere"+I2S(i)))
if sphere!=null then
call RemoveUnit(sphere)
call flush_object(sphere)
endif
set i=i+1
endloop
endfunction

//###########################################################################
function bs_move_lightning takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit target=I2U(get_object_iparam(t,"target"))
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(target)
local lightning lg=I2LG(get_object_iparam(t,"lightning"))
local effect e=I2FX(get_object_iparam(t,"effect"))
if get_object_iparam(target,"bs*")==0 then
call DestroyEffect(e)
call DestroyLightning(lg)
call DestroyTimer(t)
call flush_object(t)
call RemoveLocation(l)
call RemoveLocation(l2)
return
endif
call MoveLightningEx(lg,true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUni tFlyHeight(caster)+25.,GetUnitX(target),GetUnitY(target),GetLocationZ(l2)+GetUni tFlyHeight(target)+25.)
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_move_lightning)
set t=null
set caster=null
set target=null
set l=null
set l2=null
set lg=null
set e=null
endfunction

//###########################################################################
function bs_damage_runtime takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit target=I2U(get_object_iparam(t,"target"))
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(target)
local integer lvl=GetUnitAbilityLevelSwapped(cfgi("bs_ability_id"),caster)
local integer time=get_object_iparam(t,"time")
if time<=0 or GetUnitState(caster,UNIT_STATE_LIFE)<=0 or GetUnitState(target,UNIT_STATE_LIFE)<=0 or DistanceBetweenPoints(l,l2)>cfgr("bs_max_dist") then
call set_object_iparam(target,"bs*",0)
call DestroyTimer(t)
call flush_object(t)
call RemoveLocation(l)
call RemoveLocation(l2)
return
endif
call UnitDamageTarget(caster,target,cfgr("bs_damage"+I2S(lvl)),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS )
set time=time-1
call set_object_iparam(t,"time",time)
call TimerStart(t,1.,false,function bs_damage_runtime)
set t=null
set l=null
set l2=null
set caster=null
set target=null
endfunction

//###########################################################################
function bs_sphere_motion takes nothing returns nothing
local timer t=GetExpiredTimer()
local timer t2
local timer t3
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit sphere=I2U(get_object_iparam(t,"sphere"+I2S(get_object_iparam(t,"id"))))
local player p=GetOwningPlayer(caster)
local unit target
local real a=get_object_rparam(t,"angle")
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(sphere)
local location l3
local lightning lg=I2LG(get_object_iparam(t,"lightning"))
local effect e
if GetUnitState(caster,UNIT_STATE_LIFE)<=0 or GetUnitState(sphere,UNIT_STATE_LIFE)<=0 then
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx2"),l2))
call RemoveUnit(sphere)
call DestroyLightning(lg)
call DestroyTimer(t)
call flush_object(t)
call flush_object(sphere)
return
endif
set target=GroupPickRandomUnit(GetUnitsInRangeOfLocAll(cfgr("bs_range"),l2))
if target!=null and sphere!=null and IsUnitEnemy(target,p) and target!=caster and target!=sphere and IsUnitType(target,UNIT_TYPE_STRUCTURE)==false and get_object_iparam(target,"bs*")!=1 and IsUnitType(target, UNIT_TYPE_FLYING)!=true and GetUnitState(target,UNIT_STATE_LIFE)>0 then
call DestroyLightning(lg)
set t2=CreateTimer()
set t3=CreateTimer()
set lg=AddLightningEx(cfg("bs_lightning"),true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(GetUnitLoc(caster))+GetUni tFlyHeight(caster)+25.,GetUnitX(target),GetUnitY(target),GetLocationZ(GetUnitLoc (target))+GetUnitFlyHeight(target)+25.)
set e=AddSpecialEffectTarget(cfg("bs_fx3"),target,"chest")
call set_object_iparam(t2,"target",H2I(target))
call set_object_iparam(t2,"caster",H2I(caster))
call set_object_iparam(t2,"time",cfgi("bs_duration"))
call set_object_iparam(t3,"target",H2I(target))
call set_object_iparam(t3,"caster",H2I(caster))
call set_object_iparam(t3,"lightning",H2I(lg))
call set_object_iparam(t3,"effect",H2I(e))
call set_object_iparam(target,"bs*",1)
call TimerStart(t2,1.,false,function bs_damage_runtime)
call TimerStart(t3,cfgr("bs_motion_per"),false,function bs_move_lightning)
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx2"),l2))
call RemoveUnit(sphere)
call DestroyTimer(t)
call flush_object(t)
call flush_object(sphere)
return
endif
set a=ModuloReal(a+cfgr("bs_motion_speed"),360.)
set l3=Location(GetLocationX(l)+cfgr("bs_sphere_dist")*Cos(a*bj_DEGTORAD),GetLocationY(l)+cfgr("bs_sphere_dist")*Sin(a*bj_DEGTORAD))
call SetUnitPositionLoc(sphere,l3)
call MoveLightningEx(lg,true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUni tFlyHeight(caster)+25.,GetUnitX(sphere),GetUnitY(sphere),GetLocationZ(l2)+GetUni tFlyHeight(sphere)+25.)
call set_object_rparam(t,"angle",a)
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_sphere_motion)
call RemoveLocation(l)
call RemoveLocation(l2)
call RemoveLocation(l3)
set t=null
set t2=null
set caster=null
set sphere=null
set target=null
set l=null
set l2=null
set l3=null
set lg=null
set e=null
endfunction

//###########################################################################
function Trig_Saron_Burning_Web_Actions takes nothing returns nothing
local timer t
local unit caster=GetSpellAbilityUnit()
local unit sphere
local location l=GetUnitLoc(caster)
local location l2
local integer i=1
local integer lvl=GetUnitAbilityLevelSwapped(cfgi("bs_ability_id"),caster)
local real a=0
local lightning lg
call bs_reset(caster,lvl)
loop
exitwhen i>cfgi("bs_sphere_count"+I2S(lvl))
set l2=Location(GetLocationX(l)+cfgr("bs_sphere_dist")*Cos(a*bj_DEGTORAD),GetLocationY(l)+cfgr("bs_sphere_dist")*Sin(a*bj_DEGTORAD))
set sphere=CreateUnitAtLoc(GetOwningPlayer(caster),cfgi("bs_sphere_id"),l2,0)
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx1"),GetUnitLoc(sphere)))
set lg=AddLightningEx(cfg("bs_lightning"),true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUnitFlyHeight(caster )+25.,GetUnitX(sphere),GetUnitY(sphere),GetLocationZ(GetUnitLoc(sphere))+GetUnit FlyHeight(sphere)+25.)
set t=CreateTimer()
call set_object_iparam(t,"id",i)
call set_object_iparam(t,"caster",H2I(caster))
call set_object_iparam(t,"lightning",H2I(lg))
call set_object_iparam(t,"sphere"+I2S(i),H2I(sphere))
call set_object_iparam(caster,"sphere"+I2S(i),H2I(sphere))
call set_object_rparam(t,"angle",a)
set i=i+1
set a=a+360/cfgi("bs_sphere_count"+I2S(lvl))
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_sphere_motion)
call RemoveLocation(l2)
endloop
call RemoveLocation(l)
call RemoveLocation(l2)
set t=null
set caster=null
set sphere=null
set l=null
set l2=null
set lg=null
endfunction

//###########################################################################
function InitTrig_Saron_Burning_Web takes nothing returns nothing

//##########################################################################

set gg_trg_Saron_Burning_Web=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Saron_Burning_Web,EVENT_PLAYER_UNIT_SPELL_E FFECT)
call TriggerAddCondition( gg_trg_Saron_Burning_Web, Condition( function Trig_Saron_Burning_Web_Conditions ) )
call TriggerAddAction(gg_trg_Saron_Burning_Web,function Trig_Saron_Burning_Web_Actions)

//##########################################################################

call setcfg("bs_ability_id",I2S('A068'))
call setcfg("bs_sphere_id",I2S('e00E'))
call setcfg("bs_sphere_count"+I2S(1),I2S(4))
call setcfg("bs_sphere_count"+I2S(2),I2S(4))
call setcfg("bs_sphere_count"+I2S(3),I2S(4))
call setcfg("bs_sphere_count"+I2S(4),I2S(5))
call setcfg("bs_sphere_count"+I2S(5),I2S(5))
call setcfg("bs_sphere_count"+I2S(6),I2S(5))
call setcfg("bs_sphere_count"+I2S(7),I2S(6))
call setcfg("bs_sphere_count"+I2S(8),I2S(6))
call setcfg("bs_sphere_count"+I2S(9),I2S(6))
call setcfg("bs_sphere_count"+I2S(10),I2S(7))
call setcfg("bs_sphere_count"+I2S(11),I2S(7))
call setcfg("bs_sphere_count"+I2S(12),I2S(7))
call setcfg("bs_sphere_count"+I2S(13),I2S(8))
call setcfg("bs_sphere_count"+I2S(14),I2S(8))
call setcfg("bs_sphere_count"+I2S(15),I2S(8))
call setcfg("bs_sphere_dist",R2S(200.))
call setcfg("bs_max_dist",R2S(2200))
call setcfg("bs_motion_per",R2S(0.03))
call setcfg("bs_range",R2S(100.))
call setcfg("bs_duration",I2S(5))
call setcfg("bs_damage"+I2S(1),R2S(10.))
call setcfg("bs_damage"+I2S(2),R2S(20.))
call setcfg("bs_damage"+I2S(3),R2S(30.))
call setcfg("bs_damage"+I2S(4),R2S(40.))
call setcfg("bs_damage"+I2S(5),R2S(50.))
call setcfg("bs_damage"+I2S(6),R2S(60.))
call setcfg("bs_damage"+I2S(7),R2S(70.))
call setcfg("bs_damage"+I2S(8),R2S(80.))
call setcfg("bs_damage"+I2S(9),R2S(90.))
call setcfg("bs_damage"+I2S(10),R2S(100.))
call setcfg("bs_damage"+I2S(11),R2S(110.))
call setcfg("bs_damage"+I2S(12),R2S(120.))
call setcfg("bs_damage"+I2S(13),R2S(130.))
call setcfg("bs_damage"+I2S(14),R2S(140.))
call setcfg("bs_damage"+I2S(15),R2S(150.))
call setcfg("bs_motion_speed",R2S(3.5))
call setcfg("bs_lightning","LEAS")
call setcfg("bs_fx1","Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl")
call setcfg("bs_fx2","Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl")
call setcfg("bs_fx3","Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedTarget.mdl")

//##########################################################################

endfunction

Юзайте каты

Отредактировано ScorpioT1000, 17.05.2008 в 20:13.
Старый 10.08.2007, 20:24
stalin001

offline
Опыт: 4,613
Активность:
ЗЕВС
у меня вот так
» НЕСТаНДАРТНЫЙ КОД

//###########################################################################
function I2TM takes integer i returns timer
return i
return null
endfunction
function I2FX takes integer i returns effect
return i
return null
endfunction
function I2LG takes integer i returns lightning
return i
return null
endfunction
function I2L takes integer i returns location
return i
return null
endfunction
function I2P takes integer i returns player
return i
return null
endfunction
function I2U takes integer i returns unit
return i
return null
endfunction
function H2I takes handle h returns integer
return h
return 0
endfunction

//###########################################################################
function setcfg takes string key, string val returns nothing
call StoreString(udg_cache,"config",key,val)
endfunction

function cfg takes string key returns string
return GetStoredString(udg_cache,"config", key)
endfunction
function cfgr takes string key returns real
return S2R(cfg(key))
endfunction
function cfgi takes string key returns integer
return S2I(cfg(key))
endfunction

//###########################################################################

function get_object_iparam takes handle h, string key returns integer
return GetStoredInteger(udg_cache,I2S(H2I(h)),key)
endfunction
function set_object_iparam takes handle h, string key, integer val returns nothing
call StoreInteger(udg_cache,I2S(H2I(h)),key, val)
endfunction

function get_object_rparam takes handle h, string key returns real
return GetStoredReal(udg_cache,I2S(H2I(h)),key)
endfunction
function set_object_rparam takes handle h, string key, real val returns nothing
call StoreReal(udg_cache,I2S(H2I(h)),key,val)
endfunction

function flush_object takes handle h returns nothing
call FlushStoredMission(udg_cache,I2S(H2I(h)))
endfunction

А ВОТ СПЕЛЛ burning shield
//###########################################################################
function bs_cast_condition takes nothing returns boolean
return GetSpellAbilityId() == cfgi("bs_ability_id")
endfunction

//###########################################################################
function bs_reset takes unit caster, integer lvl returns nothing
local integer i=1
local unit sphere
loop
exitwhen i>cfgi("bs_sphere_count"+I2S(lvl))
set sphere=I2U(get_object_iparam(caster,"sphere"+I2S(i)))
if sphere!=null then
call RemoveUnit(sphere)
call flush_object(sphere)
endif
set i=i+1
endloop
endfunction

//###########################################################################
function bs_move_lightning takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit target=I2U(get_object_iparam(t,"target"))
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(target)
local lightning lg=I2LG(get_object_iparam(t,"lightning"))
local effect e=I2FX(get_object_iparam(t,"effect"))
if get_object_iparam(target,"bs*")==0 then
call DestroyEffect(e)
call DestroyLightning(lg)
call DestroyTimer(t)
call flush_object(t)
call RemoveLocation(l)
call RemoveLocation(l2)
return
endif
call MoveLightningEx(lg,true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUni tFlyHeight(caster)+25.,GetUnitX(target),GetUnitY(target),GetLocationZ(l2)+GetUni tFlyHeight(target)+25.)
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_move_lightning)
set t=null
set caster=null
set target=null
set l=null
set l2=null
set lg=null
set e=null
endfunction

//###########################################################################
function bs_damage_runtime takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit target=I2U(get_object_iparam(t,"target"))
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(target)
local integer lvl=GetUnitAbilityLevelSwapped(cfgi("bs_ability_id"),caster)
local integer time=get_object_iparam(t,"time")
if time<=0 or GetUnitState(caster,UNIT_STATE_LIFE)<=0 or GetUnitState(target,UNIT_STATE_LIFE)<=0 or DistanceBetweenPoints(l,l2)>cfgr("bs_max_dist") then
call set_object_iparam(target,"bs*",0)
call DestroyTimer(t)
call flush_object(t)
call RemoveLocation(l)
call RemoveLocation(l2)
return
endif
call UnitDamageTarget(caster,target,cfgr("bs_damage"+I2S(lvl)),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS )
set time=time-1
call set_object_iparam(t,"time",time)
call TimerStart(t,1.,false,function bs_damage_runtime)
set t=null
set l=null
set l2=null
set caster=null
set target=null
endfunction

//###########################################################################
function bs_sphere_motion takes nothing returns nothing
local timer t=GetExpiredTimer()
local timer t2
local timer t3
local unit caster=I2U(get_object_iparam(t,"caster"))
local unit sphere=I2U(get_object_iparam(t,"sphere"+I2S(get_object_iparam(t,"id"))))
local player p=GetOwningPlayer(caster)
local unit target
local real a=get_object_rparam(t,"angle")
local location l=GetUnitLoc(caster)
local location l2=GetUnitLoc(sphere)
local location l3
local lightning lg=I2LG(get_object_iparam(t,"lightning"))
local effect e
if GetUnitState(caster,UNIT_STATE_LIFE)<=0 or GetUnitState(sphere,UNIT_STATE_LIFE)<=0 then
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx2"),l2))
call RemoveUnit(sphere)
call DestroyLightning(lg)
call DestroyTimer(t)
call flush_object(t)
call flush_object(sphere)
return
endif
set target=GroupPickRandomUnit(GetUnitsInRangeOfLocAll(cfgr("bs_range"),l2))
if target!=null and sphere!=null and IsUnitEnemy(target,p) and target!=caster and target!=sphere and IsUnitType(target,UNIT_TYPE_STRUCTURE)==false and get_object_iparam(target,"bs*")!=1 and IsUnitType(target, UNIT_TYPE_FLYING)!=true and GetUnitState(target,UNIT_STATE_LIFE)>0 then
call DestroyLightning(lg)
set t2=CreateTimer()
set t3=CreateTimer()
set lg=AddLightningEx(cfg("bs_lightning"),true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(GetUnitLoc(caster))+GetUni tFlyHeight(caster)+25.,GetUnitX(target),GetUnitY(target),GetLocationZ(GetUnitLoc (target))+GetUnitFlyHeight(target)+25.)
set e=AddSpecialEffectTarget(cfg("bs_fx3"),target,"chest")
call set_object_iparam(t2,"target",H2I(target))
call set_object_iparam(t2,"caster",H2I(caster))
call set_object_iparam(t2,"time",cfgi("bs_duration"))
call set_object_iparam(t3,"target",H2I(target))
call set_object_iparam(t3,"caster",H2I(caster))
call set_object_iparam(t3,"lightning",H2I(lg))
call set_object_iparam(t3,"effect",H2I(e))
call set_object_iparam(target,"bs*",1)
call TimerStart(t2,1.,false,function bs_damage_runtime)
call TimerStart(t3,cfgr("bs_motion_per"),false,function bs_move_lightning)
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx2"),l2))
call RemoveUnit(sphere)
call DestroyTimer(t)
call flush_object(t)
call flush_object(sphere)
return
endif
set a=ModuloReal(a+cfgr("bs_motion_speed"),360.)
set l3=Location(GetLocationX(l)+cfgr("bs_sphere_dist")*Cos(a*bj_DEGTORAD),GetLocationY(l)+cfgr("bs_sphere_dist")*Sin(a*bj_DEGTORAD))
call SetUnitPositionLoc(sphere,l3)
call MoveLightningEx(lg,true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUni tFlyHeight(caster)+25.,GetUnitX(sphere),GetUnitY(sphere),GetLocationZ(l2)+GetUni tFlyHeight(sphere)+25.)
call set_object_rparam(t,"angle",a)
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_sphere_motion)
call RemoveLocation(l)
call RemoveLocation(l2)
call RemoveLocation(l3)
set t=null
set t2=null
set caster=null
set sphere=null
set target=null
set l=null
set l2=null
set l3=null
set lg=null
set e=null
endfunction

//###########################################################################
function bs_init_actions takes nothing returns nothing
local timer t
local unit caster=GetSpellAbilityUnit()
local unit sphere
local location l=GetUnitLoc(caster)
local location l2
local integer i=1
local integer lvl=GetUnitAbilityLevelSwapped(cfgi("bs_ability_id"),caster)
local real a=0
local lightning lg
call bs_reset(caster,lvl)
loop
exitwhen i>cfgi("bs_sphere_count"+I2S(lvl))
set l2=Location(GetLocationX(l)+cfgr("bs_sphere_dist")*Cos(a*bj_DEGTORAD),GetLocationY(l)+cfgr("bs_sphere_dist")*Sin(a*bj_DEGTORAD))
set sphere=CreateUnitAtLoc(GetOwningPlayer(caster),cfgi("bs_sphere_id"),l2,0)
call DestroyEffect(AddSpecialEffectLoc(cfg("bs_fx1"),GetUnitLoc(sphere)))
set lg=AddLightningEx(cfg("bs_lightning"),true,GetUnitX(caster),GetUnitY(caster),GetLocationZ(l)+GetUnitFlyHeight(caster )+25.,GetUnitX(sphere),GetUnitY(sphere),GetLocationZ(GetUnitLoc(sphere))+GetUnit FlyHeight(sphere)+25.)
set t=CreateTimer()
call set_object_iparam(t,"id",i)
call set_object_iparam(t,"caster",H2I(caster))
call set_object_iparam(t,"lightning",H2I(lg))
call set_object_iparam(t,"sphere"+I2S(i),H2I(sphere))
call set_object_iparam(caster,"sphere"+I2S(i),H2I(sphere))
call set_object_rparam(t,"angle",a)
set i=i+1
set a=a+360/cfgi("bs_sphere_count"+I2S(lvl))
call TimerStart(t,cfgr("bs_motion_per"),false,function bs_sphere_motion)
call RemoveLocation(l2)
endloop
call RemoveLocation(l)
call RemoveLocation(l2)
set t=null
set caster=null
set sphere=null
set l=null
set l2=null
set lg=null
endfunction

//###########################################################################
function InitTrig_burning_shield takes nothing returns nothing

//##########################################################################

set gg_trg_burning_shield=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_burning_shield,EVENT_PLAYER_UNIT_SPELL_EFFE CT)
call TriggerAddCondition(gg_trg_burning_shield,Condition(function bs_cast_condition))
call TriggerAddAction(gg_trg_burning_shield,function bs_init_actions)

//##########################################################################

call setcfg("bs_ability_id",I2S('A006'))
call setcfg("bs_sphere_id",I2S('e000'))
call setcfg("bs_sphere_count"+I2S(1),I2S(3))
call setcfg("bs_sphere_count"+I2S(2),I2S(4))
call setcfg("bs_sphere_count"+I2S(3),I2S(5))
call setcfg("bs_sphere_dist",R2S(200.))
call setcfg("bs_max_dist",R2S(22200))
call setcfg("bs_motion_per",R2S(0.03))
call setcfg("bs_range",R2S(100.))
call setcfg("bs_duration",I2S(5))
call setcfg("bs_damage"+I2S(1),R2S(10.))
call setcfg("bs_damage"+I2S(2),R2S(12.))
call setcfg("bs_damage"+I2S(3),R2S(14.))
call setcfg("bs_motion_speed",R2S(3.5))
call setcfg("bs_lightning","LEAS")
call setcfg("bs_fx1","Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl")
call setcfg("bs_fx2","Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl")
call setcfg("bs_fx3","Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedTarget.mdl")

//##########################################################################

endfunction

и у меня всё работает.
ТЫ С РЕДАКТОРА ОБЬЕКТОВ ВСЁ ЧТО НУЖНО СКОПИРОВАЛ?

Юзайте каты

Отредактировано ScorpioT1000, 17.05.2008 в 20:14.
Старый 10.08.2007, 22:13
Зевс
Адская Зверюга
offline
Опыт: 152,154
Активность:
Объекты скопировал и раз пять через Ctrl+D проверил. Вроде все как и надо ( Мб не работает из-за того что их там 15? Щас твой пересмотрю.
Старый 11.08.2007, 11:26
Ответ

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

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

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

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



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