//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
Ability_Hashtable | hashtable | No | |
AbilityHash | hashtable | No | |
AI_Item | itemcode | Yes | |
AI_ItemCost | integer | Yes | |
AIGroup | group | No | |
AIHeroes | group | Yes | |
AIHeroName | string | Yes | |
AIInjuredHeroes | group | Yes | |
AIIsDefendingBase | boolean | Yes | |
AIPlayers | force | No | |
AITargetUnit | unit | Yes | |
AIUnits | group | Yes | |
CastingAIUnits | group | No | |
Configure_Attack_Creep | real | No | |
Configure_Attack_Hero | real | No | |
Configure_Attack_Range | real | No | |
Configure_Flee | real | No | |
Configure_Hero_Retreat | real | No | |
Configure_Item_Pick_Range | real | No | |
Configure_Max_Item | integer | No | |
DeadPlayer | string | No | |
FightingForceStrength | real | Yes | |
GreaterBash_CheckGroup | group | No | |
GreaterBash_StartGroup | group | No | |
Hashtable | hashtable | No | |
HeroType | unitcode | Yes | |
Kill | integer | Yes | |
KillCounter | integer | Yes | |
Mode | integer | No | |
NetherStrike_Angle | real | No | |
NetherStrike_Caster | unit | Yes | |
NetherStrike_CasterLoc | location | No | |
NetherStrike_Colour | real | Yes | |
NetherStrike_Colour2 | real | Yes | |
NetherStrike_Counts | integer | No | |
NetherStrike_CustomValue | integer | No | |
NetherStrike_CustomValue2 | integer | No | |
NetherStrike_DistanceSlide | real | Yes | |
NetherStrike_DummyGroup | group | No | |
NetherStrike_Point | location | Yes | |
NetherStrike_SlideAngle | real | Yes | |
NetherStrike_SlideGroup | group | No | |
NetherStrike_StartGroup | group | No | |
NetherStrike_Target | unit | Yes | |
Player_Color | string | Yes | |
PlayerName | string | Yes | |
Players | force | No | |
RecentKill | integer | Yes | |
Sounds | soundtype | Yes | |
Streak | integer | Yes | |
TempAbility | abilcode | No | |
TempGroup | group | No | |
TempInteger | integer | No | |
TempInteger2 | integer | No | |
TempPoint | location | No | |
TempPoint2 | location | No | |
Timer | real | No | |
TimerGroup | group | No | |
UnitGroup | group | Yes |
//TESH.scrollpos=5
//TESH.alwaysfold=0
library GetPlayerNameColored
function GetPlayerNameColored takes player id returns string
local playercolor col = GetPlayerColor(id)
local string r = GetPlayerName(id)
if col == PLAYER_COLOR_RED then
set r="|cffff0000"+r+"|r"
elseif col == PLAYER_COLOR_BLUE then
set r="|cff0000ff"+r+"|r"
elseif col == PLAYER_COLOR_CYAN then
set r="|cff93ffc9"+r+"|r"
elseif col == PLAYER_COLOR_PURPLE then
set r="|cff400080"+r+"|r"
elseif col == PLAYER_COLOR_YELLOW then
set r="|cffffff00"+r+"|r"
elseif col == PLAYER_COLOR_ORANGE then
set r="|cffff8000"+r+"|r"
elseif col == PLAYER_COLOR_GREEN then
set r="|cff00c400"+r+"|r"
elseif col == PLAYER_COLOR_PINK then
set r="|cffff80c0"+r+"|r"
elseif col == PLAYER_COLOR_LIGHT_GRAY then
set r="|cff808080"+r+"|r"
elseif col == PLAYER_COLOR_LIGHT_BLUE then
set r="|cffc1c1ff"+r+"|r"
elseif col == PLAYER_COLOR_AQUA then
set r="|cff5e5e2f"+r+"|r"
elseif col == PLAYER_COLOR_BROWN then
set r="|cff004000"+r+"|r"
else
set r="|cff000000"+r+"|r"
endif
return r
endfunction
// Added this so when heroes are created they can have their name in their players color, the S stands for string, since it returns the
// string, not the actual playercolor constant
function GetPlayerColorS takes player id returns string
local playercolor col = GetPlayerColor(id)
local string r = ""
if col == PLAYER_COLOR_RED then
set r="|cffff0000"
elseif col == PLAYER_COLOR_BLUE then
set r="|cff0000ff"
elseif col == PLAYER_COLOR_CYAN then
set r="|cff93ffc9"
elseif col == PLAYER_COLOR_PURPLE then
set r="|cff400080"
elseif col == PLAYER_COLOR_YELLOW then
set r="|cffffff00"
elseif col == PLAYER_COLOR_ORANGE then
set r="|cffff8000"
elseif col == PLAYER_COLOR_GREEN then
set r="|cff00c400"
elseif col == PLAYER_COLOR_PINK then
set r="|cffff80c0"
elseif col == PLAYER_COLOR_LIGHT_GRAY then
set r="|cff808080"
elseif col == PLAYER_COLOR_LIGHT_BLUE then
set r="|cffc1c1ff"
elseif col == PLAYER_COLOR_AQUA then
set r="|cff5e5e2f"
elseif col == PLAYER_COLOR_BROWN then
set r="|cff004000"
else
set r="|cff000000"
endif
return r
endfunction
endlibrary
function Trig_Rupture_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A04G'
endfunction
function Rupture_Effects takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u = GetHandleUnit(t, "u")
local unit v = GetHandleUnit(t, "v")
local location l = GetHandleLocation(t,"l")
local integer i = GetHandleInt(t, "i")
call UnitDamageTargetBJ( u, v, ( ( 0.20 * i ) * DistanceBetweenPoints(GetUnitLoc(v), l) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
if UnitHasBuffBJ(v, 'B00M') == true then
if GetBooleanOr(GetLocationX(GetUnitLoc(v)) != GetLocationX(l),GetLocationY(GetUnitLoc(v)) != GetLocationY(l)) then
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",v,"chest"))
endif
endif
set l = GetUnitLoc(v)
call SetHandleHandle(t, "l", l)
set t = null
set u = null
set v = null
endfunction
function Trig_Rupture_Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit u = GetTriggerUnit()
local unit v = GetSpellTargetUnit()
local integer i = GetUnitAbilityLevelSwapped('A04G', u)
local location l = GetUnitLoc(v)
call SetHandleHandle(t, "u", u)
call SetHandleHandle(t, "v", v)
call SetHandleInt(t, "i", i)
call SetHandleHandle(t, "l", l)
call TimerStart(t, 0.04, true, function Rupture_Effects)
call UnitDamageTarget( u, v, ( 150.00 + ( 100.00 * ( I2R(i) - 1 ) ) ),false, true, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL,WEAPON_TYPE_AXE_MEDIUM_CHOP )
call TriggerSleepAction( ( 3.00 + ( 2.00 * I2R(i) ) ) )
call FlushHandleLocals(t)
call PauseTimer(t)
call DestroyTimer(t)
set t = null
set u = null
set v = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_Rupture takes nothing returns nothing
set gg_trg_Rupture = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rupture, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Rupture, Condition( function Trig_Rupture_Conditions ) )
call TriggerAddAction( gg_trg_Rupture, function Trig_Rupture_Actions )
endfunction