function SaveLoad_InitialSetup takes nothing returns nothing
local integer i = 0
local integer j = 0
loop
set udg_SaveLoad_Compress[i + 48] = j
set udg_SaveLoad_Uncompress[i] = i + 48
set j = j + 1
set i = i + 1
exitwhen i >= 10
endloop
set i = 0
loop
set udg_SaveLoad_Compress[i + 97] = j
set udg_SaveLoad_Compress[i + 65] = j + 26
set udg_SaveLoad_Uncompress[i + 10] = i + 97
set udg_SaveLoad_Uncompress[i + 26 + 10] = i + 65
set j = j + 1
set i = i + 1
exitwhen i >= 26
endloop
endfunction
function SaveLoad_Id2CId takes integer n returns integer
local integer i = n / (256 * 256 * 256)
local integer r
set n = n - i * (256 * 256 * 256)
set r = udg_SaveLoad_Compress[i]
set i = n / (256 * 256)
set n = n - i * (256 * 256)
set r = r * 64 + udg_SaveLoad_Compress[i]
set i = n / 256
set r = r * 64 + udg_SaveLoad_Compress[i]
return r * 64 + udg_SaveLoad_Compress[n - i * 256]
endfunction
function SaveLoad_CId2Id takes integer n returns integer
local integer i = n / (64 * 64 * 64)
local integer r
set n = n - i * (64 * 64 * 64)
set r = udg_SaveLoad_Uncompress[i]
set i = n / (64 * 64)
set n = n - i * (64 * 64)
set r = r * 256 + udg_SaveLoad_Uncompress[i]
set i = n / 64
set r = r * 256 + udg_SaveLoad_Uncompress[i]
return r * 256 + udg_SaveLoad_Uncompress[n - i * 64]
endfunction
function SaveLoad_Unit2Integer takes unit u returns integer
local integer i = 0
local integer n = GetUnitTypeId(u)
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
loop
set i = i + 1
exitwhen i > udg_SaveLoad_Heroes_LastIndex
if udg_SaveLoad_Heroes[i] == n then
return i
endif
endloop
return SaveLoad_Id2CId(n)
endfunction
function SaveLoad_Integer2Unit takes integer i returns integer
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
if i <= udg_SaveLoad_Heroes_LastIndex then
return udg_SaveLoad_Heroes[i]
endif
return SaveLoad_CId2Id(i)
endfunction
function SaveLoad_Item2Integer takes item t returns integer
local integer i = 0
local integer n = GetItemTypeId(t)
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
loop
set i = i + 1
exitwhen i > udg_SaveLoad_Items_LastIndex
if udg_SaveLoad_Items[i] == n then
return i
endif
endloop
return SaveLoad_Id2CId(n)
endfunction
function SaveLoad_Integer2Item takes integer i returns integer
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
if i <= udg_SaveLoad_Items_LastIndex then
return udg_SaveLoad_Items[i]
endif
return SaveLoad_CId2Id(i)
endfunction
function SaveLoad_Ability2Integer takes integer a returns integer
local integer i = 0
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
loop
set i = i + 1
exitwhen i > udg_SaveLoad_Abilities_LastIndex
if udg_SaveLoad_Abilities[i] == a then
return i
endif
endloop
return SaveLoad_Id2CId(a)
endfunction
function SaveLoad_Integer2Ability takes integer i returns integer
if udg_SaveLoad_Initialized == false then
set udg_SaveLoad_Initialized = true
call SaveLoad_InitialSetup()
endif
if i <= udg_SaveLoad_Abilities_LastIndex then
return udg_SaveLoad_Abilities[i]
endif
return SaveLoad_CId2Id(i)
endfunction
function SaveLoad_EncodeChar takes string n returns integer
local integer i = 0
local string s1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local string s2 = "abcdefghijklmnopqrstuvwxyz"
local string s3 = "0123456789"
loop
if SubString(s1,i,i + 1) == n then
return i
endif
if SubString(s2,i,i + 1) == n then
return i
endif
set i = i + 1
exitwhen i >= 26
endloop
set i = 0
loop
if SubString(s3,i,i + 1) == n then
return i
endif
set i = i + 1
exitwhen i >= 10
endloop
return 0
endfunction
function SaveLoad_EncodeVerify takes string buffer returns integer
local integer i = 0
local integer j = 0
local string name = GetPlayerName(GetTriggerPlayer())
if udg_SaveLoad_UsePlayername == true then
loop
set j = j + SaveLoad_EncodeChar(SubString(name,i,i + 1))
set i = i + 1
exitwhen i >= StringLength(name)
endloop
endif
set i = 0
loop
set j = j + SaveLoad_EncodeChar(SubString(buffer,i,i + 1))
set i = i + 1
exitwhen i >= StringLength(buffer)
endloop
return j
endfunction
function SaveLoad_EncodeValues takes nothing returns string
local integer i
local integer j
local integer k
local integer l
local integer m
local integer CodeLength = StringLength(udg_SaveLoad_Alphabet)
local integer array a
local string buffer = ""
local string c = ""
local integer skip = 0
local integer CONST = 1000000
local string abc = "0123456789"
set i = 0
loop
set i = i + 1
exitwhen i > udg_SaveCount
set buffer = buffer + I2S(udg_Save[i]) + "-"
endloop
set buffer = buffer + I2S(SaveLoad_EncodeVerify(buffer))
if udg_Save[1] == 0 then
set buffer = "-" + buffer
endif
set i = 0
loop
set a[i] = 0
set i = i + 1
exitwhen i >= 100
endloop
set m = 0
set i = 0
loop
set j = 0
loop
set a[j] = a[j] * 11
set j = j + 1
exitwhen j > m
endloop
set l = 0
set c = SubString(buffer,i,i + 1)
loop
exitwhen SubString(abc,l,l + 1) == c
set l = l + 1
exitwhen l > 9
endloop
set a[0] = a[0] + l
set j = 0
loop
set k = a[j] / CONST
set a[j] = a[j] - k * CONST
set a[j + 1] = a[j + 1] + k
set j = j + 1
exitwhen j > m
endloop
if k > 0 then
set m = m + 1
endif
set i = i + 1
exitwhen i >= StringLength(buffer)
endloop
set buffer = ""
loop
exitwhen m < 0
set j = m
loop
exitwhen j <= 0
set k = a[j] / CodeLength
set a[j - 1] = a[j - 1] + (a[j] - k * CodeLength) * CONST
set a[j] = k
set j = j - 1
endloop
set k = a[j] / CodeLength
set i = a[j] - k * CodeLength
set buffer = buffer + SubString(udg_SaveLoad_Alphabet,i,i + 1)
set a[j] = k
if a[m] == 0 then
set m = m - 1
endif
endloop
set i = StringLength(buffer)
set skip = 0
set c = ""
loop
set i = i - 1
set c = c + SubString(buffer,i,i + 1)
set skip = skip + 1
if skip == 4 and i > 0 then
set c = c + "-"
set skip = 0
endif
exitwhen i <= 0
endloop
return c
endfunction
function SaveLoad_DecodeValues takes string s returns boolean
local integer i
local integer j
local integer k
local integer l
local integer SaveCode = 0
local integer m
local integer array a
local string buffer = ""
local integer CodeLength = StringLength(udg_SaveLoad_Alphabet)
local integer skip = -1
local integer CONST = 1000000
local string abc = "0123456789-"
local string c
set i = 0
loop
set a[i] = 0
set i = i + 1
exitwhen i >= 100
endloop
set m = 0
set i = 0
loop
set j = 0
loop
set a[j] = a[j] * CodeLength
set j = j + 1
exitwhen j > m
endloop
set skip = skip + 1
if skip == 4 then
set skip = 0
set i = i + 1
endif
set l = CodeLength
set c = SubString(s,i,i + 1)
loop
set l = l - 1
exitwhen l < 1
exitwhen SubString(udg_SaveLoad_Alphabet,l,l + 1) == c
endloop
set a[0] = a[0] + l
set j = 0
loop
set k = a[j] / CONST
set a[j] = a[j] - k * CONST
set a[j + 1] = a[j + 1] + k
set j = j + 1
exitwhen j > m
endloop
if k > 0 then
set m = m + 1
endif
set i = i + 1
exitwhen i >= StringLength(s)
endloop
loop
exitwhen m < 0
set j = m
loop
exitwhen j <= 0
set k = a[j] / 11
set a[j - 1] = a[j - 1] + (a[j] - k * 11) * CONST
set a[j] = k
set j = j - 1
endloop
set k = a[j] / 11
set i = a[j] - k * 11
set buffer = SubString(abc,i,i + 1) + buffer
set a[j] = k
if a[m] == 0 then
set m = m - 1
endif
endloop
set i = 0
set j = 0
loop
loop
exitwhen i >= StringLength(buffer)
exitwhen i > 0 and SubString(buffer,i,i + 1) == "-" and SubString(buffer,i - 1,i) != "-"
set i = i + 1
endloop
if i < StringLength(buffer) then
set k = i
endif
set SaveCode = SaveCode + 1
set udg_Save[SaveCode] = S2I(SubString(buffer,j,i))
set j = i + 1
set i = i + 1
exitwhen i >= StringLength(buffer)
endloop
set j = SaveLoad_EncodeVerify(SubString(buffer,0,k))
set udg_SaveCount = SaveCode - 1
if j == udg_Save[SaveCode]then
return true
endif
return false
endfunction
function SaveLoad_Encode takes nothing returns string
if udg_SaveLoad_CaseSensitive == false then
set udg_SaveLoad_Alphabet = StringCase(udg_SaveLoad_Alphabet,true)
endif
return SaveLoad_EncodeValues()
endfunction
function SaveLoad_Decode takes string s returns boolean
if udg_SaveLoad_CaseSensitive == false then
set udg_SaveLoad_Alphabet = StringCase(udg_SaveLoad_Alphabet,true)
set s = StringCase(s,true)
endif
if SaveLoad_DecodeValues(s) then
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Decoding sucessful")
return true
endif
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Decoding failed")
return false
endfunction
function CreateTextFile takes string Code returns nothing
local integer i = 1
loop
exitwhen i > udg_NumHeroesToSave
set udg_SaveText[i] = "
" + "
" + udg_HeroToSaveName[i] + "
" + udg_SaveText[i]
set i = i + 1
endloop
call PreloadGenClear()
call PreloadGenStart()
// The line below creates the log
call Preload(udg_SaveText[1] + udg_SaveText[2] + udg_SaveText[3] + udg_SaveText[4] + "
")
// The line below creates the file at the specified location
call PreloadGenEnd(udg_TextFileName + ".txt")
endfunction
Name | Type | is_array | initial_value |
A_AoE | real | No | |
A_Bool | boolean | No | |
A_Damage | real | No | |
A_Duration | real | No | |
A_Int | integer | No | |
A_Real | real | No | |
A_Real2 | real | No | |
A_Speed | real | No | |
A_UType | unitcode | No | |
AA_A_Group | group | No | |
AA_Cstr_Group | group | No | |
AA_E_HP | real | No | |
AA_HPcount | real | No | |
AA_Loc | location | Yes | |
AA_Percent | real | Yes | |
AA_PreLoop | integervar | No | |
Absolaoe | real | No | |
AbsolBoolean1 | boolean | No | |
AbsolBoolean2 | boolean | No | |
AbsolBoolean3 | boolean | No | |
AbsolBoolean4 | boolean | No | |
AbsolCast | unit | No | |
AbsolCnt | integer | No | |
AbsolCol | real | No | |
AbsolDamg | real | No | |
AbsolDestroy | boolean | No | |
AbsolDummy | unit | No | |
AbsolDummy2 | unit | No | |
AbsolGroup | group | No | |
AbsolGroupTARGET | group | No | |
AbsolId | integer | No | |
AbsolINTEGER | integer | No | |
AbsolLightningId | integer | No | |
AbsolLoop | integervar | No | |
AbsolMax | integer | No | |
AbsolMaxBound | integer | No | |
AbsolPlayer | player | No | |
AbsolREAL | real | No | |
AbsolRealHeightUp | real | No | |
AbsolTrigger | integer | No | |
AbsolUnitInteger | integer | No | |
Agile_AoE | real | No | |
AgileAbility | abilcode | No | |
AgileAmount | integer | Yes | |
AgileCasters | unit | Yes | |
AgileCasterSE | effect | Yes | |
AgileDamage | integer | No | |
AgileDamageArea | location | No | |
AgileDamageEnemy | group | No | |
AgileDamagePercent | real | No | |
AgileDamageSize | integer | No | |
AgileEnemies | unit | No | |
Agileindex | integer | Yes | |
Agileindex_max_size | integer | No | |
Agileindex_size | integer | No | |
AgileInteger | integer | No | |
AgileLevel | integer | No | |
AgileLoop | integervar | No | |
AgileRAmount | integer | No | |
AgileRTime | integer | No | |
AgileSFX1 | string | No | |
AgileSFX1_AP | string | No | |
AgileSFX2 | string | No | |
AgileSFX2_AP | string | No | |
AgileSFX3 | string | No | |
AgileSFX3_Ap | string | No | |
AgileTime | integer | Yes | |
AH1 | real | No | |
AH2 | real | No | |
AH3 | real | No | |
AIorNot | boolean | No | |
AL | lightning | No | |
ALT | lightningtype | No | |
Amount | real | No | |
Angle_setter | real | No | |
AP | location | No | |
AP2 | location | No | |
AP3 | location | No | |
Aqua_Burst_Ability_Level | integer | No | |
Aqua_Burst_Area_of_Effect | real | No | |
Aqua_Burst_Base_Damage | real | No | |
Aqua_Burst_Caster | unit | No | |
Aqua_Burst_Damage_Group | group | No | |
Aqua_Burst_Location | location | No | |
Aqua_Burst_Total_Damage | real | No | |
AR_Point | location | No | |
AS | integervar | No | |
AS_Angle | real | Yes | |
AS_Animation | real | No | |
AS_Defense_fake | integer | Yes | |
AS_Distance | real | Yes | |
AS_Equation | real | Yes | |
AS_FLY | real | Yes | |
AS_Formula | real | Yes | |
AS_Group | group | Yes | |
AS_Hero | unit | Yes | |
AS_Max_Height | real | Yes | |
AS_Off | boolean | Yes | |
AS_Point | location | Yes | |
AS_Skip | integer | No | |
AS_Special | effect | Yes | |
AS_Speed | real | Yes | |
AS_Stable_Distance | real | Yes | |
AS_Times | integer | No | |
AS_X_Special | effect | Yes | |
ASAOE | real | No | |
ASCaster | unit | No | |
ASCasterGroup | group | No | |
ASCasterPoint | location | No | |
ASDamage | real | No | |
ASDamageGroup | group | No | |
ASExplosion | unit | No | |
ASHashtable | hashtable | No | |
ASPlayer | player | No | |
ASRandomGroup | group | No | |
ASRay | unit | No | |
ASRayFly | real | No | |
ASTarget | unit | No | |
ASTargetPoint | location | No | |
ASTime | real | No | |
BB | integervar | No | |
BB2 | integervar | No | |
BB_Angle | real | Yes | |
BB_Attacked | unit | No | |
BB_Caster | unit | Yes | |
BB_Casting | unit | Yes | |
BB_CastNumber | integer | No | |
BB_Chance | integer | No | |
BB_Damage | real | Yes | |
BB_Distance | real | Yes | |
BB_Expire | integer | Yes | |
BB_Group | group | No | |
BB_Height | real | Yes | |
BB_LEVEL | integer | No | |
BB_Loop | integervar | No | |
BB_Missile | unit | Yes | |
BB_Off | boolean | Yes | |
BB_Point | location | Yes | |
BB_Real_Damage_Spam | integer | Yes | |
BB_Skip | integer | No | |
BB_Speed | real | Yes | |
BB_Switch | integer | No | |
BB_Targ | unit | Yes | |
BB_Times | integer | No | |
BB_Up | boolean | Yes | |
Beast_Attack_Ability_Level | integer | No | |
Beast_Attack_Atribute | integer | No | |
Beast_Attack_Atribute_Damage | real | No | |
Beast_Attack_Caster | unit | No | |
Beast_Attack_Damage_Splitter | integer | No | |
Beast_Attack_Life_Damage | real | No | |
Beast_Attack_Location | location | No | |
Beast_Attack_Location2 | location | No | |
Beast_Attack_Max_Life | real | No | |
Beast_Attack_Target | unit | No | |
Beast_Attack_Total_Damage | real | No | |
BFAbility | abilcode | Yes | |
BFAura | unit | Yes | |
BFAura2 | unit | Yes | |
BFAura3 | unit | Yes | |
BFCaster | unit | Yes | |
BFCasterAbility | abilcode | Yes | |
BFCount | integer | No | |
BFGroup | group | Yes | |
BFHas | boolean | Yes | |
BFIndex | integer | No | |
BFInteger | integervar | No | |
BFLastRecycled | integer | No | |
BFMax | integer | No | |
BFRecycledList | integer | Yes | |
BFTimer | real | Yes | |
BlazeCaster | unit | Yes | |
BlazeDuration | real | Yes | |
BlazeIndexsize | integer | No | |
BlazeInteger | integer | Yes | |
BlazeLoop | integervar | No | |
BlazeMaxsize | integer | No | |
BlazePoint | location | No | |
BlazeTemp | integer | No | |
Caster | unit | No | |
CE_Ability_Level | integer | No | |
CE_Area_of_Effect | real | No | |
CE_Base_Damage | real | No | |
CE_Caster | unit | No | |
CE_Damage_Group | group | No | |
CE_Destroy_Trees | boolean | No | |
CE_Knock_Angle | real | No | |
CE_Knock_Distance | real | No | |
CE_Knock_Group | group | No | |
CE_Knock_Loc1 | location | No | |
CE_Knock_Loc2 | location | No | |
CE_Knock_Speed | real | No | |
CE_Knocktable | hashtable | No | |
CE_Location | location | No | |
CE_Location2 | location | No | |
CE_Pathing_On | boolean | No | |
CE_Special_Effect | effect | No | |
CE_Special_Effect1 | effect | No | |
CE_Total_Damage | real | No | |
ChooseComputer | boolean | No | |
ChosenPokemon | unit | No | |
Code | string | No | |
Currant_intstances | integer | No | |
currentHerotoLoad | integer | No | |
currentHerotoSave | integer | No | |
DANATHhero | unit | No | |
DANATHorc | unit | No | |
DDS_Detect | group | No | |
Debug | integervar | No | |
Degrees_set | real | No | |
Dfficultychosen | boolean | No | |
DSB_Ability_ID | abilcode | No | |
DSB_Ability_Level | integer | Yes | |
DSB_Angle | real | Yes | |
DSB_Animation_Speed | real | No | |
DSB_AoE | real | No | |
DSB_Caster | unit | Yes | |
DSB_Conditions | boolean | Yes | |
DSB_Current_Index | integervar | No | |
DSB_Damage | real | Yes | |
DSB_Damage_Group | group | No | |
DSB_Destroy_Tree | boolean | No | |
DSB_Destroyer | unit | No | |
DSB_Distance | real | No | |
DSB_Dummy | unit | Yes | |
DSB_Dummy2 | unit | Yes | |
DSB_Dummy2_Animation | string | No | |
DSB_Dummy2_BLUE | real | No | |
DSB_Dummy2_GREEN | real | No | |
DSB_Dummy2_Lifetime | real | No | |
DSB_Dummy2_RED | real | No | |
DSB_Dummy2_Transparency | real | No | |
DSB_Dummy_Type | unitcode | No | |
DSB_Dummy_Type2 | unitcode | No | |
DSB_Max_Index | integer | No | |
DSB_Owner | player | Yes | |
DSB_Shadow | boolean | No | |
DSB_Shdow | boolean | Yes | |
DSB_SoundEffect | sound | No | |
DSB_Special_Effect | string | No | |
DSB_Special_Effect_Location | string | No | |
DSB_Stage | integer | Yes | |
DSB_Start_Range | real | No | |
DSB_UnDamage_Group | group | Yes | |
Earth_Fury_Ability_Level | integer | No | |
Earth_Fury_AoE_Bouns | real | No | |
Earth_Fury_Base_Area_of_Effect | real | No | |
Earth_Fury_Base_Damage | real | No | |
Earth_Fury_Bonus_Damage | real | No | |
Earth_Fury_Caster | unit | No | |
Earth_Fury_Chance | real | No | |
Earth_Fury_Damage_Group | group | No | |
Earth_Fury_Dummy_Ability | abilcode | No | |
Earth_Fury_Dummy_Ability_2 | abilcode | No | |
Earth_Fury_Location | location | No | |
Earth_Fury_Owner | player | No | |
Earth_Fury_Total_Area_of_Effec | real | No | |
Earth_Fury_Total_Damage | real | No | |
Ending_Cinematic_Is_On | boolean | No | |
EnemyTeams | force | No | |
EP | integervar | No | |
EP_Angle | real | Yes | |
EP_Caster | unit | Yes | |
EP_CastNumber | integer | No | |
EP_ConstDistance | real | Yes | |
EP_Distance | real | Yes | |
EP_Height | real | Yes | |
EP_Integer | integervar | No | |
EP_Missile | unit | Yes | |
EP_Off | boolean | Yes | |
EP_Point | location | Yes | |
EP_Speed | real | Yes | |
EP_Switch | integer | No | |
ES_Caster | unit | No | |
ES_Group | group | No | |
ES_Integer | integervar | No | |
ES_Point | location | Yes | |
ES_Target | unit | No | |
F_Integers | integer | Yes | |
F_ReachedFading | real | Yes | |
F_Time | real | Yes | |
F_Unit | unit | Yes | |
FA_Time | real | No | |
FA_Unit | unit | No | |
FB_Blast | unit | Yes | |
FB_Caster | unit | Yes | |
FB_Dummy | unit | Yes | |
FB_Explosion | integervar | Yes | |
FB_Indexsize | integer | No | |
FB_Integer | integer | Yes | |
FB_Loop | integervar | No | |
FB_Maxindexsize | integer | No | |
FB_Point | location | Yes | |
FB_Real | real | Yes | |
FB_Temp | integer | No | |
FENRISHERO | unit | No | |
Flck_Ability | abilcode | No | |
Flck_CaptureDistance | real | No | |
Flck_CaptureRadius | real | No | |
Flck_Caster | unit | No | |
Flck_CasterPoint | location | No | |
Flck_Facing | real | No | |
Flck_SpecialEffectWarpInCaster | string | No | |
Flck_SpecialEffectWarpOutCast | string | No | |
Flck_TargetPoint | location | No | |
Flck_Tempangle | real | No | |
Flck_Tempgroup | group | No | |
Flck_Temppoint | location | No | |
Flck_Temppoint2 | location | No | |
Flck_Temppoint3 | location | No | |
Flck_Victim | unit | No | |
FP_Point | location | No | |
FSCaster | unit | Yes | |
FSCasterPoint | location | Yes | |
FSCount | integer | No | |
FSDistance | real | Yes | |
FSDummy | unit | Yes | |
FSDummyGroup | group | Yes | |
FSFace | real | Yes | |
FSFade | real | Yes | |
FSFadeC | real | Yes | |
FSHas | boolean | Yes | |
FSIndex | integer | No | |
FSInteger | integervar | No | |
FSLastRecycled | integer | No | |
FSMax | integer | No | |
FSMaxDistance | real | Yes | |
FSMove | real | Yes | |
FSRecycledList | integer | Yes | |
FSTime | real | No | |
GDD__Integers | integer | Yes | |
GDD__LeftMapGroup | group | No | |
GDD__TriggerArray | trigger | Yes | |
GDD__UnitArray | unit | Yes | |
GDD_Damage | real | No | |
GDD_DamagedUnit | unit | No | |
GDD_DamageSource | unit | No | |
GDD_Event | real | No | |
Gravity_unit | unit | No | |
Gravity_Unit_ID | handle | No | |
GromEnd | unit | No | |
Handle_Absol | integer | No | |
HarathaEnd | unit | No | |
HashAbsol | hashtable | No | |
Hashtable | hashtable | No | |
HeroFifthAbility | abilcode | Yes | |
HeroFirstAbility | abilcode | Yes | |
HeroFourthAbility | abilcode | Yes | |
HeroLoadedornew | boolean | No | |
HeroSecondAbility | abilcode | Yes | |
HeroThirdAbility | abilcode | Yes | |
HeroToLoad | unit | Yes | |
HeroToSave | unit | Yes | |
HeroToSaveName | string | Yes | |
hidelastdgunits | group | No | |
HJ_Ability | abilcode | No | |
HJ_AbilityMaxLevel | integer | No | |
HJ_AttackType | attacktype | No | |
HJ_Caster | unit | Yes | |
HJ_CasterPlayer | player | Yes | |
HJ_CollisionRange | real | No | |
HJ_CustomBoolean | boolean | Yes | |
HJ_CustomInteger | integervar | No | |
HJ_CustomReal | real | Yes | |
HJ_CustomReal2 | real | Yes | |
HJ_CustomReal3 | real | Yes | |
HJ_CustomReal4 | real | Yes | |
HJ_DamageType | damagetype | No | |
HJ_DummyType | unitcode | No | |
HJ_Effect | string | Yes | |
HJ_EffectCount | integer | No | |
HJ_EnemySoulModelHandler | effect | Yes | |
HJ_EnemySoulUnit | unit | Yes | |
HJ_FriendlySoulModelHandler | effect | Yes | |
HJ_FriendlySoulUnit | unit | Yes | |
HJ_Group | group | No | |
HJ_ID | integer | No | |
HJ_JudgeDuration | real | Yes | |
HJ_JudgeDurationCounter | real | Yes | |
HJ_Level | integer | Yes | |
HJ_LevitateSpeedCalculation | real | Yes | |
HJ_LoopInterval | real | No | |
HJ_ModelHandler | effect | Yes | |
HJ_Pause | boolean | No | |
HJ_PauseAbility | abilcode | No | |
HJ_PauseEnemyEffectAttach | string | No | |
HJ_PauseEnemyEffectHandler | effect | Yes | |
HJ_PauseFriendlyEffectAttach | string | No | |
HJ_PauseFriendlyEffectHandler | effect | Yes | |
HJ_PauseOrder | string | No | |
HJ_PickedUnit | unit | No | |
HJ_Radius | real | Yes | |
HJ_RadiusEffectAngle | real | No | |
HJ_RadiusEffectCount | integer | Yes | |
HJ_ReturnHeightCalculation | real | Yes | |
HJ_SoulDamage | real | Yes | |
HJ_SoulDistance | real | Yes | |
HJ_SoulDistanceCounter | real | Yes | |
HJ_SoulEnemyExitAttach | string | No | |
HJ_SoulEnemyModelAttach | string | No | |
HJ_SoulFriendlyExitAttach | string | No | |
HJ_SoulFriendlyModelAttach | string | No | |
HJ_SoulHeal | real | Yes | |
HJ_SoulInitialHeight | real | Yes | |
HJ_SoulLevitateTime | real | Yes | |
HJ_SoulLevitateTravel | boolean | No | |
HJ_SoulLevitateTravelAngle | real | Yes | |
HJ_SoulMaxHeight | real | Yes | |
HJ_SoulMotionEffect | string | Yes | |
HJ_SoulMotionEffectAttach | string | Yes | |
HJ_SoulMotionEffectChance | integer | No | |
HJ_SoulReturnDamageAttach | string | No | |
HJ_SoulReturnHealAttach | string | No | |
HJ_SoulSize | real | Yes | |
HJ_SoulUnit | unit | Yes | |
HJ_TravelSpeedCalculation | real | Yes | |
HJ_Unit | unit | No | |
HoT_Const_AoE | real | No | |
HoT_Const_Dmg_Base | real | No | |
HoT_Const_Dmg_Bonus | real | No | |
HoT_Const_Dmg_Burn | real | No | |
HoT_Const_Dmg_Stun | real | No | |
HoT_Const_Dmg_Stun_Bonus | real | No | |
HoT_Const_Duration | real | No | |
HoT_Const_Range | real | No | |
HoT_Const_Stun_Duration | real | No | |
HoT_Group | group | No | |
HoT_Hash | hashtable | No | |
HoT_Lightning_Group | group | No | |
HoT_Slam_Group | group | No | |
HoT_Stun_Group | group | No | |
HoT_Targets | group | No | |
HoT_Up_Group | group | No | |
HS_ability | abilcode | No | |
HS_animation | string | No | |
HS_attack_type | attacktype | No | |
HS_caster | unit | No | |
HS_caster_loc | location | No | |
HS_charge_counter | integer | No | |
HS_charges | integer | Yes | |
HS_cone | real | No | |
HS_counter | real | No | |
HS_damage | real | Yes | |
HS_damageType | damagetype | No | |
HS_destroy_dest | boolean | No | |
HS_detect_area | real | No | |
HS_direction | real | No | |
HS_effect | string | No | |
HS_effect2 | string | No | |
HS_explosion_count | integer | No | |
HS_facing | real | No | |
HS_group | group | No | |
HS_hash | hashtable | No | |
HS_height | real | No | |
HS_knockup | boolean | No | |
HS_knockup_animation | string | No | |
HS_knockup_effect | string | No | |
HS_knockup_speed | real | No | |
HS_level | integer | No | |
HS_loop_speed | real | No | |
HS_speed | real | Yes | |
HS_temp_loc | location | No | |
HS_time | real | No | |
HS_trigger | trigger | No | |
HS_trigger2 | trigger | No | |
HydroJetCasters | group | No | |
HydroJetProjectiles | group | No | |
InitTrigger | trigger | No | |
Insanemodeactivated | boolean | No | |
Intervals | timer | No | |
ISD_boolean | boolean | No | |
ISD_d | destructable | No | |
ISD_dummy | unit | No | |
ISD_loc | location | No | |
ISD_p | location | No | |
KHADGARHERO | unit | No | |
KNIGHTBOT | unit | No | |
KNIGHTTOP | unit | No | |
KoS_Angle | real | Yes | |
KOS_BackstabEffect | string | No | |
KURDRANhero | unit | No | |
KURDRANORC | unit | No | |
KUS_animation | string | No | |
KUS_effect | modelfile | No | |
KUS_group | group | No | |
KUS_hash | hashtable | No | |
KUS_height | real | No | |
KUS_knockup | boolean | No | |
KUS_speed | real | No | |
KUS_target | unit | No | |
KUS_temp_loc | location | No | |
KUS_temp_speed | real | No | |
Leak_Point | location | No | |
LF_A_Decrease | real | Yes | |
LF_Alpha | real | Yes | |
LF_B | real | Yes | |
LF_CountInteger | integer | Yes | |
LF_Debug | boolean | Yes | |
LF_G | real | Yes | |
LF_Lightning | lightning | Yes | |
LF_R | real | Yes | |
LiquidElementals | group | No | |
MA_Chance | integer | No | |
MA_Chance2 | real | No | |
MA_Nova | integervar | No | |
MA_Point | location | Yes | |
MA_Real | real | No | |
NumHeroAquiringTome | integer | No | |
NumHeroesToLoad | integer | No | |
NumHeroesToSave | integer | No | |
Opening_Cinematic_Is_On | boolean | No | |
Orangeinitialatttack | group | No | |
Orc_Base_Cinematic_Is_On | boolean | No | |
orcbasehiddenunit | group | No | |
P1 | player | No | |
P2 | player | No | |
pb_angle_1 | real | Yes | |
pb_angle_2 | real | Yes | |
pb_caster | unit | Yes | |
pb_caster_loc | location | Yes | |
pb_counter | real | Yes | |
pb_distance_1 | real | Yes | |
pb_distance_2 | real | Yes | |
pb_effect_1 | unit | Yes | |
pb_effect_2 | unit | Yes | |
pb_effect_3 | unit | Yes | |
pb_index1 | integer | No | |
pb_index2 | integer | No | |
pb_index3 | integervar | No | |
pb_light_1 | lightning | Yes | |
pb_light_2 | lightning | Yes | |
pb_loopon | boolean | Yes | |
pb_segment_1 | location | Yes | |
pb_segment_2 | location | Yes | |
pb_segment_3 | location | Yes | |
pb_target_loc | location | Yes | |
PD_Angle | real | Yes | |
PD_Distances | real | Yes | |
PD_Integers | integer | Yes | |
PD_ReachedDistance | real | Yes | |
PD_RealTimer | real | Yes | |
PD_SpeedUnits | real | Yes | |
PD_TempPoint | location | Yes | |
PD_TestGroup | group | No | |
PD_TreesDestroy | boolean | Yes | |
PD_Unit | unit | Yes | |
Pokemon_Cinematic_Is_On | boolean | No | |
pokemonhiddenunit | group | No | |
potionopenhiddenunit | group | No | |
Power_Slam_Ability_Level | integer | No | |
Power_Slam_Base_Chance | real | No | |
Power_Slam_Caster | unit | No | |
Power_Slam_Damage | real | No | |
Power_Slam_Damage_Multiplier | real | No | |
Power_Slam_Dummy_Ability | abilcode | No | |
Power_Slam_Location | location | No | |
Power_Slam_Owner | player | No | |
Power_Slam_Strength | integer | No | |
Power_Slam_Target | unit | No | |
Power_Slam_Total_Chance | real | No | |
PR_Ability_Level | integer | No | |
PR_Atribute | integer | No | |
PR_Caster | unit | No | |
PR_Caster_Loc | location | No | |
PR_Damage | real | No | |
PR_Damage_Factor | real | No | |
PR_Dummy_Ability | abilcode | No | |
PR_Target | unit | No | |
PR_Target_Loc | location | No | |
PR_Target_Mana | real | No | |
QuestionVisionRQ1 | questitem | No | |
QuestNecessity | quest | No | |
QuestNecessityRQ1 | questitem | No | |
QuestNecessityRQ2 | questitem | No | |
QuestVision | quest | No | |
QuestVisionRQ2 | questitem | No | |
QuestVisionRQ3 | questitem | No | |
Reflect_Users | group | No | |
Returning_to_normal_fly_height | group | No | |
revealspellgreen | effect | No | |
revealspellpurple | effect | No | |
revealspellred | effect | No | |
RexxarEnd | unit | No | |
RS_Angle | real | Yes | |
RS_Boolean | boolean | Yes | |
RS_Caster | unit | Yes | |
RS_CurDis | real | Yes | |
RS_Damage | real | Yes | |
RS_Index | integer | Yes | |
RS_LevelA | integer | Yes | |
RS_Loc | location | Yes | |
RS_MaxD | real | Yes | |
RS_MaxH | real | Yes | |
RS_Player | player | Yes | |
RS_Real | real | Yes | |
RS_Speed | real | Yes | |
RS_Target | unit | Yes | |
S_caster | unit | Yes | |
S_dummy | unit | Yes | |
S_dummypoint | location | No | |
S_index1 | integer | Yes | |
S_index2 | integer | No | |
S_index3 | integervar | No | |
S_index_max | integer | No | |
S_index_size | integer | No | |
S_pause | boolean | Yes | |
S_speed | real | Yes | |
S_stopduration | real | Yes | |
S_stopgroup | group | Yes | |
S_targetpoint | location | No | |
SandStorm | group | No | |
Save | integer | Yes | |
SaveCount | integer | No | |
SaveLoad_Abilities | abilcode | Yes | |
SaveLoad_Abilities_LastIndex | integer | No | |
SaveLoad_Alphabet | string | No | |
SaveLoad_CaseSensitive | boolean | No | |
SaveLoad_Compress | integer | Yes | |
SaveLoad_Heroes | unitcode | Yes | |
SaveLoad_Heroes_LastIndex | integer | No | |
SaveLoad_Initialized | boolean | No | |
SaveLoad_Items | itemcode | Yes | |
SaveLoad_Items_LastIndex | integer | No | |
SaveLoad_Uncompress | integer | Yes | |
SaveLoad_UsePlayername | boolean | No | |
SaveText | string | Yes | |
SD_Caster | unit | Yes | |
SD_Damage | real | Yes | |
SD_DamageEffect | string | Yes | |
SD_Index | integer | Yes | |
SD_LightningEffect | lightning | Yes | |
SD_MaxDistance | real | Yes | |
SD_Off | boolean | Yes | |
SD_TargetedUnit | unit | Yes | |
SD_Timer | real | Yes | |
SD_TimeToDoDamage | real | Yes | |
selectorcdie1 | group | No | |
selectorcdie2 | group | No | |
selectpokemon1 | group | No | |
selectpokemon2 | group | No | |
selectpotionstart1 | group | No | |
selectpotionstart2 | group | No | |
Sepharic_Star_Hashtable | hashtable | No | |
Sepharic_Star_Speed | integer | No | |
SES_Index | integer | Yes | |
SES_Off | boolean | Yes | |
SES_SpecialEffect | effect | Yes | |
SES_Timer | real | Yes | |
SF | integervar | No | |
SF_AoE | real | No | |
SF_Caster | unit | No | |
SF_CastNumber | integer | No | |
SF_ChainProc | integer | No | |
SF_Hero | unit | Yes | |
SF_Integer | integervar | Yes | |
SF_Loc | location | Yes | |
SF_Loc1 | location | Yes | |
SF_Off | boolean | Yes | |
SF_Real | real | No | |
SF_Switch | integer | No | |
SF_Time | real | Yes | |
Sinister_Strike_Ability_Level | integer | No | |
Sinister_Strike_Atribute | integer | No | |
Sinister_Strike_Base_Chance | real | No | |
Sinister_Strike_Bonus_Armor | integer | No | |
Sinister_Strike_Caster | unit | No | |
Sinister_Strike_Damage_Factor | real | No | |
Sinister_Strike_Dummy_Ability | abilcode | No | |
Sinister_Strike_Dummy_Ability2 | abilcode | No | |
Sinister_Strike_Location | location | No | |
Sinister_Strike_Normal_Armor | integer | No | |
Sinister_Strike_Owner | player | No | |
Sinister_Strike_Target | unit | No | |
Sinister_Strike_Total_Chance | real | No | |
Sinister_Strike_Total_Damage | real | No | |
SoulripperDead | unit | No | |
Soulripperend | unit | No | |
Spell__Ability | abilcode | No | |
Spell__Caster | unit | No | |
Spell__CasterOwner | player | No | |
Spell__CastPoint | location | No | |
Spell__Channeling | boolean | No | |
Spell__Completed | boolean | No | |
Spell__DummyOwner | player | No | |
Spell__DummyType | unitcode | No | |
Spell__Duration | real | No | |
Spell__Expired | boolean | No | |
Spell__Filter_AllowAlly | boolean | No | |
Spell__Filter_AllowDead | boolean | No | |
Spell__Filter_AllowEnemy | boolean | No | |
Spell__Filter_AllowFlying | boolean | No | |
Spell__Filter_AllowHero | boolean | No | |
Spell__Filter_AllowLiving | boolean | No | |
Spell__Filter_AllowMagicImmune | boolean | No | |
Spell__Filter_AllowMechanical | boolean | No | |
Spell__Filter_AllowNonHero | boolean | No | |
Spell__Filter_AllowStructure | boolean | No | |
Spell__Hash | hashtable | No | |
Spell__Index | integer | No | |
Spell__InRange | real | No | |
Spell__InRangeCount | integer | No | |
Spell__InRangeGroup | group | No | |
Spell__InRangePoint | location | No | |
Spell__InRangeUnits | unit | Yes | |
Spell__Interval | real | No | |
Spell__Level | integer | No | |
Spell__LevelMultiplier | real | No | |
Spell__Running | boolean | No | |
Spell__Target | unit | No | |
Spell__TargetGroup | group | No | |
Spell__TargetPoint | location | No | |
Spell__Time | real | No | |
Spell__Trigger_OnCast | trigger | No | |
Spell__Trigger_OnChannel | trigger | No | |
Spell__Trigger_OnEffect | trigger | No | |
Spell__Trigger_OnFinish | trigger | No | |
Spell__Trigger_OnLoop | trigger | No | |
Spell__UseTargetGroup | boolean | No | |
Spell__WakeTargets | boolean | No | |
Spell_i_AllowAlly | boolean | Yes | |
Spell_i_AllowDead | boolean | Yes | |
Spell_i_AllowEnemy | boolean | Yes | |
Spell_i_AllowFlying | boolean | Yes | |
Spell_i_AllowHero | boolean | Yes | |
Spell_i_AllowLiving | boolean | Yes | |
Spell_i_AllowMagicImmune | boolean | Yes | |
Spell_i_AllowMechanical | boolean | Yes | |
Spell_i_AllowNonHero | boolean | Yes | |
Spell_i_AllowStructure | boolean | Yes | |
Spell_i_Caster | unit | Yes | |
Spell_i_Channeling | boolean | Yes | |
Spell_i_Completed | boolean | Yes | |
Spell_i_Duration | real | Yes | |
Spell_i_EventType | integer | Yes | |
Spell_i_GroupN | integer | No | |
Spell_i_GroupStack | group | Yes | |
Spell_i_Head | integer | Yes | |
Spell_i_Instances | integer | No | |
Spell_i_LastTime | real | Yes | |
Spell_i_Level | integer | Yes | |
Spell_i_Linked | boolean | Yes | |
Spell_i_OnCastStack | trigger | Yes | |
Spell_i_OnChannelStack | trigger | Yes | |
Spell_i_OnEffectStack | trigger | Yes | |
Spell_i_OnFinishStack | trigger | Yes | |
Spell_i_OnLoopStack | trigger | Yes | |
Spell_i_PreloadDummy | unit | No | |
Spell_i_Recycle | integer | No | |
Spell_i_RecycleList | integer | Yes | |
Spell_i_Stack | integer | Yes | |
Spell_i_StackN | integer | No | |
Spell_i_StackRef | integer | Yes | |
Spell_i_Target | unit | Yes | |
Spell_i_TargetGroup | group | Yes | |
Spell_i_TargetX | real | Yes | |
Spell_i_TargetY | real | Yes | |
Spell_i_Time | real | Yes | |
Spell_i_Timer | timer | No | |
Spell_i_UseTG | boolean | Yes | |
SpellLevel | integer | No | |
SR_Angle | real | Yes | |
SR_Boolean | boolean | Yes | |
SR_Caster | unit | Yes | |
SR_Duration | real | Yes | |
SR_Group | group | Yes | |
SR_Index | integer | Yes | |
SR_Loc | location | Yes | |
SR_Projectile | unit | Yes | |
SR_WaitCounter | real | Yes | |
ST_Angle | real | No | |
ST_Aoe | real | Yes | |
ST_AoeBase | real | No | |
ST_AoePerLevel | real | No | |
ST_BarrierModel | string | No | |
ST_BarrierSpaceTaken | real | No | |
ST_Core | unit | Yes | |
ST_CurrentLightningEffect | lightning | Yes | |
ST_DissappearenceSFX | string | No | |
ST_DummyType | unitcode | No | |
ST_EffectScalingSpawn | real | No | |
ST_HealthPenaltyPerSecond | real | No | |
ST_Index | integervar | No | |
ST_LightningBlue | real | No | |
ST_LightningEffect | string | No | |
ST_LightningGreen | real | No | |
ST_LightningRed | real | No | |
ST_LightningZ | real | No | |
ST_MaxIndex | integer | No | |
ST_OriginalCaster | unit | Yes | |
ST_SecondaryIndex | integervar | No | |
ST_SpawnSFX | string | No | |
ST_SpecialEffect | effect | Yes | |
ST_Spell | abilcode | No | |
ST_StageID | integer | Yes | |
ST_TempGroup | group | No | |
ST_TempInteger | integer | No | |
ST_TempPoint | location | No | |
ST_TempPoint2 | location | No | |
ST_TempReal | real | No | |
ST_TempUnit | unit | No | |
ST_TempUnit2 | unit | No | |
ST_TempUnit3 | unit | No | |
ST_TempX | real | No | |
ST_TempX2 | real | No | |
ST_TempY | real | No | |
ST_TempY2 | real | No | |
ST_TempZ | real | No | |
ST_TempZ2 | real | No | |
ST_TetherDurationBase | real | No | |
ST_TetherDurationPerLevel | real | No | |
ST_TetherModel | string | No | |
ST_TriggeringHealthPercent | real | No | |
ST_UndeadDuration | real | Yes | |
ST_UndeadDurationBase | real | No | |
ST_UndeadDurationPerLevel | real | No | |
ST_UnitIDStorage | unit | No | |
ST_UnitIndex | unit | Yes | |
ST_UnitTransparency | real | No | |
StaffforKhadgar | item | No | |
Surging_Pulse_Caster_Loc | location | No | |
Surging_Pulse_Formula | real | No | |
Surging_Pulse_Location | location | No | |
Surging_Pulse_Loop | integer | No | |
Surging_Pulse_Loop_Location | location | No | |
Surging_Pulse_Owner | player | No | |
SystemPoint | location | Yes | |
SystemUnitGroup | group | Yes | |
TA_BaseChance | integer | No | |
TA_BaseDamage | real | No | |
TA_ChanceGrowth | integer | No | |
TA_DamageGrowth | real | No | |
TA_Levels | integer | No | |
TA_SFX | string | No | |
TA_ThornEffect | location | No | |
TA_ThornSpawn | location | No | |
TAGARHERO | unit | No | |
Target_Dummy | unit | No | |
Temp_Group | group | No | |
Temp_Group_1 | group | No | |
Temp_Group_2 | group | No | |
Temp_Lightning | lightning | No | |
Temp_Loc_1 | location | No | |
Temp_Loc_2 | location | No | |
Temp_Loc_3 | location | No | |
Temp_Point | location | No | |
Temp_Point_2 | location | No | |
Temp_Real_1 | real | No | |
Temp_Real_2 | real | No | |
Temp_Real_3 | real | No | |
Temp_Unit_1 | unit | No | |
Temp_Unit_2 | unit | No | |
Temp_Unit_3 | unit | No | |
Temp_Unit_4 | unit | No | |
TempDest | destructable | No | |
TempGroup | group | No | |
TempHandle | handle | No | |
TempInteger | integer | No | |
TempItem | item | No | |
TempItemType | itemcode | No | |
TempLoc | location | No | |
TempPoint | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
temppointnature | location | No | |
tempSESSpecialEffect | effect | No | |
tempSESTimer | real | No | |
TempUnit | unit | No | |
TempUnit2 | unit | No | |
TextFileName | string | No | |
Thorn_Dummy | unit | No | |
TK_AttackType | attacktype | No | |
TK_DamageType | damagetype | No | |
TK_FlyingUnits | group | No | |
TK_FSpeed | real | Yes | |
TK_HDmgInPercIncreasement | real | No | |
TK_HDmgInPercStart | real | No | |
TK_Hero | unit | Yes | |
TK_ImpactDmgIncreasement | real | No | |
TK_ImpactDmgStart | real | No | |
TK_ImpactSFX | string | No | |
TK_Integers | integer | Yes | |
TK_Interval | real | Yes | |
TK_Level | integer | Yes | |
TK_LiftSFX | string | No | |
TK_LiftSFXTimer | real | No | |
TK_LsfxT | real | Yes | |
TK_MaxHeight | real | Yes | |
TK_MaxHeightIncreasement | real | No | |
TK_MaxHeightStart | real | No | |
TK_MinHeightIncreasement | real | No | |
TK_MinHeightStart | real | No | |
TK_Pause | boolean | No | |
TK_Speed | real | No | |
TK_SpeedVariationPerc | real | No | |
TK_SpellAoEIncreasement | real | No | |
TK_SpellAoEStart | real | No | |
TK_StartSFX | string | No | |
TK_TempPoint | location | Yes | |
TK_Unit | unit | Yes | |
TK_UnitGroup | group | No | |
TomeAgility | integer | Yes | |
TomeHealth | integer | Yes | |
TomeIntelligence | integer | Yes | |
TomeStrength | integer | Yes | |
TP_A_down_height_min | real | No | |
TP_A_infinity_longs | boolean | Yes | |
TP_A_Only_Top | boolean | No | |
TP_A_Only_Top_ex | boolean | Yes | |
TP_A_Pan_Camera | boolean | No | |
TP_A_Pan_Camera_ex | boolean | Yes | |
TP_A_Pan_Camera_Time | real | No | |
TP_A_Pan_Camera_Time_ex | real | Yes | |
TP_A_player | player | No | |
TP_A_point_create | location | No | |
TP_A_point_destination | location | No | |
TP_A_size | real | No | |
TP_A_time_before_created | real | No | |
TP_A_time_closing | real | No | |
TP_A_time_life | real | No | |
TP_A_time_opening | real | No | |
TP_A_top_height_max | real | No | |
TP_A_top_height_min | real | No | |
TP_A_two_directions | boolean | No | |
TP_accelerate | real | No | |
TP_accelerate_ex | real | Yes | |
TP_angle | real | No | |
TP_angle_ex | real | Yes | |
TP_distance | real | No | |
TP_distance_current | real | Yes | |
TP_distance_max | real | Yes | |
TP_DOWN_1_effect | effect | Yes | |
TP_DOWN_2_effect | effect | Yes | |
TP_down_height_min_ex | real | Yes | |
TP_dummy_down_model | string | No | |
TP_dummy_down_model_ex | string | Yes | |
TP_dummy_down_size | real | No | |
TP_dummy_down_size_ex | real | Yes | |
TP_dummy_top_model | string | No | |
TP_dummy_top_model_ex | string | Yes | |
TP_dummy_top_size | real | No | |
TP_dummy_top_size_ex | real | Yes | |
TP_dummy_type | unitcode | No | |
TP_E_eff_constant | string | No | |
TP_E_eff_constant_ex | effect | Yes | |
TP_E_eff_constant_ex2 | effect | Yes | |
TP_E_eff_create_finish | string | No | |
TP_E_eff_create_finish_ex | string | Yes | |
TP_E_eff_create_start | string | No | |
TP_E_eff_create_start_ex | string | Yes | |
TP_E_eff_dissapear_finish | string | No | |
TP_E_eff_dissapear_finish_ex | string | Yes | |
TP_E_eff_dissapear_start | string | No | |
TP_E_eff_dissapear_start_ex | string | Yes | |
TP_E_eff_unit_move | string | No | |
TP_E_eff_unit_move2 | string | No | |
TP_E_eff_unit_move2_ex | string | Yes | |
TP_E_eff_unit_move_ex | string | Yes | |
TP_fly_height | real | No | |
TP_fly_heights | real | Yes | |
TP_get_X | real | Yes | |
TP_get_Y | real | Yes | |
TP_Go_go_missile | boolean | No | |
TP_Go_go_missile_ex | boolean | Yes | |
TP_go_X | real | Yes | |
TP_go_Y | real | Yes | |
TP_i | integer | Yes | |
TP_i_last | integer | No | |
TP_index | integer | No | |
TP_life_timer_is_expired | boolean | Yes | |
TP_loop_interval | real | No | |
TP_Max_Size | integer | No | |
TP_missile | unit | Yes | |
TP_missile_eff | effect | Yes | |
TP_missile_gfx | string | No | |
TP_missile_gfx_ex | string | Yes | |
TP_missile_scale | real | No | |
TP_missile_scale_ex | real | Yes | |
TP_move_units_now | boolean | Yes | |
TP_move_units_now_2 | boolean | Yes | |
TP_Movement_type | integer | No | |
TP_player_ex | player | Yes | |
TP_point_temp | location | No | |
TP_point_temp2 | location | No | |
TP_portal_created_ex | boolean | Yes | |
TP_Potral_Index | integer | Yes | |
TP_Potral_Number | integer | Yes | |
TP_real | real | No | |
TP_Recently_Teleported | group | No | |
TP_Recently_Teleported_time | real | Yes | |
TP_seconds_to_reach | real | No | |
TP_size_ex | real | Yes | |
TP_slow_time_factor | real | No | |
TP_slow_time_factor_ex | real | Yes | |
TP_slow_time_finished_ex | boolean | Yes | |
TP_slow_time_place | real | No | |
TP_slow_time_place_ex | real | Yes | |
TP_slow_time_started_ex | boolean | Yes | |
TP_slow_time_width | real | No | |
TP_slow_time_width_ex | real | Yes | |
TP_speed | real | No | |
TP_speed_ex | real | Yes | |
TP_speed_up | real | No | |
TP_t_activated | boolean | Yes | |
TP_t_activated_2 | boolean | Yes | |
TP_t_down | unit | Yes | |
TP_t_down2 | unit | Yes | |
TP_t_is_busy1 | boolean | Yes | |
TP_t_is_busy2 | boolean | Yes | |
TP_t_top | unit | Yes | |
TP_t_top2 | unit | Yes | |
TP_t_unbusy1 | boolean | Yes | |
TP_t_unbusy2 | boolean | Yes | |
TP_t_unbusy_timer1 | real | Yes | |
TP_t_unbusy_timer2 | real | Yes | |
TP_teleported_unit | unit | Yes | |
TP_TEMP_LOOP | integer | No | |
TP_TEMP_POINT_0 | location | No | |
TP_TEMP_POINT_1 | location | No | |
TP_TEMP_POINT_2 | location | No | |
TP_this_is_not_portal | boolean | Yes | |
TP_time_before_create_ex | real | Yes | |
TP_time_closing_ex | real | Yes | |
TP_time_life_ex | real | Yes | |
TP_time_opening_ex | real | Yes | |
TP_time_to_move | real | Yes | |
TP_time_to_move_2 | real | Yes | |
TP_TOP_1_effect | effect | Yes | |
TP_TOP_2_effect | effect | Yes | |
TP_top_height_max_ex | real | Yes | |
TP_top_height_min_ex | real | Yes | |
TP_Transparecy_down | real | No | |
TP_Transparecy_down_ex | real | Yes | |
TP_Transparecy_top | real | No | |
TP_Transparecy_top_ex | real | Yes | |
TP_turn_on | boolean | Yes | |
TP_turn_on_2 | boolean | Yes | |
TP_two_directions_ex | boolean | Yes | |
TP_x1 | real | Yes | |
TP_x2 | real | Yes | |
TP_y1 | real | Yes | |
TP_y2 | real | Yes | |
TURAHERO | unit | No | |
UC_Counter | integer | Yes | |
UC_Groups | group | Yes | |
UC_Inv | boolean | Yes | |
UC_SETTINGS_AreaOfEffect | real | Yes | |
UC_SETTINGS_Collosion | boolean | No | |
UC_SETTINGS_DestroyTrees_Dash | boolean | No | |
UC_SETTINGS_Invulnerable | boolean | No | |
UC_SETTINGS_Speed | real | No | |
UC_Target | unit | No | |
UC_TempPoint | location | Yes | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
UnitsHidden | boolean | No | |
Validate | boolean | No | |
Vision_Cinematic_Is_On | boolean | No | |
visionhiddenunit | group | No | |
VL_Ability | abilcode | No | |
VL_AbilityCurse | abilcode | No | |
VL_AbilityHeal | abilcode | No | |
VL_AoE | real | Yes | |
VL_Buff | buffcode | No | |
VL_C_Amount | integer | No | |
VL_C_Even | real | No | |
VL_C_GrowRate | real | Yes | |
VL_C_GrowTime | real | No | |
VL_C_MoveRate | real | Yes | |
VL_C_SFX | string | No | |
VL_C_Speed | real | No | |
VL_CurrentAoE | real | Yes | |
VL_Debuff | buffcode | No | |
VL_Degree | real | No | |
VL_DummyCaster | unit | No | |
VL_Duration | real | Yes | |
VL_L | lightning | Yes | |
VL_L_Amount | integer | No | |
VL_L_CheckSFX | boolean | Yes | |
VL_L_Counter | real | Yes | |
VL_L_Direction | real | No | |
VL_L_Distance | real | No | |
VL_L_Duration | real | No | |
VL_L_Height | real | No | |
VL_L_ID | integer | No | |
VL_L_SFX | lightningtype | No | |
VL_L_SFX_EndPoint | string | No | |
VL_MaxLevel | integer | No | |
VL_SFX | string | No | |
VL_TempInt | integervar | No | |
VL_TempLoc | location | No | |
VL_TempReal | real | No | |
VL_TempUnit | unit | No | |
WaterWaves | group | No | |
WhirlPools | group | No | |
WoS_Angle | real | Yes | |
WoS_AttackEffect | string | Yes | |
WoS_AttackRange | real | Yes | |
WoS_AttackTimer | real | Yes | |
WoS_Caster | unit | Yes | |
WoS_Damage | real | Yes | |
WoS_Index | integer | Yes | |
WoS_MaxSpeed | real | Yes | |
WoS_Off | boolean | Yes | |
WoS_OnAttackSpeedDecrease | real | Yes | |
WoS_ShadowEffect | string | Yes | |
WoS_ShadowEffectCreatingDelay | real | Yes | |
WoS_ShadowEffectDuration | real | Yes | |
WoS_ShadowEffectTimer | real | Yes | |
WoS_Speed | real | Yes | |
WoS_SpeedIncreasement | real | Yes | |
WoS_SpellDuration | real | Yes | |
WoS_TargetedUnit | unit | Yes | |
WS | integervar | No | |
WS_Angle | real | Yes | |
WS_Caster | unit | Yes | |
WS_CastNumber | integer | No | |
WS_Chance | integer | No | |
WS_Distance | real | Yes | |
WS_Dummie | unit | Yes | |
WS_Effect1 | unit | Yes | |
WS_Effect2 | unit | Yes | |
WS_Effect3 | unit | Yes | |
WS_Off | boolean | Yes | |
WS_Point | location | Yes | |
WS_Speed | real | Yes | |
WS_Switch | integer | No | |
zzTestReal | real | No | |
ZZZZredandpurple | force | No |
// GUI-Friendly Damage Detection -- v1.2.1 -- by Weep
// http:// www.thehelper.net/forums/showthread.php?t=137957
//
// Requires: only this trigger and its variables.
//
// -- What? --
// This snippet provides a leak-free, GUI-friendly implementation of an "any unit takes
// damage" event. It requires no JASS knowledge to use.
//
// It uses the Game - Value Of Real Variable event as its method of activating other
// triggers, and passes the event responses through a few globals.
//
// -- Why? --
// The traditional GUI method of setting up a trigger than runs when any unit is damaged
// leaks trigger events. This snippet is easy to implement and removes the need to do
// you own GUI damage detection setup.
//
// -- How To Implement --
// 0. Before you copy triggers that use GDD into a new map, you need to copy over GDD
// with its GDD Variable Creator trigger, or there will be a problem: the variables
// won't be automatically created correctly.
//
// 1. Be sure "Automatically create unknown variables while pasting trigger data" is
// enabled in the World Editor general preferences.
// 2. Copy this trigger category ("GDD") and paste it into your map.
// (Alternately: create the variables listed in the globals block below, create a
// trigger named "GUI Friendly Damage Detection", and paste in this entire text.)
// 3. Create your damage triggers using Game - Value Of Real Variable as the event,
// select GDD_Event as the variable, and leave the rest of the settings to the default
// "becomes Equal to 0.00".
// The event responses are the following variables:
// GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
// GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
// Triggering Unit can still be used, if you need to use waits.
// Read the -- Notes -- section below for more info.
// GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.
//
// -- Notes --
// GDD's event response variables are not wait-safe; you can't use them after a wait in
// a trigger. If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can
// be used in place of GDD_DamageSource. There is no usable wait-safe equivalent to
// Event Damage or Damage Source; you'll need to save the values yourself.
//
// Don't write any values to the variables used as the event responses, or it will mess
// up any other triggers using this snippet for their triggering. Only use their values.
//
// This uses arrays, so can detect damage for a maximum of 8190 units at a time, and
// cleans up data at a rate of 33.33 per second, by default. This should be enough for
// most maps, but if you want to change the rate, change the value returned in the
// GDD_RecycleRate function at the top of the code, below.
//
// By default, GDD will not register units that have Locust at the moment of their
// entering the game, and will not recognize when they take damage (which can only
// happen if the Locust ability is later removed from the unit.) To allow a unit to have
// Locust yet still cause GDD damage events if Locust is removed, you can either design
// the unit to not have Locust by default and add it via triggers after creation, or
// edit the GDD_Filter function at the top of the code, below.
//
// -- Credits --
// Captain Griffin on wc3c.net for the research and concept of GroupRefresh.
//
// Credit in your map not needed, but please include this README.
//
// -- Version History --
// 1.2.1: Minor code cleaning. Added configuration functions. Updated documentation.
// 1.2.0: Made this snippet work properly with recursive damage.
// 1.1.1: Added a check in order to not index units with the Locust ability (dummy units).
// If you wish to check for damage taken by a unit that is unselectable, do not
// give the unit-type Locust in the object editor; instead, add the Locust ability
// 'Aloc' via a trigger after its creation, then remove it.
// 1.1.0: Added a check in case a unit gets moved out of the map and back.
// 1.0.0: First release.
//===================================================================
// Configurables.
function GDD_RecycleRate takes nothing returns real //The rate at which the system checks units to see if they've been removed from the game
return 0.03
endfunction
function GDD_Filter takes unit u returns boolean //The condition a unit has to pass to have it registered for damage detection
return GetUnitAbilityLevel(u, 'Aloc') == 0 //By default, the system ignores Locust units, because they normally can't take damage anyway
endfunction
//===================================================================
// This is just for reference.
// If you use JassHelper, you could uncomment this section instead of creating the variables in the trigger editor.
// globals
// real udg_GDD_Event = 0.
// real udg_GDD_Damage = 0.
// unit udg_GDD_DamagedUnit
// unit udg_GDD_DamageSource
// trigger array udg_GDD__TriggerArray
// integer array udg_GDD__Integers
// unit array udg_GDD__UnitArray
// group udg_GDD__LeftMapGroup = CreateGroup()
// endglobals
//===================================================================
// System code follows. Don't touch!
function GDD_Event takes nothing returns boolean
local unit damagedcache = udg_GDD_DamagedUnit
local unit damagingcache = udg_GDD_DamageSource
local real damagecache = udg_GDD_Damage
set udg_GDD_DamagedUnit = GetTriggerUnit()
set udg_GDD_DamageSource = GetEventDamageSource()
set udg_GDD_Damage = GetEventDamage()
set udg_GDD_Event = 1.
set udg_GDD_Event = 0.
set udg_GDD_DamagedUnit = damagedcache
set udg_GDD_DamageSource = damagingcache
set udg_GDD_Damage = damagecache
set damagedcache = null
set damagingcache = null
return false
endfunction
function GDD_AddDetection takes nothing returns boolean
// if(udg_GDD__Integers[0] > 8190) then
// call BJDebugMsg("GDD: Too many damage events! Decrease number of units present in the map or increase recycle rate.")
// ***Recycle rate is specified in the GDD_RecycleRate function at the top of the code. Smaller is faster.***
// return
// endif
if(IsUnitInGroup(GetFilterUnit(), udg_GDD__LeftMapGroup)) then
call GroupRemoveUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
elseif(GDD_Filter(GetFilterUnit())) then
set udg_GDD__Integers[0] = udg_GDD__Integers[0]+1
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = GetFilterUnit()
set udg_GDD__TriggerArray[udg_GDD__Integers[0]] = CreateTrigger()
call TriggerRegisterUnitEvent(udg_GDD__TriggerArray[udg_GDD__Integers[0]], udg_GDD__UnitArray[udg_GDD__Integers[0]], EVENT_UNIT_DAMAGED)
call TriggerAddCondition(udg_GDD__TriggerArray[udg_GDD__Integers[0]], Condition(function GDD_Event))
endif
return false
endfunction
function GDD_PreplacedDetection takes nothing returns nothing
local group g = CreateGroup()
local integer i = 0
loop
call GroupEnumUnitsOfPlayer(g, Player(i), Condition(function GDD_AddDetection))
set i = i+1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call DestroyGroup(g)
set g = null
endfunction
function GDD_GroupRefresh takes nothing returns nothing
// Based on GroupRefresh by Captain Griffen on wc3c.net
if (bj_slotControlUsed[5063] == true) then
call GroupClear(udg_GDD__LeftMapGroup)
set bj_slotControlUsed[5063] = false
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetEnumUnit())
endfunction
function GDD_Recycle takes nothing returns nothing
if(udg_GDD__Integers[0] <= 0) then
return
elseif(udg_GDD__Integers[1] <= 0) then
set udg_GDD__Integers[1] = udg_GDD__Integers[0]
endif
if(GetUnitTypeId(udg_GDD__UnitArray[udg_GDD__Integers[1]]) == 0) then
call DestroyTrigger(udg_GDD__TriggerArray[udg_GDD__Integers[1]])
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = null
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = udg_GDD__TriggerArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[1]] = udg_GDD__UnitArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = null
set udg_GDD__Integers[0] = udg_GDD__Integers[0]-1
endif
set udg_GDD__Integers[1] = udg_GDD__Integers[1]-1
endfunction
function GDD_LeaveMap takes nothing returns boolean
local boolean cached = bj_slotControlUsed[5063]
if(udg_GDD__Integers[2] < 64) then
set udg_GDD__Integers[2] = udg_GDD__Integers[2]+1
else
set bj_slotControlUsed[5063] = true
call ForGroup(udg_GDD__LeftMapGroup, function GDD_GroupRefresh)
set udg_GDD__Integers[2] = 0
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
set bj_slotControlUsed[5063] = cached
return false
endfunction
// ===========================================================================
function InitTrig_GUI_Friendly_Damage_Detection takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, GetWorldBounds())
call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function GDD_AddDetection))
call TriggerRegisterLeaveRegion(CreateTrigger(), r, Condition(function GDD_LeaveMap))
call GDD_PreplacedDetection()
call TimerStart(CreateTimer(), GDD_RecycleRate(), true, function GDD_Recycle)
set r = null
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
/*
Volatile Light w/ GUI Spell System
v2.01
By KILLCIDE
Making this spell gave me so many problems ._. this spell went through A LOT (an understatement) of changes
Requirements:
--------
- dummy.mdx
- GUI Spell System
Credits:
-------
- Bribe for GUI Spell System
- Vexorian for dummy.mdx
How to Install:
--------------
1. Under Preferences, make sure you have "Automatically create unknown variables while pasting trigger data" checked
2. Import dummy.mdx, then copy and paste the dummy unit, three abilities, and two buffs into your map
NOTE: If you already have dummy.mdx imported into your map, you DO NOT have to reimport it
If you already have a global dummy unit in your map, you can skip this step
3. Copy and paste the VL w/ GUI Spell System folder into your map
NOTE: You DO NOT have to reimport GUI Spell System if you already have it in your map
If this is your first time importing GUI Spell System, make sure the DummyType variable has the corresponding global dummy
unit in your map
4. Go to the VL Config trigger, and change the Ability, AbilityCurse, AbilityHeal, Debuff, & Buff variables to the
corresponding objects you just imported
5. Right click on each VL trigger (excluding VL readme) and click on "Initially on"
NOTE: Make sure there are no disabled actions in any of the VL triggers
NOTE: Make sure that AbilityCurse & AbilityHeal have the correct buff data fields!
Changelog:
---------
- v2.01 (March 18, 2016): Added an optional Volatile Light folder that is integrated with GUI Spell System
Fixed inaccuracy of GrowRate incrementing inside the circle creation loop
Removed unnecesary NodeLast[] variable for linked list; last spell instance now stores into NodePrev[0]
Removed If/Then/Else that would set NodeLast = NodePrev[Spell_ID] if NodeLast == Spell_ID
- v2.00 (January 25, 2016): Changed data structure to linked listing
Fixed bug of debuff effect not being removed on dead enemy units until the end of the duration
- v1.03 (December 04, 2015): Changed Owner[] variable to now use Triggering Player instead of Owner of (Unit)
Changed spell to now use one global dummy caster instead of one dummy caster per spell instance
Changed loop to check if it is time to deindex before starting
Changed name of VL Init trigger to VL Cast
Removed unnecessary function call when turning off VL Loop (Turn off (This trigger) -> (Turn off VL Loop))
- v1.02 (November 26, 2015): Changed the way the lightning effects are created
Changed names of some variables
Removed the Lightning Effects ability
Removed unneccesary variables
- v1.01 (October 1, 2015): Added a configurable to change the origin and angle of the lightning effects
Fixed GrowSpeed to GrowTime (lets you decide how long it will take for effects to reach max radius)
Removed KillUnit function and replaced it with RemoveUnit
Removed VL Dummy Cleaner trigger
- v1.00 (September 29, 2015): Uploaded onto Hive
//TESH.scrollpos=49
//TESH.alwaysfold=0
function SpellIndexGetVars takes integer i returns nothing
set udg_Spell__Index = i
set udg_Spell__Caster = udg_Spell_i_Caster[i]
set udg_Spell__CasterOwner = GetOwningPlayer(udg_Spell__Caster)
set udg_Spell__Level = udg_Spell_i_Level[i]
set udg_Spell__LevelMultiplier = udg_Spell__Level //Spell__LevelMultiplier is a real variable.
set udg_Spell__Target = udg_Spell_i_Target[i]
//Assign the saved coordinates to the static locations
call MoveLocation(udg_Spell__CastPoint, GetUnitX(udg_Spell__Caster), GetUnitY(udg_Spell__Caster))
if udg_Spell__Target == null then
call MoveLocation(udg_Spell__TargetPoint, udg_Spell_i_TargetX[i], udg_Spell_i_TargetY[i])
else
call MoveLocation(udg_Spell__TargetPoint, GetUnitX(udg_Spell__Target), GetUnitY(udg_Spell__Target))
endif
set udg_Spell__TargetGroup = udg_Spell_i_TargetGroup[i]
set udg_Spell__Completed = udg_Spell_i_Completed[i]
set udg_Spell__Channeling = udg_Spell_i_Channeling[i]
endfunction
function SpellSetFilters takes integer i returns nothing
set udg_Spell_i_AllowEnemy[i] = udg_Spell__Filter_AllowEnemy
set udg_Spell_i_AllowAlly[i] = udg_Spell__Filter_AllowAlly
set udg_Spell_i_AllowDead[i] = udg_Spell__Filter_AllowDead
set udg_Spell_i_AllowLiving[i] = udg_Spell__Filter_AllowLiving
set udg_Spell_i_AllowMagicImmune[i] = udg_Spell__Filter_AllowMagicImmune
set udg_Spell_i_AllowMechanical[i] = udg_Spell__Filter_AllowMechanical
set udg_Spell_i_AllowStructure[i] = udg_Spell__Filter_AllowStructure
set udg_Spell_i_AllowFlying[i] = udg_Spell__Filter_AllowFlying
set udg_Spell_i_AllowHero[i] = udg_Spell__Filter_AllowHero
set udg_Spell_i_AllowNonHero[i] = udg_Spell__Filter_AllowNonHero
endfunction
function SpellIndexDestroy takes integer i returns nothing
local integer indexOf
local integer index
if udg_Spell_i_RecycleList[i] >= 0 then
return
endif
//If the caster is still channeling on the spell, don't destroy until it's finished:
if not udg_Spell_i_Channeling[i] then
set index = udg_Spell_i_Head[i]
set udg_Spell_i_RecycleList[i] = udg_Spell_i_Recycle
set udg_Spell_i_Recycle = i
//Reset things to defaults:
set udg_Spell_i_Time[i] = 0.00
set udg_Spell_i_LastTime[i] = 0.00
set udg_Spell_i_Duration[i] = 0.00
set udg_Spell_i_Completed[i] = false
set udg_Spell_i_Caster[i] = null
set udg_Spell_i_Target[i] = null
set udg_Spell_i_OnLoopStack[i] = null
//Recycle any applicable target unit group.
if udg_Spell_i_TargetGroup[i] != null then
call GroupClear(udg_Spell_i_TargetGroup[i])
set udg_Spell_i_GroupStack[udg_Spell_i_GroupN] = udg_Spell_i_TargetGroup[i]
set udg_Spell_i_GroupN = udg_Spell_i_GroupN + 1
set udg_Spell_i_TargetGroup[i] = null
endif
//Clear any user-specified data in the hashtable:
call FlushChildHashtable(udg_Spell__Hash, i)
//call BJDebugMsg("Destroying index: " + I2S(i))
endif
set indexOf = udg_Spell_i_StackRef[i]
if indexOf >= 0 then
set index = udg_Spell_i_StackN - 1
set udg_Spell_i_StackN = index
set udg_Spell_i_StackRef[udg_Spell_i_Stack[index]] = indexOf
set udg_Spell_i_Stack[indexOf] = udg_Spell_i_Stack[index]
if index == 0 then
//If no more spells require the timer, pause it.
call PauseTimer(udg_Spell_i_Timer)
endif
set udg_Spell_i_StackRef[i] = -1
endif
endfunction
function SpellTriggerExecute takes integer i, trigger t returns real
local real d = udg_Spell_i_Duration[i]
set udg_Spell__Time = 0.00
if t != null then
set udg_Spell__Trigger_OnLoop = null
set udg_Spell__Expired = d <= 0.00 //If the duration is <= 0, the spell has expired.
call SpellIndexGetVars(i)
if TriggerEvaluate(t) then
call TriggerExecute(t)
endif
if udg_Spell__Trigger_OnLoop != null then
set udg_Spell_i_OnLoopStack[i] = udg_Spell__Trigger_OnLoop
endif
if udg_Spell__Duration > 0.00 then
set d = udg_Spell__Duration
set udg_Spell__Duration = 0.00
elseif udg_Spell__Expired then
return udg_Spell__Time
endif
if udg_Spell__Time == 0.00 then
if udg_Spell_i_LastTime[i] == 0.00 then
//If this is the first time the spell has been given a
//duration, set the spell time to the minimum.
set udg_Spell__Time = udg_Spell__Interval
else
//Otherwise, set it to what it was before.
set udg_Spell__Time = udg_Spell_i_LastTime[i]
endif
//else, the user is specifying a new time for the spell.
endif
set udg_Spell_i_LastTime[i] = udg_Spell__Time //Whatever the case, remember this time for next time.
set udg_Spell_i_Duration[i] = d - udg_Spell__Time //Subtract the time from the duration.
endif
return udg_Spell__Time
endfunction
//===========================================================================
// Runs every Spell__Interval seconds and handles all of the timed events.
//
function SpellTimerLoop takes nothing returns nothing
local integer i = udg_Spell_i_StackN
local integer node
local real time
set udg_Spell__Running = true
//Run stack top to bottom to avoid skipping slots when destroying.
loop
set i = i - 1
exitwhen i < 0
set node = udg_Spell_i_Stack[i]
set time = udg_Spell_i_Time[node] - udg_Spell__Interval
if time <= 0.00 then
set time = SpellTriggerExecute(node, udg_Spell_i_OnLoopStack[node])
endif
if time <= 0.00 then
call SpellIndexDestroy(node)
else
set udg_Spell_i_Time[node] = time
endif
endloop
set udg_Spell__Running = false
endfunction
//===========================================================================
// This is the meat of the system as it handles the event responses.
//
function RunSpellEvent takes nothing returns boolean
local boolean b
local integer aid = GetSpellAbilityId()
local integer head = LoadInteger(udg_Spell__Hash, 0, aid)
local integer i
local integer id
local trigger t
local playerunitevent eid
if head == 0 then
//Nothing for this ability has been registered. Skip the sequence.
return false
endif
set eid = ConvertPlayerUnitEvent(GetHandleId(GetTriggerEventId()))
set udg_Spell__Caster = GetTriggerUnit()
set id = GetHandleId(udg_Spell__Caster)
set i = LoadInteger(udg_Spell__Hash, aid, id)
if i == 0 then
//This block will almost always happen with the OnChannel event. In the
//case of Charge Gold and Lumber, only an OnEffect event will run.
set i = udg_Spell_i_Recycle
if i == 0 then
//Create a new, unique index
set i = udg_Spell_i_Instances + 1
set udg_Spell_i_Instances = i
else
//Repurpose an existing one
set udg_Spell_i_Recycle = udg_Spell_i_RecycleList[i]
endif
//call BJDebugMsg("Creating index: " + I2S(i))
set udg_Spell_i_RecycleList[i] = -1
set udg_Spell_i_StackRef[i] = -1
set udg_Spell_i_Head[i] = head
if eid == EVENT_PLAYER_UNIT_SPELL_CHANNEL then
set udg_Spell_i_Channeling[i] = true
call SaveInteger(udg_Spell__Hash, aid, id, i)
set t = udg_Spell_i_OnChannelStack[head]
else //eid == EVENT_PLAYER_UNIT_SPELL_EFFECT
set t = udg_Spell_i_OnEffectStack[head]
endif
set udg_Spell_i_Caster[i] = udg_Spell__Caster
set udg_Spell_i_Level[i] = GetUnitAbilityLevel(udg_Spell__Caster, aid)
set udg_Spell_i_Target[i] = GetSpellTargetUnit()
set udg_Spell_i_TargetX[i] = GetSpellTargetX()
set udg_Spell_i_TargetY[i] = GetSpellTargetY()
set udg_Spell_i_OnLoopStack[i] = udg_Spell_i_OnLoopStack[head]
if udg_Spell_i_UseTG[head] then
//Get a recycled unit group or create a new one.
set id = udg_Spell_i_GroupN - 1
if id >= 0 then
set udg_Spell_i_GroupN = id
set udg_Spell_i_TargetGroup[i] = udg_Spell_i_GroupStack[id]
else
set udg_Spell_i_TargetGroup[i] = CreateGroup()
endif
endif
elseif eid == EVENT_PLAYER_UNIT_SPELL_CAST then
set t = udg_Spell_i_OnCastStack[head]
elseif eid == EVENT_PLAYER_UNIT_SPELL_EFFECT then
set t = udg_Spell_i_OnEffectStack[head]
elseif eid == EVENT_PLAYER_UNIT_SPELL_FINISH then
set udg_Spell_i_Completed[i] = true
return true
else //eid == EVENT_PLAYER_UNIT_SPELL_ENDCAST
set udg_Spell_i_Channeling[i] = false
call RemoveSavedInteger(udg_Spell__Hash, aid, id)
set t = udg_Spell_i_OnFinishStack[head]
endif
if SpellTriggerExecute(i, t) > 0.00 then
//Set the spell time to the user-specified one.
set udg_Spell_i_Time[i] = udg_Spell__Time
if udg_Spell_i_StackRef[i] < 0 then
//Allocate the spell index onto the loop stack.
set aid = udg_Spell_i_StackN
set udg_Spell_i_Stack[aid] = i
set udg_Spell_i_StackRef[i] = aid
set udg_Spell_i_StackN = aid + 1
if aid == 0 then
//If this is the first spell index using the timer, start it up:
call TimerStart(udg_Spell_i_Timer, udg_Spell__Interval, true, function SpellTimerLoop)
endif
endif
elseif (not udg_Spell_i_Channeling[i]) and (t != null or udg_Spell_i_Time[i] <= 0.00) then
call SpellIndexDestroy(i)
endif
set t = null
return true
endfunction
//This function is invoked if an event was launched recursively by another event's callback.
function RunPreSpellEvent takes nothing returns nothing
local integer i = udg_Spell__Index
local real time = udg_Spell__Time
local real d = udg_Spell__Duration
local boolean expired = udg_Spell__Expired
if udg_Spell__Trigger_OnLoop != null then
set udg_Spell_i_OnLoopStack[i] = udg_Spell__Trigger_OnLoop
endif
if RunSpellEvent() then
set udg_Spell__Time = time
set udg_Spell__Duration = d
set udg_Spell__Expired = expired
call SpellIndexGetVars(i)
endif
endfunction
//===========================================================================
// Base function of the system: runs when an ability event does something.
//
function SpellSystemEvent takes nothing returns boolean
if udg_Spell__Running then
call RunPreSpellEvent()
else
set udg_Spell__Running = true
call RunSpellEvent()
set udg_Spell__Running = false
endif
return false
endfunction
//===========================================================================
// Set Spell__Ability to your spell's ability
// Set Spell__Trigger_OnChannel/Cast/Effect/Finish/Loop to any trigger(s) you
// want to automatically run.
//
// GUI-friendly: Run Spell System <gen> (ignoring conditions)
//
function SpellSystemRegister takes nothing returns nothing
local integer aid = udg_Spell__Ability
local integer head = udg_Spell_i_Instances + 1
if HaveSavedInteger(udg_Spell__Hash, 0, aid) or aid == 0 then
//The system rejects duplicate or unassigned abilities.
return
endif
set udg_Spell_i_Instances = head
//Preload the ability on dummy unit to help prevent first-instance lag
call UnitAddAbility(udg_Spell_i_PreloadDummy, aid)
//Save head index to the spell ability so it be referenced later.
call SaveInteger(udg_Spell__Hash, 0, aid, head)
//Set any applicable event triggers.
set udg_Spell_i_OnChannelStack[head]= udg_Spell__Trigger_OnChannel
set udg_Spell_i_OnCastStack[head] = udg_Spell__Trigger_OnCast
set udg_Spell_i_OnEffectStack[head] = udg_Spell__Trigger_OnEffect
set udg_Spell_i_OnFinishStack[head] = udg_Spell__Trigger_OnFinish
set udg_Spell_i_OnLoopStack[head] = udg_Spell__Trigger_OnLoop
//Set any customized filter variables:
call SpellSetFilters(head)
//Tell the system to automatically create target groups, if needed
set udg_Spell_i_UseTG[head] = udg_Spell__UseTargetGroup
//Set variables back to their defaults:
set udg_Spell__Trigger_OnChannel= null
set udg_Spell__Trigger_OnCast = null
set udg_Spell__Trigger_OnEffect = null
set udg_Spell__Trigger_OnFinish = null
set udg_Spell__Trigger_OnLoop = null
set udg_Spell__UseTargetGroup = false
set udg_Spell__Filter_AllowEnemy = udg_Spell_i_AllowEnemy[0]
set udg_Spell__Filter_AllowAlly = udg_Spell_i_AllowAlly[0]
set udg_Spell__Filter_AllowDead = udg_Spell_i_AllowDead[0]
set udg_Spell__Filter_AllowMagicImmune = udg_Spell_i_AllowMagicImmune[0]
set udg_Spell__Filter_AllowMechanical = udg_Spell_i_AllowMechanical[0]
set udg_Spell__Filter_AllowStructure = udg_Spell_i_AllowStructure[0]
set udg_Spell__Filter_AllowFlying = udg_Spell_i_AllowFlying[0]
set udg_Spell__Filter_AllowHero = udg_Spell_i_AllowHero[0]
set udg_Spell__Filter_AllowNonHero = udg_Spell_i_AllowNonHero[0]
set udg_Spell__Filter_AllowLiving = udg_Spell_i_AllowLiving[0]
endfunction
function SpellFilterCompare takes boolean is, boolean yes, boolean no returns boolean
return (is and yes) or ((not is) and no)
endfunction
//===========================================================================
// Before calling this function, set Spell__InRangePoint to whatever point
// you need, THEN set Spell__InRange to the radius you need. The system will
// enumerate the units matching the configured filter and fill them into
// Spell_InRangeGroup.
//
function SpellGroupUnitsInRange takes nothing returns boolean
local integer i = udg_Spell_i_Head[udg_Spell__Index]
local integer j = 0
local unit u
local real padding = 64.00
if udg_Spell_i_AllowStructure[i] then
//A normal unit can only have up to size 64.00 collision, but if the
//user needs to check for structures we need a padding big enough for
//the "fattest" ones: Tier 3 town halls.
set padding = 197.00
endif
call GroupEnumUnitsInRangeOfLoc(udg_Spell__InRangeGroup, udg_Spell__InRangePoint, udg_Spell__InRange + padding, null)
loop
set u = FirstOfGroup(udg_Spell__InRangeGroup)
exitwhen u == null
call GroupRemoveUnit(udg_Spell__InRangeGroup, u)
loop
exitwhen not IsUnitInRangeLoc(u, udg_Spell__InRangePoint, udg_Spell__InRange)
exitwhen not SpellFilterCompare(IsUnitType(u, UNIT_TYPE_DEAD), udg_Spell_i_AllowDead[i], udg_Spell_i_AllowLiving[i])
exitwhen not SpellFilterCompare(IsUnitAlly(u, udg_Spell__CasterOwner), udg_Spell_i_AllowAlly[i], udg_Spell_i_AllowEnemy[i])
exitwhen not SpellFilterCompare(IsUnitType(u, UNIT_TYPE_HERO) or IsUnitType(u, UNIT_TYPE_RESISTANT), udg_Spell_i_AllowHero[i], udg_Spell_i_AllowNonHero[i])
exitwhen IsUnitType(u, UNIT_TYPE_STRUCTURE) and not udg_Spell_i_AllowStructure[i]
exitwhen IsUnitType(u, UNIT_TYPE_FLYING) and not udg_Spell_i_AllowFlying[i]
exitwhen IsUnitType(u, UNIT_TYPE_MECHANICAL) and not udg_Spell_i_AllowMechanical[i]
exitwhen IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) and not udg_Spell_i_AllowMagicImmune[i]
if udg_Spell__WakeTargets and UnitIsSleeping(u) then
call UnitWakeUp(u)
endif
set j = j + 1
set udg_Spell__InRangeUnits[j] = u
exitwhen true
endloop
endloop
set udg_Spell__InRange = 0.00
set udg_Spell__InRangeCount = j
loop
exitwhen j == 0
call GroupAddUnit(udg_Spell__InRangeGroup, udg_Spell__InRangeUnits[j])
set j = j - 1
endloop
return false
endfunction
//===========================================================================
function InitTrig_Spell_System takes nothing returns nothing
local integer i = 16
local player p
local trigger t
if gg_trg_Spell_System != null then
//A JASS function call already initialized the system.
return
endif
//This runs before map init events so the hashtable is ready before then.
set udg_Spell__Hash = InitHashtable()
//Initialize these two locations which will never get removed
set udg_Spell__CastPoint = Location(0, 0)
set udg_Spell__TargetPoint = Location(0, 0)
//Recycle existing unit groups into the recycle stack to avoid needing to destroy any extras.
set udg_Spell_i_GroupStack[2] = udg_Spell__TargetGroup
set udg_Spell_i_GroupStack[3] = udg_Spell_i_TargetGroup[0]
set udg_Spell_i_GroupStack[4] = udg_Spell_i_TargetGroup[1]
set udg_Spell_i_GroupN = 5 //There are already five valid unit groups thanks to Variable Editor.
set t = CreateTrigger()
call TriggerRegisterVariableEvent(t, "udg_Spell__InRange", GREATER_THAN, 0.00)
call TriggerAddCondition(t, Filter(function SpellGroupUnitsInRange))
set t = CreateTrigger()
call TriggerAddCondition(t, Filter(function SpellSystemEvent))
loop
set i = i - 1
set p = Player(i)
call TriggerRegisterPlayerUnitEvent(t, p, EVENT_PLAYER_UNIT_SPELL_CHANNEL, null)
call TriggerRegisterPlayerUnitEvent(t, p, EVENT_PLAYER_UNIT_SPELL_CAST, null)
call TriggerRegisterPlayerUnitEvent(t, p, EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
call TriggerRegisterPlayerUnitEvent(t, p, EVENT_PLAYER_UNIT_SPELL_FINISH, null)
call TriggerRegisterPlayerUnitEvent(t, p, EVENT_PLAYER_UNIT_SPELL_ENDCAST, null)
exitwhen i == 0
endloop
set p = null
set t = null
//Run the configuration trigger so its variables are ready before the
//map initialization events run.
call TriggerExecute(gg_trg_Spell_System_Config)
call SpellSetFilters(0)
//Create this trigger so it's GUI-friendly.
set gg_trg_Spell_System = CreateTrigger()
call TriggerAddAction(gg_trg_Spell_System, function SpellSystemRegister)
set gg_trg_Spell_System_Config = gg_trg_Spell_System //In case the user accidentally picks this one
//Create a dummy unit for preloading abilities.
set udg_Spell_i_PreloadDummy = CreateUnit(udg_Spell__DummyOwner, udg_Spell__DummyType, 0, 0, 0)
call UnitApplyTimedLife(udg_Spell_i_PreloadDummy, 'BTLF', 0.01)
endfunction
//TESH.scrollpos=8
//TESH.alwaysfold=0
***************************
******Holy Shockwave*******
*********By Chaosy*********
*********** 1.0 ***********
***************************
Spell description:
The caster shoots small holy shockwaves in random directions infront of him X times.
Needed systems (also included in this map):
Knockup system - http://www.hiveworkshop.com/forums/spells-569/knockup-system-gui-229329/
IsDestructableTree - http://www.hiveworkshop.com/forums/spells-569/isdestructabletree-gui-1-1-a-228385/
Setup variables and what they do:
HS_damage - how much damage the spells deal when it hits a unit.
HS_speed - how big the gap between each effect will be, with other words speed.
HS_charges - the number of shockwaves created before the spell is finished.
HS_destroy_dest - if destructables should be killed. (tress only)
HS_detect_area - the area used to detect both units and destructables.
HS_effect - the path of the model used to create the shockwaves.
HS_effect2 - the path of the model used when something is hit by the spell.
HS_time - how long each shockwave is allowed to travel before the next one starts.
HS_ability - the ability you cast.
HS_knockup - if units that got hit should get knocked into the air, this requires the second system in this map.
HS_animation - animation that is played open casting the spell.
HS_cone - setting this to 180 means the beams will random in any direction. Setting it
to 1 will make it fire in the same angle infront of the caster.
additional info:
I did a simple destructable respawn system for this map, you should consider
downloading one from www.hiveworkshop.com if you want to enable the killing
of destructables with this spell.
I also want to mention that the extra systems used in this maps are made by me in case
you wonder why there are no credit section.
How to use:
1. copy the triggers from the "Holy Shockwave", "IsDestructableTree" and "system" folders.
2. copy the Holy Shockwave spell from the object editor.
3. profit