Name | Type | is_array | initial_value |
Addition | integer | No | 1 |
AgilityHeroes | unit | Yes | |
Allies | group | Yes | |
AllUnitsReg | rect | Yes | |
Assassin | unit | No | |
AttackCastle | rect | Yes | |
AttackReg | rect | Yes | |
AttackReg2 | rect | Yes | |
AttackReg3 | rect | Yes | |
Castle | unit | Yes | |
ChatString | string | No | |
CityArea | rect | Yes | |
CurrentWave | integer | No | 0 |
Defeated | boolean | Yes | |
DefeatedGroup | group | No | |
EnemiesType | unitcode | Yes | |
EnemiesTypeCount | integer | No | 1 |
FireArrows | hashtable | No | |
FireArrowsG | group | No | |
FireArrowsTime | real | No | |
Guards | group | Yes | |
GuardsDir | real | No | -800.00 |
GuardsTimer | timer | No | |
Hero | unit | Yes | |
InteligenceHeroes | unit | Yes | |
InterWaveTimer | timer | No | |
InterWaveTimerW | timerdialog | No | |
LightningChance | real | No | |
LightningWielder | unit | No | |
MeleeBarracks | unit | Yes | |
MeleeUnitsRegion | rect | Yes | |
MissChanceMin | real | No | |
MissChanceReal | real | No | |
NumOfPlayers | integer | No | 2 |
NumOfSpawned | integer | No | |
PlayerColor | string | Yes | |
PlayerTeams | force | Yes | |
PNODU | integer | Yes | |
PNODUA | integer | No | |
PNODUB | integer | No | |
PointNum | integer | No | 2 |
RandomLocation | location | No | |
Respawn | timer | Yes | |
RespawnPoint | location | Yes | |
RespawnWin | timerdialog | Yes | |
Shiv | unit | No | |
SpawnedUnits | integer | Yes | |
SpawnPoint | location | No | |
SpawnReg | rect | Yes | |
SpawnTime | real | No | 0.00 |
SpawnTimer | timer | No | |
StrengthHeroes | unit | Yes | |
Sucuba | unit | No | |
SucubaExp | integer | No | |
SucubaSkills | abilcode | No | |
summ | unit | No | |
TauntTimer | timer | No | |
Tavern | unit | Yes | |
VisibilityHack | fogmodifier | No | |
VisibilityHackAll | fogmodifier | Yes | |
WaveTime | real | No | |
WaveTimer | timer | No | |
WaveWindow | timerdialog | No | |
Woman | unit | No | |
WomanExp | integer | No | |
WomanSkils | abilcode | No |
//##############################################################################\\
//# #\\
//# S P E L L S E S S I O N 1 0 #\\
//# #\\
//# Rain of Arrows v1.00 #\\
//# Created by Fulla #\\
//# #\\
//##############################################################################\\
globals
integer RainTotal=0
real Rain_X=0
real Rain_Y=0
unit u = null
endglobals
function Arrow_Shower_Ability_ID takes nothing returns integer
return 'A02L'
endfunction
function Arrow_Shower_Order_ID takes nothing returns integer
return 852238
endfunction
function Arrow_Shower_Unit_Id takes integer lvl returns integer
if lvl==1 then
return 'n101'
elseif lvl==2 then
return 'n102'
elseif lvl==3 then
return 'n103'
endif
return 'n101'
endfunction
function Arrow_Shower_Cons takes nothing returns boolean
return GetSpellAbilityId()==Arrow_Shower_Ability_ID()
endfunction
function Arrow_Shower_Call takes nothing returns nothing
local unit d=null
local integer i=GetRandomInt(1,6)
local integer lvl=GetUnitAbilityLevel(u,Arrow_Shower_Ability_ID())
local real area=200
local real dist=0
local real a=0
local real x1=0
local real y1=0
local real x2=0
local real y2=0
loop
exitwhen i<=0
set a=GetRandomReal(0,360)
set x1=Rain_X+GetRandomReal(0,area)*Cos(a*.017453)
set y1=Rain_Y+GetRandomReal(0,area)*Sin(a*.017453)
set d=CreateUnit(Player(11),'n101',x1,y1,a)
set x2=x1+GetRandomReal(30,100)*Cos(a*.017453)
set y2=y1+GetRandomReal(30,100)*Sin(a*.017453)
set dist=SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
call IssuePointOrderById(d,851984,x2,y2)
set i=i-1
endloop
set RainTotal=RainTotal-1
if RainTotal<=0 then
call DestroyTimer(GetExpiredTimer())
endif
endfunction
function Arrow_Shower_Blast takes nothing returns nothing
if RainTotal<=0 then
set RainTotal=10
call TimerStart(CreateTimer(),.05,true,function Arrow_Shower_Call)
else
set RainTotal=10
endif
call DestroyTimer(GetExpiredTimer())
endfunction
function Arrow_Shower_Acts takes nothing returns nothing
local location l=GetSpellTargetLoc()
set u = GetSpellAbilityUnit()
set Rain_X=GetLocationX(l)
set Rain_Y=GetLocationY(l)
loop
if GetUnitCurrentOrder(u)==Arrow_Shower_Order_ID() then
call TimerStart(CreateTimer(),1,false,function Arrow_Shower_Blast)
endif
call TriggerSleepAction(1)
endloop
call RemoveLocation(l)
set l=null
endfunction
//===========================================================================
function InitTrig_Arrow_Shower takes nothing returns nothing
set gg_trg_Arrow_Shower=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Arrow_Shower,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Arrow_Shower,Condition(function Arrow_Shower_Cons))
call TriggerAddAction(gg_trg_Arrow_Shower,function Arrow_Shower_Acts)
endfunction