//TESH.scrollpos=0
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
//TESH.scrollpos=48
//TESH.alwaysfold=0
///////////////////////////////////////////////////////////////
/// The Map Meta Data Library
/// Version: v1.00
/// Last Modified: April 24, 2009
/// Author Chain: Strilanc, [insert next ...]
///////////////////////////////////////////////////////////////
/// This library is used to emit standardized meta data which replay parsers and bot hosts can use to record relevant
/// game statistics like "hero kills" which would otherwise be impossible to record automatically.
///
/// In particular, the flag function can be used to indicate if a leaver should be awarded a win or not. Replays
/// don't contain enough information to easily tell winners who leave from losers who leave. (for example: people
/// who leave while end-game stats are being shown)
///////////////////////////////////////////////////////////////
/// Interface:
/// void FlagPlayer(player, flag_constant)
/// void DefineValue(name, type_constant, goal_constant, suggest_constant)
/// void UpdateValueInt(name, player, operation_constant, value)
/// void UpdateValueReal(name, player, operation_constant, value)
/// void UpdateValueString(name, player, value)
/// void DefineEvent0(name, format)
/// void DefineEvent1(name, format, argName1)
/// void DefineEvent2(name, format, argName1, argName2)
/// void DefineEvent3(name, format, argName1, argName2, argName3)
/// void LogEvent0(name)
/// void LogEvent1(name, arg0)
/// void LogEvent2(name, arg0, arg1)
/// void LogEvent3(name, arg0, arg1, arg2)
/// void LogCustom(unique_identifier, data)
/// void RaiseGuard(reason)
///////////////////////////////////////////////////////////////
/// Notes:
/// - Errors are displayed using BJDebugMsg
/// - Don't try to update a value before defining it
/// - Parsers expect a very specific format, don't screw with the library's output.
/// - If you emit a bunch of data per second, you will cause bandwidth problems for dial-up users. Try to avoid
/// emitting lots of data all at once except at the start and end of games or rounds.
/// - An event's format string uses {#} to represent arguments
/// - Calling RaiseGuard will increase the number of senders for each message from 1 to 3. This increases
/// security but uses more network bandwidth. It is done automatically if tampering is detected.
///////////////////////////////////////////////////////////////
library MMD initializer init
globals
public constant integer GOAL_NONE = 101
public constant integer GOAL_HIGH = 102
public constant integer GOAL_LOW = 103
public constant integer TYPE_STRING = 101
public constant integer TYPE_REAL = 102
public constant integer TYPE_INT = 103
public constant integer OP_ADD = 101
public constant integer OP_SUB = 102
public constant integer OP_SET = 103
public constant integer SUGGEST_NONE = 101
public constant integer SUGGEST_TRACK = 102
public constant integer SUGGEST_LEADERBOARD = 103
public constant integer FLAG_DRAWER = 101
public constant integer FLAG_LOSER = 102
public constant integer FLAG_WINNER = 103
public constant integer FLAG_LEAVER = 104
public constant integer FLAG_PRACTICING = 105
endglobals
///////////////////////////////////////////////////////////////
/// Private variables and constants
///////////////////////////////////////////////////////////////
globals
private constant boolean SHOW_DEBUG_MESSAGES = true
private constant string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-+= \\[email protected]#$%^&*()/?>.<,;:'\"{}[]|`~"
private constant integer num_chars = StringLength(chars)
private string array flags
private string array goals
private string array ops
private string array types
private string array suggestions
private boolean initialized = false
private gamecache gc = null
private constant string ESCAPED_CHARS = " \\"
private constant integer CURRENT_VERSION = 1
private constant integer MINIMUM_PARSER_VERSION = 1
private constant string FILENAME = "MMD.Dat"
private constant string M_KEY_VAL = "val:"
private constant string M_KEY_CHK = "chk:"
private constant integer NUM_SENDERS_NAIVE = 1
private constant integer NUM_SENDERS_SAFE = 3
private integer num_senders = NUM_SENDERS_NAIVE
private integer num_msg = 0
private timer clock = CreateTimer()
private string array q_msg
private real array q_time
private integer array q_index
private keyword QueueNode
private QueueNode q_head = 0
private QueueNode q_tail = 0
endglobals
///////////////////////////////////////////////////////////////
/// Private functions
///////////////////////////////////////////////////////////////
///Triggered when tampering is detected. Increases the number of safeguards against tampering.
public function RaiseGuard takes string reason returns nothing
debug if SHOW_DEBUG_MESSAGES then
debug call BJDebugMsg("MMD: Guard Raised! (" + reason + ")")
debug endif
set num_senders = NUM_SENDERS_SAFE //increase number of players voting on each message
endfunction
///Returns seconds elapsed in game time
private function time takes nothing returns real
return TimerGetElapsed(clock)
endfunction
///Initializes the char-to-int conversion
private function prepC2I takes nothing returns nothing
local integer i = 0
local string id
loop
exitwhen i >= num_chars
set id = SubString(chars, i, i+1)
if id == StringCase(id, true) then
set id = id + "U"
endif
call StoreInteger(gc, "c2i", id, i)
set i = i + 1
endloop
endfunction
///Converts a character to an integer
private function C2I takes string c returns integer
local integer i
local string id = c
if id == StringCase(id, true) then
set id = id + "U"
endif
set i = GetStoredInteger(gc, "c2i", id)
if (i < 0 or i >= num_chars or SubString(chars, i, i+1) != c) and HaveStoredInteger(gc, "c2i", id) then
//A cheater sent a fake sync to screw with the cached values
set i = 0
loop
exitwhen i >= num_chars //just a weird character
if c == SubString(chars, i, i+1) then //cheating!
call RaiseGuard("c2i poisoned")
call StoreInteger(gc, "c2i", id, i)
exitwhen true
endif
set i = i + 1
endloop
endif
return i
endfunction
///Computes a weak hash value, hopefully secure enough for our purposes
private function poor_hash takes string s, integer seed returns integer
local integer n = StringLength(s)
local integer m = n + seed
local integer i = 0
loop
exitwhen i >= n
set m = m * 41 + C2I(SubString(s, i, i+1))
set i = i + 1
endloop
return m
endfunction
///Stores previously sent messages for tamper detection purposes
private struct QueueNode
readonly real timeout
readonly string msg
readonly integer checksum
readonly string key
public QueueNode next = 0
public static method create takes integer id, string msg returns QueueNode
local QueueNode this = QueueNode.allocate()
set .timeout = time() + 7.0 + GetRandomReal(0, 2+0.1*GetPlayerId(GetLocalPlayer()))
set .msg = msg
set .checksum = poor_hash(.msg, id)
set .key = I2S(id)
return this
endmethod
private method onDestroy takes nothing returns nothing
call FlushStoredInteger(gc, M_KEY_VAL+.key, .msg)
call FlushStoredInteger(gc, M_KEY_CHK+.key, .key)
set .msg = null
set .key = null
set .next = 0
endmethod
public method send takes nothing returns nothing
call StoreInteger(gc, M_KEY_VAL+.key, .msg, .checksum)
call StoreInteger(gc, M_KEY_CHK+.key, .key, .checksum)
call SyncStoredInteger(gc, M_KEY_VAL+.key, .msg)
call SyncStoredInteger(gc, M_KEY_CHK+.key, .key)
endmethod
endstruct
///Returns true for a fixed size uniform random subset of players in the game
private function isEmitter takes nothing returns boolean
local integer i = 0
local integer n = 0
local integer r
local integer array picks
local boolean array pick_flags
loop
exitwhen i >= 12
if GetPlayerController(Player(i)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
if n < num_senders then //initializing picks
set picks[n] = i
set pick_flags[i] = true
else //maintain the invariant 'P(being picked) = c/n'
set r = GetRandomInt(0, n)
if r < num_senders then
set pick_flags[picks[r]] = false
set picks[r] = i
set pick_flags[i] = true
endif
endif
set n = n + 1
endif
set i = i + 1
endloop
return pick_flags[GetPlayerId(GetLocalPlayer())]
endfunction
///Places meta-data in the replay and in network traffic
private function emit takes string message returns nothing
local QueueNode q
if not initialized then
call BJDebugMsg("MMD Emit Error: Library not initialized yet.")
return
endif
//remember sent messages for tamper check
set q = QueueNode.create(num_msg, message)
if q_head == 0 then
set q_head = q
else
set q_tail.next = q
endif
set q_tail = q
//send new message
set num_msg = num_msg + 1
if isEmitter() then
call q.send()
endif
endfunction
///Performs tamper checks
private function tick takes nothing returns nothing
local QueueNode q
local integer i
//check previously sent messages for tampering
set q = q_head
loop
exitwhen q == 0 or q.timeout >= time()
if not HaveStoredInteger(gc, M_KEY_VAL+q.key, q.msg) then
call RaiseGuard("message skipping")
call q.send()
elseif not HaveStoredInteger(gc, M_KEY_CHK+q.key, q.key) then
call RaiseGuard("checksum skipping")
call q.send()
elseif GetStoredInteger(gc, M_KEY_VAL+q.key, q.msg) != q.checksum then
call RaiseGuard("message tampering")
call q.send()
elseif GetStoredInteger(gc, M_KEY_CHK+q.key, q.key) != q.checksum then
call RaiseGuard("checksum tampering")
call q.send()
endif
set q_head = q.next
call q.destroy()
set q = q_head
endloop
if q_head == 0 then
set q_tail = 0
endif
//check for future message tampering
set i = 0
loop
exitwhen not HaveStoredInteger(gc, M_KEY_CHK+I2S(num_msg), I2S(num_msg))
call RaiseGuard("message insertion")
call emit("Blank")
set i = i + 1
exitwhen i >= 10
endloop
endfunction
///Replaces control characters with escape sequences
private function pack takes string value returns string
local integer j
local integer i = 0
local string result = ""
local string c
loop //for each character in argument string
exitwhen i >= StringLength(value)
set c = SubString(value, i, i+1)
set j = 0
loop //for each character in escaped chars string
exitwhen j >= StringLength(ESCAPED_CHARS)
//escape control characters
if c == SubString(ESCAPED_CHARS, j, j+1) then
set c = "\\" + c
exitwhen true
endif
set j = j + 1
endloop
set result = result + c
set i = i + 1
endloop
return result
endfunction
///Updates the value of a defined variable for a given player
private function update_value takes string name, player p, string op, string value, integer val_type returns nothing
local integer id = GetPlayerId(p)
if p == null or id < 0 or id >= 12 then
call BJDebugMsg("MMD Set Error: Invalid player. Must be P1 to P12.")
elseif val_type != GetStoredInteger(gc, "types", name) then
call BJDebugMsg("MMD Set Error: Updated value of undefined variable or used value of incorrect type.")
elseif StringLength(op) == 0 then
call BJDebugMsg("MMD Set Error: Unrecognized operation type.")
elseif StringLength(name) > 50 then
call BJDebugMsg("MMD Set Error: Variable name is too long.")
elseif StringLength(name) == 0 then
call BJDebugMsg("MMD Set Error: Variable name is empty.")
else
call emit("VarP " + I2S(id) + " " + pack(name) + " " + op + " " + value)
endif
endfunction
///Defines an event's arguments and format
private function DefineEvent takes string name, integer num_args, string format, string arg_data returns nothing
if GetStoredInteger(gc, "events", name) != 0 then
call BJDebugMsg("MMD DefEvent Error: Event redefined.")
else
call StoreInteger(gc, "events", name, num_args+1)
call emit("DefEvent " + pack(name) + " " + I2S(num_args) + " " + arg_data + pack(format))
endif
endfunction
///Places an event in the meta-data
private function LogEvent takes string name, integer num_args, string data returns nothing
if GetStoredInteger(gc, "events", name) != num_args+1 then
call BJDebugMsg("MMD LogEvent Error: Event not defined or defined with different # of args.")
else
call emit("Event " + pack(name) + data)
endif
endfunction
///////////////////////////////////////////////////////////////
/// Public functions
///////////////////////////////////////////////////////////////
///Sets a player flag like "win_on_leave"
public function FlagPlayer takes player p, string flag_type returns nothing
local integer id = GetPlayerId(p)
if p == null or id < 0 or id >= 12 then
call BJDebugMsg("MMD Flag Error: Invalid player. Must be P1 to P12.")
elseif StringLength(flag_type) == 0 then
call BJDebugMsg("MMD Flag Error: Unrecognized flag type.")
elseif GetPlayerController(Player(id)) == MAP_CONTROL_USER then
call emit("FlagP " + I2S(id) + " " + flag_type)
endif
endfunction
///Defines a variable to store things in
public function DefineValue takes string name, integer value_type, integer goal_type, integer suggestion_type returns nothing
local string goal = goals[goal_type]
local string vtype = types[value_type]
local string stype = suggestions[suggestion_type]
if goal == null then
call BJDebugMsg("MMD Def Error: Unrecognized goal type.")
elseif vtype == null then
call BJDebugMsg("MMD Def Error: Unrecognized value type.")
elseif stype == null then
call BJDebugMsg("Stats Def Error: Unrecognized suggestion type.")
elseif StringLength(name) > 32 then
call BJDebugMsg("MMD Def Error: Variable name is too long.")
elseif StringLength(name) == 0 then
call BJDebugMsg("MMD Def Error: Variable name is empty.")
elseif value_type == TYPE_STRING and goal_type != GOAL_NONE then
call BJDebugMsg("MMD Def Error: Strings must have goal type of none.")
elseif GetStoredInteger(gc, "types", name) != 0 then
call BJDebugMsg("MMD Def Error: Value redefined.")
else
call StoreInteger(gc, "types", name, value_type)
call emit("DefVarP " + pack(name) + " " + vtype + " " + goal + " " + stype)
endif
endfunction
///Updates the value of an integer variable
public function UpdateValueInt takes string name, player p, integer op, integer value returns nothing
call update_value(name, p, ops[op], I2S(value), TYPE_INT)
endfunction
///Updates the value of a real variable
public function UpdateValueReal takes string name, player p, integer op, real value returns nothing
call update_value(name, p, ops[op], R2S(value), TYPE_REAL)
endfunction
///Updates the value of a string variable
public function UpdateValueString takes string name, player p, string value returns nothing
local string q = "\""
call update_value(name, p, ops[OP_SET], q + pack(value) + q, TYPE_STRING)
endfunction
public function DefineEvent0 takes string name, string format returns nothing
call DefineEvent(name, 0, format, "")
endfunction
public function DefineEvent1 takes string name, string format, string argName0 returns nothing
call DefineEvent(name, 1, format, pack(argName0) + " ")
endfunction
public function DefineEvent2 takes string name, string format, string argName0, string argName1 returns nothing
call DefineEvent(name, 2, format, pack(argName0) + " " + pack(argName1) + " ")
endfunction
public function DefineEvent3 takes string name, string format, string argName0, string argName1, string argName2 returns nothing
call DefineEvent(name, 3, format, pack(argName0) + " " + pack(argName1) + " " + pack(argName2) + " ")
endfunction
public function LogEvent0 takes string name returns nothing
call LogEvent(name, 0, "")
endfunction
public function LogEvent1 takes string name, string arg0 returns nothing
call LogEvent(name, 1, " " + pack(arg0))
endfunction
public function LogEvent2 takes string name, string arg0, string arg1 returns nothing
call LogEvent(name, 2, " " + pack(arg0) + " " + pack(arg1))
endfunction
public function LogEvent3 takes string name, string arg0, string arg1, string arg2 returns nothing
call LogEvent(name, 3, " " + pack(arg0) + " " + pack(arg1) + " " + pack(arg2))
endfunction
///Emits meta-data which parsers will ignore unless they are customized to understand it
public function LogCustom takes string unique_identifier, string data returns nothing
call emit("custom " + pack(unique_identifier) + " " + pack(data))
endfunction
///////////////////////////////////////////////////////////////
/// Initialization
///////////////////////////////////////////////////////////////
///Emits initialization data
private function init2 takes nothing returns nothing
local integer i
local trigger t
set initialized = true
call emit("init version " + I2S(MINIMUM_PARSER_VERSION) + " " + I2S(CURRENT_VERSION))
set i = 0
loop
exitwhen i >= 12
if GetPlayerController(Player(i)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
call emit("init pid " + I2S(i) + " " + pack(GetPlayerName(Player(i))))
endif
set i = i + 1
endloop
set t = CreateTrigger()
call TriggerAddAction(t, function tick)
call TriggerRegisterTimerEvent(t, 0.37, true)
endfunction
///Places init2 on a timer, initializes game cache, and translates constants
private function init takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 0, false)
call TriggerAddAction(t, function init2)
set goals[GOAL_NONE] = "none"
set goals[GOAL_HIGH] = "high"
set goals[GOAL_LOW] = "low"
set types[TYPE_INT] = "int"
set types[TYPE_REAL] = "real"
set types[TYPE_STRING] = "string"
set suggestions[SUGGEST_NONE] = "none"
set suggestions[SUGGEST_TRACK] = "track"
set suggestions[SUGGEST_LEADERBOARD] = "leaderboard"
set ops[OP_ADD] = "+="
set ops[OP_SUB] = "-="
set ops[OP_SET] = "="
set flags[FLAG_DRAWER] = "drawer"
set flags[FLAG_LOSER] = "loser"
set flags[FLAG_WINNER] = "winner"
set flags[FLAG_LEAVER] = "leaver"
set flags[FLAG_PRACTICING] = "practicing"
call FlushGameCache(InitGameCache(FILENAME))
set gc = InitGameCache(FILENAME)
call TimerStart(clock, 999999999, false, null)
call prepC2I()
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Rects
public function IsUnitInRect takes unit u, rect r returns boolean
return (GetUnitX(u) > GetRectMinX(r)-32 and GetUnitX(u) < GetRectMaxX(r)+32) and (GetUnitY(u) > GetRectMinY(r)-32 and GetUnitY(u) < GetRectMaxY(r)+32)
endfunction
endlibrary
//TESH.scrollpos=53
//TESH.alwaysfold=0
library FearSystem /* v2.7
************************************************************************************
*
* */uses /*
* */optional/*
*
* */ Table /* http://www.hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
* //By Bribe or Vexorian
*
************************************************************************************
*
* struct Fear extends array
*
* Description
* -------------------------
*
* This is a fear system; use it to remove player
* control from a unit temporarily. Units affected
* will also be unable to attack.
*
* Fields
* -------------------------
*
* unit targ -> The unit you want to apply the fear.
*
* string path -> The path of the sfx you want to add to the unit.
*
* string attach -> The attachment string you want the sfx to be on the unit
*
* readonly effect e -> The effect currently applied to the unit.
* Initializes to null
*
* Methods
* -------------------------
*
* static method create takes nothing returns thistype
* method destroy takes nothing returns nothing
*
* method start takes nothing returns nothing
* When you have set every parameters you start your fear instance.
*
* method changeEffect takes string path, string attach returns nothing
* If you already have set the effect of your instance and it is running
* and you want to change it use this.
*
* static method isFeared takes unit u returns boolean
* static method get takes unit u returns thistype
*
* Operators
* -------------------------
*
* method operator time= takes real t returns nothing
* method operator time takes nothing returns real
*
* Credits
* -------------------------
*
* - Vexorian for vJASS and Table
* - Maker for the DisableUnit function
* - Bribe for Table
* - Chobibo for the addition in the DisableUnit function/
*
************************************************************************************/
native UnitAlive takes unit u returns boolean
globals
//There will be check every FPS second.
private constant real FPS = 0.031250000
//Feared units will change direction every EACH_CHANGE FPS.
private constant integer EACH_CHANGE = 8
//Feared units will go maximum in a circle of 150 around them each time they change direction.
private constant real AROUND = 300.
//The rawcode of the attack disable. Be sure it is the same in the Object Editor.
private constant integer DISABLE_ATTACK = 'A0CF'
//The rawcode of the morph. Be sure it is the same in the Object Editor.
private constant integer MORPH_ID = 'AEme'
//The rawcode of the bear form. Be sure it is the same in the Object Editor.
private constant integer BEAR_ID = 'Abrf'
endglobals
globals
private hashtable ht = InitHashtable()
endglobals
private function round takes real r returns integer
return R2I(r+0.5)
endfunction
private function modulo takes integer a, integer b returns integer
return a - (a/b)*b
endfunction
//Credits to Maker for this awesum func <3
private function DisableControl takes unit u returns nothing
local boolean b
//call UnitAddAbility(u, 'Aloc')
//call UnitRemoveAbility(u, 'Aloc')
// if IsUnitType(u, UNIT_TYPE_HERO) then
// call UnitAddAbility(u,MORPH_ID)
// call IssueImmediateOrder(u, "metamorphosis")
// call UnitRemoveAbility(u,MORPH_ID)
// else
// call UnitAddAbility(u, BEAR_ID)
// call IssueImmediateOrder(u, "bearform")
// call UnitRemoveAbility(u, BEAR_ID)
// endif
//Thanks to chobibo for this idea
// if GetLocalPlayer() != GetOwningPlayer(u) then
// set b = not IsUnitHidden(u)
// call ShowUnit(u,false)
// call ShowUnit(u,b)
// endif
//I added this line to disable their attack too.
call UnitAddAbility(u,DISABLE_ATTACK)
call UnitAddAbility(u,'A0CW')
endfunction
private function EnableControl takes unit u returns nothing
local boolean backup = not IsUnitHidden(u)
//call ShowUnit(u,false)
//I added this line to enable their attack.
call UnitRemoveAbility(u,DISABLE_ATTACK)
call UnitRemoveAbility(u,'A0CW')
//call ShowUnit(u,backup)
endfunction
struct Fear extends array
unit targ
string path
string attach
readonly effect e
readonly boolean b
private integer steps
private integer startat
private static timer period
private static integer dindex
private static thistype array data
private static integer instanceCount
private static thistype recycle
private thistype recycleNext
private static method periodic takes nothing returns nothing
local thistype this
local real x
local real y
local integer i = 0
loop
exitwhen i > dindex
set this = data[i]
if modulo(this.steps,EACH_CHANGE) == this.startat then
set x = GetUnitX(this.targ)
set y = GetUnitY(this.targ)
call IssuePointOrder(this.targ, "move", GetRandomReal(x-AROUND,x+AROUND), GetRandomReal(y-AROUND, y+AROUND) )
endif
set this.steps = this.steps - 1
if this.steps == 0 or not(UnitAlive(this.targ)) then
set data[i] = data[dindex]
set i = i - 1
set dindex = dindex - 1
if this.e != null then
call DestroyEffect(this.e)
set this.e = null
endif
call IssueImmediateOrder(this.targ,"stop")
call EnableControl(this.targ)
call FlushChildHashtable(ht,GetHandleId(this.targ))
if this.b then
set this.targ = null
set recycleNext = recycle
set recycle = this
endif
endif
if dindex == -1 then
call PauseTimer(period)
endif
set i = i + 1
endloop
endmethod
static method isFeared takes unit u returns boolean
return HaveSavedInteger(ht,GetHandleId(u),0)
endmethod
method operator time= takes real t returns nothing
set this.steps = round(t/FPS)
endmethod
method operator time takes nothing returns real
return this.steps*FPS
endmethod
method changeEffect takes string path, string attach returns nothing
call DestroyEffect(this.e)
set this.e = null
set this.e = AddSpecialEffectTarget(path,this.targ,attach)
endmethod
static method get takes unit u returns thistype
local thistype this
if isFeared(u) then
return LoadInteger(ht,GetHandleId(u),0)
else
debug call BJDebugMsg("Tryng to get wrong instance")
return 0
endif
endmethod
method start takes nothing returns nothing
debug if this.targ==null or this.steps==0 then
debug call BJDebugMsg("You're instanciating badly ....")
debug return
debug endif
set dindex = dindex + 1
set data[dindex] = this
set this.startat = modulo(this.steps,EACH_CHANGE)
call DisableControl(this.targ)
if this.path != "" and this.attach != "" then
set this.e = AddSpecialEffectTarget(this.path, this.targ, this.attach)
endif
call SaveInteger(ht,GetHandleId(this.targ),0,this)
if dindex == 0 then
call TimerStart(period, FPS, true, function thistype.periodic)
endif
endmethod
static method create takes nothing returns thistype
local thistype this
if recycle == 0 then
set instanceCount = instanceCount + 1
set this = instanceCount
else
set this = recycle
set recycle = recycle.recycleNext
endif
set this.path = ""
set this.attach = ""
set this.e = null
set this.b = false
return this
endmethod
method destroy takes nothing returns nothing
set this.b = true
endmethod
private static method onInit takes nothing returns nothing
set dindex = - 1
set instanceCount = 0
set recycle = 0
set period = CreateTimer()
endmethod
endstruct
endlibrary
//TESH.scrollpos=3
//TESH.alwaysfold=0
library ProgressBars requires TimerUtils optional BoundSentinel
/**************************************************************
*
* ProgressBars v2.0.1 by TriggerHappy
*
* This library allows you to easily create and modify progress bars.
* It works by creating a dummy unit with a special model and changing
* the animation speed to increase or reduce the bar speed. It is more than
* just a wrapper as it recycles each progress bar, meaning it will avoid
* costly CreateUnit calls whenever possible which also leak.
*
* Options:
* x - set X coordinate
* y - set Y coordinate
* xOffset - offset of the target unit, if any.
* yOffset - offset of the target unit, if any.
* zOffset - how high the bar is from the ground.
* color - allows you to tint the bar or add transparency
* targetUnit - pick which unit the bar should hover over
* size - set model scale
*
* Usage:
* local ProgressBar bar = ProgressBar.create()
* set bar.zOffset = 150
* set bar.color = PLAYER_COLOR_RED
* set bar.targetUnit = CreateUnit(Player(0), 'hfoo', 0, 0, 0)
* call bar.setPercentage(30)
*
* Installation:
* 1. Copy the dummy unit over to your map
* 2. Change the DUMMY constant to fit the Raw code of the dummy.
* 3. Copy this and all required libraries over to your map.
*
* Thanks to JesusHipster for the Progress Bar models
* and to Vexorian for TimerUtils & BoundSentinel
*
**************************************************************/
globals
private constant integer PROGRESS_BAR_DUMMY = 'e00B' // the default one
private constant player PROGRESS_BAR_OWNER = Player(PLAYER_NEUTRAL_PASSIVE) // owner of the dummy
private constant real UPDATE_POSITION_PERIOD = 0.03 // the timer period used with .targetUnit
endglobals
struct ProgressBar
unit bar
unit target
real xOffset = 0
real yOffset = 0
timer timer
timer timer2
private boolean t_enabled = false
private real endVal
private real curVal=0
private real pspeed=0
private boolean reverse
private boolean done
private boolean recycle
readonly static unit array dummy
readonly static integer lastDummyIndex = -1
method operator x= takes real x returns nothing
call SetUnitX(this.bar, x)
endmethod
method operator x takes nothing returns real
return GetUnitX(this.bar)
endmethod
method operator y= takes real y returns nothing
call SetUnitY(this.bar, y)
endmethod
method operator y takes nothing returns real
return GetUnitY(this.bar)
endmethod
method operator zOffset= takes real offset returns nothing
call SetUnitFlyHeight(this.bar, offset, 0)
endmethod
method operator zOffset takes nothing returns real
return GetUnitFlyHeight(this.bar)
endmethod
method operator size= takes real size returns nothing
call SetUnitScale(this.bar, size, size, size)
endmethod
method operator color= takes playercolor color returns nothing
call SetUnitColor(this.bar, color)
endmethod
method show takes boolean flag returns nothing
call UnitRemoveAbility(this.bar, 'Aloc')
call ShowUnit(this.bar, flag)
call UnitAddAbility(this.bar, 'Aloc')
endmethod
method reset takes nothing returns nothing
call SetUnitAnimationByIndex(this.bar, 1)
endmethod
method RGB takes integer red, integer green, integer blue, integer alpha returns nothing
call SetUnitVertexColor(this.bar, red, green, blue, alpha)
endmethod
method destroy takes nothing returns nothing
if (recycle) then
set lastDummyIndex = lastDummyIndex + 1
set dummy[lastDummyIndex] = this.bar
call SetUnitAnimationByIndex(this.bar, 0)
call SetUnitTimeScale(this.bar, 1)
endif
set this.bar = null
set this.target = null
set this.t_enabled = false
set this.endVal = 0
set this.curVal = 0
if (this.timer != null) then
call ReleaseTimer(this.timer)
set this.timer = null
endif
if (this.timer2 != null) then
call ReleaseTimer(this.timer2)
set this.timer2 = null
endif
endmethod
private static method updatePercentage takes nothing returns nothing
local timer expired = GetExpiredTimer()
local thistype this = GetTimerData(expired)
if (this.reverse) then
if (this.curVal > this.endVal) then
call SetUnitTimeScale(this.bar, -this.pspeed)
set this.curVal = (this.curVal - (this.pspeed))
elseif (this.curVal <= this.endVal) then
call PauseTimer(this.timer2)
call SetUnitTimeScale(this.bar, 0)
set this.curVal = this.endVal
set this.done = true
endif
else
if (this.curVal < this.endVal) then
call SetUnitTimeScale(this.bar, this.pspeed)
set this.curVal = (this.curVal + (this.pspeed))
elseif (this.curVal >= this.endVal) then
call PauseTimer(this.timer2)
call SetUnitTimeScale(this.bar, 0)
set this.curVal = this.endVal
set this.done = true
endif
endif
endmethod
private static method updatePosition takes nothing returns nothing
local thistype this = GetTimerData(GetExpiredTimer())
if (this.target != null) then
call SetUnitX(this.bar, GetUnitX(this.target) + xOffset)
call SetUnitY(this.bar, GetUnitY(this.target) + yOffset)
else
call ReleaseTimer(GetExpiredTimer())
endif
endmethod
private static method getDummy takes nothing returns unit
if (lastDummyIndex <= -1) then
set bj_lastCreatedUnit = CreateUnit(PROGRESS_BAR_OWNER, PROGRESS_BAR_DUMMY, 0, 0, 270)
call PauseUnit(bj_lastCreatedUnit, true)
return bj_lastCreatedUnit
endif
call SetUnitAnimationByIndex(dummy[lastDummyIndex], 1)
set lastDummyIndex = lastDummyIndex - 1
return dummy[lastDummyIndex + 1]
endmethod
static method release takes integer count returns nothing
if (count > thistype.lastDummyIndex) then
set count = thistype.lastDummyIndex
endif
loop
exitwhen count <= 0
call RemoveUnit(dummy[count])
set dummy[count] = null
set count = count - 1
endloop
set thistype.lastDummyIndex = -1
endmethod
static method create takes nothing returns thistype
local thistype this = thistype.allocate()
set this.bar = thistype.getDummy()
set this.done = true
set this.recycle = true
call SetUnitAnimationByIndex(this.bar, 1)
call SetUnitTimeScale(this.bar, 0)
return this
endmethod
static method createEx takes integer unitId returns thistype
local thistype this = thistype.allocate()
set this.bar = CreateUnit(PROGRESS_BAR_OWNER, unitId, 0, 0, 0)
set this.done = true
set this.recycle = false
call SetUnitAnimationByIndex(this.bar, 1)
call SetUnitTimeScale(this.bar, 0)
return this
endmethod
method setPercentage takes real percent, real speed returns nothing
set this.endVal = R2I(percent)
set this.pspeed = speed
set this.reverse = (curVal > endVal)
if (this.done) then
if (this.timer2 == null) then
set this.timer2 = NewTimerEx(this)
endif
call TimerStart(this.timer2, 0.01, true, function thistype.updatePercentage)
set this.done=false
endif
endmethod
method operator targetUnit= takes unit u returns nothing
set this.target = u
if (u != null) then
if (this.timer == null) then
set this.timer = NewTimerEx(this)
endif
call TimerStart(this.timer, UPDATE_POSITION_PERIOD, true, function thistype.updatePosition)
call SetUnitX(this.bar, GetUnitX(this.target) - xOffset)
call SetUnitY(this.bar, GetUnitY(this.target) - yOffset)
set this.t_enabled = true
else
if (this.timer != null) then
call ReleaseTimer(this.timer)
endif
set this.t_enabled = false
endif
endmethod
endstruct
endlibrary
//TESH.scrollpos=36
//TESH.alwaysfold=0
/******************************************************************************
*
* TIMED LIGHTNINGS by Maker v1.0.1.1
*
* Allows the creation of lightnings with expiration timer.
* Supports:
* o Fading lightnings in and out
* o Attaching to units
* o Attaching to points
* o Linear movement in x-, y- and z-axes
*
*
* Methods
*
* P2U
* From a static point attached to a unit
* static method P2U takes lightning l, unit t, real time, real x1, real y1, real z1, real z2, real startAlpha, real endAlpha returns nothing
*
* The lightning, target unit, duration, origin x, origin y, origin z, end z
*
*
* P2UEx
* From a moving point attached to a unit
* static method P2UEx takes lightning l, unit a, real t, real zu, real x1, real y1, real z1, real x2, real y2, real z2, real startAlpha, real endAlpha returns nothing
*
* The lightning, target unit, duration, target z, origin start x, origin start y, origin start z, origin end x, origin end y, origin end z
*
* U2P
* From attached to a unit to a static point
* static method U2P takes lightning l, unit s, real t, real x1, real y1, real x2, real y2, real z1, real z2, real startAlpha, real endAlpha returns nothing
*
* The lightning, source unit, duration, origin x, origin y, point x , point y, source z, point z
*
* U2PEx
* From attached to a unit to a moving point
* static method U2PEx takes lightning l, unit a, real t, real zu, real x1, real y1, real z1, real x2, real y2, real z2, real startAlpha, real endAlpha returns nothing
*
* The lightning, source unit, duration, source z, point start x, point start y, point start z, point end x, point end y, point end z
*
* U2U
* From attached to a unit to attached to a unit
* static method U2U takes lightning l, unit s, unit t, real time, real z1, real z2, real startAlpha, real endAlpha returns nothing
*
* The lightning, source unit, target unit, duration, source z, target z
*
* P2P
* From a static point to a static point
* static method P2P takes lightning l, real t, real startAlpha, real endAlpha returns nothing
*
* The lightning, duration
*
* P2PEx
* From a moving point to a moving point
* static method P2PEx takes lightning l, real t, real x1, real y1, real z1, real x2, real y2, real z2, real x3, real y3, real z3, real x4, real y4, real z4, real startAlpha, real endAlpha returns nothing
*
* The lightning, duration, origin start x, origin start y, origin start z, origin end x, origin end y, origin end z, target start x, target start y, target start z, target end x, target end y, target end z
*
*
* Alpha values are between 1 and 0. 1 is fully visible, 0 is transparent.
*
*******************************************************************************/
library TimedLightnings
globals
private constant real TO = 0.03125000 // Update interval
private integer CT = 0 // Lightning count
private timer TMR = CreateTimer()
private location loc = Location(0,0)
endglobals
struct TimedL extends array
lightning l
real av // aplha value
real da // transparency change rate
real x1
real x2
real y1
real y2
real z1
real z2
real dx1
real dy1
real dz1
real dx2
real dy2
real dz2
unit s // source
unit t // target
integer time // how many ticks, time
integer next // next node
integer prev // previous node
boolean moves
private static integer rlast = 0 // previous created
private static thistype first // first node
private static integer ic = 0
private static integer ir = 0
private thistype rn
private static thistype dat
private static thistype dat2
private static thistype dat3
private static method destroyL takes nothing returns nothing
/*-Link previous node with next one-*/
set dat3 = dat2.prev
set dat3.next = dat2.next
/*-----Set new last created node----*/
if dat2 == rlast then
set rlast = dat3
endif
/*-Link next node with previous one-*/
set dat3 = dat2.next
set dat3.prev = dat2.prev
/*--------Set new first node--------*/
if dat2 == first then
set first = dat3
endif
call DestroyLightning(dat2.l)
set CT = CT - 1
if CT == 0 then
call PauseTimer(TMR)
endif
set dat2.rn=ir
set ir=dat2
endmethod
private static method looping takes nothing returns nothing
local real z1
local real z2
set dat = first
loop
set z1 = 0
set z2 = 0
set dat.time = dat.time - 1
if dat.da != 0 then
set dat.av = dat.av - dat.da
call SetLightningColor(dat.l, 1, 1, 1, dat.av)
endif
if dat.s == null then
if dat.dx1 != 0 then
set dat.x1 = dat.x1 + dat.dx1
endif
if dat.dy1 != 0 then
set dat.y1 = dat.y1 + dat.dy1
endif
if dat.dz1 != 0 then
set dat.z1 = dat.z1 + dat.dz1
endif
else
set dat.x1 = GetUnitX(dat.s)
set dat.y1 = GetUnitY(dat.s)
set z1 = GetUnitFlyHeight(dat.s)
endif
if dat.t == null then
if dat.dx2 != 0 then
set dat.x2 = dat.x2 + dat.dx2
endif
if dat.dy2 != 0 then
set dat.y2 = dat.y2 + dat.dy2
endif
if dat.dz2 != 0 then
set dat.z2 = dat.z2 + dat.dz2
endif
else
set dat.x2 = GetUnitX(dat.t)
set dat.y2 = GetUnitY(dat.t)
set z2 = GetUnitFlyHeight(dat.t)
endif
if dat.moves then
call MoveLocation(loc, dat.x1, dat.y1)
set z1 = GetLocationZ(loc) + dat.z1 + z1
call MoveLocation(loc, dat.x2, dat.y2)
set z2 = GetLocationZ(loc) + dat.z2 + z2
call MoveLightningEx(dat.l, true, dat.x1, dat.y1, z1, dat.x2, dat.y2, z2)
endif
if dat.time == 0 then
set dat2 = dat
set dat = dat.next
call destroyL()
else
set dat = dat.next
endif
exitwhen dat == 0
endloop
endmethod
private static method InitAdd takes nothing returns nothing
/* Add node to list, make this the last on list */
if rlast != 0 then
set dat2 = rlast
set dat2.next = dat
endif
/* Link this with previous node */
set dat.prev = rlast
/* Make this the last created node */
set rlast = dat
set CT = CT + 1
if CT == 1 then
/* Make this the first node */
set first = dat
call TimerStart(TMR, TO, true, function thistype.looping)
endif
endmethod
private static method Recycle takes nothing returns nothing
if 0==ir then
set ic=ic+1
set dat=ic
else
set dat=ir
set ir=dat.rn
endif
endmethod
static method P2U takes lightning l, unit t, real time, real x1, real y1, real z1, real z2, real startAlpha, real endAlpha returns nothing
local thistype this
call Recycle()
set this = dat
set .x1 = x1
set .y1 = y1
set .z1 = z1
set .z2 = z2
set .s = null
set .t = t
set .next = 0 // Nodes are added to the end of the list, there is no next node
set .l = l
set .time = R2I(time/TO) // Calculates how many loops does the lightning lasts
set .av = startAlpha
set .da = (startAlpha-endAlpha)*TO/time // Transparency change speed
set .moves = true
call InitAdd()
endmethod
static method U2P takes lightning l, unit s, real t, real x1, real y1, real x2, real y2, real z1, real z2, real startAlpha, real endAlpha returns nothing
local thistype this
call Recycle()
set this = dat
set .x1 = x1
set .y1 = y1
set .x2 = x2
set .y2 = y2
set .z1 = z1
set .z2 = z2
set .s = s
set .t = null
set .next = 0
set .l = l
set .time = R2I(t/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*TO/t
set .moves = true
call InitAdd()
endmethod
static method U2U takes lightning l, unit s, unit t, real time, real z1, real z2, real startAlpha, real endAlpha returns nothing
local thistype this
call Recycle()
set this = dat
set .z1 = z1
set .z2 = z2
set .s = s
set .t = t
set .next = 0
set .l = l
set .time = R2I(time/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*TO/time
set .moves = true
call InitAdd()
endmethod
static method P2P takes lightning l, real t, real startAlpha, real endAlpha returns nothing
local thistype this
call Recycle()
set this = dat
set .s = null
set .t = null
set .next = 0
set .l = l
set .time = R2I(t/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*TO/t
set .moves = false
call InitAdd()
endmethod
static method P2UEx takes lightning l, unit a, real t, real zu, real x1, real y1, real z1, real x2, real y2, real z2, real startAlpha, real endAlpha returns nothing
local thistype this
local real n = TO/t
call Recycle()
set this = dat
set .x1 = x1
set dx1 = (x2-x1)*n
set .y1 = y1
set dy1 = (y2-y1)*n
set .z1 = z1
set dz1 = (z2-z1)*n
set .z2 = zu
set .s = null
set .t = a
set .next = 0
set .l = l
set .time = R2I(t/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*n
set .moves = true
call InitAdd()
endmethod
static method U2PEx takes lightning l, unit a, real t, real zu, real x1, real y1, real z1, real x2, real y2, real z2, real startAlpha, real endAlpha returns nothing
local thistype this
local real n = TO/t
call Recycle()
set this = dat
set .x2 = x1
set .dx2 = (x2-x1)*n
set .y2 = y1
set .dy2 = (y2-y1)*n
set .z2 = z1
set .dz2 = (z2-z1)*n
set .z1 = zu
set .s = a
set .t = null
set .next = 0
set .l = l
set .time = R2I(t/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*n
set .moves = true
call thistype.InitAdd()
endmethod
static method P2PEx takes lightning l, real t, real x1, real y1, real z1, real x2, real y2, real z2, real x3, real y3, real z3, real x4, real y4, real z4, real startAlpha, real endAlpha returns nothing
local thistype this
local real n = TO/t
call Recycle()
set this = dat
set .x1 = x1
set .x2 = x3
set .y1 = y1
set .y2 = y3
set .z1 = z1
set .z2 = z3
set .dx1 = (x2-x1)*n
set .dy1 = (y2-y1)*n
set .dz1 = (z2-z1)*n
set .dx2 = (x4-x3)*n
set .dy2 = (y4-y3)*n
set .dz2 = (z4-z3)*n
set .s = null
set .t = null
set .next = 0
set .l = l
set .time = R2I(t/TO)
set .av = startAlpha
set .da = (startAlpha-endAlpha)*n
set .moves = true
call InitAdd()
endmethod
endstruct
endlibrary
//TESH.scrollpos=29
//TESH.alwaysfold=0
/*****************************************************************************
*
* RegisterNativeEvent v1.0.0.0
* by Bannar aka Spinnaker
*
* Storage of trigger handles for native events.
*
******************************************************************************
*
* Optional requirements:
*
* Table by Bribe
* hiveworkshop.com/forums/jass-resources-412/snippet-new-table-188084/
*
******************************************************************************
*
* Important:
*
* Avoid using TriggerSleepAction within functions registered
* Destroy native event trigger on your own responsibility
*
******************************************************************************
*
* Functions:
*
* function IsNativeEventRegistered takes integer whichIndex, integer eventId returns boolean
* whether index whichIndex has already been attached to event with id eventId
*
* function RegisterNativeEvent takes integer whichIndex, integer eventId returns boolean
* attaches index whichIndex to eventId if it hasn't been attached already and creates new trigger handle if needed
*
* function GetNativeEventTrigger takes integer eventId returns trigger
* retrieves trigger handle for event with id eventId
*
*****************************************************************************/
library RegisterNativeEvent uses optional Table
globals
private trigger array triggers
endglobals
private module NativeEventInit
private static method onInit takes nothing returns nothing
static if LIBRARY_Table then
set table = TableArray[122]
endif
endmethod
endmodule
private struct NativeEvent extends array
static if LIBRARY_Table then
static TableArray table
else
static hashtable table = InitHashtable()
endif
// 122 native events, unfortunatelly ids are not continuous
static method operator[] takes integer eventId returns integer
if ( eventId > 286 ) then
return eventId - 174
elseif ( eventId > 259 ) then
return eventId - 165
elseif ( eventId > 91 ) then
return eventId - 164
endif
return eventId
endmethod
implement NativeEventInit
endstruct
private function RegisterEvent takes integer whichIndex, integer eventId returns nothing
static if LIBRARY_Table then
set NativeEvent.table[NativeEvent[eventId]].integer[whichIndex] = eventId
else
call SaveInteger(NativeEvent.table, NativeEvent[eventId], whichIndex, eventId)
endif
endfunction
function IsNativeEventRegistered takes integer whichIndex, integer eventId returns boolean
static if LIBRARY_Table then
return NativeEvent.table[NativeEvent[eventId]].has(whichIndex)
else
return HaveSavedInteger(NativeEvent.table, NativeEvent[eventId], whichIndex)
endif
endfunction
function RegisterNativeEvent takes integer whichIndex, integer eventId returns boolean
if not IsNativeEventRegistered(whichIndex, eventId) then
call RegisterEvent(whichIndex, eventId)
if ( triggers[eventId] == null ) then
set triggers[eventId] = CreateTrigger()
endif
return true
endif
return false
endfunction
function GetNativeEventTrigger takes integer eventId returns trigger
return triggers[eventId]
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
/*****************************************************************************
*
* RegisterUnitEvent v1.0.0.1
* by Bannar aka Spinnaker
*
* Register version of TriggerRegisterUnitEvent.
*
******************************************************************************
*
* Requirements:
*
* RegisterNativeEvent by Bannar
* hiveworkshop.com/forums/submissions-414/snippet-registerevent-pack-250266/
*
******************************************************************************
*
* Functions:
*
* function RegisterUnitEvent takes unit whichUnit, unitevent whichEvent, code cb returns nothing
* registers unitevent whichEvent for unit whichUnit adding code cb as callback
*
* function GetUnitEventTrigger takes unitevent whichEvent returns trigger
* retrieves trigger handle for unitevent whichEvent
*
*****************************************************************************/
library RegisterUnitEvent requires RegisterNativeEvent
globals
triggercondition array TriggerCondition
endglobals
function RegisterUnitEvent takes unit whichUnit, unitevent whichEvent, code cb returns nothing
local integer eventId = GetHandleId(whichEvent)
if RegisterNativeEvent(GetHandleId(whichUnit), eventId) then
call TriggerRegisterUnitEvent(GetNativeEventTrigger(eventId), whichUnit, whichEvent)
endif
set TriggerCondition[eventId] = TriggerAddCondition(GetNativeEventTrigger(eventId), Condition(cb))
endfunction
function GetUnitEventTrigger takes unitevent whichEvent returns trigger
return GetNativeEventTrigger(GetHandleId(whichEvent))
endfunction
endlibrary
//TESH.scrollpos=0
//TESH.alwaysfold=0
//============================================================================
// SpellEffectEvent
// - Version 1.1.0.0
//
// API
// ---
// RegisterSpellEffectEvent(integer abil, code onCast)
//
// Requires
// --------
// RegisterPlayerUnitEvent: hiveworkshop.com/forums/showthread.php?t=203338
//
// Optional
// --------
// Table: hiveworkshop.com/forums/showthread.php?t=188084
//
library SpellEffectEvent requires RegisterPlayerUnitEvent, optional Table
//============================================================================
private module M
static if LIBRARY_Table then
static Table tb
else
static hashtable ht = InitHashtable()
endif
static method onCast takes nothing returns nothing
static if LIBRARY_Table then
call TriggerEvaluate(.tb.trigger[GetSpellAbilityId()])
else
call TriggerEvaluate(LoadTriggerHandle(.ht, 0, GetSpellAbilityId()))
endif
endmethod
private static method onInit takes nothing returns nothing
static if LIBRARY_Table then
set .tb = Table.create()
endif
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT, function thistype.onCast)
endmethod
endmodule
//============================================================================
private struct S extends array
implement M
endstruct
//============================================================================
function RegisterSpellEffectEvent takes integer abil, code onCast returns nothing
static if LIBRARY_Table then
if not S.tb.handle.has(abil) then
set S.tb.trigger[abil] = CreateTrigger()
endif
call TriggerAddCondition(S.tb.trigger[abil], Filter(onCast))
else
if not HaveSavedHandle(S.ht, 0, abil) then
call SaveTriggerHandle(S.ht, 0, abil, CreateTrigger())
endif
call TriggerAddCondition(LoadTriggerHandle(S.ht, 0, abil), Filter(onCast))
endif
endfunction
endlibrary
//TESH.scrollpos=26188
//TESH.alwaysfold=0
globals
constant integer CalloftheHaunted___ABIL_ID= 'A0AA'
constant integer CalloftheHaunted___ABIL_ID2= 'A0A9'
constant integer CalloftheHaunted___NOSTACK_ID= 'A0AB'
constant integer CalloftheHaunted___INV_ID= 'AInv'
constant integer CalloftheHaunted___TIMED_LIFE_ID= 'BTLF'
constant integer CalloftheHaunted___SUPER_HP= 'I021'
constant integer CalloftheHaunted___SUPER_DMG= 'I022'
constant integer CalloftheHaunted___HEALTH_TOME_1= 'I021'
constant integer CalloftheHaunted___HEALTH_TOME_2= 'I021'
constant integer CalloftheHaunted___HEALTH_TOME_3= 'I021'
constant integer CalloftheHaunted___HEALTH_TOME_4= 'I021'
constant integer CalloftheHaunted___DAMAGE_TOME_1= 'I022'
constant integer CalloftheHaunted___DAMAGE_TOME_2= 'I022'
constant integer CalloftheHaunted___DAMAGE_TOME_3= 'I022'
constant integer CalloftheHaunted___DAMAGE_TOME_4= 'I022'
constant integer CalloftheHaunted___UNIT1= 'uske'
constant integer CalloftheHaunted___UNIT2= 'uskm'
constant integer CalloftheHaunted___UNIT3= 'nskm'
constant integer CalloftheHaunted___UNIT4= 'nskf'
constant integer CalloftheHaunted___UNIT1_INDEX= 9
constant integer CalloftheHaunted___UNIT2_INDEX= 6
constant integer CalloftheHaunted___UNIT3_INDEX= 7
constant integer CalloftheHaunted___UNIT4_INDEX= 7
constant integer CalloftheHaunted___UNIT1_ABILITY1= 'A0A0'
constant integer CalloftheHaunted___UNIT1_ABILITY2= 'A0A1'
constant integer CalloftheHaunted___UNIT2_ABILITY1= 'A0A6'
constant integer CalloftheHaunted___UNIT2_ABILITY2= 'A0A6'
constant integer CalloftheHaunted___UNIT3_ABILITY1= 'A09Z'
constant integer CalloftheHaunted___UNIT3_ABILITY2= 'A09W'
constant integer CalloftheHaunted___UNIT4_ABILITY1= 'A09Z'
constant integer CalloftheHaunted___UNIT4_ABILITY2= 'A09Z'
constant integer CalloftheHaunted___SUPER_UNIT= 'nsko'
constant integer CalloftheHaunted___SUPER_UNIT_ABILITY1= 'A0A4'
constant integer CalloftheHaunted___SUPER_UNIT_ABILITY2= 'A0A5'
constant integer CalloftheHaunted___SUPER_UNIT_ABILITY3= 'A0A2'
constant integer CalloftheHaunted___SUPER_BIRTH_INDEX= 9
constant string CalloftheHaunted___EFFECT= "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl"
constant string CalloftheHaunted___SUPER_EFFECT= "Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl"
constant string CalloftheHaunted___ATTACH= "war3mapImported\\Soul Aura.mdx"
constant string CalloftheHaunted___ATTACH_POINT= "origin"
constant integer CalloftheHaunted___SUPER_UNIT_DAMAGE_PER_TOME= 16
constant integer CalloftheHaunted___SUPER_UNIT_HP_PER_TOME= 25
constant integer CalloftheHaunted___UNIT1_DAMAGE_PER_TOME= 16
constant integer CalloftheHaunted___UNIT2_DAMAGE_PER_TOME= 16
constant integer CalloftheHaunted___UNIT3_DAMAGE_PER_TOME= 16
constant integer CalloftheHaunted___UNIT4_DAMAGE_PER_TOME= 16
constant integer CalloftheHaunted___UNIT1_HP_PER_TOME= 25
constant integer CalloftheHaunted___UNIT2_HP_PER_TOME= 25
constant integer CalloftheHaunted___UNIT3_HP_PER_TOME= 25
constant integer CalloftheHaunted___UNIT4_HP_PER_TOME= 25
constant boolean CalloftheHaunted___USE_UPGRADE_ABILITY= true
constant integer Chernobyliss__ABIL_ID= 'A03E'
constant integer Chernobyliss__SLOW_ID= 'A09U'
constant string Chernobyliss__EFFECT1= "war3mapImported\\Acid Ex.mdx"
constant string Chernobyliss__EFFECT2= "war3mapImported\\VenomousGaleV2_Portrait.mdx"
constant string Chernobyliss__EFFECT3= "Abilities\\Spells\\Other\\AcidBomb\\BottleMissile.mdl"
constant string Chernobyliss__ATTACH= "chest"
constant string Chernobyliss__ATTACH2= "chest"
constant string Chernobyliss__KB_SFX= ""
constant real Chernobyliss__TIMER_INTERVAL= 2.
constant real Chernobyliss__KB_DURATION= .6
constant boolean Chernobyliss__CHANGE_VERTEX_COLOR= true
constant attacktype Chernobyliss__ATTACK_TYPE= ATTACK_TYPE_NORMAL
constant damagetype Chernobyliss__DAMAGE_TYPE= DAMAGE_TYPE_LIGHTNING
constant real Chernobyliss__TREE_AOE= 0.0
constant boolean Chernobyliss__ALLOW_MOVE= false
constant boolean Chernobyliss__CHECK_PATHING= false
constant group Chernobyliss__GROUP= CreateGroup()
unit Chernobyliss__CASTER
real Chernobyliss__SPELL_X
real Chernobyliss__SPELL_Y
constant integer si__Chernobyliss__Cbliss=419
integer si__Chernobyliss__Cbliss_F=0
integer si__Chernobyliss__Cbliss_I=0
integer array si__Chernobyliss__Cbliss_V
unit array s__Chernobyliss__Cbliss_cast
unit array s__Chernobyliss__Cbliss_t
real array s__Chernobyliss__Cbliss_x
real array s__Chernobyliss__Cbliss_y
real array s__Chernobyliss__Cbliss_dur
integer array s__Chernobyliss__Cbliss_lvl
effect array s__Chernobyliss__Cbliss_attach
constant integer si__CalloftheHaunted___CotH=420
integer si__CalloftheHaunted___CotH_F=0
integer si__CalloftheHaunted___CotH_I=0
integer array si__CalloftheHaunted___CotH_V
unit array s__CalloftheHaunted___CotH_cast
real array s__CalloftheHaunted___CotH_x
real array s__CalloftheHaunted___CotH_y
integer array s__CalloftheHaunted___CotH_lvl
integer array s__CalloftheHaunted___CotH_lvl2
effect array s__CalloftheHaunted___CotH_attach
constant integer si__DeathCall___DCall=421
integer si__DeathCall___DCall_F=0
integer si__DeathCall___DCall_I=0
integer array si__DeathCall___DCall_V
unit array s__DeathCall___DCall_cast
unit array s__DeathCall___DCall_t
effect array s__DeathCall___DCall_attach
constant integer si__ReviveSafe___revivec=422
integer si__ReviveSafe___revivec_F=0
integer si__ReviveSafe___revivec_I=0
integer array si__ReviveSafe___revivec_V
integer array s__ReviveSafe___revivec_i
unit V
boolean E=true
integer X=1
boolean O=true
real R=2.
boolean I=true
boolean A=true
boolean BRTON=false
boolean NOOBM=false
boolean GAMEM=true
boolean LWMON=false
boolean FLAGREMATCH=true
boolean array LICHS
boolean array TIPST
string N="Sound\\Interface\\Error.wav"
unit array B
unit array C
item array D
item array F
item array G
real array H
integer J=0
integer K=0
timer L=CreateTimer()
destructable M
effect P
hashtable Q=InitHashtable()
integer S=0
integer T=0
integer array U
boolean array W
item array Y
integer Z=0
integer VV=0
real EV=.0
real XV=.0
real OV=.0
real RV=.0
rect IV=null
unit AV=null
item NV=null
timer BV=null
boolexpr CV=null
timer array DV
trigger array FV
integer array GV
integer array HV
triggercondition array JV
boolexpr array KV
integer array LV
integer array MV
integer array PV
integer QV=0
integer array SV
integer TV=1
integer array UV
triggercondition array WV
boolexpr array YV
boolean array ZV
integer VE=0
integer EE=-1
integer XE
integer OE
integer RE
integer IE
conditionfunc AE
conditionfunc NE
conditionfunc BE
integer array CE
boolexpr array DE
trigger array FE
integer GE=0
trigger array HE
integer array JE
integer KE
trigger LE
integer ME
integer PE
trigger QE
group SE=null
item TE=null
location UE=null
location HeroCreateLocation=null
location RandomCreateLocation=null
boolexpr WE=null
location YE=Location(.0,.0)
constant timer ZE=CreateTimer()
location VX=null
location EX=null
constant integer XX=255
constant integer OX=255
constant integer RX=255
constant integer IX=175
sound AX
integer NX=0
trigger BX=CreateTrigger()
hashtable CX
//hashtable FX
//integer GX=0
//constant integer HX=679645218
integer JX=0
integer array KX
integer LX=0
timer MX=CreateTimer()
integer PX=0
integer array QX
integer SX=0
timer TX=CreateTimer()
timer UX=CreateTimer()
integer WX=0
unit array YX
integer array ZX
integer array VO
integer EO=0
integer XO=0
integer array OO
integer RO=0
timer IO=CreateTimer()
integer array AO
integer NO=0
integer array BO
integer CO=0
integer DO=0
integer array FO
unit array GO
trigger HO=CreateTrigger()
trigger JO=CreateTrigger()
trigger KO=CreateTrigger()
integer MO
integer QO=0
integer SO=0
group array TO
boolexpr WO=null
boolexpr YO=null
hashtable ZO=InitHashtable()
boolean VR=false
group ER=null
group array XR
integer OR=0
real RR=.0
real IR=.0
real AR=.0
hashtable NR=InitHashtable()
unit BR
unit CR
unit DR
integer FR
rect GR=null
group JR=CreateGroup()
//group PATHING_GROUP = CreateGroup()
real KR
real LR
real MR
real PR
hashtable QR=InitHashtable()
constant real SR=200.*200.
constant trigger TR=CreateTrigger()
integer UR
integer WR
integer YR
string array ZR
integer VI=0
hashtable EI=InitHashtable()
integer XI=0
timer OI
timer RI
integer II
boolean AI=true
integer NI=0
damagetype array BI
boolean array CI
real array DI
unit array FI
integer GI=0
timer HI=CreateTimer()
real JI
unit KI
unit LI
real MI
trigger QI=null
trigger SI=null
group TI=null
group UI=null
unit WI=null
unit YI=null
real ZI=.0
real VA=1410065408.
real XA=VA
real OA=.0
real RA=.0
real IA=.0
destructable AA=null
item NA=null
unit BA
real CA
real DA
real FA
real GA
real HA
constant player JA=Player(PLAYER_NEUTRAL_PASSIVE)
integer KA=0
integer LA=0
integer MA=0
integer PA=0
integer QA=0
real TA=.0
real UA=.0
real WA=.0
real YA=.0
hashtable ZA=null
hashtable VN=null
real XN=.0
real ON=.0
real RN=.0
real IN=.0
real AN=.0
location NN=null
constant real BN=-5000
location CN=Location(.0,.0)
real array DN
real array FN
integer array GN
location HN=Location(.0,.0)
constant attacktype JN=ATTACK_TYPE_CHAOS
constant real KN=-.061875
constant damagetype LN=DAMAGE_TYPE_FORCE
integer MN=0
integer PN=0
unit QN=null
unit SN=null
real TN=.0
integer array UN
location WN=Location(.0,.0)
location YN=Location(.0,.0)
constant integer ZN=20
location VB=Location(.0,.0)
location EB=Location(.0,.0)
location XB=Location(.0,.0)
constant group OB=CreateGroup()
unit RB
location IB=Location(.0,.0)
constant group AB=CreateGroup()
unit NB
location BB=Location(.0,.0)
location CB=Location(.0,.0)
location DB=Location(.0,.0)
location FB=Location(.0,.0)
location GB=Location(.0,.0)
location HB=Location(.0,.0)
location JB=Location(.0,.0)
constant group KB=CreateGroup()
unit LB
real MB
location PB=Location(.0,.0)
location QB=Location(.0,.0)
location SB=Location(.0,.0)
location TB=Location(.0,.0)
trigger UB=null
location WB=Location(.0,.0)
unit YB
location ZB=Location(.0,.0)
location VC=Location(.0,.0)
location EC=Location(.0,.0)
location XC=Location(.0,.0)
unit OC
boolean array RC
integer array IC
integer array AC
boolean array NC
integer array BC
integer array CC
boolean array DC
integer array FC
integer array GC
constant real HC=2*bj_PI
integer JC
group KC=CreateGroup()
unit array LC
integer array MC
integer PC=0
integer QC=0
integer SC=0
integer TC=0
unit array UC
integer WC=0
dialog YC=null
button array ZC
integer array VD
real ED=0
timer array XD
boolean array OD
dialog RD=null
button array ID
integer array AD
integer ND=0
integer array BD
boolean DD=false
unit FD=null
rect array GD
boolean HD=false
boolean array KD
leaderboard LD=null
location array MD
location array PD
boolean array QD
group SD=null
integer array TD
string array UD
real WD=0
real YD=0
location NF=null
location BF=null
location CF=null
location DF=null
hashtable FF=null
integer GF=0
real HF=0
location JF=null
unit KF=null
integer LF=0
unit array MF
location array PF
integer array QF
integer array SF
real array TF
unit UF=null
group array WF
sound array YF
integer ZF=0
group VG=null
location EG=null
location XG=null
unit OG=null
location RG=null
group IG=null
integer AG=0
real NG=0
integer array BG
location array CG
unit DG=null
real array FG
location GG=null
real array HG
real array JG
real KG=0
unit array LG
real array MG
string array PG
string QG=""
string array SG
string TG=""
boolean array UG
boolean WG=false
real array YG
real ZG=0
real VH=0
group EH=null
real array XH
real array OH
boolean RH=false
location IH=null
group AH=null
integer NH=0
unit array BH
unit array CH
location array DH
location array FH
real array GH
real array HH
integer array JH
real array KH
real array LH
integer MH=0
group PH=null
integer QH=0
unit array SH
location array TH
integer array UH
real array WH
location array YH
real array ZH
real array VJ
integer EJ=0
group array XJ
group OJ=null
integer RJ=0
integer IJ=0
unit array AJ
location array NJ
real array BJ
real array CJ
real array DJ
group array FJ
integer GJ=0
location array HJ
integer JJ=0
unit array KJ
real array LJ
real array MJ
real PJ=0
real QJ=0
real SJ=0
location array TJ
unit array UJ
integer WJ=0
group array YJ
group ZJ=null
real VK=0
integer EK=0
location XK=null
location OK=null
location RK=null
location IK=null
group AK=null
group NK=null
group BK=null
group CK=null
location DK=null
location FK=null
group GK=null
integer HK=0
integer JK=0
integer KK=0
location LK=null
location MK=null
integer array PK
group QK=null
group SK=null
group TK=null
group UK=null
group WK=null
location YK=null
location ZK=null
location TempLocation=null
location TempLocation2=null
unit array VL
location EL=null
group XL=null
integer OL=0
unit RL=null
location IL=null
location AL=null
integer NL=0
unit BL=null
location CL=null
real DL=0
real FL=0
group GL=null
location HL=null
location JL=null
group KL=null
location LL=null
location ML=null
unit array PL
location QL=null
effect array SL
location TL=null
location UL=null
group WL=null
location YL=null
real ZL=0
location VM=null
boolean array EM
unit XM=null
unit OM=null
location array RM
integer array IM
real array AM
group NM=null
lightning BM=null
group CM=null
location DM=null
unit array FM
player GM=null
location array HM
integer array JM
boolean array KM
real array LM
real array MM
real array PM
unit array QM
unit array SM
group TM=null
effect array UM
effect array WM
effect array YM
effect array ZM
location array VP
location array EP
real array XP
real array OP
real array RP
real array IP
unit array AP
unit array NP
unit array BP
unit array CP
unit array DP
unit array FP
unit array GP
unit array HP
unit array JP
real array KP
real array LP
integer array MP
integer array PP
real array QP
location array SP
location array TP
location array UP
location array WP
location array YP
location array ZP
unit VQ=null
unit SpeedyGonzalez=null
location EQ=null
force XQ=null
real OQ=0
location RQ=null
location IQ=null
location AQ=null
location NQ=null
force BQ=null
real array CQ
integer array DQ
integer array FQ
integer array GQ
integer array HQ
integer array JQ
integer array KQ
integer array LQ
unit array MQ
string PQ=""
integer array QQ
string array SQ
integer TQ=0
integer array UQ
string WQ=""
string YQ=""
string ZQ=""
force array VS
force ES=null
string array XS
integer OS=0
string RS=""
integer array IS
multiboard array AS
leaderboard array NS
string array BS
integer CS=0
boolean DS=false
integer FS=0
real array GS
integer array HS
integer array JS
integer array KS
integer LS=0
force MS=null
integer PS=0
integer array QS
string array SS
integer array TS
integer array US
integer array WS
integer YS=0
real array ZS
integer array VT
integer array ET
integer XT=0
integer OT=0
string RT=""
real array IT
real array AT
string array NT
integer array BT
integer array CT
string array DT
integer array FT
integer array GT
integer array HT
boolean array JT
real array KT
integer array LT
integer array MT
integer array PT
integer array QT
boolean ST=false
boolean array TT
location UT=null
boolean array WT
location YT=null
integer ZT=0
integer VU=0
boolean array EU
unit array XU
real array OU
real array RU
integer IU=0
location AU=null
location NU=null
effect array BU
timer array CU
trigger DU=null
location FU=null
rect GU=null
rect HU=null
rect JU=null
rect KU=null
rect LU=null
rect MU=null
rect PU=null
rect QU=null
rect SU=null
rect TU=null
rect UU=null
rect WU=null
rect YU=null
rect ZU=null
rect VW=null
rect EW=null
rect XW=null
rect OW=null
rect RW=null
rect IW=null
rect AW=null
rect NW=null
rect BW=null
rect CW=null
rect DW=null
rect FW=null
rect GW=null
rect HW=null
rect JW=null
rect KW=null
rect LW=null
rect MW=null
rect PW=null
rect QW=null
rect SW=null
rect TW=null
rect UW=null
rect WW=null
rect YW=null
rect ZW=null
rect VY=null
rect EY=null
rect XY=null
rect OY=null
rect RY=null
rect IY=null
rect AY=null
rect NY=null
rect BY=null
rect CY=null
camerasetup DY=null
camerasetup FY=null
sound GY=null
sound HY=null
sound JY=null
sound KY=null
sound LY=null
sound MY=null
sound PY=null
sound QY=null
sound SY=null
sound TY=null
trigger UY=null
trigger WY=null
trigger YY=null
trigger ZY=null
trigger VZ=null
trigger EZ=null
trigger XZ=null
trigger OZ=null
trigger RZ=null
trigger IZ=null
trigger AZ=null
trigger NZ=null
trigger BZ=null
trigger CZ=null
trigger DZ=null
trigger FZ=null
trigger GZ=null
trigger HZ=null
trigger JZ=null
trigger KZ=null
trigger LZ=null
trigger MZ=null
trigger PZ=null
trigger QZ=null
trigger SZ=null
trigger TZ=null
trigger UZ=null
trigger WZ=null
trigger YZ=null
trigger ZZ=null
trigger V0=null
trigger E0=null
trigger X0=null
trigger O0=null
trigger R0=null
trigger I0=null
trigger A0=null
trigger N0=null
trigger B0=null
trigger C0=null
trigger D0=null
trigger F0=null
trigger G0=null
trigger H0=null
trigger J0=null
trigger K0=null
trigger L0=null
trigger M0=null
trigger P0=null
trigger Q0=null
trigger S0=null
trigger T0=null
trigger U0=null
trigger W0=null
trigger Y0=null
trigger Z0=null
trigger V1=null
trigger E1=null
trigger X1=null
trigger O1=null
trigger R1=null
trigger I1=null
trigger A1=null
trigger N1=null
trigger B1=null
trigger C1=null
trigger D1=null
trigger F1=null
trigger G1=null
trigger H1=null
trigger J1=null
trigger K1=null
trigger L1=null
trigger M1=null
trigger P1=null
trigger Q1=null
trigger S1=null
trigger T1=null
//trigger U1=null
trigger W1=null
trigger Y1=null
//trigger Z1=null
trigger V2=null
//trigger E2=null
trigger X2=null
trigger O2=null
trigger R2=null
trigger I2=null
trigger A2=null
trigger N2=null
trigger B2=null
trigger C2=null
trigger D2=null
trigger F2=null
//trigger G2=null
trigger H2=null
trigger J2=null
trigger K2=null
trigger L2=null
trigger M2=null
trigger P2=null
trigger Q2=null
trigger S2=null
trigger T2=null
trigger U2=null
trigger W2=null
trigger Y2=null
trigger Z2=null
trigger V3=null
trigger E3=null
trigger X3=null
//trigger O3=null
trigger R3=null
trigger I3=null
trigger A3=null
trigger N3=null
trigger B3=null
trigger C3=null
trigger D3=null
trigger F3=null
trigger G3=null
trigger H3=null
trigger J3=null
trigger K3=null
trigger L3=null
trigger M3=null
trigger P3=null
trigger Q3=null
trigger S3=null
trigger T3=null
trigger U3=null
trigger W3=null
trigger Y3=null
trigger Z3=null
trigger V4=null
trigger E4=null
trigger X4=null
trigger O4=null
trigger R4=null
trigger I4=null
trigger A4=null
trigger N4=null
trigger B4=null
trigger C4=null
trigger D4=null
trigger F4=null
trigger G4=null
trigger H4=null
trigger J4=null
trigger K4=null
trigger L4=null
trigger M4=null
trigger P4=null
trigger Q4=null
trigger S4=null
trigger T4=null
trigger U4=null
trigger W4=null
trigger Y4=null
trigger Z4=null
trigger V5=null
trigger E5=null
trigger X5=null
trigger O5=null
trigger R5=null
trigger I5=null
trigger A5=null
trigger N5=null
trigger B5=null
trigger C5=null
trigger D5=null
trigger F5=null
trigger G5=null
trigger H5=null
trigger J5=null
trigger K5=null
trigger L5=null
trigger M5=null
trigger P5=null
trigger Q5=null
trigger S5=null
trigger T5=null
trigger U5=null
trigger W5=null
trigger Y5=null
trigger Z5=null
trigger V6=null
trigger E6=null
trigger X6=null
trigger O6=null
trigger R6=null
trigger I6=null
trigger A6=null
trigger N6=null
trigger B6=null
trigger C6=null
trigger D6=null
trigger F6=null
trigger G6=null
trigger H6=null
trigger J6=null
trigger K6=null
trigger L6=null
trigger M6=null
trigger P6=null
trigger Q6=null
trigger S6=null
trigger T6=null
trigger U6=null
//trigger W6=null
trigger Y6=null
trigger Z6=null
trigger V7=null
trigger E7=null
trigger X7=null
trigger O7=null
trigger R7=null
trigger I7=null
trigger A7=null
trigger N7=null
trigger B7=null
trigger C7=null
trigger D7=null
trigger F7=null
trigger G7=null
trigger H7=null
trigger J7=null
trigger K7=null
trigger L7=null
trigger M7=null
trigger P7=null
trigger Q7=null
trigger S7=null
trigger T7=null
trigger U7=null
trigger W7=null
trigger Z7=null
trigger V8=null
trigger E8=null
trigger X8=null
trigger O8=null
trigger R8=null
trigger I8=null
trigger A8=null
trigger N8=null
trigger B8=null
trigger C8=null
trigger D8=null
trigger F8=null
trigger G8=null
trigger H8=null
trigger J8=null
trigger K8=null
trigger L8=null
trigger M8=null
trigger P8=null
trigger Q8=null
trigger S8=null
trigger T8=null
trigger U8=null
trigger W8=null
trigger Y8=null
trigger Z8=null
trigger VVV=null
trigger VEV=null
trigger VXV=null
trigger VOV=null
trigger VRV=null
trigger VIV=null
trigger VAV=null
trigger VNV=null
trigger VBV=null
trigger VCV=null
trigger VDV=null
trigger QoBT=null
trigger PeHT=null
trigger VFV=null
trigger VGV=null
trigger VHV=null
trigger VJV=null
trigger VKV=null
trigger VLV=null
trigger VMV=null
trigger VPV=null
trigger VQV=null
trigger VSV=null
trigger VTV=null
trigger VUV=null
trigger VWV=null
trigger VYV=null
trigger VZV=null
trigger V_V=null
trigger V0V=null
trigger V1V=null
trigger V2V=null
trigger V3V=null
trigger V4V=null
trigger V5V=null
trigger V6V=null
trigger V7V=null
trigger V8V=null
trigger V9V=null
trigger EVV=null
trigger EEV=null
trigger EXV=null
trigger EOV=null
trigger ERV=null
trigger EIV=null
trigger EAV=null
trigger ENV=null
trigger EBV=null
trigger ECV=null
trigger EDV=null
trigger EFV=null
trigger EGV=null
trigger EHV=null
trigger EJV=null
trigger EKV=null
trigger ELV=null
trigger EMV=null
trigger EPV=null
trigger EQV=null
trigger ESV=null
trigger ETV=null
trigger EUV=null
//trigger EWV=null
//trigger EYV=null
trigger EZV=null
trigger E_V=null
trigger E0V=null
//trigger Z_Y= null
trigger P_9=null
//trigger Q_8=null
//trigger Q_7=null
//trigger Q_6=null
trigger Q_5=null
trigger Q_4=null
trigger Q_3=null
unit E1V=null
unit E2V=null
unit E3V=null
unit E4V=null
unit E5V=null
unit E6V=null
unit E7V=null
unit E8V=null
unit E9V=null
unit XVV=null
unit XEV=null
unit XXV=null
unit XOV=null
unit XRV=null
unit XIV=null
unit XAV=null
unit QoBC=null
unit XNV=null
unit XBV=null
unit XCV=null
unit XDV=null
unit XFV=null
unit XGV=null
unit XHV=null
unit XJV=null
unit XKV=null
unit XLV=null
unit XMV=null
unit XPV=null
unit XQV=null
unit XSV=null
unit XTV=null
unit XUV=null
unit XWV=null
unit XYV=null
unit XZV=null
unit X_V=null
unit X0V=null
unit X1V=null
unit X2V=null
unit X3V=null
unit X4V=null
unit X5V=null
unit X6V=null
unit X7V=null
unit X8V=null
unit X9V=null
unit OVV=null
unit OEV=null
unit OXV=null
unit OOV=null
unit PeHC=null
constant group ORV=CreateGroup()
unit OIV
constant group OAV=CreateGroup()
unit ONV
unit OBV
//constant group OCV=CreateGroup()
//unit ODV
constant real OFV=-420.
rect OGV=null
trigger OHV
integer OJV
location OKV=Location(.0,.0)
location OLV=Location(.0,.0)
location OMV=Location(.0,.0)
constant group OPV=CreateGroup()
group OQV
unit OSV
integer OTV
location OUV=Location(0,0)
group OWV=CreateGroup()
hashtable OYV
sound OZV
real array O_V
real array O0V
real array O1V
real array O2V
constant real O3V=175
constant group O4V=CreateGroup()
unit O5V
constant integer O6V=127
integer O7V
integer array O8V
constant group O9V=CreateGroup()
unit RVV
constant group REV=CreateGroup()
unit RXV
constant group ROV=CreateGroup()
unit RRV
constant group RIV=CreateGroup()
unit RAV
constant group RNV=CreateGroup()
group UNIT_SPAWNERS_GROUP=CreateGroup()
unit RBV
unit RCV
integer RDV=0
integer array RFV
integer RGV=0
timer RHV=CreateTimer()
integer array RJV
integer RKV=0
integer array RLV
integer RMV=0
integer RPV=0
integer array RQV
trigger array RSV
integer array RTV
integer array RUV
trigger RWV
integer RYV=0
integer RZV=0
integer array R_V
unit array R0V
real array R1V
real array R2V
real array R3V
real array R4V
real array R5V
integer array R6V
effect array R7V
boolean array R8V
boolean array R9V
boolean array IVV
boolean array IEV
integer IXV=0
integer IOV=0
integer array IRV
integer array IIV
integer array IAV
real array INV
real array IBV
real array ICV
real array IDV
real array IFV
real array IGV
real array IHV
real array IJV
real array IKV
boolean array ILV
boolean array IMV
boolean array IPV
real array IQV
real array ISV
real array ITV
boolean array IUV
boolean array IWV
boolean array IYV
integer IZV=1
integer I_V=0
integer I0V=0
integer array I1V
integer I2V=0
integer I3V=0
integer array I4V
unit array I5V
real array I6V
real array I7V
integer array I8V
integer I9V=0
integer AVV=0
integer array AEV
unit array AXV
real array AOV
real array ARV
integer array AIV
integer AAV=0
integer ANV=0
integer array ABV
unit array ACV
real array ADV
real array AFV
real array AGV
real array AHV
location array AJV
integer array AKV
integer ALV=0
integer AMV=0
integer array APV
integer array AQV
real array ASV
real array ATV
unit array AUV
timer AWV=CreateTimer()
integer AYV=0
boolean array AZV
boolean array A_V
integer A0V=0
integer A1V=0
integer array A2V
unit array A3V
real array A4V
real array A5V
real array A6V
real array A7V
real array A8V
real array A9V
real array NVV
real array NEV
integer array NXV
integer array NOV
integer array NRV
integer array NIV
boolean array NAV
boolean array NNV
integer NBV=1
timer NCV=CreateTimer()
integer NDV=0
integer NFV=0
integer array NGV
unit array NHV
real array NJV
real array NKV
real array NMV
real array NPV
real array NQV
real array NSV
real array NTV
real array NUV
integer array NWV
timer NYV=CreateTimer()
integer NZV=0
boolean array N_V
boolean array N0V
integer N1V=0
integer N2V=0
integer array N3V
unit array N4V
unit array N5V
unit array N6V
real array N7V
real array N8V
real array N9V
string array BVV
integer array BEV
timer BXV=CreateTimer()
integer BOV=0
boolean array BRV
boolean array BIV
integer BAV=0
integer BNV=0
integer array BBV
unit array BCV
unit array BDV
real array BFV
real array BGV
real array BHV
real array BJV
real array BKV
real array BLV
real array BMV
real array BPV
string array BQV
integer array BSV
timer BTV=CreateTimer()
integer BUV=0
boolean array BWV
boolean array BYV
integer BZV=0
integer B_V=0
integer array B0V
integer array B1V
trigger array B2V
trigger array B3V
trigger array B4V
trigger array B5V
trigger array B6V
real array B7V
real array B8V
unit array B9V
real array CVV
real array CEV
integer array CXV
integer array COV
real array CRV
real array CIV
real array CAV
real array CNV
boolean array CBV
real array CCV
string array CDV
player array CFV
real array CGV
boolean array CHV
real array CJV
attacktype array CKV
damagetype array CLV
real CMV
real CPV
integer CQV
integer CSV
integer CTV
unit CUV
integer array CWV
integer array CYV
integer CZV=0
integer C_V=0
integer array C0V
constant integer C1V=10
integer array C2V
integer C3V=0
integer C4V=0
integer array C5V
constant integer C6V=10
integer array C7V
integer C8V=0
integer C9V=0
integer array DVV
integer array DEV
integer array DXV
integer array DOV
integer array DRV
string array DIV
string array DAV
boolean array DNV
boolean array DBV
integer DCV
unit array DDV
real array DFV
integer DGV=0
integer DHV=0
integer DJV=0
integer DKV=0
integer array DLV
integer array DMV
unit array DPV
effect array DQV
real array DSV
integer array DTV
integer array DUV
integer array DWV
integer array DYV
integer array DZV
boolean array D_V
conditionfunc D0V
trigger array D1V
real array D2V
real array D3V
boolean array D4V
boolean array D5V
real array D6V
real array D7V
boolean array D8V
integer D9V=0
integer FVV=0
integer array FEV
integer array FXV
trigger array FOV
trigger array FRV
trigger array FIV
trigger array FAV
trigger array FNV
trigger array FBV
trigger array FCV
trigger array FDV
trigger array FFV
trigger array FGV
integer array FHV
string array FJV
integer array FKV
integer array FLV
integer array FMV
integer array FPV
real array FQV
real array FSV
real array FTV
real array FUV
real array FWV
unit array FYV
group array FZV
boolean array F_V
boolean array F0V
boolean array F1V
boolean array F2V
boolean array F3V
boolean array F4V
boolean array F5V
integer F6V=0
integer F7V=1
timer F8V=CreateTimer()
rect F9V
integer GVV
trigger GEV=CreateTrigger()
boolean GXV=true
boolexpr array GOV
boolean array GRV
boolean array GIV
boolean array GAV
boolean array GBV
boolean array GCV
integer array GDV
integer GFV=0
integer GGV=0
integer array GHV
unit array GJV
real array GKV
integer array GLV
integer array GMV
integer GPV=0
integer GQV=0
integer array GSV
integer array GTV
integer array GUV
integer array GWV
boolean array GYV
unit array GZV
player array G_V
real array G0V
real array G1V
real array G2V
real array G3V
real array G4V
real array G5V
real array G6V
boolean array G7V
boolean array G8V
boolean array G9V
boolean array HVV
boolean array HEV
boolean array HXV
boolean array HOV
integer array HRV
integer array HIV
integer array HAV
integer array HNV
integer array HBV
integer array HCV
integer array HDV
unit array HFV
real array HGV
real array HHV
real array HJV
real array HKV
real array HLV
real array HMV
real array HPV
real array HQV
real array HSV
real array HTV
real array HUV
real array HWV
real array HYV
unit array HZV
effect array H_V
string array H0V
boolean array H1V
boolean array H2V
boolean array H3V
real array H4V
real array H5V
real array H6V
real array H7V
real array H8V
real array H9V
group array JVV
rect JEV=null
group JXV=null
boolexpr JOV=null
boolexpr JRV=null
integer JIV=0
image array JAV
real array JNV
boolean array JBV
real array JCV
real array JDV
boolean array JFV
integer array JGV
integer array JHV
integer array JJV
integer array JKV
integer array JLV
integer array JMV
integer JPV=0
integer JQV=0
integer JSV=0
integer array JTV
integer array JUV
group array JWV
string array JYV
real array JZV
real array J_V
real array J0V
real array J1V
real array J2V
real array J3V
boolean array J4V
boolean array J5V
integer J6V=0
integer J7V=0
integer array J8V
lightning array J9V
unit array KVV
unit array KEV
real array KXV
real array KOV
boolean array KRV
real array KIV
integer KAV=1
timer KNV=CreateTimer()
integer array KBV
integer array KCV
unit array KDV
real array KFV
real array KGV
real array KHV
string array KJV
string array KKV
integer array KLV
boolean array KMV
boolean array KPV
boolean array KQV
unit array KSV
unit KTV=null
unit KUV=null
integer KWV=0
group KYV=CreateGroup()
integer KZV=0
integer K_V=0
integer K0V=0
integer array K1V
real array K2V
real array K3V
integer K4V=0
integer K5V=0
integer array K6V
real array K7V
real array K8V
unit array K9V
real array LVV
real array LEV
real array LXV
integer array LOV
integer LRV=0
integer LIV=0
integer array LAV
real array LNV
real array LBV
unit array LCV
real array LDV
real array LFV
real array LGV
integer array LHV
integer LJV=0
integer LKV=0
integer array LLV
unit array LMV
effect array LPV
integer LQV=0
integer LSV=0
integer array LTV
unit array LUV
effect array LWV
integer array LYV
real array LZV
integer L_V=0
integer L0V=0
integer array L1V
unit array L2V
real array L3V
integer array L4V
integer array L5V
integer L6V=0
integer L7V=0
integer array L8V
unit array L9V
unit array MVV
effect array MEV
real array MXV
real array MOV
real array MRV
real array MIV
real array MAV
integer array MNV
integer array MBV
integer array MCV
integer MDV=0
integer MFV=0
integer array MGV
boolean array MHV
boolean array MJV
boolean array MKV
boolean array MLV
boolean array MMV
boolean array MPV
boolean array MQV
boolean array MSV
boolean array MTV
damagetype array MUV
attacktype array MWV
weapontype array MYV
integer array MZV
boolean array M_V
real array M0V
boolean array M1V
unittype array M2V
boolean array M3V
unittype array M4V
unittype array M5V
integer array M6V
real array M7V
integer array M8V
integer array M9V
integer array PVV
integer array PEV
real array PXV
integer array POV
integer array PRV
boolean array PIV
string array PAV
string array PNV
damagetype PBV=null
attacktype PCV=null
integer PDV=0
integer PFV=0
boolean PGV=false
integer PHV
integer array PJV
unit array PKV
real array PLV
real array PMV
real array PPV
real array PQV
boolexpr PSV
boolexpr PTV
group PUV
rect PWV
integer PYV=0
integer PZV=0
integer array P_V
unit array P0V
unit array P1V
real array P2V
integer array P3V
integer array P4V
integer P5V=0
integer P6V=0
integer array P7V
unit array P8V
integer array P9V
integer array QVV
integer array QEV
integer array QXV
integer QOV=0
integer QRV=0
integer array QIV
unit array QAV
unit array QNV
real array QBV
integer array QCV
integer array QDV
integer QFV=0
integer QGV=0
integer array QHV
unit array QJV
integer array QKV
integer array QLV
integer array QMV
integer array QPV
integer QQV=0
integer QSV=0
integer array QTV
unit array QUV
unit array QWV
real array QYV
integer array QZV
integer array Q_V
integer Q0V=0
integer Q1V=0
integer array Q2V
unit array Q3V
integer array Q4V
integer array Q5V
integer array Q6V
integer array Q7V
integer Q8V=0
integer Q9V=0
integer array SVV
unit array SEV
unit array SXV
real array SOV
integer array SRV
integer array SIV
integer array SAV
integer array SNV
integer SBV=0
integer SCV=0
integer array SDV
unit array SFV
effect array SGV
real array SHV
integer array SJV
integer array SKV
integer SLV=0
integer SMV=0
integer array SPV
unit array SQV
unit array SSV
unit array STV
integer array SUV
integer array SWV
integer array SYV
boolean array SZV
integer array S_V
boolean array S0V
integer array S1V
boolean array S2V
integer array S3V
real array S4V
integer array S5V
real array S6V
integer array S7V
real array S8V
integer array S9V
real array TVV
boolean array TEV
integer array TXV
timer array TOV
integer array TRV
integer array TIV
integer TAV
integer TNV=0
integer TBV=0
integer array TCV
unit array TDV
integer TFV=0
integer TGV=0
integer array THV
unit array TJV
real array TKV
real array TLV
real array TMV
real array TPV
real array TQV
real array TSV
real array TTV
real array TUV
effect array TWV
integer TYV=0
integer TZV=0
integer array T_V
unit array T0V
integer array T1V
effect array T2V
integer T3V=0
integer T4V=0
integer array T5V
unit array T6V
effect array T7V
integer T8V=0
integer T9V=0
integer array UVV
unit array UEV
real array UXV
real array UOV
real array URV
integer UIV=0
integer UAV=0
integer array UNV
unit array UBV
unit array UCV
real array UDV
integer UFV=0
integer UGV=0
integer array UHV
unit array UJV
integer UKV=0
integer ULV=0
integer array UMV
unit array UPV
unit array UQV
integer array USV
integer UTV=0
integer UUV=0
integer array UWV
unit array UYV
unit array UZV
real array U_V
real array U0V
integer U1V=0
integer U2V=0
integer array U3V
unit array U4V
unit array U5V
effect array U6V
integer array U7V
integer U8V=0
integer U9V=0
integer array WVV
timer WEV=CreateTimer()
integer WXV=0
unit array WOV
real array WRV
real array WIV
integer WAV=0
integer WNV=0
integer array WBV
unit array WCV
unit array WDV
effect array WFV
lightning array WGV
real array WHV
real array WJV
real array WKV
real array WLV
real array WMV
real array WPV
real array WQV
real array WSV
integer array WTV
timer WUV=CreateTimer()
integer WWV=0
boolean array WYV
boolean array WZV
integer W_V=0
integer W0V=0
integer array W1V
unit array W2V
effect array W3V
lightning array W4V
real array W5V
real array W6V
real array W7V
real array W8V
real array W9V
real array YVV
real array YEV
real array YXV
timer YOV=CreateTimer()
integer YRV=0
boolean array YIV
boolean array YAV
integer YNV=0
integer YBV=0
integer array YCV
real array YDV
real array YFV
real array YGV
real array YHV
unit array YJV
unit array YKV
effect array YLV
lightning array YMV
timer YPV=CreateTimer()
integer YQV=0
boolean array YSV
boolean array YTV
real array YUV
real array YWV
integer array YYV
integer YZV=0
integer Y_V=0
integer array Y0V
unit array Y1V
unit array Y2V
player array Y3V
lightning array Y4V
integer array Y5V
real array Y6V
integer array Y7V
real array Y8V
integer array Y9V
real array ZVV
integer array ZEV
real array ZXV
integer array ZOV
unit array ZRV
unit array ZIV
real array ZAV
real array ZNV
real array ZBV
real array ZCV
real array ZDV
real array ZFV
real array ZGV
real array ZHV
real array ZJV
real array ZKV
real array ZLV
effect array ZMV
effect array ZPV
integer array ZQV
real array ZSV
real array ZTV
integer ZUV=0
integer ZWV=0
integer array ZYV
unit array ZZV
unit array Z_V
player array Z0V
lightning array Z1V
integer array Z2V
real array Z3V
integer array Z4V
real array Z5V
integer array Z6V
real array Z7V
integer array Z8V
real array Z9V
integer array VVE
unit array VEE
unit array VXE
real array VOE
real array VRE
real array VIE
real array VAE
real array VNE
real array VBE
real array VCE
real array VDE
real array VFE
real array VGE
real array VHE
effect array VJE
effect array VKE
integer array VLE
real array VME
real array VPE
integer VQE=0
integer VSE=0
integer array VTE
unit array VUE
unit array VWE
player array VYE
lightning array VZE
integer array V_E
real array V0E
integer array V1E
real array V2E
integer array V3E
real array V4E
integer array V5E
real array V6E
integer array V7E
unit array V8E
unit array V9E
real array EVE
real array EEE
real array EXE
real array EOE
real array ERE
real array EIE
real array EAE
real array ENE
real array EBE
real array ECE
real array EDE
effect array EFE
effect array EGE
integer array EHE
real array EJE
real array EKE
integer ELE=0
integer EME=0
integer array EPE
unit array EQE
unit array ESE
integer array ETE
integer array EUE
real array EWE
group array EYE
integer EZE=0
integer E_E=0
integer array E0E
unit array E1E
real array E2E
real array E3E
integer array E4E
effect array E5E
integer E6E=0
integer E7E=0
integer array E8E
unit array E9E
unit array XVE
unit array XEE
real array XXE
timer array XOE
effect array XRE
boolean array XIE
integer XAE=0
integer XNE=0
integer array XBE
real array XCE
real array XDE
real array XFE
integer array XGE
integer array XHE
integer array XJE
unit array XKE
unit array XLE
integer array XME
timer array XPE
integer XQE=0
integer XSE=0
integer array XTE
unit array XUE
integer array XWE
integer XYE=0
integer XZE=0
integer array X_E
unit array X0E
real array X1E
real array X2E
real array X3E
real array X4E
real array X5E
real array X6E
real array X7E
real array X8E
real array X9E
real array OVE
real array OEE
real array OXE
real array OOE
real array ORE
effect array OIE
effect array OAE
effect array ONE
effect array OBE
effect array OCE
effect array ODE
effect array OFE
real array OGE
integer OHE=0
integer OJE=0
integer array OKE
unit array OLE
unit array OME
effect array OPE
real array OQE
integer OSE=0
integer OTE=0
integer array OUE
real array OWE
unit array OYE
integer array OZE
integer O_E=0
integer O0E=0
integer array O1E
unit array O2E
unit array O3E
real array O4E
real array O5E
integer O6E=0
integer O7E=0
integer array O8E
unit array O9E
unit array RVE
integer array REE
effect array RXE
integer ROE=0
integer RRE=0
integer array RIE
unit array RAE
unit array RNE
effect array RBE
effect array RCE
integer RDE=0
integer RFE=0
integer array RGE
unit array RHE
integer RJE=0
integer RKE=0
integer array RLE
integer array RME
unit array RPE
effect array RQE
integer RSE=0
integer RTE=0
integer array RUE
unit array RWE
integer array RYE
integer RZE=0
integer R_E=0
integer array R0E
unit array R1E
real array R2E
real array R3E
integer array R4E
real array R5E
integer R6E=0
integer R7E=0
integer array R8E
unit array R9E
integer array IVE
integer IEE=0
integer IXE=0
integer array IOE
unit array IRE
integer IIE=0
integer IAE=0
integer array INE
unit array IBE
integer array ICE
integer IDE=0
integer IFE=0
integer array IGE
unit array IHE
integer array IJE
integer IKE=0
integer ILE=0
integer array IME
unit array IPE
unit array IQE
real array ISE
integer ITE=0
integer IUE=0
integer array IWE
unit array IYE
unit array IZE
real array I_E
real array I0E
integer I1E=0
integer I2E=0
integer array I3E
unit array I4E
unit array I5E
integer array I6E
integer I7E=0
integer I8E=0
integer array I9E
real array AVE
real array AEE
unit array AXE
integer AOE=0
integer ARE=0
integer array AIE
unit array AAE
timerdialog array ANE
integer ABE=0
integer ACE=0
integer array ADE
unit array AFE
integer array AGE
real array AHE
real array AJE
real array AKE
real array ALE
real array AME
effect array APE
integer AQE
integer ASE
integer ATE
integer AUE
integer AWE
integer AWEQQ
integer AWEQ1
integer AWEQ2
integer AWEQ3
integer AWEQ4
integer AWEQ5
integer array AYE
integer array AZE
//timer array A_E
integer array A0E
timer array A1E
boolexpr array A2E
unit array A3E
unit array A4E
real array A5E
real array A6E
integer array A7E
integer array A8E
integer array A9E
integer array NVE
integer array NEE
integer array NXE
integer array NOE
integer array NRE
integer array NIE
trigger array NAE
trigger array NNE
integer array NBE
trigger array NCE
trigger NDE
trigger NFE
trigger NGE
trigger NHE
trigger NJE
trigger NKE
trigger NLE
trigger NME
trigger NPE
trigger NQE
trigger NSE
trigger NTE
trigger NUE
trigger NWE
trigger NYE
trigger NZE
trigger N_E
trigger N0E
trigger N1E
trigger N2E
trigger N3E
trigger N4E
trigger N5E
trigger N6E
trigger N7E
trigger N8E
trigger N9E
trigger BVE
trigger BEE
trigger BXE
trigger BOE
trigger BRE
trigger BIE
trigger BAE
trigger BNE
trigger BBE
trigger BCE
trigger BDE
trigger BFE
trigger BGE
trigger array BHE
trigger array BJE
trigger array BKE
trigger array BLE
trigger array BME
trigger array BPE
trigger array BQE
real BSE
trigger array BTE
real BUE
real BWE
unit BYE
destructable BZE
integer B_E
trigger B0E
boolexpr B1E
group B2E
integer B3E
boolean B4E
integer B5E
timer B6E=null
real B8E=.0
real B9E=.0
group CVE=null
force CEE=null
boolexpr CXE=null
endglobals
native UnitAlive takes unit whichUnit returns boolean
function CRE takes real CIE returns nothing
local real CAE
local real st=TimerGetElapsed(B6E)
if st<=0 then
set B6E=CreateTimer()
call TimerStart(B6E,1000000,false,null)
endif
if(CIE>0)then
loop
set CAE=CIE-TimerGetElapsed(B6E)+st
exitwhen CAE<=0
if(CAE>bj_POLLED_WAIT_SKIP_THRESHOLD)then
call TriggerSleepAction(.1*CAE)
else
call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
endif
endloop
endif
endfunction
function CNE takes location CBE,real CCE,real CDE returns location
return Location(GetLocationX(CBE)+CCE*Cos(CDE*bj_DEGTORAD),GetLocationY(CBE)+CCE*Sin(CDE*bj_DEGTORAD))
endfunction
function CFE takes nothing returns boolean
local real dx=GetDestructableX(GetFilterDestructable())-B8E
local real dy=GetDestructableY(GetFilterDestructable())-B9E
return(dx*dx+dy*dy<=bj_enumDestructableRadius)
endfunction
function CGE takes real CHE,location CJE,code CKE returns nothing
local rect r
if(CHE>=0)then
set B8E=GetLocationX(CJE)
set B9E=GetLocationY(CJE)
set bj_enumDestructableRadius=CHE*CHE
set r=Rect(B8E-CHE,B9E-CHE,B8E+CHE,B9E+CHE)
call EnumDestructablesInRect(r,filterEnumDestructablesInCircleBJ,CKE)
call RemoveRect(r)
set r=null
endif
endfunction
function CLE takes rect r,boolexpr CME returns group
set CVE=CreateGroup()
call GroupEnumUnitsInRect(CVE,r,CME)
call DestroyBoolExpr(CME)
return CVE
endfunction
function CPE takes rect r returns group
set CVE=CreateGroup()
call GroupEnumUnitsInRect(CVE,r,CXE)
return CVE
endfunction
function CQE takes real CHE,location CSE,boolexpr CME returns group
set CVE=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(CVE,CSE,CHE,CME)
return CVE
endfunction
function CTE takes real CHE,location CSE returns group
set CVE=CreateGroup()
call GroupEnumUnitsInRangeOfLoc(CVE,CSE,CHE,CXE)
return CVE
endfunction
function CUE takes player CWE,boolexpr CME returns group
set CVE=CreateGroup()
call GroupEnumUnitsOfPlayer(CVE,CWE,CME)
call DestroyBoolExpr(CME)
return CVE
endfunction
function CountingAliveUnitsOfComputer takes nothing returns boolean
return UnitAlive(GetFilterUnit())
endfunction
function CYE takes player CWE returns group
set CVE=CreateGroup()
call GroupEnumUnitsOfPlayer(CVE,CWE,Filter(function CountingAliveUnitsOfComputer))
return CVE
endfunction
function CZE takes player CWE returns force
set CEE=CreateForce()
call ForceAddPlayer(CEE,CWE)
return CEE
endfunction
function C_E takes mapcontrol C0E returns force
local integer C1E
local player C2E
set CEE=CreateForce()
set C1E=0
loop
set C2E=Player(C1E)
if GetPlayerController(C2E)==C0E then
call ForceAddPlayer(CEE,C2E)
endif
set C1E=C1E+1
exitwhen C1E==16
endloop
return CEE
endfunction
function C3E takes player CWE returns force
set CEE=CreateForce()
call ForceEnumAllies(CEE,CWE,CXE)
return CEE
endfunction
function C4E takes boolexpr CME returns force
set CEE=CreateForce()
call ForceEnumPlayers(CEE,CME)
call DestroyBoolExpr(CME)
return CEE
endfunction
function C5E takes integer C6E,group C7E returns group
set bj_randomSubGroupGroup=CreateGroup()
set bj_randomSubGroupWant=C6E
set bj_randomSubGroupTotal=CountUnitsInGroup(C7E)
if(bj_randomSubGroupWant<=0 or bj_randomSubGroupTotal<=0)then
return bj_randomSubGroupGroup
endif
set bj_randomSubGroupChance=I2R(bj_randomSubGroupWant)/I2R(bj_randomSubGroupTotal)
call ForGroup(C7E,function GetRandomSubGroupEnum)
return bj_randomSubGroupGroup
endfunction
function C8E takes player CWE,playercolor C9E,boolean DVE returns nothing
local group g
call SetPlayerColor(CWE,C9E)
if DVE then
set bj_setPlayerTargetColor=C9E
set g=CreateGroup()
call GroupEnumUnitsOfPlayer(g,CWE,CXE)
call ForGroup(g,function SetPlayerColorBJEnum)
call DestroyGroup(g)
set g=null
endif
endfunction
function DEE takes itemtype DXE,integer DOE returns nothing
local group g
set bj_stockPickedItemType=DXE
set bj_stockPickedItemLevel=DOE
set g=CreateGroup()
call GroupEnumUnitsOfType(g,"marketplace",CXE)
call ForGroup(g,function UpdateEachStockBuildingEnum)
call DestroyGroup(g)
set g=null
endfunction
function DRE takes nothing returns nothing
local integer pickedItemId
local itemtype DIE
local integer DAE=0
local integer DNE=0
local integer DOE
set DOE=1
loop
if(bj_stockAllowedPermanent[DOE])then
set DNE=DNE+1
if(GetRandomInt(1,DNE)==1)then
set DIE=ITEM_TYPE_PERMANENT
set DAE=DOE
endif
endif
if(bj_stockAllowedCharged[DOE])then
set DNE=DNE+1
if(GetRandomInt(1,DNE)==1)then
set DIE=ITEM_TYPE_CHARGED
set DAE=DOE
endif
endif
if(bj_stockAllowedArtifact[DOE])then
set DNE=DNE+1
if(GetRandomInt(1,DNE)==1)then
set DIE=ITEM_TYPE_ARTIFACT
set DAE=DOE
endif
endif
set DOE=DOE+1
exitwhen DOE>10
endloop
if(DNE==0)then
set DIE=null
return
endif
call DEE(DIE,DAE)
set DIE=null
endfunction
function DBE takes nothing returns nothing
call DRE()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INTERVAL,true,function DRE)
endfunction
function DDE takes nothing returns boolean
return true
endfunction
function DJE takes integer i returns real
if(i<8191)then
return ICV[i]
elseif(i<16382)then
return INV[i-8191]
else
return IBV[i-16382]
endif
endfunction
function DKE takes integer i,real v returns nothing
if(i<8191)then
set ICV[i]=v
elseif(i<16382)then
set INV[i-8191]=v
else
set IBV[i-16382]=v
endif
endfunction
function DLE takes integer i returns real
if(i<8191)then
return IGV[i]
elseif(i<16382)then
return IDV[i-8191]
else
return IFV[i-16382]
endif
endfunction
function DME takes integer i,real v returns nothing
if(i<8191)then
set IGV[i]=v
elseif(i<16382)then
set IDV[i-8191]=v
else
set IFV[i-16382]=v
endif
endfunction
function DPE takes integer i returns real
if(i<8191)then
return IKV[i]
elseif(i<16382)then
return IHV[i-8191]
else
return IJV[i-16382]
endif
endfunction
function DQE takes integer i,real v returns nothing
if(i<8191)then
set IKV[i]=v
elseif(i<16382)then
set IHV[i-8191]=v
else
set IJV[i-16382]=v
endif
endfunction
function DSE takes integer i returns boolean
if(i<8191)then
return IPV[i]
elseif(i<16382)then
return ILV[i-8191]
else
return IMV[i-16382]
endif
endfunction
function DTE takes integer i,boolean v returns nothing
if(i<8191)then
set IPV[i]=v
elseif(i<16382)then
set ILV[i-8191]=v
else
set IMV[i-16382]=v
endif
endfunction
function DUE takes integer i returns real
if(i<8191)then
return ITV[i]
elseif(i<16382)then
return IQV[i-8191]
else
return ISV[i-16382]
endif
endfunction
function DWE takes integer i,real v returns nothing
if(i<8191)then
set ITV[i]=v
elseif(i<16382)then
set IQV[i-8191]=v
else
set ISV[i-16382]=v
endif
endfunction
function DYE takes integer i returns boolean
if(i<8191)then
return IYV[i]
elseif(i<16382)then
return IUV[i-8191]
else
return IWV[i-16382]
endif
endfunction
function DZE takes integer i,boolean v returns nothing
if(i<8191)then
set IYV[i]=v
elseif(i<16382)then
set IUV[i-8191]=v
else
set IWV[i-16382]=v
endif
endfunction
function D_E takes nothing returns integer
local integer D0E=ABE
if(D0E!=0)then
set ABE=ADE[D0E]
else
set ACE=ACE+1
set D0E=ACE
endif
if(D0E>8190)then
return 0
endif
set AGE[D0E]=0
set ADE[D0E]=-1
return D0E
endfunction
function D1E takes nothing returns integer
local integer D0E=AOE
if(D0E!=0)then
set AOE=AIE[D0E]
else
set ARE=ARE+1
set D0E=ARE
endif
if(D0E>8190)then
return 0
endif
set AIE[D0E]=-1
return D0E
endfunction
function D2E takes integer D0E returns nothing
if D0E==null then
return
elseif(AIE[D0E]!=-1)then
return
endif
set AIE[D0E]=AOE
set AOE=D0E
endfunction
function D3E takes nothing returns integer
local integer D0E=I7E
if(D0E!=0)then
set I7E=I9E[D0E]
else
set I8E=I8E+1
set D0E=I8E
endif
if(D0E>8190)then
return 0
endif
set I9E[D0E]=-1
return D0E
endfunction
function D4E takes integer D0E returns nothing
if D0E==null then
return
elseif(I9E[D0E]!=-1)then
return
endif
set I9E[D0E]=I7E
set I7E=D0E
endfunction
function D5E takes nothing returns integer
local integer D0E=I1E
if(D0E!=0)then
set I1E=I3E[D0E]
else
set I2E=I2E+1
set D0E=I2E
endif
if(D0E>8190)then
return 0
endif
set I3E[D0E]=-1
return D0E
endfunction
function D6E takes integer D0E returns nothing
if D0E==null then
return
elseif(I3E[D0E]!=-1)then
return
endif
set I3E[D0E]=I1E
set I1E=D0E
endfunction
function D7E takes nothing returns integer
local integer D0E=ITE
if(D0E!=0)then
set ITE=IWE[D0E]
else
set IUE=IUE+1
set D0E=IUE
endif
if(D0E>8190)then
return 0
endif
set IWE[D0E]=-1
return D0E
endfunction
function D8E takes integer D0E returns nothing
if D0E==null then
return
elseif(IWE[D0E]!=-1)then
return
endif
set IWE[D0E]=ITE
set ITE=D0E
endfunction
function D9E takes nothing returns integer
local integer D0E=IKE
if(D0E!=0)then
set IKE=IME[D0E]
else
set ILE=ILE+1
set D0E=ILE
endif
if(D0E>8190)then
return 0
endif
set IME[D0E]=-1
return D0E
endfunction
function FVE takes integer D0E returns nothing
if D0E==null then
return
elseif(IME[D0E]!=-1)then
return
endif
set IME[D0E]=IKE
set IKE=D0E
endfunction
function FEE takes nothing returns integer
local integer D0E=IDE
if(D0E!=0)then
set IDE=IGE[D0E]
else
set IFE=IFE+1
set D0E=IFE
endif
if(D0E>8190)then
return 0
endif
set IGE[D0E]=-1
return D0E
endfunction
function FXE takes integer D0E returns nothing
if D0E==null then
return
elseif(IGE[D0E]!=-1)then
return
endif
set IGE[D0E]=IDE
set IDE=D0E
endfunction
function FOE takes nothing returns integer
local integer D0E=IIE
if(D0E!=0)then
set IIE=INE[D0E]
else
set IAE=IAE+1
set D0E=IAE
endif
if(D0E>8190)then
return 0
endif
set INE[D0E]=-1
return D0E
endfunction
function FRE takes integer D0E returns nothing
if D0E==null then
return
elseif(INE[D0E]!=-1)then
return
endif
set INE[D0E]=IIE
set IIE=D0E
endfunction
function FIE takes nothing returns integer
local integer D0E=IEE
if(D0E!=0)then
set IEE=IOE[D0E]
else
set IXE=IXE+1
set D0E=IXE
endif
if(D0E>8190)then
return 0
endif
set IOE[D0E]=-1
return D0E
endfunction
function FAE takes integer D0E returns nothing
if D0E==null then
return
elseif(IOE[D0E]!=-1)then
return
endif
set IOE[D0E]=IEE
set IEE=D0E
endfunction
function FNE takes nothing returns integer
local integer D0E=R6E
if(D0E!=0)then
set R6E=R8E[D0E]
else
set R7E=R7E+1
set D0E=R7E
endif
if(D0E>8190)then
return 0
endif
set R8E[D0E]=-1
return D0E
endfunction
function FBE takes integer D0E returns nothing
if D0E==null then
return
elseif(R8E[D0E]!=-1)then
return
endif
set R8E[D0E]=R6E
set R6E=D0E
endfunction
function FCE takes nothing returns integer
local integer D0E=RZE
if(D0E!=0)then
set RZE=R0E[D0E]
else
set R_E=R_E+1
set D0E=R_E
endif
if(D0E>8190)then
return 0
endif
set R0E[D0E]=-1
return D0E
endfunction
function FDE takes integer D0E returns nothing
if D0E==null then
return
elseif(R0E[D0E]!=-1)then
return
endif
set R0E[D0E]=RZE
set RZE=D0E
endfunction
function FFE takes nothing returns integer
local integer D0E=RSE
if(D0E!=0)then
set RSE=RUE[D0E]
else
set RTE=RTE+1
set D0E=RTE
endif
if(D0E>8190)then
return 0
endif
set RUE[D0E]=-1
return D0E
endfunction
function FGE takes integer D0E returns nothing
if D0E==null then
return
elseif(RUE[D0E]!=-1)then
return
endif
set RUE[D0E]=RSE
set RSE=D0E
endfunction
function FHE takes nothing returns integer
local integer D0E=RJE
if(D0E!=0)then
set RJE=RLE[D0E]
else
set RKE=RKE+1
set D0E=RKE
endif
if(D0E>8190)then
return 0
endif
set RLE[D0E]=-1
return D0E
endfunction
function FJE takes integer D0E returns nothing
if D0E==null then
return
elseif(RLE[D0E]!=-1)then
return
endif
set RLE[D0E]=RJE
set RJE=D0E
endfunction
function FKE takes nothing returns integer
local integer D0E=RDE
if(D0E!=0)then
set RDE=RGE[D0E]
else
set RFE=RFE+1
set D0E=RFE
endif
if(D0E>8190)then
return 0
endif
set RGE[D0E]=-1
return D0E
endfunction
function FLE takes integer D0E returns nothing
if D0E==null then
return
elseif(RGE[D0E]!=-1)then
return
endif
set RGE[D0E]=RDE
set RDE=D0E
endfunction
function FME takes nothing returns integer
local integer D0E=ROE
if(D0E!=0)then
set ROE=RIE[D0E]
else
set RRE=RRE+1
set D0E=RRE
endif
if(D0E>8190)then
return 0
endif
set RIE[D0E]=-1
return D0E
endfunction
function FPE takes integer D0E returns nothing
if D0E==null then
return
elseif(RIE[D0E]!=-1)then
return
endif
set RIE[D0E]=ROE
set ROE=D0E
endfunction
function FQE takes nothing returns integer
local integer D0E=O6E
if(D0E!=0)then
set O6E=O8E[D0E]
else
set O7E=O7E+1
set D0E=O7E
endif
if(D0E>8190)then
return 0
endif
set O8E[D0E]=-1
return D0E
endfunction
function FSE takes integer D0E returns nothing
if D0E==null then
return
elseif(O8E[D0E]!=-1)then
return
endif
set O8E[D0E]=O6E
set O6E=D0E
endfunction
function FTE takes nothing returns integer
local integer D0E=O_E
if(D0E!=0)then
set O_E=O1E[D0E]
else
set O0E=O0E+1
set D0E=O0E
endif
if(D0E>8190)then
return 0
endif
set O1E[D0E]=-1
return D0E
endfunction
function FUE takes integer D0E returns nothing
if D0E==null then
return
elseif(O1E[D0E]!=-1)then
return
endif
set O1E[D0E]=O_E
set O_E=D0E
endfunction
function FWE takes nothing returns integer
local integer D0E=OSE
if(D0E!=0)then
set OSE=OUE[D0E]
else
set OTE=OTE+1
set D0E=OTE
endif
if(D0E>8190)then
return 0
endif
set OUE[D0E]=-1
return D0E
endfunction
function FYE takes integer D0E returns nothing
if D0E==null then
return
elseif(OUE[D0E]!=-1)then
return
endif
set OUE[D0E]=OSE
set OSE=D0E
endfunction
function FZE takes nothing returns integer
local integer D0E=OHE
if(D0E!=0)then
set OHE=OKE[D0E]
else
set OJE=OJE+1
set D0E=OJE
endif
if(D0E>8190)then
return 0
endif
set OKE[D0E]=-1
return D0E
endfunction
function F_E takes integer D0E returns nothing
if D0E==null then
return
elseif(OKE[D0E]!=-1)then
return
endif
set OKE[D0E]=OHE
set OHE=D0E
endfunction
function F0E takes nothing returns integer
local integer D0E=XYE
if(D0E!=0)then
set XYE=X_E[D0E]
else
set XZE=XZE+1
set D0E=XZE
endif
if(D0E>8190)then
return 0
endif
set X_E[D0E]=-1
return D0E
endfunction
function F1E takes integer D0E returns nothing
if D0E==null then
return
elseif(X_E[D0E]!=-1)then
return
endif
set X_E[D0E]=XYE
set XYE=D0E
endfunction
function F2E takes nothing returns integer
local integer D0E=XQE
if(D0E!=0)then
set XQE=XTE[D0E]
else
set XSE=XSE+1
set D0E=XSE
endif
if(D0E>8190)then
return 0
endif
set XTE[D0E]=-1
return D0E
endfunction
function F3E takes integer D0E returns nothing
if D0E==null then
return
elseif(XTE[D0E]!=-1)then
return
endif
set XTE[D0E]=XQE
set XQE=D0E
endfunction
function F4E takes nothing returns integer
local integer D0E=XAE
if(D0E!=0)then
set XAE=XBE[D0E]
else
set XNE=XNE+1
set D0E=XNE
endif
if(D0E>8190)then
return 0
endif
set XBE[D0E]=-1
return D0E
endfunction
function F5E takes integer D0E returns nothing
if D0E==null then
return
elseif(XBE[D0E]!=-1)then
return
endif
set XBE[D0E]=XAE
set XAE=D0E
endfunction
function F6E takes nothing returns integer
local integer D0E=E6E
if(D0E!=0)then
set E6E=E8E[D0E]
else
set E7E=E7E+1
set D0E=E7E
endif
if(D0E>8190)then
return 0
endif
set E8E[D0E]=-1
return D0E
endfunction
function F7E takes integer D0E returns nothing
if D0E==null then
return
elseif(E8E[D0E]!=-1)then
return
endif
set E8E[D0E]=E6E
set E6E=D0E
endfunction
function F8E takes nothing returns integer
local integer D0E=EZE
if(D0E!=0)then
set EZE=E0E[D0E]
else
set E_E=E_E+1
set D0E=E_E
endif
if(D0E>8190)then
return 0
endif
set E0E[D0E]=-1
return D0E
endfunction
function F9E takes integer D0E returns nothing
if D0E==null then
return
elseif(E0E[D0E]!=-1)then
return
endif
set E0E[D0E]=EZE
set EZE=D0E
endfunction
function GVE takes nothing returns integer
local integer D0E=ELE
if(D0E!=0)then
set ELE=EPE[D0E]
else
set EME=EME+1
set D0E=EME
endif
if(D0E>8190)then
return 0
endif
set EPE[D0E]=-1
return D0E
endfunction
function GEE takes nothing returns integer
local integer D0E=VQE
if(D0E!=0)then
set VQE=VTE[D0E]
else
set VSE=VSE+1
set D0E=VSE
endif
if(D0E>4094)then
return 0
endif
set V_E[D0E]=(D0E-1)*2
set V1E[D0E]=(D0E-1)*2
set V3E[D0E]=(D0E-1)*2
set V5E[D0E]=(D0E-1)*2
set V7E[D0E]=(D0E-1)*2
set EKE[D0E]=.0
set VTE[D0E]=-1
return D0E
endfunction
function GXE takes integer D0E returns nothing
if D0E==null then
return
elseif(VTE[D0E]!=-1)then
return
endif
set VTE[D0E]=VQE
set VQE=D0E
endfunction
function GOE takes nothing returns integer
local integer D0E=ZUV
if(D0E!=0)then
set ZUV=ZYV[D0E]
else
set ZWV=ZWV+1
set D0E=ZWV
endif
if(D0E>4094)then
return 0
endif
set Z2V[D0E]=(D0E-1)*2
set Z4V[D0E]=(D0E-1)*2
set Z6V[D0E]=(D0E-1)*2
set Z8V[D0E]=(D0E-1)*2
set VVE[D0E]=(D0E-1)*2
set VPE[D0E]=.0
set ZYV[D0E]=-1
return D0E
endfunction
function GRE takes integer D0E returns nothing
if D0E==null then
return
elseif(ZYV[D0E]!=-1)then
return
endif
set ZYV[D0E]=ZUV
set ZUV=D0E
endfunction
function GIE takes nothing returns integer
local integer D0E=YZV
if(D0E!=0)then
set YZV=Y0V[D0E]
else
set Y_V=Y_V+1
set D0E=Y_V
endif
if(D0E>4094)then
return 0
endif
set Y5V[D0E]=(D0E-1)*2
set Y7V[D0E]=(D0E-1)*2
set Y9V[D0E]=(D0E-1)*2
set ZEV[D0E]=(D0E-1)*2
set ZOV[D0E]=(D0E-1)*2
set ZTV[D0E]=.0
set Y0V[D0E]=-1
return D0E
endfunction
function GAE takes integer D0E returns nothing
if D0E==null then
return
elseif(Y0V[D0E]!=-1)then
return
endif
set Y0V[D0E]=YZV
set YZV=D0E
endfunction
function GBE takes nothing returns integer
local integer D0E=RMV
if(D0E!=0)then
set RMV=RQV[D0E]
else
set RPV=RPV+1
set D0E=RPV
endif
if(D0E>8190)then
return 0
endif
set RQV[D0E]=-1
return D0E
endfunction
function GCE takes integer D0E returns nothing
if D0E==null then
return
elseif(RQV[D0E]!=-1)then
return
endif
set RQV[D0E]=RMV
set RMV=D0E
endfunction
function GDE takes nothing returns integer
local integer D0E=YNV
if(D0E!=0)then
set YNV=YCV[D0E]
else
set YBV=YBV+1
set D0E=YBV
endif
if(D0E>8190)then
return 0
endif
set YCV[D0E]=-1
return D0E
endfunction
function GFE takes integer D0E returns nothing
if D0E==null then
return
elseif(YCV[D0E]!=-1)then
return
endif
set YCV[D0E]=YNV
set YNV=D0E
endfunction
function GGE takes nothing returns integer
local integer D0E=W_V
if(D0E!=0)then
set W_V=W1V[D0E]
else
set W0V=W0V+1
set D0E=W0V
endif
if(D0E>8190)then
return 0
endif
set W1V[D0E]=-1
return D0E
endfunction
function GHE takes integer D0E returns nothing
if D0E==null then
return
elseif(W1V[D0E]!=-1)then
return
endif
set W1V[D0E]=W_V
set W_V=D0E
endfunction
function GJE takes nothing returns integer
local integer D0E=WAV
if(D0E!=0)then
set WAV=WBV[D0E]
else
set WNV=WNV+1
set D0E=WNV
endif
if(D0E>2729)then
return 0
endif
set WTV[D0E]=(D0E-1)*3
set WBV[D0E]=-1
return D0E
endfunction
function GKE takes integer D0E returns nothing
if D0E==null then
return
elseif(WBV[D0E]!=-1)then
return
endif
set WBV[D0E]=WAV
set WAV=D0E
endfunction
function GLE takes nothing returns integer
local integer D0E=U8V
if(D0E!=0)then
set U8V=WVV[D0E]
else
set U9V=U9V+1
set D0E=U9V
endif
if(D0E>8190)then
return 0
endif
set WVV[D0E]=-1
return D0E
endfunction
function GME takes integer D0E returns nothing
if D0E==null then
return
elseif(WVV[D0E]!=-1)then
return
endif
set WVV[D0E]=U8V
set U8V=D0E
endfunction
/*function GPE takes nothing returns integer
local integer D0E=U1V
if(D0E!=0)then
set U1V=U3V[D0E]
else
set U2V=U2V+1
set D0E=U2V
endif
if(D0E>8190)then
return 0
endif
set U3V[D0E]=-1
return D0E
endfunction*/
function GQE takes integer D0E returns nothing
if D0E==null then
return
elseif(U3V[D0E]!=-1)then
return
endif
set U3V[D0E]=U1V
set U1V=D0E
endfunction
function GSE takes nothing returns integer
local integer D0E=UTV
if(D0E!=0)then
set UTV=UWV[D0E]
else
set UUV=UUV+1
set D0E=UUV
endif
if(D0E>8190)then
return 0
endif
set UWV[D0E]=-1
return D0E
endfunction
function GTE takes integer D0E returns nothing
if D0E==null then
return
elseif(UWV[D0E]!=-1)then
return
endif
set UWV[D0E]=UTV
set UTV=D0E
endfunction
function GUE takes nothing returns integer
local integer D0E=UKV
if(D0E!=0)then
set UKV=UMV[D0E]
else
set ULV=ULV+1
set D0E=ULV
endif
if(D0E>8190)then
return 0
endif
set UMV[D0E]=-1
return D0E
endfunction
function GWE takes integer D0E returns nothing
if D0E==null then
return
elseif(UMV[D0E]!=-1)then
return
endif
set UMV[D0E]=UKV
set UKV=D0E
endfunction
function GYE takes nothing returns integer
local integer D0E=UFV
if(D0E!=0)then
set UFV=UHV[D0E]
else
set UGV=UGV+1
set D0E=UGV
endif
if(D0E>8190)then
return 0
endif
set UHV[D0E]=-1
return D0E
endfunction
function GZE takes integer D0E returns nothing
if D0E==null then
return
elseif(UHV[D0E]!=-1)then
return
endif
set UHV[D0E]=UFV
set UFV=D0E
endfunction
function G_E takes nothing returns integer
local integer D0E=UIV
if(D0E!=0)then
set UIV=UNV[D0E]
else
set UAV=UAV+1
set D0E=UAV
endif
if(D0E>8190)then
return 0
endif
set UNV[D0E]=-1
return D0E
endfunction
function G0E takes integer D0E returns nothing
if D0E==null then
return
elseif(UNV[D0E]!=-1)then
return
endif
set UNV[D0E]=UIV
set UIV=D0E
endfunction
function G1E takes nothing returns integer
local integer D0E=T8V
if(D0E!=0)then
set T8V=UVV[D0E]
else
set T9V=T9V+1
set D0E=T9V
endif
if(D0E>8190)then
return 0
endif
set UVV[D0E]=-1
return D0E
endfunction
function G2E takes integer D0E returns nothing
if D0E==null then
return
elseif(UVV[D0E]!=-1)then
return
endif
set UVV[D0E]=T8V
set T8V=D0E
endfunction
function G3E takes nothing returns integer
local integer D0E=T3V
if(D0E!=0)then
set T3V=T5V[D0E]
else
set T4V=T4V+1
set D0E=T4V
endif
if(D0E>8190)then
return 0
endif
set T5V[D0E]=-1
return D0E
endfunction
function G4E takes integer D0E returns nothing
if D0E==null then
return
elseif(T5V[D0E]!=-1)then
return
endif
set T5V[D0E]=T3V
set T3V=D0E
endfunction
function G5E takes nothing returns integer
local integer D0E=TYV
if(D0E!=0)then
set TYV=T_V[D0E]
else
set TZV=TZV+1
set D0E=TZV
endif
if(D0E>8190)then
return 0
endif
set T_V[D0E]=-1
return D0E
endfunction
function G6E takes integer D0E returns nothing
if D0E==null then
return
elseif(T_V[D0E]!=-1)then
return
endif
set T_V[D0E]=TYV
set TYV=D0E
endfunction
function G7E takes nothing returns integer
local integer D0E=TFV
if(D0E!=0)then
set TFV=THV[D0E]
else
set TGV=TGV+1
set D0E=TGV
endif
if(D0E>8190)then
return 0
endif
set THV[D0E]=-1
return D0E
endfunction
function G8E takes integer D0E returns nothing
if D0E==null then
return
elseif(THV[D0E]!=-1)then
return
endif
set THV[D0E]=TFV
set TFV=D0E
endfunction
function G9E takes nothing returns integer
local integer D0E=TNV
if(D0E!=0)then
set TNV=TCV[D0E]
else
set TBV=TBV+1
set D0E=TBV
endif
if(D0E>8190)then
return 0
endif
set TCV[D0E]=-1
return D0E
endfunction
function HVE takes integer D0E returns nothing
if D0E==null then
return
elseif(TCV[D0E]!=-1)then
return
endif
set TCV[D0E]=TNV
set TNV=D0E
endfunction
function HEE takes nothing returns integer
local integer D0E=SLV
if(D0E!=0)then
set SLV=SPV[D0E]
else
set SMV=SMV+1
set D0E=SMV
endif
if(D0E>67)then
return 0
endif
set SUV[D0E]=(D0E-1)*120
set SYV[D0E]=(D0E-1)*120
set S_V[D0E]=(D0E-1)*120
set S1V[D0E]=(D0E-1)*120
set S3V[D0E]=(D0E-1)*120
set S5V[D0E]=(D0E-1)*120
set S7V[D0E]=(D0E-1)*120
set S9V[D0E]=(D0E-1)*120
set TXV[D0E]=(D0E-1)*120
set SPV[D0E]=-1
return D0E
endfunction
function HXE takes integer D0E returns nothing
if D0E==null then
return
elseif(SPV[D0E]!=-1)then
return
endif
set B3E=D0E
call TriggerEvaluate(BFE)
set SPV[D0E]=SLV
set SLV=D0E
endfunction
function HOE takes integer D0E returns nothing
set SJV[SKV[D0E]]=SJV[D0E]
set SKV[SJV[D0E]]=SKV[D0E]
endfunction
function HRE takes nothing returns integer
local integer D0E=SBV
if(D0E!=0)then
set SBV=SDV[D0E]
else
set SCV=SCV+1
set D0E=SCV
endif
if(D0E>8190)then
return 0
endif
set SFV[D0E]=null
set SGV[D0E]=null
set SHV[D0E]=.0
set SDV[D0E]=-1
return D0E
endfunction
function HIE takes integer D0E returns nothing
if D0E==null then
return
elseif(SDV[D0E]!=-1)then
return
endif
set SDV[D0E]=SBV
set SBV=D0E
endfunction
function HAE takes integer D0E returns nothing
set SAV[SNV[D0E]]=SAV[D0E]
set SNV[SAV[D0E]]=SNV[D0E]
endfunction
function HNE takes nothing returns integer
local integer D0E=Q8V
if(D0E!=0)then
set Q8V=SVV[D0E]
else
set Q9V=Q9V+1
set D0E=Q9V
endif
if(D0E>8190)then
return 0
endif
set SEV[D0E]=null
set SXV[D0E]=null
set SOV[D0E]=.0
set SRV[D0E]=0
set SIV[D0E]=0
set SVV[D0E]=-1
return D0E
endfunction
function HBE takes integer D0E returns nothing
if D0E==null then
return
elseif(SVV[D0E]!=-1)then
return
endif
set SVV[D0E]=Q8V
set Q8V=D0E
endfunction
function HCE takes integer D0E returns nothing
set Q6V[Q7V[D0E]]=Q6V[D0E]
set Q7V[Q6V[D0E]]=Q7V[D0E]
endfunction
function HDE takes nothing returns integer
local integer D0E=Q0V
if(D0E!=0)then
set Q0V=Q2V[D0E]
else
set Q1V=Q1V+1
set D0E=Q1V
endif
if(D0E>8190)then
return 0
endif
set Q3V[D0E]=null
set Q4V[D0E]=0
set Q5V[D0E]=0
set Q2V[D0E]=-1
return D0E
endfunction
function HFE takes integer D0E returns nothing
if D0E==null then
return
elseif(Q2V[D0E]!=-1)then
return
endif
set Q2V[D0E]=Q0V
set Q0V=D0E
endfunction
function HGE takes integer D0E returns nothing
set QZV[Q_V[D0E]]=QZV[D0E]
set Q_V[QZV[D0E]]=Q_V[D0E]
endfunction
function HHE takes nothing returns integer
local integer D0E=QQV
if(D0E!=0)then
set QQV=QTV[D0E]
else
set QSV=QSV+1
set D0E=QSV
endif
if(D0E>8190)then
return 0
endif
set QUV[D0E]=null
set QWV[D0E]=null
set QYV[D0E]=.0
set QTV[D0E]=-1
return D0E
endfunction
function HJE takes integer D0E returns nothing
if D0E==null then
return
elseif(QTV[D0E]!=-1)then
return
endif
set QTV[D0E]=QQV
set QQV=D0E
endfunction
function HKE takes integer D0E returns nothing
set QMV[QPV[D0E]]=QMV[D0E]
set QPV[QMV[D0E]]=QPV[D0E]
endfunction
function HLE takes nothing returns integer
local integer D0E=QFV
if(D0E!=0)then
set QFV=QHV[D0E]
else
set QGV=QGV+1
set D0E=QGV
endif
if(D0E>8190)then
return 0
endif
set QJV[D0E]=null
set QKV[D0E]=0
set QLV[D0E]=0
set QHV[D0E]=-1
return D0E
endfunction
function HME takes integer D0E returns nothing
if D0E==null then
return
elseif(QHV[D0E]!=-1)then
return
endif
set QHV[D0E]=QFV
set QFV=D0E
endfunction
function HPE takes integer D0E returns nothing
set QCV[QDV[D0E]]=QCV[D0E]
set QDV[QCV[D0E]]=QDV[D0E]
endfunction
function HQE takes nothing returns integer
local integer D0E=QOV
if(D0E!=0)then
set QOV=QIV[D0E]
else
set QRV=QRV+1
set D0E=QRV
endif
if(D0E>8190)then
return 0
endif
set QAV[D0E]=null
set QNV[D0E]=null
set QBV[D0E]=.0
set QIV[D0E]=-1
return D0E
endfunction
function HSE takes integer D0E returns nothing
if D0E==null then
return
elseif(QIV[D0E]!=-1)then
return
endif
set QIV[D0E]=QOV
set QOV=D0E
endfunction
function HTE takes integer D0E returns nothing
set QEV[QXV[D0E]]=QEV[D0E]
set QXV[QEV[D0E]]=QXV[D0E]
endfunction
function HUE takes nothing returns integer
local integer D0E=P5V
if(D0E!=0)then
set P5V=P7V[D0E]
else
set P6V=P6V+1
set D0E=P6V
endif
if(D0E>8190)then
return 0
endif
set P8V[D0E]=null
set P9V[D0E]=0
set QVV[D0E]=0
set P7V[D0E]=-1
return D0E
endfunction
function HWE takes integer D0E returns nothing
if D0E==null then
return
elseif(P7V[D0E]!=-1)then
return
endif
set P7V[D0E]=P5V
set P5V=D0E
endfunction
function HYE takes integer D0E returns nothing
set P3V[P4V[D0E]]=P3V[D0E]
set P4V[P3V[D0E]]=P4V[D0E]
endfunction
function HZE takes nothing returns integer
local integer D0E=PYV
if(D0E!=0)then
set PYV=P_V[D0E]
else
set PZV=PZV+1
set D0E=PZV
endif
if(D0E>8190)then
return 0
endif
set P0V[D0E]=null
set P1V[D0E]=null
set P2V[D0E]=.0
set P_V[D0E]=-1
return D0E
endfunction
function H_E takes integer D0E returns nothing
if D0E==null then
return
elseif(P_V[D0E]!=-1)then
return
endif
set P_V[D0E]=PYV
set PYV=D0E
endfunction
function H0E takes nothing returns integer
local integer D0E=MDV
if(D0E!=0)then
set MDV=MGV[D0E]
else
set MFV=MFV+1
set D0E=MFV
endif
if(D0E>2729)then
return 0
endif
set M6V[D0E]=(D0E-1)*3
set M8V[D0E]=(D0E-1)*3
set PEV[D0E]=(D0E-1)*3
set POV[D0E]=(D0E-1)*3
set MHV[D0E]=false
set MJV[D0E]=false
set MKV[D0E]=true
set MLV[D0E]=true
set MMV[D0E]=true
set MPV[D0E]=false
set MQV[D0E]=false
set MSV[D0E]=false
set MTV[D0E]=false
set MUV[D0E]=DAMAGE_TYPE_UNIVERSAL
set MWV[D0E]=ATTACK_TYPE_NORMAL
set MYV[D0E]=WEAPON_TYPE_WHOKNOWS
set MZV[D0E]=0
set M_V[D0E]=false
set M0V[D0E]=1.
set M1V[D0E]=false
set M2V[D0E]=null
set M3V[D0E]=false
set M4V[D0E]=null
set M9V[D0E]=0
set PRV[D0E]=0
set PIV[D0E]=false
set MGV[D0E]=-1
return D0E
endfunction
function H1E takes integer D0E returns nothing
set MBV[MCV[D0E]]=MBV[D0E]
set MCV[MBV[D0E]]=MCV[D0E]
endfunction
function H2E takes nothing returns integer
local integer D0E=L6V
if(D0E!=0)then
set L6V=L8V[D0E]
else
set L7V=L7V+1
set D0E=L7V
endif
if(D0E>8190)then
return 0
endif
set L9V[D0E]=null
set MVV[D0E]=null
set MEV[D0E]=null
set MXV[D0E]=.0
set MOV[D0E]=.0
set MRV[D0E]=.0
set MIV[D0E]=.0
set MAV[D0E]=.0
set MNV[D0E]=0
set L8V[D0E]=-1
return D0E
endfunction
function H3E takes integer D0E returns nothing
if D0E==null then
return
elseif(L8V[D0E]!=-1)then
return
endif
set L8V[D0E]=L6V
set L6V=D0E
endfunction
function H4E takes integer D0E returns nothing
set L4V[L5V[D0E]]=L4V[D0E]
set L5V[L4V[D0E]]=L5V[D0E]
endfunction
function H5E takes nothing returns integer
local integer D0E=L_V
if(D0E!=0)then
set L_V=L1V[D0E]
else
set L0V=L0V+1
set D0E=L0V
endif
if(D0E>8190)then
return 0
endif
set L2V[D0E]=null
set L3V[D0E]=.0
set L1V[D0E]=-1
return D0E
endfunction
function H6E takes integer D0E returns nothing
if D0E==null then
return
elseif(L1V[D0E]!=-1)then
return
endif
set L1V[D0E]=L_V
set L_V=D0E
endfunction
function H7E takes nothing returns integer
local integer D0E=LQV
if(D0E!=0)then
set LQV=LTV[D0E]
else
set LSV=LSV+1
set D0E=LSV
endif
if(D0E>8190)then
return 0
endif
set LTV[D0E]=-1
return D0E
endfunction
function H8E takes integer D0E returns nothing
if D0E==null then
return
elseif(LTV[D0E]!=-1)then
return
endif
set LTV[D0E]=LQV
set LQV=D0E
endfunction
function H9E takes nothing returns integer
local integer D0E=LJV
if(D0E!=0)then
set LJV=LLV[D0E]
else
set LKV=LKV+1
set D0E=LKV
endif
if(D0E>8190)then
return 0
endif
set LLV[D0E]=-1
return D0E
endfunction
function JVE takes integer D0E returns nothing
if D0E==null then
return
elseif(LLV[D0E]!=-1)then
return
endif
set LLV[D0E]=LJV
set LJV=D0E
endfunction
function JEE takes nothing returns integer
local integer D0E=LRV
if(D0E!=0)then
set LRV=LAV[D0E]
else
set LIV=LIV+1
set D0E=LIV
endif
if(D0E>8190)then
return 0
endif
set LAV[D0E]=-1
return D0E
endfunction
function JXE takes integer D0E returns nothing
if D0E==null then
return
elseif(LAV[D0E]!=-1)then
return
endif
set LAV[D0E]=LRV
set LRV=D0E
endfunction
function JOE takes nothing returns integer
local integer D0E=K4V
if(D0E!=0)then
set K4V=K6V[D0E]
else
set K5V=K5V+1
set D0E=K5V
endif
if(D0E>8190)then
return 0
endif
set K6V[D0E]=-1
return D0E
endfunction
function JRE takes integer D0E returns nothing
if D0E==null then
return
elseif(K6V[D0E]!=-1)then
return
endif
set K6V[D0E]=K4V
set K4V=D0E
endfunction
function JIE takes nothing returns integer
local integer D0E=K_V
if(D0E!=0)then
set K_V=K1V[D0E]
else
set K0V=K0V+1
set D0E=K0V
endif
if(D0E>8190)then
return 0
endif
set K2V[D0E]=.0
set K3V[D0E]=.0
set K1V[D0E]=-1
return D0E
endfunction
function JAE takes integer D0E returns nothing
if D0E==null then
return
elseif(K1V[D0E]!=-1)then
return
endif
set K1V[D0E]=K_V
set K_V=D0E
endfunction
function JNE takes nothing returns integer
local integer D0E=RYV
if(D0E!=0)then
set RYV=R_V[D0E]
else
set RZV=RZV+1
set D0E=RZV
endif
if(D0E>8190)then
return 0
endif
set R0V[D0E]=null
set R1V[D0E]=.0
set R2V[D0E]=.0
set R3V[D0E]=.0
set R4V[D0E]=.0
set R5V[D0E]=.0
set R6V[D0E]=0
set R7V[D0E]=null
set R8V[D0E]=false
set R9V[D0E]=false
set IVV[D0E]=false
set IEV[D0E]=false
set R_V[D0E]=-1
return D0E
endfunction
function JBE takes nothing returns integer
local integer D0E=J6V
if(D0E!=0)then
set J6V=J8V[D0E]
else
set J7V=J7V+1
set D0E=J7V
endif
if(D0E>8190)then
return 0
endif
set KXV[D0E]=.0
set KOV[D0E]=.0
set KIV[D0E]=1.
set J8V[D0E]=-1
return D0E
endfunction
function JCE takes integer D0E returns nothing
if D0E==null then
return
elseif(J8V[D0E]!=-1)then
return
endif
set J8V[D0E]=J6V
set J6V=D0E
endfunction
function JDE takes integer D0E,integer JFE returns boolean
set B3E=D0E
set B_E=JFE
call TriggerEvaluate(N9E)
return B4E
endfunction
function JGE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(BVE)
endfunction
function JHE takes nothing returns integer
local integer D0E=JQV
if(D0E!=0)then
set JQV=JTV[D0E]
else
set JSV=JSV+1
set D0E=JSV
endif
if(D0E>8190)then
return 0
endif
set JUV[D0E]=0
set JTV[D0E]=-1
return D0E
endfunction
function JJE takes integer D0E returns nothing
if D0E==null then
return
elseif(JTV[D0E]!=-1)then
return
endif
set JTV[D0E]=JQV
set JQV=D0E
endfunction
function JKE takes integer D0E returns integer
set B3E=D0E
call TriggerEvaluate(N3E)
return B5E
endfunction
function JLE takes integer D0E returns integer
set B3E=D0E
call TriggerEvaluate(N4E)
return B5E
endfunction
function JME takes integer D0E returns integer
set B3E=D0E
call TriggerEvaluate(N5E)
return B5E
endfunction
function JPE takes integer D0E returns integer
set B3E=D0E
call TriggerEvaluate(N6E)
return B5E
endfunction
function JQE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(N7E)
endfunction
function JSE takes integer D0E returns nothing
set JHV[JJV[D0E]]=JHV[D0E]
set JJV[JHV[D0E]]=JJV[D0E]
endfunction
function JTE takes nothing returns integer
local integer D0E=GPV
if(D0E!=0)then
set GPV=GSV[D0E]
else
set GQV=GQV+1
set D0E=GQV
endif
if(D0E>8190)then
return 0
endif
set GTV[D0E]=0
set GUV[D0E]=0
set GWV[D0E]=0
set GYV[D0E]=false
set GZV[D0E]=null
set G_V[D0E]=null
set G0V[D0E]=64.
set G1V[D0E]=64.
set G2V[D0E]=.0
set G3V[D0E]=.0
set G4V[D0E]=.0
set G5V[D0E]=1.
set G6V[D0E]=2.
set G7V[D0E]=false
set G8V[D0E]=false
set G9V[D0E]=false
set HVV[D0E]=false
set HEV[D0E]=false
set HXV[D0E]=false
set HOV[D0E]=false
set HRV[D0E]=0
set HIV[D0E]=0
set HAV[D0E]=0
set HNV[D0E]=0
set HBV[D0E]=0
set HCV[D0E]=0
set HDV[D0E]=0
set HFV[D0E]=null
set HGV[D0E]=.0
set HHV[D0E]=.0
set HJV[D0E]=.0
set HKV[D0E]=.0
set HLV[D0E]=.0
set HMV[D0E]=.0
set HPV[D0E]=.0
set HQV[D0E]=.0
set HSV[D0E]=.0
set HTV[D0E]=.0
set HUV[D0E]=.0
set HWV[D0E]=.0
set HYV[D0E]=.0
set HZV[D0E]=null
set H_V[D0E]=null
set H0V[D0E]=""
set H1V[D0E]=false
set H2V[D0E]=false
set H3V[D0E]=true
set H4V[D0E]=.0
set H5V[D0E]=.0
set H6V[D0E]=.0
set H7V[D0E]=.0
set H8V[D0E]=.0
set H9V[D0E]=.0
set JAV[D0E]=null
set JNV[D0E]=.0
set JBV[D0E]=false
set JCV[D0E]=.0
set JDV[D0E]=1.
set JFV[D0E]=false
set JGV[D0E]=0
set GSV[D0E]=-1
return D0E
endfunction
function JUE takes integer D0E returns nothing
if D0E==null then
return
elseif(GSV[D0E]!=-1)then
return
endif
set GSV[D0E]=GPV
set GPV=D0E
endfunction
function JWE takes integer D0E returns nothing
set GLV[GMV[D0E]]=GLV[D0E]
set GMV[GLV[D0E]]=GMV[D0E]
endfunction
function JYE takes nothing returns integer
local integer D0E=GFV
if(D0E!=0)then
set GFV=GHV[D0E]
else
set GGV=GGV+1
set D0E=GGV
endif
if(D0E>8190)then
return 0
endif
set GJV[D0E]=null
set GKV[D0E]=.0
set GHV[D0E]=-1
return D0E
endfunction
function JZE takes integer D0E returns nothing
if D0E==null then
return
elseif(GHV[D0E]!=-1)then
return
endif
set GHV[D0E]=GFV
set GFV=D0E
endfunction
function J_E takes nothing returns integer
local integer D0E=IXV
if(D0E!=0)then
if(D0E<8191)then
set IXV=IRV[D0E]
elseif(D0E<16382)then
set IXV=IIV[D0E-8191]
else
set IXV=IAV[D0E-16382]
endif
else
set IOV=IOV+1
set D0E=IOV
endif
if(D0E>20000)then
return 0
endif
if(D0E<8191)then
set ICV[D0E]=.0
set IGV[D0E]=.0
set IKV[D0E]=.0
set IPV[D0E]=true
set ITV[D0E]=.0
set IYV[D0E]=false
elseif(D0E<16382)then
set INV[D0E-8191]=.0
set IDV[D0E-8191]=.0
set IHV[D0E-8191]=.0
set ILV[D0E-8191]=true
set IQV[D0E-8191]=.0
set IUV[D0E-8191]=false
else
set IBV[D0E-16382]=.0
set IFV[D0E-16382]=.0
set IJV[D0E-16382]=.0
set IMV[D0E-16382]=true
set ISV[D0E-16382]=.0
set IWV[D0E-16382]=false
endif
if(D0E<8191)then
set IRV[D0E]=-1
elseif(D0E<16382)then
set IIV[D0E-8191]=-1
else
set IAV[D0E-16382]=-1
endif
return D0E
endfunction
function J0E takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(FRV[FXV[D0E]])
endfunction
function J1E takes integer D0E,unit J2E returns nothing
set B3E=D0E
set BYE=J2E
call TriggerEvaluate(FIV[FXV[D0E]])
endfunction
function J3E takes integer D0E,destructable J4E returns nothing
set B3E=D0E
set BZE=J4E
call TriggerEvaluate(FAV[FXV[D0E]])
endfunction
function J5E takes integer D0E,real x,real y returns nothing
set B3E=D0E
set BUE=x
set BWE=y
call TriggerEvaluate(FNV[FXV[D0E]])
endfunction
function J6E takes integer D0E,integer J7E returns nothing
set B3E=D0E
set B_E=J7E
call TriggerEvaluate(FBV[FXV[D0E]])
endfunction
function J8E takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(FCV[FXV[D0E]])
endfunction
function J9E takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(FDV[FXV[D0E]])
endfunction
function KVE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(FFV[FXV[D0E]])
endfunction
function KEE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(FGV[FXV[D0E]])
endfunction
function KXE takes integer D0E returns nothing
if D0E==null then
return
elseif(FEV[D0E]!=-1)then
return
endif
set B3E=D0E
call TriggerEvaluate(FOV[FXV[D0E]])
set FEV[D0E]=D9V
set D9V=D0E
endfunction
function KOE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(NUE)
endfunction
function sc__Damage___Detector_AIDS_onInit takes nothing returns nothing
call TriggerEvaluate(NYE)
endfunction
function KRE takes nothing returns integer
local integer D0E=DJV
if(D0E!=0)then
set DJV=DLV[D0E]
else
set DKV=DKV+1
set D0E=DKV
endif
if(D0E>8190)then
return 0
endif
set DMV[D0E]=0
set DQV[D0E]=null
set DSV[D0E]=.0
set DTV[D0E]=255
set DUV[D0E]=255
set DWV[D0E]=255
set DYV[D0E]=255
set DZV[D0E]=0
set DLV[D0E]=-1
return D0E
endfunction
function KIE takes nothing returns integer
local integer D0E=C8V
if(D0E!=0)then
set C8V=DVV[D0E]
else
set C9V=C9V+1
set D0E=C9V
endif
if(D0E>1364)then
return 0
endif
set DXV[D0E]=(D0E-1)*6
set DVV[D0E]=-1
return D0E
endfunction
function KAE takes integer D0E returns nothing
if D0E==null then
return
elseif(DVV[D0E]!=-1)then
return
endif
set B3E=D0E
call TriggerEvaluate(NSE)
set DVV[D0E]=C8V
set C8V=D0E
endfunction
function KNE takes nothing returns integer
local integer D0E=C4V
if(D0E!=0)then
set C4V=C7V[D0E]
else
set C3V=C3V+10
set D0E=C3V
endif
if(D0E>8181)then
return 0
endif
set C7V[D0E]=-1
return D0E
endfunction
function KBE takes integer D0E returns nothing
if D0E==null then
return
elseif(C7V[D0E]!=-1)then
return
endif
set C7V[D0E]=C4V
set C4V=D0E
endfunction
function KCE takes nothing returns integer
local integer D0E=C_V
if(D0E!=0)then
set C_V=C2V[D0E]
else
set CZV=CZV+10
set D0E=CZV
endif
if(D0E>8181)then
return 0
endif
set C2V[D0E]=-1
return D0E
endfunction
function KDE takes integer D0E returns nothing
if D0E==null then
return
elseif(C2V[D0E]!=-1)then
return
endif
set C2V[D0E]=C_V
set C_V=D0E
endfunction
function KFE takes nothing returns integer
local integer D0E=I_V
if(D0E!=0)then
set I_V=I1V[D0E]
else
set I0V=I0V+1
set D0E=I0V
endif
if(D0E>8100)then
return 0
endif
set NBE[D0E]=7
set I1V[D0E]=-1
return D0E
endfunction
function KGE takes integer D0E returns nothing
if D0E==null then
return
elseif(I1V[D0E]!=-1)then
return
endif
set B3E=D0E
call TriggerEvaluate(NCE[NBE[D0E]])
set I1V[D0E]=I_V
set I_V=D0E
endfunction
function KHE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(B3V[B1V[D0E]])
endfunction
function KJE takes integer D0E,unit u returns nothing
set B3E=D0E
set BYE=u
call TriggerEvaluate(B4V[B1V[D0E]])
endfunction
function KKE takes integer D0E,unit u returns nothing
set B3E=D0E
set BYE=u
call TriggerEvaluate(B5V[B1V[D0E]])
endfunction
function KLE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(B6V[B1V[D0E]])
endfunction
function KME takes integer D0E returns nothing
if D0E==null then
return
elseif(B0V[D0E]!=-1)then
return
endif
set B3E=D0E
call TriggerEvaluate(B2V[B1V[D0E]])
set B0V[D0E]=BZV
set BZV=D0E
endfunction
function KPE takes nothing returns integer
local integer D0E=BAV
if(D0E!=0)then
set BAV=BBV[D0E]
else
set BNV=BNV+1
set D0E=BNV
endif
if(D0E>8190)then
return 0
endif
set BBV[D0E]=-1
return D0E
endfunction
function KQE takes integer D0E returns nothing
if D0E==null then
return
elseif(BBV[D0E]!=-1)then
return
endif
set BBV[D0E]=BAV
set BAV=D0E
endfunction
function KSE takes nothing returns integer
local integer D0E=N1V
if(D0E!=0)then
set N1V=N3V[D0E]
else
set N2V=N2V+1
set D0E=N2V
endif
if(D0E>8190)then
return 0
endif
set N3V[D0E]=-1
return D0E
endfunction
function KTE takes integer D0E returns nothing
if D0E==null then
return
elseif(N3V[D0E]!=-1)then
return
endif
set N3V[D0E]=N1V
set N1V=D0E
endfunction
function KUE takes nothing returns integer
local integer D0E=NDV
if(D0E!=0)then
set NDV=NGV[D0E]
else
set NFV=NFV+1
set D0E=NFV
endif
if(D0E>2729)then
return 0
endif
set NWV[D0E]=(D0E-1)*3
set NGV[D0E]=-1
return D0E
endfunction
function KWE takes integer D0E returns nothing
if D0E==null then
return
elseif(NGV[D0E]!=-1)then
return
endif
set NGV[D0E]=NDV
set NDV=D0E
endfunction
function KYE takes integer D0E,real x returns nothing
set B3E=D0E
set BUE=x
call TriggerEvaluate(NJE)
endfunction
function KZE takes integer D0E,real y returns nothing
set B3E=D0E
set BUE=y
call TriggerEvaluate(NKE)
endfunction
function K_E takes integer D0E,real K0E returns nothing
set B3E=D0E
set BUE=K0E
call TriggerEvaluate(NLE)
endfunction
function K1E takes integer D0E,real K2E returns nothing
set B3E=D0E
set BUE=K2E
call TriggerEvaluate(NME)
endfunction
function K3E takes nothing returns integer
local integer D0E=A0V
if(D0E!=0)then
set A0V=A2V[D0E]
else
set A1V=A1V+1
set D0E=A1V
endif
if(D0E>8190)then
return 0
endif
set A4V[D0E]=.0
set A5V[D0E]=15.
set A6V[D0E]=.0
set A7V[D0E]=.0
set A8V[D0E]=.0
set A9V[D0E]=.0
set NVV[D0E]=1.
set NEV[D0E]=1.
set NXV[D0E]=255
set NOV[D0E]=255
set NRV[D0E]=255
set NIV[D0E]=0
set NAV[D0E]=true
set NNV[D0E]=false
set A2V[D0E]=-1
return D0E
endfunction
function K4E takes integer D0E returns nothing
if D0E==null then
return
elseif(A2V[D0E]!=-1)then
return
endif
set A2V[D0E]=A0V
set A0V=D0E
endfunction
function K5E takes nothing returns integer
local integer D0E=ALV
if(D0E!=0)then
set ALV=APV[D0E]
else
set AMV=AMV+1
set D0E=AMV
endif
if(D0E>8190)then
return 0
endif
set APV[D0E]=-1
return D0E
endfunction
function K6E takes integer D0E returns nothing
if D0E==null then
return
elseif(APV[D0E]!=-1)then
return
endif
set APV[D0E]=ALV
set ALV=D0E
endfunction
function K7E takes nothing returns integer
local integer D0E=AAV
if(D0E!=0)then
set AAV=ABV[D0E]
else
set ANV=ANV+1
set D0E=ANV
endif
if(D0E>8190)then
return 0
endif
set ABV[D0E]=-1
return D0E
endfunction
function K8E takes nothing returns integer
local integer D0E=I9V
if(D0E!=0)then
set I9V=AEV[D0E]
else
set AVV=AVV+1
set D0E=AVV
endif
if(D0E>8190)then
return 0
endif
set AEV[D0E]=-1
return D0E
endfunction
function K9E takes nothing returns integer
local integer D0E=I2V
if(D0E!=0)then
set I2V=I4V[D0E]
else
set I3V=I3V+1
set D0E=I3V
endif
if(D0E>8190)then
return 0
endif
set I4V[D0E]=-1
return D0E
endfunction
function LVE takes nothing returns integer
local integer D0E=KFE()
local integer LEE
if(D0E==0)then
return 0
endif
set NBE[D0E]=10
set LEE=D0E
return D0E
endfunction
function s__StringTable__allocate takes nothing returns integer
local integer D0E=KFE()
local integer LEE
if(D0E==0)then
return 0
endif
set NBE[D0E]=9
set LEE=D0E
return D0E
endfunction
function LXE takes nothing returns integer
local integer D0E=KFE()
local integer LEE
if(D0E==0)then
return 0
endif
set NBE[D0E]=8
set LEE=D0E
return D0E
endfunction
function LOE takes nothing returns integer
call TriggerEvaluate(NZE)
return B5E
endfunction
function LRE takes nothing returns integer
local integer LEE
local integer D0E=D9V
if(D0E!=0)then
set D9V=FEV[D0E]
else
set FVV=FVV+1
set D0E=FVV
endif
if(D0E>8190)then
return 0
endif
set FXV[D0E]=34
set LEE=D0E
set FQV[D0E]=.0
set FSV[D0E]=.0
set FTV[D0E]=.0
set FUV[D0E]=.0
set FWV[D0E]=1.
set FYV[D0E]=null
set FZV[D0E]=CreateGroup()
set F_V[D0E]=false
set F0V[D0E]=false
set F1V[D0E]=false
set F2V[D0E]=false
set F3V[D0E]=true
set F4V[D0E]=false
set F5V[D0E]=false
set FEV[D0E]=-1
return D0E
endfunction
function LIE takes integer D0E returns nothing
set CWV[CYV[D0E]]=CWV[D0E]
set CYV[CWV[D0E]]=CYV[D0E]
endfunction
function LAE takes nothing returns integer
local integer LEE
local integer D0E=BZV
if(D0E!=0)then
set BZV=B0V[D0E]
else
set B_V=B_V+1
set D0E=B_V
endif
if(D0E>8190)then
return 0
endif
set B1V[D0E]=22
set LEE=D0E
set CBV[D0E]=false
set B0V[D0E]=-1
return D0E
endfunction
function LNE takes integer D0E returns boolean
set B3E=D0E
call TriggerEvaluate(NAE[FXV[D0E]])
return B4E
endfunction
function LBE takes integer D0E returns nothing
set B3E=D0E
call TriggerEvaluate(NNE[FXV[D0E]])
endfunction
function LCE takes nothing returns integer
local integer D0E=LOE()
local integer LEE
if(D0E==0)then
return 0
endif
set FXV[D0E]=43
set LEE=D0E
set KBV[D0E]=1
set KCV[D0E]=1
set KDV[D0E]=null
set KFV[D0E]=.0
set KGV[D0E]=.0
set KHV[D0E]=.0
set KJV[D0E]=""
set KKV[D0E]=""
set KMV[D0E]=false
set KPV[D0E]=false
set KQV[D0E]=false
set KSV[D0E]=null
return D0E
endfunction
function LDE takes nothing returns integer
local integer D0E=LCE()
local integer LEE
if(D0E==0)then
return 0
endif
set FXV[D0E]=91
set LEE=D0E
set YWV[D0E]=.0
set YYV[D0E]=0
return D0E
endfunction
function LFE takes nothing returns integer
local integer D0E=LCE()
local integer LEE
if(D0E==0)then
return 0
endif
set FXV[D0E]=89
set LEE=D0E
return D0E
endfunction
function LGE takes nothing returns integer
local integer D0E=LCE()
local integer LEE
if(D0E==0)then
return 0
endif
set FXV[D0E]=90
set LEE=D0E
set YUV[D0E]=.0
return D0E
endfunction
function LHE takes integer i,integer a1 returns nothing
set B_E=a1
call TriggerExecute(BHE[i])
endfunction
function LJE takes integer i,trigger a1,integer a2 returns nothing
set B0E=a1
set B_E=a2
call TriggerExecute(BKE[i])
endfunction
function LKE takes integer i,boolexpr a1 returns nothing
set B1E=a1
call TriggerEvaluate(BLE[i])
endfunction
function LLE takes integer i,integer a1,unit a2 returns nothing
set B_E=a1
set BYE=a2
call TriggerExecute(BME[i])
endfunction
function LME takes integer i,integer a1,destructable a2 returns nothing
set B_E=a1
set BZE=a2
call TriggerExecute(BPE[i])
endfunction
function LPE takes integer i,group a1,real a2,real a3 returns nothing
set B2E=a1
set BUE=a2
set BWE=a3
call TriggerExecute(BTE[i])
endfunction
function LQE takes boolexpr a0 returns nothing
call LKE(1,a0)
call DestroyBoolExpr(a0)
endfunction
function LSE takes nothing returns nothing
set V=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'zsmc',.0,.0,.0)
call UnitApplyTimedLife(V,0,.001)
call ShowUnit(V,false)
call UnitAddAbility(V,'Aloc')
endfunction
function LTE takes unit u returns boolean
local integer is=UnitInventorySize(u)
local integer s=0
loop
exitwhen s>=is
if UnitItemInSlot(u,s)==null then
return false
endif
set s=s+1
endloop
return true
endfunction
function LUE takes unit u,item i returns boolean
local integer ic=GetItemCharges(i)
local integer is
local integer il
local integer it
local item ii
local integer LWE
local integer s=0
local real px
local real py
local real ua
if IsItemPowerup(i)then
return false
endif
if ic<=0 then
call DisableTrigger(S1)
call UnitAddItem(u,i)
call EnableTrigger(S1)
else
set is=UnitInventorySize(u)
set il=GetItemLevel(i)
set it=GetItemTypeId(i)
call RemoveItem(i)
loop
set ii=UnitItemInSlot(u,s)
set LWE=GetItemCharges(ii)
if ii!=null and(not A or il==0 or LWE<il)and GetItemTypeId(ii)==it then
if A and il>0 and LWE+ic>il then
call SetItemCharges(ii,il)
set ic=LWE+ic-il
else
call SetItemCharges(ii,LWE+ic)
set ic=0
endif
endif
set s=s+1
exitwhen ic<=0 or s>=is
endloop
if ic>0 then
set px=GetUnitX(u)
set py=GetUnitY(u)
set s=0
loop
set ii=UnitItemInSlot(u,s)
if ii==null then
set ii=CreateItem(it,px,py)
if A and il>0 and ic>il then
call SetItemCharges(ii,il)
set ic=ic-il
else
call SetItemCharges(ii,ic)
set ic=0
endif
call DisableTrigger(S1)
call UnitAddItem(u,ii)
call EnableTrigger(S1)
endif
set s=s+1
exitwhen ic<=0 or s>=is
endloop
if ic>0 then
set ua=GetUnitFacing(u)
set px=GetUnitX(u)+100*Cos(ua*bj_DEGTORAD)
set py=GetUnitY(u)+100*Sin(ua*bj_DEGTORAD)
loop
if ic>il then
set LWE=il
set ic=ic-il
else
set LWE=ic
set ic=0
endif
set ii=CreateItem(it,px,py)
call SetItemCharges(ii,LWE)
exitwhen ic<=0
endloop
return true
endif
endif
endif
return false
endfunction
function LYE takes nothing returns nothing
local unit u
local item i
local item ii
local integer x=0
local integer o
local real px
local real py
local player p
local string LZE
local sound L_E
if J>0 then
loop
set u=B[x]
set i=D[x]
if u!=null and i!=null and not IsItemOwned(i)and GetWidgetLife(i)>0 and GetWidgetLife(u)>0 then
set o=GetUnitCurrentOrder(u)
set px=GetItemX(i)-GetUnitX(u)
set py=GetItemY(i)-GetUnitY(u)
if px*px+py*py<=22500 or o!=851986 then
if o==851986 then
set p=GetOwningPlayer(u)
set LZE="Sound\\Interface\\PickUpItem.wav"
if GetLocalPlayer()!=p then
set LZE=""
endif
set L_E=CreateSound(LZE,false,true,false,12700,12700,"")
call AttachSoundToUnit(L_E,u)
call SetSoundVolume(L_E,75)
call SetSoundDistances(L_E,600.,1024.)
call SetSoundDistanceCutoff(L_E,1536.)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
call IssueImmediateOrderById(u,851972)
call SetUnitFacing(u,bj_RADTODEG*Atan2(GetItemY(i)-GetUnitY(u),GetItemX(i)-GetUnitX(u)))
if LUE(u,i)then
set LZE="Sound\\Interface\\HeroDropItem1.wav"
if GetLocalPlayer()!=p then
set LZE=""
endif
set L_E=CreateSound(LZE,false,true,false,12700,12700,"")
call AttachSoundToUnit(L_E,u)
call SetSoundVolume(L_E,75)
call SetSoundDistances(L_E,600.,1024.)
call SetSoundDistanceCutoff(L_E,1536.)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
endif
endif
set J=J-1
if J>0 then
set B[x]=B[J]
set D[x]=D[J]
set x=x-1
endif
endif
elseif u!=null or i!=null then
call IssueImmediateOrderById(u,851972)
set J=J-1
if J>0 then
set B[x]=B[J]
set D[x]=D[J]
set x=x-1
endif
endif
set x=x+1
exitwhen x>=J
endloop
endif
if O and K>0 then
set x=0
loop
set u=C[x]
set i=F[x]
set ii=G[x]
set px=H[x]
if u!=null and i!=null and ii!=null and px>0 and UnitHasItem(u,i)and UnitHasItem(u,ii)then
set H[x]=px-.05
else
set K=K-1
if K>0 then
set C[x]=C[K]
set F[x]=F[K]
set G[x]=G[K]
set H[x]=H[K]
set x=x-1
endif
endif
set x=x+1
exitwhen x>=K
endloop
endif
if J<=0 and(not O or K<=0)then
call PauseTimer(L)
endif
set u=null
set i=null
set p=null
set L_E=null
endfunction
function L0E takes nothing returns boolean
local integer x=0
if J>0 then
loop
if B[x]==GetTriggerUnit()and(GetOrderPointX()!=GetItemX(D[x])or GetOrderPointY()!=GetItemY(D[x]))then
set J=J-1
if J>0 then
set B[x]=B[J]
set D[x]=D[J]
set x=x-1
elseif not O or K<=0 then
call PauseTimer(L)
endif
endif
set x=x+1
exitwhen x>=J
endloop
endif
return false
endfunction
function L1E takes nothing returns boolean
local item i=GetOrderTargetItem()
local integer o=GetIssuedOrderId()
local unit u
local player p
local item ii
local integer is
local integer L2E
local integer s
local integer ss
local boolean L3E
local real ua
local string LZE
local sound L_E
if i==null then
set i=GetManipulatedItem()
endif
set s=GetItemCharges(i)
if i!=null and(o==851971 or(s>0 and(o==0 or(o>852001 and o<852008))))then
set u=GetTriggerUnit()
set is=UnitInventorySize(u)
if is>0 then
if o>852001 and o<852008 then
if UnitHasItem(u,i)then
set o=o-852002
set ii=UnitItemInSlot(u,o)
if GetItemTypeId(ii)==GetItemTypeId(i)then
if ii==i then
if E then
set L3E=LTE(u)
if s>1 and(I or not L3E)then
if X>0 then
if X>=s then
set ss=s-1
else
set ss=X
endif
else
set ss=s/2
endif
call SetItemCharges(i,s-ss)
if O then
set ii=null
if K>0 then
set o=0
loop
if u==C[o]then
set ii=G[o]
set L2E=GetItemCharges(ii)
set s=GetItemLevel(ii)
exitwhen true
endif
set o=o+1
exitwhen o>=K
endloop
endif
endif
if O and ii!=null and ii!=i and F[o]==i and(not A or s==0 or L2E<s)and UnitHasItem(u,ii)and GetItemTypeId(ii)==GetItemTypeId(i)then
call SetItemCharges(ii,L2E+ss)
set H[o]=R
else
set ua=GetUnitFacing(u)
set ii=CreateItem(GetItemTypeId(i),GetUnitX(u)+100*Cos(ua*bj_DEGTORAD),GetUnitY(u)+100*Sin(ua*bj_DEGTORAD))
call SetItemCharges(ii,ss)
if not L3E then
call DisableTrigger(S1)
call UnitAddItem(u,ii)
call EnableTrigger(S1)
if O then
set o=0
if K>0 then
loop
if C[o]==u then
set F[o]=i
set G[o]=ii
set H[o]=R
set o=-1
else
set o=o+1
endif
exitwhen o>=K or o==-1
endloop
endif
if o>=0 then
if K==0 then
call TimerStart(L,.05,true,function LYE)
endif
set C[K]=u
set F[K]=i
set G[K]=ii
set H[K]=R
set K=K+1
endif
endif
else
set p=GetOwningPlayer(u)
set LZE="Sound\\Interface\\HeroDropItem1.wav"
if GetLocalPlayer()!=p then
set LZE=""
endif
set L_E=CreateSound(LZE,false,true,false,12700,12700,"")
call AttachSoundToUnit(L_E,u)
call SetSoundVolume(L_E,75)
call SetSoundDistances(L_E,600.,1024.)
call SetSoundDistanceCutoff(L_E,1536.)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
endif
endif
endif
endif
else
set is=GetItemLevel(i)
set L2E=GetItemCharges(ii)
if A and is>0 and L2E+s>is then
if o<is and L2E<GetItemLevel(ii)then
call SetItemCharges(ii,L2E+s-is)
call SetItemCharges(i,is)
endif
else
call SetItemCharges(ii,L2E+s)
call RemoveItem(i)
endif
endif
endif
endif
elseif o==851971 then
if LTE(u)then
set o=GetItemLevel(i)
set L2E=GetItemTypeId(i)
set s=0
loop
set ii=UnitItemInSlot(u,s)
if ii!=i and GetItemTypeId(ii)==L2E and(not A or o==0 or GetItemCharges(ii)<o)then
set s=is+1
else
set s=s+1
endif
exitwhen s>=is
endloop
if s>is and GetItemCharges(i)>0 then
set s=0
if J>0 then
loop
if B[s]==u then
set D[s]=i
set s=-1
else
set s=s+1
endif
exitwhen s>=J or s==-1
endloop
endif
if s>=0 then
if J==0 then
call TimerStart(L,.05,true,function LYE)
endif
set B[J]=u
set D[J]=i
set J=J+1
endif
call IssuePointOrderById(u,851986,GetItemX(i),GetItemY(i))
else
call IssueImmediateOrderById(u,851972)
set p=GetOwningPlayer(u)
if N!=null and N!="" then
set LZE=N
if GetLocalPlayer()!=p then
set LZE=""
endif
set L_E=CreateSound(LZE,false,false,false,12700,12700,"")
call SetSoundVolume(L_E,127)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
endif
endif
endif
else
if LUE(u,i)then
set p=GetOwningPlayer(u)
set LZE="Sound\\Interface\\Sound\\Interface\\HeroDropItem1.wav.wav"
if GetLocalPlayer()!=p then
set LZE=""
endif
set L_E=CreateSound(LZE,false,true,false,12700,12700,"")
call AttachSoundToUnit(L_E,u)
call SetSoundVolume(L_E,75)
call SetSoundDistances(L_E,600.,1024.)
call SetSoundDistanceCutoff(L_E,1536.)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
endif
endif
endif
endif
set u=null
set p=null
set i=null
set ii=null
set L_E=null
return false
endfunction
function L4E takes nothing returns boolean
local string array LZE
local sound L_E
local integer x=0
set LZE[0]="Sound\\Interface\\PickUpItem.wav"
set LZE[1]="Sound\\Interface\\HeroDropItem1.wav"
if N!=null and N!="" then
set LZE[2]=N
endif
loop
exitwhen LZE[x]==null
set L_E=CreateSound(LZE[x],false,false,false,12700,12700,"")
call SetSoundVolume(L_E,0)
call StartSound(L_E)
call KillSoundWhenDone(L_E)
set x=x+1
endloop
set L_E=null
call DestroyTrigger(GetTriggeringTrigger())
return false
endfunction
function L5E takes nothing returns nothing
local trigger L6E=CreateTrigger()
local trigger L7E=CreateTrigger()
local integer x=0
set S1=CreateTrigger()
loop
call TriggerRegisterPlayerUnitEvent(S1,Player(x),EVENT_PLAYER_UNIT_PICKUP_ITEM,null)
call TriggerRegisterPlayerUnitEvent(S1,Player(x),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerRegisterPlayerUnitEvent(L6E,Player(x),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
set x=x+1
exitwhen x>=16
endloop
call TriggerRegisterTimerEvent(L7E,.0,false)
call TriggerAddCondition(S1,Condition(function L1E))
call TriggerAddCondition(L6E,Condition(function L0E))
call TriggerAddCondition(L7E,Condition(function L4E))
endfunction
function L8E takes string L9E,real x,real y,real z returns effect
set M=CreateDestructableZ('OTip',x,y,z,.0,1.,0)
set P=AddSpecialEffect(L9E,x,y)
call RemoveDestructable(M)
return P
endfunction
function s__Event___EventStack_increment takes nothing returns nothing
set RKV=(RKV+1)
endfunction
function s__Event___EventStack_decrement takes nothing returns nothing
set RKV=(RKV-1)
endfunction
function s__Event_getTriggeringEventReg takes nothing returns integer
return RLV[RKV]
endfunction
function MVE takes nothing returns integer
local integer D0E=GBE()
set RTV[D0E]=D0E
set RUV[D0E]=D0E
return D0E
endfunction
function MEE takes integer D0E returns nothing
local integer MXE=RTV[D0E]
set RKV=(RKV+1)
loop
exitwhen MXE==D0E
set RWV=RSV[MXE]
if IsTriggerEnabled(RWV)then
set RLV[RKV]=MXE
if TriggerEvaluate(RWV)then
call TriggerExecute(RWV)
endif
else
call EnableTrigger(RWV)
if IsTriggerEnabled(RWV)then
call DisableTrigger(RWV)
else
set RUV[RTV[MXE]]=RUV[MXE]
set RTV[RUV[MXE]]=RTV[MXE]
call GCE(MXE)
endif
endif
set MXE=RTV[MXE]
endloop
set RKV=(RKV-1)
endfunction
function MOE takes integer D0E,trigger t returns integer
local integer MRE=GBE()
set RUV[MRE]=RUV[D0E]
set RTV[RUV[D0E]]=MRE
set RUV[D0E]=MRE
set RTV[MRE]=D0E
set RSV[MRE]=t
set RJV[((MRE))]=0
return MRE
endfunction
function CreateEvent takes nothing returns integer
return MVE()
endfunction
function GetTriggeringEventReg takes nothing returns integer
return(RLV[RKV])
endfunction
function MAE takes handle h returns nothing
local integer id=GetHandleId(h)
local integer qi
if HaveSavedInteger(Q,id,0)then
set qi=LoadInteger(Q,id,0)
set AYE[qi]=AYE[qi]+1
elseif T>0 then
set T=T-1
set AYE[AZE[T]]=1
call SaveInteger(Q,id,0,AZE[T])
else
set AYE[S]=1
call SaveInteger(Q,id,0,S)
set S=S+1
endif
endfunction
function MNE takes handle h returns nothing
local integer id=GetHandleId(h)
local integer qi=LoadInteger(Q,id,0)
set AYE[qi]=AYE[qi]-1
if AYE[qi]==0 then
set AZE[T]=qi
set T=T+1
call FlushChildHashtable(Q,id)
endif
endfunction
function MBE takes nothing returns nothing
if IsItemVisible(GetEnumItem())then
set Y[Z]=GetEnumItem()
call SetItemVisible(Y[Z],false)
set Z=Z+1
endif
endfunction
function MCE takes real x1,real y1 returns boolean
local real x2=.0
local real y2=.0
call SetRect(IV,.0,.0,128.,128.)
call MoveRectTo(IV,x1,y1)
call EnumItemsInRect(IV,null,function MBE)
call SetItemPosition(NV,x1,y1)
set x2=GetItemX(NV)
set y2=GetItemY(NV)
call SetItemVisible(NV,false)
loop
exitwhen Z<=0
set Z=Z-1
call SetItemVisible(Y[Z],true)
set Y[Z]=null
endloop
return(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)<10.*10.
endfunction
function MDE takes nothing returns nothing
if W[0]then
call KillDestructable(GetEnumDestructable())
else
set W[1]=true
endif
endfunction
function MFE takes nothing returns boolean
local destructable MGE=GetFilterDestructable()
local boolean MHE=false
if GetDestructableLife(MGE)>.405 then
call ShowUnit(AV,true)
call SetUnitX(AV,GetWidgetX(MGE))
call SetUnitY(AV,GetWidgetY(MGE))
set MHE=IssueTargetOrderById(AV,852018,MGE)
call IssueImmediateOrderById(AV,851972)
call ShowUnit(AV,false)
set MGE=null
return MHE
endif
set MGE=null
return MHE
endfunction
function MJE takes real x,real y returns boolean
return(x>EV or y>OV or x<XV or y<RV)
endfunction
function MKE takes integer D0E returns integer
local real x=GetUnitX(R0V[D0E])
local real y=GetUnitY(R0V[D0E])
if IsTerrainPathable(x,y,PATHING_TYPE_FLOATABILITY)then
return 1
elseif not IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then
return 2
endif
return 0
endfunction
function MLE takes unit MME,real MPE,real MQE,real MSE,string MTE,real MUE,boolean MWE,boolean MYE returns integer
local integer d=JNE()
set R0V[d]=MME
set R1V[d]=(2.*MPE)/(MQE+1.)
set R2V[d]=R1V[d]/MQE
set R3V[d]=Sin(MSE)
set R4V[d]=Cos(MSE)
set R5V[d]=MUE
set R9V[d]=MWE
set IVV[d]=MYE
set R6V[d]=MKE(d)
if MTE!="" and MTE!=null then
set R8V[d]=true
endif
if R8V[d]then
set R7V[d]=AddSpecialEffectTarget(MTE,R0V[d],"chest")
else
if R6V[d]==1 then
set R7V[d]=AddSpecialEffectTarget("war3mapImported\\Dust.mdx",R0V[d],"chest")
elseif R6V[d]==2 then
set R7V[d]=AddSpecialEffectTarget("war3mapImported\\SlideWater.mdx",R0V[d],"chest")
endif
endif
return d
endfunction
function MZE takes integer D0E returns nothing
set R0V[D0E]=null
if R7V[D0E]!=null then
call DestroyEffect(R7V[D0E])
set R7V[D0E]=null
endif
set W[0]=false
set W[1]=false
endfunction
function M_E takes integer D0E returns nothing
if D0E==null then
return
elseif(R_V[D0E]!=-1)then
return
endif
call MZE(D0E)
set R_V[D0E]=RYV
set RYV=D0E
endfunction
function M0E takes nothing returns nothing
local integer i=1
local integer M1E=0
local integer M2E=0
local integer d=0
local real x=.0
local real y=.0
local real M3E=.0
local real M4E=.0
loop
exitwhen i>VV
set d=U[i]
set M1E=R6V[d]
set x=GetUnitX(R0V[d])
set y=GetUnitY(R0V[d])
if R5V[d]!=.0 then
set W[0]=R5V[d]>.0
call SetRect(IV,x-R5V[d],y-R5V[d],x+R5V[d],y+R5V[d])
call EnumDestructablesInRect(IV,CV,function MDE)
endif
if IVV[d]then
if MCE(x+50.*R4V[d],y+50.*R3V[d])==false then
set M2E=1
if true then
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y))
endif
endif
endif
if not R8V[d]then
set R6V[d]=MKE(d)
if R6V[d]==1 and M1E==2 then
call DestroyEffect(R7V[d])
set R7V[d]=AddSpecialEffectTarget("war3mapImported\\Dust.mdx",R0V[d],"chest")
elseif R6V[d]==2 and M1E==1 then
call DestroyEffect(R7V[d])
set R7V[d]=AddSpecialEffectTarget("war3mapImported\\SlideWater.mdx",R0V[d],"chest")
endif
endif
if R1V[d]<=0 or MJE(x,y)or W[1]or M2E==1 or IEV[d]then
call M_E(d)
set U[i]=U[VV]
set VV=VV-1
set i=i-1
set M2E=0
else
set M3E=x+R1V[d]*R4V[d]
set M4E=y+R1V[d]*R3V[d]
if R9V[d]then
call SetUnitX(R0V[d],M3E)
call SetUnitY(R0V[d],M4E)
else
call SetUnitPosition(R0V[d],M3E,M4E)
endif
set R1V[d]=R1V[d]-R2V[d]
endif
set i=i+1
endloop
if VV<=0 then
call PauseTimer(BV)
set VV=0
endif
endfunction
function M5E takes unit MME returns boolean
local integer i=1
loop
exitwhen i>VV
if R0V[U[i]]==MME then
return true
endif
set i=i+1
endloop
return false
endfunction
function M6E takes unit MME,real MPE,real MQE,real MSE,string MTE,real MUE,boolean MWE,boolean MYE returns boolean
local integer d=0
if MME==null or MPE<=.0 or MQE<=.0 then
return false
endif
set d=MLE(MME,MPE,(MQE/.04),(MSE*.01745328),MTE,MUE,MWE,MYE)
set VV=VV+1
if VV==1 then
call TimerStart(BV,.04,true,function M0E)
endif
set U[VV]=d
return true
endfunction
function M7E takes nothing returns nothing
set BV=CreateTimer()
set IV=Rect(.0,.0,1.,1.)
set CV=Filter(function MFE)
set EV=GetRectMaxX(bj_mapInitialPlayableArea)-64.
set OV=GetRectMaxY(bj_mapInitialPlayableArea)-64.
set XV=GetRectMinX(bj_mapInitialPlayableArea)+64.
set RV=GetRectMinY(bj_mapInitialPlayableArea)+64.
set W[0]=false
set W[1]=false
set AV=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h007',.0,.0,.0)
call SetUnitPathing(AV,false)
call ShowUnit(AV,false)
call UnitAddAbility(AV,'Ahrl')
call UnitAddAbility(AV,'Aloc')
set NV=CreateItem('ciri',.0,.0)
call SetItemVisible(NV,false)
endfunction
function M8E takes nothing returns nothing
set EE=R2I(TimerGetTimeout(GetExpiredTimer())*800)
set XE=HV[EE]
call TriggerEvaluate(FV[EE])
set XE=0
loop
exitwhen XE==VE
set XE=XE+1
if ZV[XE]then
set JV[UV[XE]]=TriggerAddCondition(FV[EE],KV[UV[XE]])
else
call TriggerRemoveCondition(FV[EE],WV[XE])
call LQE(YV[XE])
endif
endloop
set VE=0
set EE=-1
endfunction
function M9E takes nothing returns boolean
set VE=VE+1
set ZV[VE]=false
set WV[VE]=JV[OE]
set YV[VE]=KV[OE]
if MV[OE]==0 then
set HV[EE]=PV[OE]
endif
set PV[MV[OE]]=PV[OE]
if PV[OE]==0 then
set GV[EE]=MV[OE]
if GV[EE]<1 then
call PauseTimer(DV[EE])
endif
else
set MV[PV[OE]]=MV[OE]
endif
set SV[TV]=OE
set TV=TV+1
return false
endfunction
function PVE takes code PEE,integer PXE,real POE returns nothing
set RE=R2I(POE*800)
if DV[RE]==null then
set DV[RE]=CreateTimer()
set FV[RE]=CreateTrigger()
endif
if TV==1 then
set QV=QV+1
set IE=QV
else
set TV=TV-1
set IE=SV[TV]
endif
set KV[IE]=And(Condition(PEE),AE)
if EE==RE then
set VE=VE+1
set ZV[VE]=true
set UV[VE]=IE
else
if GV[RE]<1 then
call TimerStart(DV[RE],RE/800.,true,function M8E)
set HV[RE]=IE
endif
set JV[IE]=TriggerAddCondition(FV[RE],KV[IE])
endif
set LV[IE]=PXE
set PV[IE]=0
set MV[IE]=GV[RE]
set PV[GV[RE]]=IE
set GV[RE]=IE
endfunction
function PRE takes nothing returns integer
set OE=XE
set XE=PV[XE]
return LV[OE]
endfunction
function KT__KTinit takes nothing returns nothing
set AE=Condition(function M9E)
endfunction
function PIE takes nothing returns boolean
set KE=PRE()
call TriggerExecute(HE[KE])
set JE[KE]=JE[KE]-1
if JE[KE]==0 then
set GE=GE+1
set FE[GE]=HE[KE]
return true
endif
return false
endfunction
function PAE takes nothing returns boolean
set LE=GetTriggeringTrigger()
set ME=GetTriggerExecCount(LE)
call DestroyTrigger(LE)
call LQE(DE[ME])
set HE[ME]=CreateTrigger()
set JE[ME]=ME
call PVE(function PIE,ME,.03125)
return false
endfunction
function PNE takes nothing returns boolean
set XE=8190
set LV[8190]=CE[GetTriggerExecCount(GetTriggeringTrigger())]
return false
endfunction
function PBE takes code PEE,integer PXE,real POE returns nothing
set QE=FE[GE]
set PE=GetTriggerExecCount(QE)
set GE=GE-1
set CE[PE]=PXE
set DE[PE]=And(Condition(PEE),BE)
call TriggerAddCondition(QE,NE)
call TriggerAddCondition(QE,DE[PE])
call TriggerRegisterTimerEvent(QE,POE,true)
endfunction
function PCE takes trigger t,integer d returns nothing
if d>64 then
call LJE(1,t,d-64)
set d=64
endif
loop
exitwhen d==0
set d=d-1
call TriggerExecute(t)
endloop
endfunction
function PDE takes nothing returns nothing
set NE=Condition(function PNE)
set BE=Condition(function PAE)
set MV[8190]=8190
set PV[8190]=8190
loop
set GE=GE+1
set FE[GE]=CreateTrigger()
call LJE(1,FE[GE],64+1-GE)
exitwhen GE==64
endloop
endfunction
function PFE takes code PEE,integer PXE,real POE returns nothing
if POE<.3 then
call PVE(PEE,PXE,POE)
else
call PBE(PEE,PXE,POE)
endif
endfunction
function PGE takes nothing returns nothing
set AE=Condition(function M9E)
call PDE()
endfunction
function PHE takes real x returns real
local real PJE=-88.
local real PKE=88.
local real PLE
local integer i=20
loop
set PLE=(PJE+PKE)/2
exitwhen(i<=0)
set i=i-1
if(Pow(bj_E,PLE)>=x)then
set PKE=PLE
else
set PJE=PLE
endif
endloop
return PLE
endfunction
function PME takes unit u returns nothing
call UnitAddAbility(u,'Amrf')
call UnitRemoveAbility(u,'Amrf')
endfunction
function PPE takes real x,real y,real xt,real yt returns real
local real dx=xt-x
local real dy=yt-y
return SquareRoot(dx*dx+dy*dy)
endfunction
function PQE takes nothing returns boolean
return true
endfunction
function PSE takes real CHE,real x,real y returns group
call GroupEnumUnitsInRange(SE,x,y,CHE,WE)
return SE
endfunction
function PTE takes real x,real y returns real
call MoveLocation(UE,x,y)
return GetLocationZ(UE)
endfunction
function PUE takes real PWE,real zs,real zt,real q returns real
return(PWE*Sin(q*bj_PI))+q*(zt-zs)
endfunction
function PYE takes unit c,unit u returns boolean
if IsUnitEnemy(u,GetOwningPlayer(c))then
if GetUnitState(u,UNIT_STATE_LIFE)>.0 then
if GetUnitAbilityLevel(u,'Avul')<=0 then
if IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false then
return IsUnitType(u,UNIT_TYPE_STRUCTURE)==false
endif
endif
endif
endif
return false
endfunction
function PZE takes unit u returns boolean
if IsUnitType(u,UNIT_TYPE_RESISTANT)==false then
if IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE)==false then
if GetUnitState(u,UNIT_STATE_LIFE)>.0 then
if GetUnitAbilityLevel(u,'Avul')<=0 then
return GetUnitAbilityLevel(u,'Bprg')<=0
endif
endif
endif
endif
return false
endfunction
function P_E takes nothing returns nothing
set TE=CreateItem('sehr',0,0)
set UE=Location(0,0)
set SE=CreateGroup()
set WE=Filter(function PQE)
call SetItemVisible(TE,false)
endfunction
function P0E takes real CDE returns real
local real r=CDE
loop
exitwhen r>=0 and r<=360
if r<0 then
set r=r+360
elseif r>360 then
set r=r-360
endif
endloop
return r
endfunction
function P1E takes real x0,real y0,real x1,real y1 returns real
return Atan2((y1-y0),(x1-x0))
endfunction
function P4E takes real h,real d,real x returns real
return(4*h/d)*(d-x)*(x/d)
endfunction
function P5E takes real h,real d,real x,real z0,real z1 returns real
return(4*h/d)*(d-x)*(x/d)+(((z1-z0)/d)*x+z0)
endfunction
function P6E takes integer D0E returns nothing
call DZE(D0E,false)
call DWE(D0E,.0)
call DTE(D0E,true)
endfunction
function P7E takes integer D0E returns nothing
if D0E==null then
return
elseif(IRV[D0E]!=-1)then
return
endif
call P6E(D0E)
set IRV[D0E]=IXV
set IXV=D0E
endfunction
function P8E takes real x,real y,real z returns integer
local integer P9E=J_E()
call DKE(P9E,x)
call DME(P9E,y)
call DQE(P9E,z)
call DZE(P9E,true)
if P9E==IZV then
set IZV=IZV+1
endif
return P9E
endfunction
function QVE takes integer D0E returns real
return SquareRoot(DJE(D0E)*DJE(D0E)+DLE(D0E)*DLE(D0E)+DPE(D0E)*DPE(D0E))
endfunction
function QEE takes integer D0E returns real
return P1E(.0,.0,DJE(D0E),DLE(D0E))
endfunction
function QOE takes integer D0E,integer QRE returns nothing
call DKE(D0E,DJE(D0E)+DJE(QRE))
call DME(D0E,DLE(D0E)+DLE(QRE))
call DQE(D0E,DPE(D0E)+DPE(QRE))
endfunction
function QIE takes integer QAE,integer QNE returns integer
return P8E(DJE(QNE)-DJE(QAE),DLE(QNE)-DLE(QAE),DPE(QNE)-DPE(QAE))
endfunction
function QBE takes integer D0E,real QCE returns nothing
call DKE(D0E,DJE(D0E)*QCE)
call DME(D0E,DLE(D0E)*QCE)
call DQE(D0E,DPE(D0E)*QCE)
endfunction
function QDE takes integer a,real QCE returns integer
return P8E(DJE(a)*QCE,DLE(a)*QCE,DPE(a)*QCE)
endfunction
function QGE takes integer a returns integer
return QDE(a,1/QVE(a))
endfunction
function QHE takes integer D0E,real x,real y,real z,real CHE returns boolean
if DJE(D0E)>x-CHE and DJE(D0E)<x+CHE and DLE(D0E)>y-CHE and DLE(D0E)<y+CHE and DPE(D0E)>z-CHE and DPE(D0E)<z+CHE then
return true
else
return false
endif
endfunction
function QJE takes integer a,integer b,real CHE returns boolean
return QHE(a,DJE(b),DLE(b),DPE(b),CHE)
endfunction
function QKE takes nothing returns nothing
local integer i=0
loop
exitwhen i==IZV
if DSE((i))and DYE((i))then
if DUE((i))>=.1 then
call DZE((i),false)
call P7E((i))
endif
call DWE((i),DUE((i))+.05)
endif
set i=i+1
endloop
endfunction
function QLE takes nothing returns nothing
call TimerStart(ZE,.05,true,function QKE)
endfunction
function QME takes real x,real y returns real
call MoveLocation(YE,x,y)
return GetLocationZ(YE)
endfunction
function QPE takes nothing returns boolean
if(GetWidgetLife(GetManipulatedItem())==0)then
call RemoveItem(GetManipulatedItem())
endif
return false
endfunction
function QQE takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddCondition(t,Condition(function QPE))
endfunction
function QSE takes nothing returns nothing
set VX=Location(.0,.0)
set EX=Location(.0,.0)
endfunction
function QTE takes real x1,real y1,real x2,real y2 returns real
return SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
endfunction
function QUE takes real x1,real y1,real x2,real y2 returns real
return bj_RADTODEG*(Atan2(y2-y1,x2-x1))
endfunction
function QWE takes real CDE,real x,real y,real QYE,real QZE returns real
return 2.*Atan2(QZE-y,QYE-x)+bj_PI-CDE*bj_DEGTORAD
endfunction
function Q_E takes player Q0E,string Q1E returns nothing
set Q1E="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n|cffffcc00"+Q1E+"|r"
if(GetLocalPlayer()==Q0E)then
call ClearTextMessages()
call DisplayTimedTextToPlayer(Q0E,.52,.96,2.,Q1E)
call StartSound(AX)
endif
endfunction
function Q2E takes nothing returns nothing
set AX=CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
endfunction
function Q3E takes nothing returns nothing
set NX=NX+1
call TriggerEvaluate(BX)
endfunction
function Q4E takes nothing returns nothing
call TimerStart(CreateTimer(),.03125,true,function Q3E)
endfunction
function Q5E takes nothing returns nothing
set CX=InitHashtable()
endfunction
function Q6E takes unit J2E,string Q7E,string C9E returns nothing
local texttag tt=CreateTextTag()
local real Q8E=RMinBJ(StringLength(Q7E)*5.5,200.)
call SetTextTagText(tt,C9E+Q7E,.024)
call SetTextTagPos(tt,GetUnitX(J2E)-Q8E,GetUnitY(J2E),16.)
call SetTextTagVelocity(tt,.0,.04)
call SetTextTagVisibility(tt,true)
call SetTextTagFadepoint(tt,2.5)
call SetTextTagLifespan(tt,4.)
call SetTextTagPermanent(tt,false)
set tt=null
endfunction
function Q9E takes unit J2E,integer SVE returns nothing
local texttag tt=CreateTextTag()
local string Q7E="-"+I2S(SVE)
call SetTextTagText(tt,Q7E,.024)
call SetTextTagPos(tt,GetUnitX(J2E)-16.,GetUnitY(J2E),.0)
call SetTextTagColor(tt,82,82,255,255)
call SetTextTagVelocity(tt,.0,.04)
call SetTextTagVisibility(tt,true)
call SetTextTagFadepoint(tt,2.)
call SetTextTagLifespan(tt,5.)
call SetTextTagPermanent(tt,false)
set Q7E=null
set tt=null
endfunction
function SEE takes unit J2E,integer SVE returns nothing
local texttag tt=CreateTextTag()
local string Q7E=I2S(SVE)+"!"
call SetTextTagText(tt,Q7E,.024)
call SetTextTagPos(tt,GetUnitX(J2E),GetUnitY(J2E),.0)
call SetTextTagColor(tt,255,0,0,255)
call SetTextTagVelocity(tt,.0,.04)
call SetTextTagVisibility(tt,true)
call SetTextTagFadepoint(tt,2.)
call SetTextTagLifespan(tt,5.)
call SetTextTagPermanent(tt,false)
set Q7E=null
set tt=null
endfunction
//function SRE takes nothing returns nothing
//local integer i=0
//local integer o=-1
//local boolean oops=false
//set FX=InitHashtable()
//loop
//exitwhen(i==256)
//set A_E[i]=CreateTimer()
//call SaveInteger(FX,0,GetHandleId((A_E[i])),(HX))
//set i=i+1
//endloop
//set GX=256
//endfunction
function SIE takes nothing returns nothing
local integer i=JX
local integer sw
loop
exitwhen i<=0
set sw=KX[i]
set I6V[sw]=I6V[sw]-I7V[sw]
call SetUnitVertexColor(I5V[sw],255,255,255,R2I(I6V[sw]))
set I8V[sw]=I8V[sw]-1
if I8V[sw]==0 then
set KX[i]=KX[JX]
set KX[JX]=sw
set JX=JX-1
call RemoveUnit(I5V[sw])
if JX==0 then
call PauseTimer(MX)
endif
endif
set i=i-1
endloop
endfunction
function SAE takes integer id,real x,real y,real K0E,real CIE,string SNE,real SBE returns nothing
local unit SCE=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),id,x,y,K0E)
call UnitAddAbility(SCE,'Aloc')
call PauseUnit(SCE,true)
call SetUnitX(SCE,x)
call SetUnitY(SCE,y)
call SetUnitAnimation(SCE,SNE)
call SetUnitTimeScale(SCE,SBE)
set JX=JX+1
if JX>LX then
set LX=LX+1
set KX[JX]=K9E()
endif
set I6V[KX[JX]]=255.
set I8V[KX[JX]]=R2I(CIE/.03125)
set I7V[KX[JX]]=255./I2R(I8V[KX[JX]])
set I5V[KX[JX]]=SCE
if JX==1 then
call TimerStart(MX,.03125,true,function SIE)
endif
endfunction
function SDE takes integer id,real x,real y,real K0E,real CIE,integer DGE,real SBE returns nothing
local unit SCE=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),id,x,y,K0E)
call UnitAddAbility(SCE,'Aloc')
call PauseUnit(SCE,true)
call SetUnitX(SCE,x)
call SetUnitY(SCE,y)
call SetUnitAnimationByIndex(SCE,DGE)
call SetUnitTimeScale(SCE,SBE)
set JX=JX+1
if JX>LX then
set LX=LX+1
set KX[JX]=K9E()
endif
set I6V[KX[JX]]=255.
set I8V[KX[JX]]=R2I(CIE/.03125)
set I7V[KX[JX]]=255./I2R(I8V[KX[JX]])
set I5V[KX[JX]]=SCE
if JX==1 then
call TimerStart(MX,.03125,true,function SIE)
endif
endfunction
function SFE takes nothing returns nothing
local integer i=PX
local integer sw
loop
exitwhen i<=0
set sw=QX[i]
set AOV[sw]=AOV[sw]-ARV[sw]
call SetUnitVertexColor(AXV[sw],50,50,50,R2I(AOV[sw]))
set AIV[sw]=AIV[sw]-1
if AIV[sw]==0 then
set QX[i]=QX[PX]
set QX[PX]=sw
set PX=PX-1
call RemoveUnit(AXV[sw])
if PX==0 then
call PauseTimer(TX)
endif
endif
set i=i-1
endloop
endfunction
function SGE takes integer id,real x,real y,real K0E,real CIE,string SNE,real SBE returns nothing
local unit SCE=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),id,x,y,K0E)
call UnitAddAbility(SCE,'Aloc')
call PauseUnit(SCE,true)
call SetUnitX(SCE,x)
call SetUnitY(SCE,y)
call SetUnitAnimation(SCE,SNE)
call SetUnitTimeScale(SCE,SBE)
set PX=PX+1
if PX>SX then
set SX=SX+1
set QX[PX]=K8E()
endif
set AOV[QX[PX]]=255.
set AIV[QX[PX]]=R2I(CIE/.03125)
set ARV[QX[PX]]=255./I2R(AIV[QX[PX]])
set AXV[QX[PX]]=SCE
if PX==1 then
call TimerStart(TX,.03125,true,function SFE)
endif
endfunction
function SHE takes integer id,real x,real y,real K0E,real CIE,integer DGE,real SBE returns nothing
local unit SCE=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),id,x,y,K0E)
call UnitAddAbility(SCE,'Aloc')
call PauseUnit(SCE,true)
call SetUnitX(SCE,x)
call SetUnitY(SCE,y)
call SetUnitAnimationByIndex(SCE,DGE)
call SetUnitTimeScale(SCE,SBE)
set PX=PX+1
if PX>SX then
set SX=SX+1
set QX[PX]=K8E()
endif
set AOV[QX[PX]]=255.
set AIV[QX[PX]]=R2I(CIE/.03125)
set ARV[QX[PX]]=255./I2R(AIV[QX[PX]])
set AXV[QX[PX]]=SCE
if PX==1 then
call TimerStart(TX,.03125,true,function SFE)
endif
endfunction
function SJE takes unit u1,location l1,real SKE,real SLE returns integer
local integer d=K7E()
local real dx=GetUnitX(u1)-GetLocationX(l1)
local real dy=GetUnitY(u1)-GetLocationY(l1)
set AJV[d]=l1
set ACV[d]=u1
set ADV[d]=SKE
set AFV[d]=SLE
set AGV[d]=SquareRoot(dx*dx+dy*dy)
set AHV[d]=0
set AKV[WX]=d
return d
endfunction
function SME takes integer D0E returns nothing
set ACV[D0E]=null
set AJV[D0E]=null
call RemoveLocation(AJV[D0E])
endfunction
function SPE takes integer D0E returns nothing
if D0E==null then
return
elseif(ABV[D0E]!=-1)then
return
endif
call SME(D0E)
set ABV[D0E]=AAV
set AAV=D0E
endfunction
function SQE takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function SSE takes unit u returns nothing
local rect r
local real STE=GetUnitX(u)
local real SUE=GetUnitY(u)
local real CHE=90
local location CJE=GetUnitLoc(u)
if(CHE>=0)then
set bj_enumDestructableCenter=CJE
set bj_enumDestructableRadius=CHE
set r=Rect(STE-CHE,SUE-CHE,STE+CHE,SUE+CHE)
call EnumDestructablesInRect(r,filterEnumDestructablesInCircleBJ,function SQE)
call RemoveRect(r)
call RemoveLocation(CJE)
endif
set r=null
set CJE=null
endfunction
function SWE takes nothing returns nothing
local integer i=0
local integer d
local real x
local real y
local real x1
local real y1
local real dx
local real dy
local real d2
local group g=CreateGroup()
local boolexpr CME
loop
exitwhen i>=WX
set d=AKV[i]
set x1=GetUnitX(ACV[d])
set y1=GetUnitY(ACV[d])
set dx=GetLocationX(AJV[d])-x1
set dy=GetLocationY(AJV[d])-y1
set d2=SquareRoot(dx*dx+dy*dy)
set x=x1+ADV[d]*dx/d2
set y=y1+ADV[d]*dy/d2
call SetUnitX(ACV[d],x)
call SetUnitY(ACV[d],y)
if true then
if IsTerrainPathable(x,y,PATHING_TYPE_FLOATABILITY)then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FlakTarget3.mdx",ACV[d],"origin"))
elseif not IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\WaterElementalMissile\\WaterElementalMissile.mdl",ACV[d],"origin"))
endif
endif
if true then
call SSE(ACV[d])
endif
set AHV[d]=AHV[d]+ADV[d]
if ADV[d]-AFV[d]>=.0 then
set ADV[d]=ADV[d]-AFV[d]
endif
if AHV[d]>=AGV[d]or AHV[d]<=1 or ADV[d]<=1 then
set WX=WX-1
set AKV[i]=AKV[WX]
set i=i-1
if WX<=0 then
call PauseTimer(UX)
set WX=0
endif
call SPE(d)
endif
set i=i+1
endloop
set g=null
set CME=null
endfunction
function SYE takes unit u,location l,real SZE,real S_E returns nothing
local integer d=SJE(u,l,SZE,S_E)
set WX=WX+1
if WX==1 then
call TimerStart(UX,.02,true,function SWE)
endif
endfunction
function S0E takes unit u returns boolean
return true
endfunction
function S1E takes nothing returns integer
if FO[DO]==0 then
if EO==0 then
set XO=XO+1
set FO[DO]=XO
else
set FO[DO]=VO[EO]
set EO=EO-1
endif
call SetUnitUserData(GO[DO],FO[DO])
set YX[FO[DO]]=GO[DO]
set RO=RO+1
set OO[RO]=FO[DO]
endif
return FO[DO]
endfunction
function S4E takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_DEAD))!=null
endfunction
function S5E takes nothing returns nothing
loop
exitwhen NO==0
set NO=NO-1
set BO[0]=AO[NO]
if YX[BO[0]]!=null then
if GetUnitUserData(YX[BO[0]])==0 then
if ZX[BO[0]]==0 then
call TriggerEvaluate(KO)
set EO=EO+1
set VO[EO]=BO[0]
set YX[BO[0]]=null
endif
endif
endif
endloop
endfunction
function S6E takes nothing returns boolean
if GetIssuedOrderId()==852056 then
set MO=GetUnitUserData(GetOrderedUnit())
if AO[NO-1]!=MO then
set AO[NO]=MO
set NO=NO+1
call TimerStart(IO,0,false,function S5E)
endif
endif
return false
endfunction
function S7E takes nothing returns boolean
set DO=DO+1
set GO[DO]=GetFilterUnit()
if GetUnitUserData(GO[DO])==0 then
if S0E(GO[DO])then
if EO==0 then
set XO=XO+1
set FO[DO]=XO
else
set FO[DO]=VO[EO]
set EO=EO-1
endif
call SetUnitUserData(GO[DO],FO[DO])
set YX[FO[DO]]=GO[DO]
call UnitAddAbility(GO[DO],'AIDS')
call UnitMakeAbilityPermanent(GO[DO],true,'AIDS')
call TriggerEvaluate(HO)
else
set FO[DO]=0
call TriggerEvaluate(HO)
endif
endif
set DO=DO-1
return false
endfunction
function S8E takes nothing returns nothing
local region r=CreateRegion()
local group g=CreateGroup()
local integer n=15
local trigger t=CreateTrigger()
loop
call TriggerRegisterPlayerUnitEvent(t,Player(n),EVENT_PLAYER_UNIT_ISSUED_ORDER,Filter(function S4E))
call SetPlayerAbilityAvailable(Player(n),'AIDS',false)
exitwhen n==0
set n=n-1
endloop
set n=15
call TriggerAddCondition(t,Filter(function S6E))
set t=null
call RegionAddRect(r,GetWorldBounds())
call TriggerRegisterEnterRegion(CreateTrigger(),r,Filter(function S7E))
set r=null
loop
call GroupEnumUnitsOfPlayer(g,Player(n),Filter(function S7E))
exitwhen n==0
set n=n-1
endloop
call DestroyGroup(g)
set g=null
endfunction
function S9E takes nothing returns nothing
endfunction
function TVE takes integer D0E returns nothing
set ASV[D0E]=ASV[D0E]+.5
set AZV[D0E]=ASV[D0E]<=ATV[D0E]and GetUnitAbilityLevel(AUV[D0E],AQV[D0E])>0
endfunction
function TEE takes integer D0E returns nothing
call UnitRemoveAbility(AUV[D0E],AQV[D0E])
set AUV[D0E]=null
call K6E(D0E)
endfunction
function TXE takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==AYV
if not A_V[A7E[DGE]]then
if AZV[A7E[DGE]]then
call TVE(A7E[DGE])
set DGE=DGE+1
else
call TEE(A7E[DGE])
set AYV=AYV-1
set A7E[DGE]=A7E[AYV]
endif
else
set DGE=DGE+1
endif
endloop
if AYV==0 then
call PauseTimer(AWV)
endif
endfunction
function TRE takes nothing returns nothing
if GetDestructableLife(GetEnumDestructable())>0 then
set bj_forLoopAIndex=bj_forLoopAIndex+1
endif
endfunction
function TIE takes integer D0E returns nothing
set A4V[D0E]=.0
set NNV[D0E]=false
set NAV[D0E]=true
call ShowUnit(A3V[D0E],false)
call RemoveUnit(A3V[D0E])
call K4E(D0E)
endfunction
function TAE takes nothing returns nothing
local integer DGE=1
loop
exitwhen DGE==NBV
if NAV[(DGE)]and NNV[(DGE)]then
set A4V[(DGE)]=A4V[(DGE)]+.2
if A4V[(DGE)]>=A5V[(DGE)]then
call TIE((DGE))
endif
endif
set DGE=DGE+1
endloop
endfunction
function TNE takes real x,real y,real K0E returns integer
local integer TBE=K3E()
set A3V[TBE]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'face',x,y,K0E)
call K1E(TBE,GetUnitTurnSpeed(A3V[TBE]))
call KYE(TBE,x)
call KZE(TBE,y)
set A9V[TBE]=K0E
call K_E(TBE,0)
set NNV[TBE]=true
call UnitAddAbility(A3V[TBE],'Amrf')
call UnitRemoveAbility(A3V[TBE],'Amrf')
if TBE==NBV then
set NBV=NBV+1
endif
return TBE
endfunction
function TCE takes nothing returns nothing
call TimerStart(NCV,.2,true,function TAE)
endfunction
function TFE takes integer D0E returns real
set A4V[(D0E)]=.0
return A6V[D0E]
endfunction
function TGE takes integer D0E,real x returns nothing
set A6V[D0E]=x
call SetUnitX(A3V[D0E],x)
set A4V[(D0E)]=.0
endfunction
function THE takes integer D0E returns real
set A4V[(D0E)]=.0
return A7V[D0E]
endfunction
function TJE takes integer D0E,real y returns nothing
set A7V[D0E]=y
call SetUnitY(A3V[D0E],y)
set A4V[(D0E)]=.0
endfunction
function TKE takes integer D0E returns real
set A4V[(D0E)]=.0
return A8V[D0E]
endfunction
function TLE takes integer D0E,real z returns nothing
set A8V[D0E]=z
call SetUnitFlyHeight(A3V[D0E],z,.0)
set A4V[(D0E)]=.0
endfunction
function TME takes integer D0E,real K0E returns nothing
set A9V[D0E]=P0E(K0E)
call SetUnitFacing(A3V[D0E],K0E)
set A4V[(D0E)]=.0
endfunction
function TPE takes integer D0E,real K0E returns nothing
local integer z=R2I(K0E*.7)
loop
exitwhen z>=0 and z<=252
if z>252 then
set z=z-252
else
set z=z+252
endif
endloop
call SetUnitAnimationByIndex(A3V[D0E],z)
set A4V[(D0E)]=.0
endfunction
function TQE takes integer D0E,real K2E returns nothing
set NVV[D0E]=K2E
call SetUnitTurnSpeed(A3V[D0E],K2E)
set A4V[(D0E)]=.0
endfunction
function TSE takes integer D0E,string TTE,string TUE returns nothing
call AddSpecialEffectTarget(TTE,A3V[D0E],TUE)
set A4V[(D0E)]=.0
endfunction
function GetNextGroup takes nothing returns group
set SO=SO+1
if QO<SO then
set TO[SO]=CreateGroup()
set QO=SO
endif
call MAE(TO[SO])
set A0E[(LoadInteger(Q,GetHandleId((TO[SO])),0))]=SO
return TO[SO]
endfunction
function TWE takes nothing returns nothing
if VR then
call GroupClear(ER)
set VR=false
endif
call GroupAddUnit(ER,GetEnumUnit())
endfunction
function TYE takes nothing returns group
if OR==0 then
set XR[0]=CreateGroup()
else
set OR=OR-1
endif
call SaveInteger(ZO,0,GetHandleId(XR[OR]),1)
return XR[OR]
endfunction
function TZE takes group g returns boolean
local integer id=GetHandleId(g)
if g==null then
return false
elseif not HaveSavedInteger(ZO,0,id)then
return false
elseif LoadInteger(ZO,0,id)==2 then
return false
elseif OR==8191 then
call DestroyGroup(g)
return false
endif
call SaveInteger(ZO,0,id,2)
call GroupClear(g)
set XR[OR]=g
set OR=OR+1
return true
endfunction
function T_E takes nothing returns boolean
return IsUnitInRangeXY(GetFilterUnit(),RR,IR,AR)
endfunction
function T0E takes boolexpr b returns nothing
local integer T1E=GetHandleId(b)
if HaveSavedHandle(NR,0,T1E)then
call LQE(LoadBooleanExprHandle(NR,0,T1E))
call RemoveSavedHandle(NR,0,T1E)
endif
endfunction
function T2E takes group T3E,real x,real y,real CHE,boolexpr CME returns nothing
local real T4E=RR
local real T5E=IR
local real T6E=AR
local integer T1E=0
set RR=x
set IR=y
set AR=CHE
if CME==null then
set CME=Condition(function T_E)
else
set T1E=GetHandleId(CME)
if HaveSavedHandle(NR,0,T1E)then
set CME=LoadBooleanExprHandle(NR,0,T1E)
else
set CME=And(Condition(function T_E),CME)
call SaveBooleanExprHandle(NR,0,T1E,CME)
endif
endif
call GroupEnumUnitsInRange(T3E,x,y,(((CHE)*1.)+197.),CME)
set RR=T4E
set IR=T5E
set AR=T6E
endfunction
function T7E takes nothing returns boolean
return true
endfunction
function T8E takes nothing returns boolean
return false
endfunction
function T9E takes nothing returns nothing
set WO=Condition(function T7E)
set YO=Condition(function T8E)
endfunction
function UVE takes integer D0E returns nothing
local real UEE
local real x
local real y
local real z
set NJV[D0E]=NJV[D0E]+NMV[D0E]
if NJV[D0E]>NKV[D0E]then
call SetUnitFlyHeight(NHV[D0E],GetUnitDefaultFlyHeight(NHV[D0E]),0)
set N_V[D0E]=false
else
set x=NPV[D0E]+NSV[D0E]
set y=NQV[D0E]+NTV[D0E]
set z=PTE(x,y)
set UEE=PUE(NUV[NWV[D0E]+1],NUV[NWV[D0E]],NUV[NWV[D0E]+2],NJV[D0E]/NKV[D0E])+(NUV[NWV[D0E]]-z)
if RectContainsCoords(GR,x,y)then
call SetUnitPosition(NHV[D0E],x,y)
set NPV[D0E]=x
set NQV[D0E]=y
endif
call SetUnitFlyHeight(NHV[D0E],UEE,0)
endif
endfunction
function UXE takes integer D0E returns nothing
set NHV[D0E]=null
call KWE(D0E)
endfunction
function UOE takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==NZV
if not N0V[A8E[DGE]]then
if N_V[A8E[DGE]]then
call UVE(A8E[DGE])
set DGE=DGE+1
else
call UXE(A8E[DGE])
set NZV=NZV-1
set A8E[DGE]=A8E[NZV]
endif
else
set DGE=DGE+1
endif
endloop
if NZV==0 then
call PauseTimer(NYV)
endif
endfunction
function UIE takes integer D0E returns nothing
local real Ux=GetUnitX(N4V[D0E])
local real Uy=GetUnitY(N4V[D0E])
local real Tx=GetUnitX(N5V[D0E])
local real Ty=GetUnitY(N5V[D0E])
local real UAE=PPE(Ux,Uy,Tx,Ty)
local real CDE
if UAE>10. then
set CDE=Atan2(Ty-Uy,Tx-Ux)
set Ux=Ux+N7V[D0E]*Cos(CDE)
set Uy=Uy+N7V[D0E]*Sin(CDE)
call SetUnitPosition(N4V[D0E],Ux,Uy)
call SetUnitFlyHeight(N4V[D0E],N8V[D0E],N9V[D0E])
else
set BRV[D0E]=false
endif
endfunction
function UNE takes integer D0E returns nothing
set DR=N5V[D0E]
set BR=N4V[D0E]
set CR=N6V[D0E]
set FR=BEV[D0E]
call ExecuteFunc(BVV[D0E])
set N4V[D0E]=null
set N5V[D0E]=null
set N6V[D0E]=null
call KTE(D0E)
endfunction
function UBE takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==BOV
if not BIV[A9E[DGE]]then
if BRV[A9E[DGE]]then
call UIE(A9E[DGE])
set DGE=DGE+1
else
call UNE(A9E[DGE])
set BOV=BOV-1
set A9E[DGE]=A9E[BOV]
endif
else
set DGE=DGE+1
endif
endloop
if BOV==0 then
call PauseTimer(BXV)
endif
endfunction
function UDE takes integer D0E returns nothing
local unit a
local group g
local integer c
set BLV[D0E]=BLV[D0E]-BFV[D0E]
if BLV[D0E]>.0 then
set BMV[D0E]=BMV[D0E]+BFV[D0E]*Cos(BGV[D0E])
set BPV[D0E]=BPV[D0E]+BFV[D0E]*Sin(BGV[D0E])
call SetUnitPosition(BCV[D0E],BMV[D0E],BPV[D0E])
call SetUnitFlyHeight(BCV[D0E],BHV[D0E],BJV[D0E])
set g=PSE(BKV[D0E],BMV[D0E],BPV[D0E])
set c=0
loop
set a=FirstOfGroup(g)
exitwhen a==null
call GroupRemoveUnit(g,a)
if PYE(BDV[D0E],a)and a!=BCV[D0E]then
set c=c+1
endif
endloop
call GroupClear(g)
set g=null
set BWV[D0E]=c<=0
else
set BWV[D0E]=false
endif
endfunction
function UFE takes integer D0E returns nothing
set CR=BDV[D0E]
set BR=BCV[D0E]
set FR=BSV[D0E]
call ExecuteFunc(BQV[D0E])
set BCV[D0E]=null
set BDV[D0E]=null
call KQE(D0E)
endfunction
function UGE takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==BUV
if not BYV[NVE[DGE]]then
if BWV[NVE[DGE]]then
call UDE(NVE[DGE])
set DGE=DGE+1
else
call UFE(NVE[DGE])
set BUV=BUV-1
set NVE[DGE]=NVE[BUV]
endif
else
set DGE=DGE+1
endif
endloop
if BUV==0 then
call PauseTimer(BTV)
endif
endfunction
function UJE takes nothing returns nothing
set GR=bj_mapInitialPlayableArea
endfunction
function UKE takes integer D0E,unit u returns boolean
return(IsUnitEnemy(u,CFV[D0E])and GetWidgetLife(u)>=.405 and(IsUnitType(u,UNIT_TYPE_DEAD)!=true))
endfunction
function ULE takes nothing returns boolean
set CUV=GetFilterUnit()
if(B4V[B1V[CSV]]!=null)then
call KJE(CSV,CUV)
endif
if UKE(CSV,CUV)then
call UnitDamageTarget(B9V[CSV],CUV,CCV[CSV],false,false,CKV[CSV],CLV[CSV],null)
if(B5V[B1V[CSV]]!=null)then
call KKE(CSV,CUV)
endif
endif
return true
endfunction
function UME takes nothing returns nothing
set CTV=LoadInteger(QR,GetHandleId(GetTriggerUnit()),0)
if CTV!=0 then
set CAV[CTV]=.0
endif
endfunction
function UPE takes integer D0E returns nothing
local unit UQE=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'face',CMV,CPV,.0)
if UnitAddAbility(UQE,'Amrf')then
call UnitRemoveAbility(UQE,'Amrf')
endif
call SetUnitScale(UQE,CGV[D0E],CGV[D0E],CGV[D0E])
call SetUnitFlyHeight(UQE,CJV[D0E],.0)
call DestroyEffect(AddSpecialEffectTarget(CDV[D0E],UQE,"origin"))
call UnitApplyTimedLife(UQE,'BTLF',1.)
set CSV=D0E
call GroupEnumUnitsInRange(JR,CMV,CPV,CEV[D0E],Condition(function ULE))
set UQE=null
if(B3V[B1V[D0E]]!=null)then
call KHE(D0E)
endif
endfunction
function USE takes integer D0E returns real
local real tx=.0
loop
set tx=GetRandomReal(B7V[D0E]-CVV[D0E],B7V[D0E]+CVV[D0E])
exitwhen(tx>=MR and tx<=KR)
endloop
return tx
endfunction
function UTE takes integer D0E returns real
local real ty=.0
loop
set ty=GetRandomReal(B8V[D0E]-CVV[D0E],B8V[D0E]+CVV[D0E])
exitwhen(ty>=PR and ty<=LR)
endloop
return ty
endfunction
function UUE takes integer D0E returns nothing
local integer a=1
local integer b=0
set CQV=D0E
set CIV[CQV]=CIV[CQV]+.03
if CIV[CQV]>=CNV[CQV]then
set CNV[CQV]=CNV[CQV]+CRV[CQV]
set b=GetRandomInt(COV[CQV],CXV[CQV])
loop
exitwhen a>b
if CHV[CQV]then
set B7V[CQV]=GetUnitX(B9V[CQV])
set B8V[CQV]=GetUnitY(B9V[CQV])
endif
set CMV=USE(CQV)
set CPV=UTE(CQV)
call UPE(CQV)
set a=a+1
endloop
endif
if CIV[CQV]>=CAV[CQV]then
call LIE(CQV)
if(B6V[B1V[CQV]]!=null)then
call KLE(CQV)
endif
if CBV[CQV]then
call FlushChildHashtable(QR,GetHandleId(B9V[CQV]))
endif
call KME(CQV)
endif
endfunction
function UWE takes nothing returns boolean
local integer D0E=CWV[(0)]
loop
exitwhen D0E==0
call UUE(D0E)
set D0E=CWV[D0E]
endloop
return false
endfunction
function UYE takes integer D0E returns nothing
set CYV[CWV[(0)]]=D0E
set CWV[D0E]=CWV[(0)]
set CWV[(0)]=D0E
set CYV[D0E]=(0)
endfunction
function UZE takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function UWE))
endfunction
function U_E takes unit U0E,real x,real y,real U1E,real U2E,real M2E,integer U3E,integer U4E,real ni,real U5E,real U6E,real U7E,boolean U8E,boolean U9E,boolean WVE,string WEE,attacktype at,damagetype dt returns integer
local integer a=1
local integer b=GetRandomInt(U3E,U4E)
set CQV=LAE()
set B9V[CQV]=U0E
set CFV[CQV]=GetOwningPlayer(U0E)
set B7V[CQV]=x
set B8V[CQV]=y
set CHV[CQV]=WVE
set CJV[CQV]=M2E
set CVV[CQV]=U1E
set CCV[CQV]=U6E
set CBV[CQV]=U8E
set CDV[CQV]=WEE
set COV[CQV]=U3E
set CXV[CQV]=U4E
set CRV[CQV]=ni
set CNV[CQV]=ni
set CAV[CQV]=U5E
set CGV[CQV]=U7E
set CEV[CQV]=U2E
set CIV[CQV]=.0
set CKV[CQV]=at
set CLV[CQV]=dt
if U8E then
call SaveInteger(QR,GetHandleId(U0E),0,CQV)
endif
call UYE(CQV)
if U9E then
loop
exitwhen a>b
set CMV=USE(CQV)
set CPV=UTE(CQV)
call KHE(CQV)
set a=a+1
endloop
endif
return CQV
endfunction
function WXE takes nothing returns nothing
local trigger WOE=CreateTrigger()
local integer i=0
set KR=GetRectMaxX(bj_mapInitialPlayableArea)
set LR=GetRectMaxY(bj_mapInitialPlayableArea)
set MR=GetRectMinX(bj_mapInitialPlayableArea)
set PR=GetRectMinY(bj_mapInitialPlayableArea)
call TriggerAddAction(WOE,function UME)
loop
exitwhen i>15
call TriggerRegisterPlayerUnitEvent(WOE,Player(i),EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(WOE,Player(i),EVENT_PLAYER_UNIT_ISSUED_ORDER,null)
call TriggerRegisterPlayerUnitEvent(WOE,Player(i),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(WOE,Player(i),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
set i=i+1
endloop
endfunction
function WRE takes integer i1,integer i2,integer i3,integer i4,integer i5,integer i6,integer MHE,string WIE,string WAE,boolean WNE,integer WBE returns integer
local integer i=KIE()
local integer WCE
local integer WDE
local boolean WFE=false
local boolean array b
local integer j=0
local integer k
local integer l=0
set DEV[DXV[i]]=i1
set DEV[DXV[i]+1]=i2
set DEV[DXV[i]+2]=i3
set DEV[DXV[i]+3]=i4
set DEV[DXV[i]+4]=i5
set DEV[DXV[i]+5]=i6
set DOV[i]=MHE
set DBV[i]=true
set DNV[i]=WNE
set DRV[i]=WBE
set b[0]=true
set b[1]=i2!=i1
set b[2]=i3!=i2 and i3!=i1
set b[3]=i4!=i3 and i4!=i2 and i4!=i1
set b[4]=i5!=i4 and i5!=i3 and i5!=i2 and i5!=i1
set b[5]=i6!=i5 and i6!=i4 and i6!=i3 and i6!=i2 and i6!=i1
if WIE=="" then
set DIV[i]="Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl"
else
set DIV[i]=WIE
endif
if WAE=="" then
set DAV[i]="origin"
else
set DAV[i]=WAE
endif
loop
if DEV[DXV[i]+j]!=0 and b[j]then
set k=(LoadInteger(CX,((UR)),(DEV[DXV[i]+j])))
if k!=0 then
set WCE=(k)
set k=0
loop
exitwhen WFE or C0V[WCE+k]==0
set k=k+1
if k==C1V then
set WFE=true
endif
endloop
else
set WCE=KCE()
set k=0
endif
exitwhen WFE
set C0V[WCE+k]=i
call SaveInteger(CX,((UR)),(DEV[DXV[i]+j]),((WCE)))
endif
set j=j+1
exitwhen j==6
endloop
if not WFE then
set k=(LoadInteger(CX,((WR)),(DOV[i])))
if k!=0 then
set WDE=(k)
set k=0
loop
exitwhen WFE or C5V[WDE+k]==0
set k=k+1
if k==C6V then
set WFE=true
endif
endloop
else
set WDE=KNE()
endif
if not WFE then
set C5V[WDE+k]=i
call SaveInteger(CX,((WR)),(DOV[i]),((WDE)))
endif
endif
if WFE then
call KAE(i)
return(0)
else
return i
endif
endfunction
function WGE takes integer D0E,integer it returns nothing
local integer i=0
local integer j=0
local integer k
local integer WCE=((LoadInteger(CX,((UR)),(it))))
if it==0 or(C0V[WCE])==0 then
return
endif
loop
exitwhen i==C1V
if C0V[WCE+i]==D0E then
set j=i+1
loop
exitwhen j==C1V or C0V[WCE+j]==0
set j=j+1
endloop
set j=j-1
set C0V[WCE+i]=C0V[WCE+j]
set C0V[WCE+j]=0
exitwhen true
endif
set i=i+1
endloop
if(C0V[WCE])==0 then
call RemoveSavedInteger(CX,((UR)),(it))
call KDE(WCE)
endif
endfunction
function WHE takes integer D0E,integer it returns nothing
local integer i=0
local integer j
local integer WDE=((LoadInteger(CX,((WR)),(it))))
if it==0 then
return
endif
loop
exitwhen i==C6V
if C5V[WDE+i]==D0E then
set j=i+1
loop
exitwhen j==C6V or C5V[WDE+j]==0
set j=j+1
endloop
set j=j-1
set C5V[WDE+i]=C5V[WDE+j]
set C5V[WDE+j]=0
exitwhen true
endif
set i=i+1
endloop
if C5V[WDE]==0 then
call RemoveSavedInteger(CX,((WR)),(it))
call KBE(WDE)
endif
endfunction
function WSE takes integer WTE,unit u,item WUE returns boolean
local integer array WWE
local integer WYE=GetItemTypeId(WUE)
local integer WZE
local integer W_E=0
local integer W0E=0
local integer i=0
local integer j=0
local item W1E
local item array W2E
loop
set WWE[i]=DEV[DXV[WTE]+i]
set i=i+1
exitwhen i==6
endloop
set i=0
loop
set WZE=GetItemTypeId(UnitItemInSlot(u,i))
loop
if WWE[j]==WYE and WUE!=null then
set W2E[j]=WUE
set WWE[j]=0
set WUE=null
exitwhen true
elseif WWE[j]==WZE and WZE!=0 then
set W2E[j]=UnitItemInSlot(u,i)
set WWE[j]=0
exitwhen true
endif
set j=j+1
exitwhen j==6
endloop
set j=0
set i=i+1
exitwhen i==6
endloop
set WUE=null
set i=0
set j=0
loop
if WWE[i]!=0 then
loop
set W2E[j]=null
set j=j+1
exitwhen j==6
endloop
return false
endif
set i=i+1
exitwhen i==6
endloop
set i=0
loop
set j=GetItemCharges(W2E[i])
set W0E=W0E+j
if j>W_E then
set W_E=j
endif
call RemoveSavedInteger(CX,((YR)),GetHandleId((W2E[i])))
call RemoveItem(W2E[i])
set W2E[i]=null
set i=i+1
exitwhen i==6
endloop
set W1E=UnitAddItemById(u,DOV[WTE])
call DestroyEffect(AddSpecialEffectTarget(DIV[WTE],u,DAV[WTE]))
if DNV[WTE]then
if DRV[WTE]==0 then
call SetItemCharges(W1E,W0E)
elseif DRV[WTE]==-1 then
call SetItemCharges(W1E,W_E)
else
call SetItemCharges(W1E,DRV[WTE])
endif
endif
call SaveInteger(CX,((YR)),GetHandleId((W1E)),((WTE)))
set bj_lastCreatedItem=W1E
set W1E=null
return true
endfunction
function W3E takes item W4E,unit u returns boolean
local boolean W5E=UnitHasItem(u,W4E)
local integer r=((LoadInteger(CX,((UR)),(GetItemTypeId(W4E)))))
local integer i=0
if W4E==null then
return false
endif
loop
exitwhen(C0V[r+i])==0 or i==C1V
if DBV[C0V[r+i]]then
if W5E then
if WSE(C0V[r+i],u,null)then
return true
endif
else
if WSE(C0V[r+i],u,W4E)then
return true
endif
endif
endif
set i=i+1
endloop
return false
endfunction
function W6E takes nothing returns boolean
local real dx
local real dy
if GetIssuedOrderId()==851971then
if GetOrderTargetItem()==null then
return false
endif
set dx=GetItemX(GetOrderTargetItem())-GetUnitX(GetTriggerUnit())
set dy=GetItemY(GetOrderTargetItem())-GetUnitY(GetTriggerUnit())
if dx*dx+dy*dy<=SR then
return W3E(GetOrderTargetItem(),GetTriggerUnit())
endif
return false
endif
return W3E(GetManipulatedItem(),GetTriggerUnit())
endfunction
function W7E takes nothing returns boolean
return true
endfunction
function W8E takes nothing returns nothing
local integer DGE=0
if true then
loop
call TriggerRegisterPlayerUnitEvent(TR,Player(DGE),EVENT_PLAYER_UNIT_PICKUP_ITEM,Filter(function W7E))
if not false then
call TriggerRegisterPlayerUnitEvent(TR,Player(DGE),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,Filter(function W7E))
endif
set DGE=DGE+1
exitwhen DGE==16
endloop
call TriggerAddCondition(TR,Condition(function W6E))
endif
set UR=LXE()
set WR=LXE()
set YR=LVE()
endfunction
function W9E takes nothing returns nothing
set DCV=LXE()
endfunction
function YVE takes string t returns integer
local integer i=StringHash(t)
if(LoadInteger(CX,((DCV)),(i)))==0 then
set VI=VI+1
call SaveInteger(CX,((DCV)),(i),(VI))
set ZR[VI]=t
return VI
endif
return(LoadInteger(CX,((DCV)),(i)))
endfunction
function YIE takes timer t returns nothing
local integer DGE=(LoadInteger(Q,GetHandleId((t)),0))
call PauseTimer(t)
call MNE(t)
set A1E[XI]=t
set XI=XI+1
endfunction
function YAE takes nothing returns nothing
call RemoveUnit(DDV[DHV])
set DDV[DHV]=null
set DHV=((DHV)+1)
if(DHV==DGV)then
set DHV=0
set DGV=0
else
call TimerStart(OI,DFV[DHV]-TimerGetElapsed(RI),false,function YAE)
endif
endfunction
function YNE takes nothing returns nothing
set OI=CreateTimer()
set RI=CreateTimer()
call TimerStart(RI,43200,true,null)
endfunction
function YBE takes real x,real y,real K0E returns integer
local integer D0E=KRE()
set DPV[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'e005',x,y,K0E*bj_RADTODEG)
call UnitAddAbility(DPV[D0E],'Amrf')
call UnitAddAbility(DPV[D0E],'Aloc')
call UnitRemoveAbility(DPV[D0E],'Amrf')
call SetUnitX(DPV[D0E],x)
call SetUnitY(DPV[D0E],y)
return D0E
endfunction
function YCE takes integer D0E,real YDE returns nothing
call SetUnitScale(DPV[D0E],YDE,YDE,YDE)
endfunction
function YHE takes integer D0E,string YJE returns nothing
if(DQV[D0E]!=null)then
call DestroyEffect(DQV[D0E])
endif
if(YJE=="")then
set DQV[D0E]=null
else
set DQV[D0E]=AddSpecialEffectTarget(YJE,DPV[D0E],"origin")
endif
endfunction
function YKE takes integer D0E returns nothing
if(DZV[D0E]!=0)then
call UnitRemoveAbility(DPV[D0E],DZV[D0E])
endif
if(DQV[D0E]!=null)then
call DestroyEffect(DQV[D0E])
set DQV[D0E]=null
endif
if(DGV==8190)then
call TimerStart(OI,0,false,function YAE)
call ExplodeUnitBJ(DPV[D0E])
else
set DDV[DGV]=DPV[D0E]
set DFV[DGV]=TimerGetElapsed(RI)+4.
set DGV=((DGV)+1)
if(DGV==1)then
call TimerStart(OI,4.,false,function YAE)
endif
call SetUnitOwner(DPV[D0E],Player(PLAYER_NEUTRAL_PASSIVE),false)
endif
set DPV[D0E]=null
endfunction
function YLE takes integer D0E returns nothing
if D0E==null then
return
elseif(DLV[D0E]!=-1)then
return
endif
call YKE(D0E)
set DLV[D0E]=DJV
set DJV=D0E
endfunction
function Damage_GetType takes nothing returns damagetype
return BI[NI]
endfunction
function Damage_IsAttack takes nothing returns boolean
return CI[NI]
endfunction
function Damage_BlockAll takes nothing returns nothing
set DI[NI]=DI[NI]+GetEventDamage()
endfunction
function YME takes nothing returns nothing
loop
exitwhen GI==0
set KI=FI[GI]
set JI=GetWidgetLife(KI)
call UnitRemoveAbility(KI,'dprv')
if JI>.405 then
call SetWidgetLife(KI,JI)
endif
set GI=GI-1
endloop
endfunction
function YPE takes nothing returns boolean
if AI and GetEventDamage()!=.0 then
call MEE(II)
if DI[NI]!=.0 then
set LI=GetTriggerUnit()
set MI=GetEventDamage()
if DI[NI]>=MI then
set MI=GetWidgetLife(LI)+MI
else
set MI=GetWidgetLife(LI)+DI[NI]
endif
call SetWidgetLife(LI,MI)
if GetWidgetLife(LI)<MI then
call UnitAddAbility(LI,'dprv')
call SetWidgetLife(LI,MI)
set GI=GI+1
set FI[GI]=LI
call ResumeTimer(HI)
endif
set DI[NI]=.0
endif
endif
return false
endfunction
function UnitDamageTargetEx takes unit J2E,widget YSE,real YTE,boolean YUE,boolean YWE,attacktype YYE,damagetype YZE,weapontype Y_E returns boolean
local boolean MHE
set NI=NI+1
set BI[NI]=YZE
set CI[NI]=YUE
set MHE=UnitDamageTarget(J2E,YSE,YTE,YUE,YWE,YYE,YZE,Y_E)
set NI=NI-1
return MHE
endfunction
function Damage_IsPure takes nothing returns boolean
return(BI[NI])==DAMAGE_TYPE_UNIVERSAL
endfunction
function Damage_IsSpell takes nothing returns boolean
return(BI[NI])==DAMAGE_TYPE_MAGIC
endfunction
function Y0E takes unit CBE,unit YSE,real YTE,attacktype Y1E,boolean YUE,boolean YWE returns boolean
return UnitDamageTargetEx(CBE,YSE,YTE,YUE,YWE,Y1E,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endfunction
function Damage_IsPhysical takes nothing returns boolean
return(BI[NI])==DAMAGE_TYPE_NORMAL
endfunction
function Y2E takes nothing returns boolean
if(S0E(((GO[DO]))))then
set D_V[(S1E())]=true
call KOE(((FO[DO])))
endif
return false
endfunction
function Y3E takes nothing returns boolean
if(S0E(((GO[DO]))))then
set D_V[((FO[DO]))]=true
call KOE(((FO[DO])))
endif
return false
endfunction
function Y4E takes nothing returns boolean
if D_V[((BO[CO]))]then
call DestroyTrigger(D1V[(((BO[CO])))])
set D_V[((BO[CO]))]=false
endif
return false
endfunction
function Y5E takes nothing returns nothing
call TriggerAddCondition(HO,(Filter(function Y2E)))
call TriggerAddCondition(JO,(Filter(function Y3E)))
call TriggerAddCondition(KO,(Filter(function Y4E)))
call TriggerEvaluate(NYE)
endfunction
function s__Damage___Detector_AIDS_onInit takes nothing returns nothing
set D0V=Condition(function YPE)
endfunction
function Y6E takes nothing returns nothing
local unit Y7E=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'uloc',0,0,0)
call UnitAddAbility(Y7E,'dprv')
call RemoveUnit(Y7E)
set Y7E=null
set II=MVE()
set BI[NI]=DAMAGE_TYPE_NORMAL
set CI[NI]=true
call TimerStart(HI,.0,false,function YME)
endfunction
function Y8E takes nothing returns boolean
return IsUnitInGroup(GetEventDamageSource(),TI)
endfunction
function Y9E takes nothing returns nothing
local integer id=(LoadInteger(Q,GetHandleId((GetEventDamageSource())),0))
local triggercondition tc
set WI=A3E[id]
set YI=A4E[id]
set ZI=GetEventDamage()
set tc=TriggerAddCondition(SI,A2E[id])
call TriggerEvaluate(SI)
call TriggerRemoveCondition(SI,tc)
call LQE(A2E[id])
call GroupRemoveUnit(TI,A3E[id])
call MNE(A3E[id])
set A2E[id]=null
set A3E[id]=null
set A4E[id]=null
set tc=null
endfunction
function ZVE takes nothing returns nothing
set TI=CreateGroup()
set UI=CreateGroup()
set QI=CreateTrigger()
set SI=CreateTrigger()
call TriggerAddAction(QI,function Y9E)
call TriggerAddCondition(QI,Condition(function Y8E))
endfunction
function ZEE takes unit ZXE,real x,real y,real CHE,boolexpr b returns unit
local group g=TYE()
local real ZOE=VA
local real CCE
local unit u
call T2E(g,x,y,CHE,b)
loop
set u=FirstOfGroup(g)
exitwhen u==null
set CCE=Pow(x-GetUnitX(u),2.)+Pow(y-GetUnitY(u),2.)
if CCE<ZOE then
set ZOE=CCE
set ZXE=u
endif
call GroupRemoveUnit(g,u)
endloop
call TZE(g)
return ZXE
endfunction
function ZRE takes nothing returns nothing
local real CCE=Pow(RA-GetDestructableX(GetEnumDestructable()),2.)+Pow(IA-GetDestructableY(GetEnumDestructable()),2.)
if CCE<=OA and CCE<XA then
set AA=GetEnumDestructable()
set XA=CCE
endif
endfunction
function ZFE takes nothing returns nothing
local real CCE=Pow(RA-GetItemX(GetEnumItem()),2.)+Pow(IA-GetItemY(GetEnumItem()),2.)
if CCE<=OA and CCE<XA then
set NA=GetEnumItem()
set XA=CCE
endif
endfunction
function ZJE takes unit u returns boolean
return GetUnitAbilityLevel(u,'Aloc')==0 and not IsUnitType(u,UNIT_TYPE_STRUCTURE)
endfunction
function ZKE takes integer D0E returns nothing
set D2V[D0E]=.0
set D3V[D0E]=.0
endfunction
function ZLE takes nothing returns boolean
if(ZJE(((GO[DO]))))then
set D8V[(S1E())]=true
call ZKE(((FO[DO])))
endif
return false
endfunction
function ZME takes nothing returns boolean
if(ZJE(((GO[DO]))))then
set D8V[((FO[DO]))]=true
call ZKE(((FO[DO])))
endif
return false
endfunction
function ZPE takes nothing returns boolean
if D8V[((BO[CO]))]then
set D4V[(((BO[CO])))]=true
set D8V[((BO[CO]))]=false
endif
return false
endfunction
function ZQE takes nothing returns nothing
call TriggerAddCondition(HO,(Filter(function ZLE)))
call TriggerAddCondition(JO,(Filter(function ZME)))
call TriggerAddCondition(KO,(Filter(function ZPE)))
call S9E()
endfunction
function ZSE takes nothing returns boolean
local integer D0E=(PRE())
if D4V[D0E]then
set D5V[D0E]=false
return true
endif
set BA=(YX[((D0E))])
set CA=GetUnitX(BA)
set DA=GetUnitY(BA)
if(not IsUnitPaused(BA))and GetUnitAbilityLevel(BA,'BSTN')==0 and GetUnitAbilityLevel(BA,'BPSE')==0 then
if CA!=D6V[D0E]or DA!=D7V[D0E]then
set FA=CA-D6V[D0E]
set GA=DA-D7V[D0E]
if D3V[D0E]!=.0 then
set CA=CA+FA*D3V[D0E]
set DA=DA+GA*D3V[D0E]
endif
if D2V[D0E]!=.0 then
set HA=SquareRoot(FA*FA+GA*GA)
set CA=CA+FA/HA*D2V[D0E]
set DA=DA+GA/HA*D2V[D0E]
endif
call SetUnitX(BA,CA)
call SetUnitY(BA,DA)
endif
endif
set D6V[D0E]=CA
set D7V[D0E]=DA
return false
endfunction
function ZTE takes integer D0E returns nothing
if not D5V[D0E]then
call PFE(function ZSE,D0E,.00625)
set D5V[D0E]=true
set D4V[D0E]=false
set D6V[D0E]=GetUnitX((YX[((D0E))]))
set D7V[D0E]=GetUnitY((YX[((D0E))]))
endif
if D2V[D0E]==.0 and D3V[D0E]==.0 then
set D4V[D0E]=true
endif
endfunction
function ZUE takes unit u,real SZE returns nothing
local integer d=(GetUnitUserData(((u))))
set D2V[d]=D2V[d]+SZE*.00625
call ZTE(d)
endfunction
function ZWE takes unit u,real SZE returns nothing
local integer d=(GetUnitUserData(((u))))
set D2V[d]=SZE*.00625
call ZTE(d)
endfunction
function ZYE takes unit u returns nothing
local integer d=(GetUnitUserData(((u))))
set D2V[d]=.0
call ZTE(d)
endfunction
function ZZE takes unit u,real QCE returns nothing
local integer d=(GetUnitUserData(((u))))
set D3V[d]=D3V[d]+QCE
call ZTE(d)
endfunction
function Z_E takes unit J2E returns integer
local integer i=1
loop
exitwhen i==F7V
if A3V[FHV[(i)]]==J2E then
return(i)
endif
set i=i+1
endloop
return 0
endfunction
function s__Missile_create takes nothing returns integer
local integer J7E=LRE()
set FKV[J7E]=P8E(.0,.0,.0)
set FLV[J7E]=P8E(.0,.0,.0)
set FMV[J7E]=P8E(.0,.0,.0)
set FPV[J7E]=P8E(.0,.0,.0)
call DTE((FKV[J7E]),false)
call DTE((FLV[J7E]),false)
call DTE((FPV[J7E]),false)
call DTE((FMV[J7E]),false)
set F4V[J7E]=true
call J9E(J7E)
if J7E==F7V then
set F7V=F7V+1
endif
return J7E
endfunction
function Z0E takes integer D0E returns nothing
set FHV[D0E]=TNE(DJE(FKV[D0E]),DLE(FKV[D0E]),QEE(FPV[D0E])*57.295779)
call TQE(FHV[D0E],10.)
call TLE(FHV[D0E],DPE(FKV[D0E])-QME(DJE(FKV[D0E]),DLE(FKV[D0E])))
call TSE(FHV[D0E],FJV[D0E],"origin")
set NAV[(FHV[D0E])]=false
endfunction
function Z1E takes integer D0E returns nothing
call KEE(D0E)
call TIE(FHV[D0E])
call P7E(FKV[D0E])
call P7E(FMV[D0E])
call P7E(FPV[D0E])
call P7E(FLV[D0E])
call DestroyGroup(FZV[D0E])
set F5V[D0E]=false
call KXE(D0E)
endfunction
function Z2E takes integer D0E,real x,real y,real z returns nothing
if not F5V[D0E]then
call DKE(FKV[D0E],x)
call DME(FKV[D0E],y)
call DQE(FKV[D0E],z+QME(x,y))
call DKE(FLV[D0E],x)
call DME(FLV[D0E],y)
call DQE(FLV[D0E],z+QME(x,y))
endif
endfunction
function Z3E takes integer D0E returns real
if not F4V[D0E]then
return DJE(FLV[D0E])
endif
return .0
endfunction
function Z4E takes integer D0E returns real
if not F4V[D0E]then
return DLE(FLV[D0E])
endif
return .0
endfunction
function Z5E takes integer D0E returns unit
if not F4V[D0E]then
return FYV[D0E]
endif
return null
endfunction
function Z6E takes integer D0E,real SZE returns nothing
set FWV[D0E]=FWV[D0E]*SZE*.0233333
call QBE(FPV[D0E],FWV[D0E])
endfunction
function Z7E takes integer D0E returns nothing
call Z0E(D0E)
call J8E(D0E)
set F5V[D0E]=true
endfunction
function Z8E takes integer D0E,unit J2E returns nothing
if not F3V[D0E]and not F4V[D0E]then
set FYV[D0E]=J2E
call DKE(FKV[D0E],TFE(FHV[D0E]))
call DME(FKV[D0E],THE(FHV[D0E]))
call DQE(FKV[D0E],TKE(FHV[D0E])+QME(TFE(FHV[D0E]),THE(FHV[D0E])))
call DKE(FMV[D0E],Z3E(D0E))
call DME(FMV[D0E],Z4E(D0E))
if GetUnitFlyHeight(J2E)==.0 then
call DQE(FMV[D0E],50.+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
else
call DQE(FMV[D0E],GetUnitFlyHeight(J2E)+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
endif
set FUV[D0E]=QVE(QIE(FKV[D0E],FMV[D0E]))
set FTV[D0E]=0
call P7E(FPV[D0E])
set FPV[D0E]=QGE(QIE(FKV[D0E],FMV[D0E]))
call QBE(FPV[D0E],FWV[D0E])
call DTE((FPV[D0E]),false)
set F4V[D0E]=true
endif
endfunction
function Z9E takes integer D0E,unit J2E returns nothing
if not F5V[D0E]then
set FYV[D0E]=J2E
call DKE(FMV[D0E],GetUnitX(J2E))
call DME(FMV[D0E],GetUnitY(J2E))
if GetUnitFlyHeight(J2E)==.0 then
call DQE(FMV[D0E],50.+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
else
call DQE(FMV[D0E],GetUnitFlyHeight(J2E)+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
endif
set FUV[D0E]=QVE(QIE(FKV[D0E],FMV[D0E]))
call P7E(FPV[D0E])
set FPV[D0E]=QGE(QIE(FKV[D0E],FMV[D0E]))
call QBE(FPV[D0E],FWV[D0E])
call DTE((FPV[D0E]),false)
endif
endfunction
function VVX takes integer D0E returns nothing
local real d
if FYV[D0E]!=null then
set d=QVE(QIE(FLV[D0E],FMV[D0E]))
call DKE(FMV[D0E],GetUnitX(FYV[D0E]))
call DME(FMV[D0E],GetUnitY(FYV[D0E]))
if GetUnitFlyHeight(FYV[D0E])==.0 then
call DQE(FMV[D0E],50.+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
else
call DQE(FMV[D0E],GetUnitFlyHeight(FYV[D0E])+QME(DJE(FMV[D0E]),DLE(FMV[D0E])))
endif
set d=QVE(QIE(FLV[D0E],FMV[D0E]))-d
set FUV[D0E]=FUV[D0E]+d
call P7E(FPV[D0E])
set FPV[D0E]=QGE(QIE(FLV[D0E],FMV[D0E]))
call QBE(FPV[D0E],FWV[D0E])
call DTE((FPV[D0E]),false)
endif
endfunction
function VEX takes integer D0E returns nothing
if FYV[D0E]!=null and GetWidgetLife(FYV[D0E])<.405 then
call Z1E(D0E)
endif
call QOE(FLV[D0E],FPV[D0E])
set FTV[D0E]=FTV[D0E]+QVE(FPV[D0E])
endfunction
function VXX takes integer D0E returns nothing
local real d=FUV[D0E]
local real x=FTV[D0E]
local real a=QEE(QIE(FLV[D0E],FMV[D0E]))
if FSV[D0E]!=.0 then
call DKE(GVV,DJE(FLV[D0E])+P4E(FSV[D0E],d,x)*Sin(a))
call DME(GVV,DLE(FLV[D0E])-P4E(FSV[D0E],d,x)*Cos(a))
endif
endfunction
function VOX takes integer D0E returns nothing
local real d=FUV[D0E]
local real x=FTV[D0E]
call DQE(FLV[D0E],P5E(FQV[D0E],d,x,DPE(FKV[D0E]),DPE(FMV[D0E])))
endfunction
function VRX takes integer D0E returns nothing
if FSV[D0E]!=.0 then
call TGE(FHV[D0E],DJE(GVV))
call TJE(FHV[D0E],DLE(GVV))
else
call TGE(FHV[D0E],DJE(FLV[D0E]))
call TJE(FHV[D0E],DLE(FLV[D0E]))
endif
call TLE(FHV[D0E],DPE(FLV[D0E])-QME(TFE(FHV[D0E]),THE(FHV[D0E])))
endfunction
function VIX takes integer D0E returns nothing
if QHE(FMV[D0E],TFE(FHV[D0E]),THE(FHV[D0E]),TKE(FHV[D0E]),32.)or FTV[D0E]>FUV[D0E]then
set F4V[D0E]=false
call J0E(D0E)
if F3V[D0E]then
set F5V[D0E]=false
call Z1E(D0E)
endif
endif
endfunction
function VAX takes integer D0E returns nothing
if TKE(FHV[D0E])<QME(TFE(FHV[D0E]),THE(FHV[D0E]))and F2V[D0E]then
call J5E(D0E,TFE(FHV[D0E]),THE(FHV[D0E]))
endif
endfunction
function VNX takes integer D0E returns nothing
local real d=FUV[D0E]
local real x=FTV[D0E]
local real s=QVE(FPV[D0E])
local real z0=P4E(FSV[D0E],d,x)
local real z1=P4E(FSV[D0E],d,x+s)
local real a=Atan2(z1-z0,s)*-1*57.295779
if FSV[D0E]!=0 then
call TME(FHV[D0E],a+QEE(FPV[D0E])*57.295779)
else
call TME(FHV[D0E],QEE(FPV[D0E])*57.295779)
endif
endfunction
function VBX takes integer D0E returns nothing
local real d=FUV[D0E]
local real x=FTV[D0E]
local real s=QVE(FPV[D0E])
local real z0=P5E(FQV[D0E],d,x,DPE(FKV[D0E]),DPE(FMV[D0E]))
local real z1=P5E(FQV[D0E],d,x+s,DPE(FKV[D0E]),DPE(FMV[D0E]))
call TPE(FHV[D0E],Atan2(z1-z0,s)*57.295779)
endfunction
function VCX takes nothing returns boolean
local integer TBE=F6V
local unit VDX=GetFilterUnit()
if Z_E(VDX)!=0 and F_V[TBE]and not IsUnitInGroup(VDX,FZV[TBE])and QJE(Z_E(VDX),TBE,32.)then
call J6E(TBE,Z_E(VDX))
call GroupAddUnit(FZV[TBE],VDX)
return false
endif
if not IsUnitInGroup(VDX,FZV[TBE])then
call GroupAddUnit(FZV[TBE],VDX)
call J1E(TBE,VDX)
return false
endif
return false
endfunction
function VFX takes nothing returns boolean
call J3E(F6V,GetFilterDestructable())
return false
endfunction
function VGX takes nothing returns nothing
local integer i=1
local integer TBE=0
loop
exitwhen i==F7V
if F5V[(i)]then
set TBE=(i)
call VVX(TBE)
call VEX(TBE)
call VXX(TBE)
call VOX(TBE)
call VRX(TBE)
call VIX(TBE)
call VAX(TBE)
call VNX(TBE)
call VBX(TBE)
set F6V=TBE
call GroupEnumUnitsInRange(FZV[TBE],TFE(FHV[TBE]),THE(FHV[TBE]),32.,Condition(function VCX))
if F1V[TBE]then
call SetRect(F9V,TFE(FHV[TBE])-32.,THE(FHV[TBE])-32.,TFE(FHV[TBE])+32.,THE(FHV[TBE])+32.)
call EnumDestructablesInRect(F9V,Condition(function VFX),null)
endif
call KVE(TBE)
endif
set i=i+1
endloop
endfunction
function VHX takes nothing returns nothing
set F9V=Rect(.0,.0,.0,.0)
set GVV=P8E(.0,.0,.0)
call DTE((GVV),false)
call TimerStart(F8V,.03,true,function VGX)
endfunction
function s__GameMode_enable takes nothing returns nothing
set GXV=true
endfunction
function s__GameMode_disable takes nothing returns nothing
set GXV=false
endfunction
function s__GameMode__get_enabled takes nothing returns boolean
return GXV
endfunction
function VJX takes string Q7E,boolean VKX,code c returns integer
local integer D0E=YVE(Q7E)
set GRV[D0E]=VKX
set GOV[D0E]=Filter(c)
set GBV[D0E]=true
return D0E
endfunction
function VLX takes string s returns string
local string MRE=""
local string VMX=""
local integer DGE=0
local integer VPX=StringLength(s)
loop
exitwhen DGE>=VPX
set VMX=SubString(s,DGE,DGE+1)
if" "!=VMX then
set MRE=MRE+VMX
endif
set DGE=DGE+1
endloop
return MRE
endfunction
function VQX takes nothing returns boolean
local integer D0E
local integer DGE=1
local integer id=GetPlayerId(GetTriggerPlayer())
local integer VPX
local string LZE
if GXV and not GAV[id]then
call TriggerClearConditions(GEV)
set LZE=VLX(StringCase(GetEventPlayerChatString(),false))
set VPX=StringLength(LZE)
loop
exitwhen DGE>=VPX
set D0E=(LoadInteger(CX,((DCV)),(StringHash((SubString(LZE,DGE,DGE+2))))))
if GIV[D0E*12+id]and GBV[D0E]then
if GRV[D0E]then
call TriggerAddCondition(GEV,GOV[D0E])
elseif not GRV[D0E]and DGE==1 then
call TriggerAddCondition(GEV,GOV[D0E])
exitwhen true
endif
endif
set DGE=DGE+2
endloop
return TriggerEvaluate(GEV)
endif
return false
endfunction
function VSX takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=11
local player p
loop
set p=Player(i)
if GetPlayerSlotState(p)==PLAYER_SLOT_STATE_PLAYING and GetPlayerController(p)==MAP_CONTROL_USER then
call TriggerRegisterPlayerChatEvent(t,p,"-",false)
endif
exitwhen i==0
set i=i-1
endloop
call TriggerAddCondition(t,Condition(function VQX))
set t=null
set p=null
endfunction
function EnableGameModes takes nothing returns nothing
set GXV=true
endfunction
function DisableGameModes takes nothing returns nothing
set GXV=false
endfunction
function GameModesEnabled takes nothing returns boolean
return(GXV)
endfunction
function GetTotalProjectiles takes nothing returns integer
return JKE(QA)
endfunction
function VTX takes nothing returns boolean
if(GetUnitTypeId(((GO[DO])))=='e001')then
set GCV[(S1E())]=true
set GDV[(((FO[DO])))]=0
endif
return false
endfunction
function VUX takes nothing returns boolean
if(GetUnitTypeId(((GO[DO])))=='e001')then
set GCV[((FO[DO]))]=true
set GDV[(((FO[DO])))]=0
endif
return false
endfunction
function VWX takes nothing returns boolean
if GCV[((BO[CO]))]then
set GDV[(((BO[CO])))]=0
set GCV[((BO[CO]))]=false
endif
return false
endfunction
function VYX takes nothing returns nothing
call TriggerAddCondition(HO,(Filter(function VTX)))
call TriggerAddCondition(JO,(Filter(function VUX)))
call TriggerAddCondition(KO,(Filter(function VWX)))
call S9E()
endfunction
function VZX takes integer D0E returns nothing
call RemoveUnit(GJV[D0E])
set GJV[D0E]=null
call JZE(D0E)
endfunction
function V_X takes integer D0E returns nothing
if GKV[D0E]==NX then
call JWE(D0E)
call VZX(D0E)
endif
endfunction
function V0X takes nothing returns boolean
local integer D0E=GLV[(0)]
loop
exitwhen D0E==0
call V_X(D0E)
set D0E=GLV[D0E]
endloop
return false
endfunction
function V1X takes integer D0E returns nothing
set GMV[GLV[(0)]]=D0E
set GLV[D0E]=GLV[(0)]
set GLV[(0)]=D0E
set GMV[D0E]=(0)
endfunction
function V2X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function V0X))
endfunction
function V3X takes unit J2E,real V4X returns nothing
local integer D0E=JYE()
set GJV[D0E]=J2E
set GKV[D0E]=NX+R2I(V4X/.03125)
call V1X(D0E)
endfunction
function V5X takes integer D0E,integer V6X returns integer
set GUV[GTV[D0E]]=V6X
set GTV[V6X]=GTV[D0E]
set GTV[D0E]=V6X
if GUV[D0E]==0 then
set GUV[D0E]=V6X
endif
set GWV[V6X]=D0E
set GWV[D0E]=(GWV[D0E])+1
return V6X
endfunction
function V7X takes nothing returns integer
local integer D0E=JTE()
set GYV[D0E]=true
return D0E
endfunction
function V8X takes integer D0E,real YDE returns nothing
call SetUnitScale(HFV[D0E],YDE,.0,.0)
set H9V[D0E]=YDE
endfunction
function V9X takes integer D0E,string EVX returns nothing
if H_V[D0E]!=null then
call DestroyEffect(H_V[D0E])
set H0V[D0E]=""//Get Effect Path
endif
if EVX=="" then
set H_V[D0E]=null
set H0V[D0E]=""
else
set H_V[D0E]=AddSpecialEffectTarget(EVX,HFV[D0E],"origin")
set H0V[D0E]=EVX
endif
endfunction
function EEX takes integer D0E,unit EXX returns nothing
set H3V[D0E]=true
set HZV[D0E]=EXX
endfunction
function EOX takes integer D0E returns real
return Atan2((HJV[D0E]+HMV[D0E])-HJV[D0E],(HHV[D0E]+HLV[D0E])-HHV[D0E])
endfunction
function ERX takes integer D0E,real EIX,real EAX,real ENX,boolean EBX returns nothing
set HZV[D0E]=null
set HGV[D0E]=.0
set HQV[D0E]=EIX
set HSV[D0E]=EAX
call MoveLocation(NN,HQV[D0E],HSV[D0E])
set HTV[D0E]=ENX+GetLocationZ(NN)
set H3V[D0E]=EBX
endfunction
function ECX takes integer D0E,real EIX,real EAX,real ENX,boolean EBX returns nothing
set HHV[D0E]=EIX
set HJV[D0E]=EAX
set HKV[D0E]=ENX
set H3V[D0E]=EBX
endfunction
function EDX takes integer D0E returns nothing
set HZV[D0E]=null
set HEV[D0E]=false
endfunction
function EFX takes integer D0E,boolean EGX returns nothing
call JSE(D0E)
set H2V[D0E]=false
set H3V[D0E]=true
if not EGX then
set HRV[D0E]=0
endif
endfunction
function EHX takes integer D0E returns nothing
call V9X(D0E,"")
set H1V[D0E]=true
endfunction
function EJX takes integer D0E,unit J2E returns boolean
return IsUnitInGroup(J2E,JVV[D0E])
endfunction
function EKX takes integer D0E,unit J2E returns nothing
if IsUnitInGroup(J2E,JVV[D0E])then
call GroupRemoveUnit(JVV[D0E],J2E)
endif
endfunction
function ELX takes integer D0E returns nothing
if JAV[D0E]!=null then
call DestroyImage(JAV[D0E])
set JAV[D0E]=null
endif
set JBV[D0E]=false
endfunction
function EMX takes integer D0E,real EPX returns nothing
if JBV[D0E]then
call ELX(D0E)
endif
set JAV[D0E]=CreateImage("ReplaceableTextures\\Shadows\\ShadowFlyer.blp",EPX,EPX,EPX,HHV[D0E]-EPX*.5,HJV[D0E]-EPX*.5,.0,.0,.0,.0,2)
call SetImageColor(JAV[D0E],XX,OX,RX,IX)
call SetImageRenderAlways(JAV[D0E],IsUnitVisible(HFV[D0E],GetLocalPlayer()))
set JNV[D0E]=EPX*.5
set JBV[D0E]=true
endfunction
function EQX takes integer D0E returns nothing
call SetImagePosition(JAV[D0E],HHV[D0E]-JNV[D0E],HJV[D0E]-JNV[D0E],.0)
call SetImageRenderAlways(JAV[D0E],IsUnitVisible(HFV[D0E],GetLocalPlayer()))
endfunction
function ESX takes integer D0E returns nothing
local real ETX=.0
local real EUX=.0
local real EWX=.0
local real EYX=.0
local real M3E=.0
local real M4E=.0
local real EZX=.0
if JFV[D0E]then
call MoveLocation(VX,HHV[D0E]-16.,HJV[D0E])
call MoveLocation(EX,HHV[D0E]+16.,HJV[D0E])
set ETX=GetLocationZ(VX)-GetLocationZ(EX)
call MoveLocation(VX,HHV[D0E],HJV[D0E]-16.)
call MoveLocation(EX,HHV[D0E],HJV[D0E]+16.)
set EUX=GetLocationZ(VX)-GetLocationZ(EX)
set EWX=ETX*ETX+EUX*EUX+16.*16.
call MoveLocation(VX,HHV[D0E],HJV[D0E])
set EYX=G1V[D0E]/SquareRoot(EWX)-(HKV[D0E]-GetLocationZ(VX))*16./EWX
if EYX>=.0 then
set HHV[D0E]=HHV[D0E]+EYX*ETX
set HJV[D0E]=HJV[D0E]+EYX*EUX
set HKV[D0E]=HKV[D0E]+EYX*16.
set EWX=(HLV[D0E]*ETX+HMV[D0E]*EUX+HPV[D0E]*16.)/EWX
set M3E=ETX*EWX
set M4E=EUX*EWX
set EZX=16.*EWX
set HLV[D0E]=(HLV[D0E]-M3E)*(1.-JCV[D0E])-(M3E*JDV[D0E])
set HMV[D0E]=(HMV[D0E]-M4E)*(1.-JCV[D0E])-(M4E*JDV[D0E])
set HPV[D0E]=(HPV[D0E]-EZX)*(1.-JCV[D0E])-(EZX*JDV[D0E])
endif
if JGV[D0E]>0 then
set JGV[D0E]=JGV[D0E]-1
else
set JFV[D0E]=false
call EHX(D0E)
endif
endif
endfunction
function E_X takes nothing returns boolean
local integer D0E=JIV
local destructable MGE=GetFilterDestructable()
local real E0X=GetDestructableX(MGE)
local real E1X=GetDestructableY(MGE)
if GetWidgetLife(MGE)>.405 then
if(HHV[D0E]-E0X)*(HHV[D0E]-E0X)+(HJV[D0E]-E1X)*(HJV[D0E]-E1X)<=G0V[D0E]*G0V[D0E]then
call LME(HDV[D0E],D0E,MGE)
endif
endif
set MGE=null
return false
endfunction
function E2X takes nothing returns boolean
local integer D0E=JIV
local unit E3X=GetFilterUnit()
if not IsUnitInGroup(E3X,JVV[D0E])then
call GroupAddUnit(JVV[D0E],E3X)
call LLE(HCV[D0E],D0E,E3X)
endif
set E3X=null
return false
endfunction
function E4X takes integer D0E returns nothing
if H1V[D0E]then
call JSE(D0E)
call JQE(JLE((D0E)))
else
if HIV[D0E]!=0 then
call LHE(HIV[D0E],D0E)
endif
if HXV[D0E]then
set JIV=D0E
call SetRect(JEV,HHV[D0E]-G0V[D0E],HJV[D0E]-G0V[D0E],HHV[D0E]+G0V[D0E],HJV[D0E]+G0V[D0E])
call EnumDestructablesInRect(JEV,JOV,null)
endif
if HOV[D0E]then
set JIV=D0E
call GroupEnumUnitsInRange(JXV,HHV[D0E],HJV[D0E],G1V[D0E],JRV)
endif
if not G7V[D0E]then
if HZV[D0E]!=null and HEV[D0E]and UnitAlive(HZV[D0E])then
set XN=GetUnitX(HZV[D0E])
set ON=GetUnitY(HZV[D0E])
call MoveLocation(NN,XN,ON)
set RN=GetUnitFlyHeight(HZV[D0E])+GetLocationZ(NN)+G2V[D0E]
if HQV[D0E]!=XN or HSV[D0E]!=ON or HTV[D0E]!=RN then
set HQV[D0E]=XN
set HSV[D0E]=ON
set HTV[D0E]=RN
set H3V[D0E]=true
endif
endif
if H3V[D0E]then
set XN=HQV[D0E]-HHV[D0E]
set ON=HSV[D0E]-HJV[D0E]
set RN=HTV[D0E]-HKV[D0E]
set IN=SquareRoot(XN*XN+ON*ON+RN*RN)
set HLV[D0E]=XN/IN*H4V[D0E]
set HMV[D0E]=ON/IN*H4V[D0E]
set H7V[D0E]=IN/H4V[D0E]*.03125
if H7V[D0E]<=.0 then
set H7V[D0E]=.03125
endif
if HGV[D0E]!=.0 then
set H8V[D0E]=2.*(RN/H7V[D0E]/H7V[D0E]*.03125*.03125-(HPV[D0E]*.03125)/H7V[D0E])
else
set HPV[D0E]=RN/IN*H4V[D0E]
set H8V[D0E]=.0
endif
call SetUnitFacing(HFV[D0E],Atan2(ON,XN)*bj_RADTODEG)
set H3V[D0E]=false
endif
set AN=HKV[D0E]
set HPV[D0E]=HPV[D0E]+H8V[D0E]*G5V[D0E]
set HHV[D0E]=HHV[D0E]+HLV[D0E]*G5V[D0E]
set HJV[D0E]=HJV[D0E]+HMV[D0E]*G5V[D0E]
set HKV[D0E]=HKV[D0E]+HPV[D0E]*G5V[D0E]
call MoveLocation(NN,HHV[D0E],HJV[D0E])
set RN=GetLocationZ(NN)
call SetUnitX(HFV[D0E],HHV[D0E])
call SetUnitY(HFV[D0E],HJV[D0E])
call SetUnitFlyHeight(HFV[D0E],HKV[D0E]-RN,.0)
call SetUnitAnimationByIndex(HFV[D0E],R2I(bj_RADTODEG*Atan2((HKV[D0E]-AN),SquareRoot(HLV[D0E]*HLV[D0E]+HMV[D0E]*HMV[D0E])*G5V[D0E])+90.5))
if(JBV[(D0E)])then
call EQX(D0E)
endif
set G4V[D0E]=G4V[D0E]-.03125*G5V[D0E]
if G4V[D0E]<=.0 then
if G9V[D0E]then
set H1V[D0E]=true
endif
if HNV[D0E]!=0 then
call LHE(HNV[D0E],D0E)
endif
endif
if HKV[D0E]<=RN then
if JFV[D0E]then
call ESX(D0E)
endif
if HBV[D0E]!=0 then
call LHE(HBV[D0E],D0E)
endif
endif
endif
endif
endfunction
function E5X takes nothing returns boolean
local integer D0E=JHV[(0)]
loop
exitwhen D0E==0
call E4X(D0E)
set D0E=JHV[D0E]
endloop
return false
endfunction
function E6X takes integer D0E returns nothing
set JJV[JHV[(0)]]=D0E
set JHV[D0E]=JHV[(0)]
set JHV[(0)]=D0E
set JJV[D0E]=(0)
endfunction
function E7X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function E5X))
endfunction
function E8X takes integer D0E,real EIX,real EAX,real ENX,real SZE,real E9X returns nothing
local real XVX=EIX-HHV[D0E]
local real XEX=EAX-HJV[D0E]
local real XXX=ENX-HKV[D0E]
local real XOX=SquareRoot(XVX*XVX+XEX*XEX+XXX*XXX)
if SZE<=.0 or XOX<=.0 then
set HHV[D0E]=EIX
set HJV[D0E]=EAX
set HKV[D0E]=ENX
set H7V[D0E]=.0
else
set H7V[D0E]=XOX/SZE
endif
set H4V[D0E]=SZE*.03125
set H5V[D0E]=H4V[D0E]
set H6V[D0E]=H4V[D0E]
set HGV[D0E]=E9X
set HQV[D0E]=EIX
set HSV[D0E]=EAX
set HTV[D0E]=ENX
set HLV[D0E]=XVX/XOX*H4V[D0E]
set HMV[D0E]=XEX/XOX*H4V[D0E]
set HPV[D0E]=((XOX*E9X)/(H7V[D0E]/4.)+XXX/H7V[D0E])*.03125
if G4V[D0E]==.0 then
set G4V[D0E]=H7V[D0E]
endif
endfunction
function XRX takes integer D0E,real EIX,real EAX,real ENX,real SZE returns boolean
if not H2V[D0E]then
set H2V[D0E]=true
call E8X(D0E,EIX,EAX,ENX,SZE,.0)
call LHE(HRV[D0E],D0E)
call E6X(D0E)
return true
endif
return false
endfunction
function XIX takes integer D0E,real EIX,real EAX,real ENX,real SZE,real E9X returns boolean
if not H2V[D0E]then
set H2V[D0E]=true
call E8X(D0E,EIX,EAX,ENX,SZE,E9X)
call LHE(HRV[D0E],D0E)
call E6X(D0E)
return true
endif
return false
endfunction
function XAX takes real EIX,real EAX,real ENX,real K0E returns integer
local integer D0E=JTE()
set HFV[D0E]=CreateUnit(JA,'e001',EIX,EAX,K0E*bj_RADTODEG)
call UnitAddAbility(HFV[D0E],'Amrf')
call UnitRemoveAbility(HFV[D0E],'Amrf')
call SetUnitX(HFV[D0E],EIX)
call SetUnitY(HFV[D0E],EAX)
call MoveLocation(NN,EIX,EAX)
call SetUnitFlyHeight(HFV[D0E],ENX,.0)
set HHV[D0E]=EIX
set HJV[D0E]=EAX
set HKV[D0E]=ENX+GetLocationZ(NN)
set HUV[D0E]=EIX
set HWV[D0E]=EIX
set HYV[D0E]=ENX+GetLocationZ(NN)
set GDV[(GetUnitUserData(((HFV[D0E]))))]=D0E
set JVV[D0E]=TYE()
return V5X(QA,D0E)
endfunction
function XNX takes nothing returns nothing
set JXV=CreateGroup()
set JEV=Rect(.0,.0,.0,.0)
set JOV=Condition(function E_X)
set JRV=Condition(function E2X)
endfunction
function s__Projectile___ForGroupStack_increment takes nothing returns nothing
set JPV=(JPV+1)
endfunction
function s__Projectile___ForGroupStack_decrement takes nothing returns nothing
set JPV=(JPV-1)
endfunction
function XBX takes nothing returns nothing
set MA=GDV[(GetUnitUserData(((GetEnumUnit()))))]
set LA=JMV[JPV]
set PA=JLV[JPV]
call TriggerExecute(BJE[((JKV[JPV]))])
endfunction
function XCX takes nothing returns nothing
set MA=GDV[(GetUnitUserData(((GetEnumUnit()))))]
call TriggerExecute(BJE[((JKV[JPV]))])
endfunction
function XDX takes integer D0E returns nothing
call JGE(D0E)
call TZE(JWV[D0E])
set JWV[D0E]=null
call JJE(D0E)
endfunction
function XJX takes integer D0E,integer XGX returns nothing
set JPV=(JPV+1)
set JKV[JPV]=XGX
call ForGroup(JWV[D0E],function XCX)
set JPV=(JPV-1)
endfunction
function XKX takes integer D0E,integer JFE returns boolean
local integer i=0
local integer j=0
if JFE!=0 and IsUnitInGroup(HFV[JFE],JWV[D0E])then
call GroupRemoveUnit(JWV[D0E],HFV[JFE])
set JUV[D0E]=JUV[D0E]-1
set i=LoadInteger(ZA,(JFE),-1)-1
set j=LoadInteger(VN,(JFE),D0E)
call SaveInteger(ZA,(JFE),-1,i)
call SaveInteger(ZA,(JFE),j,LoadInteger(ZA,(JFE),i))
call SaveInteger(VN,(JFE),LoadInteger(ZA,(JFE),j),j)
if i<1 then
call FlushChildHashtable(ZA,(JFE))
call FlushChildHashtable(VN,(JFE))
endif
return true
endif
return false
endfunction
function XLX takes integer D0E,integer JFE returns boolean
local integer i=0
if JFE!=0 and not IsUnitInGroup(HFV[JFE],JWV[D0E])then
call GroupAddUnit(JWV[D0E],HFV[JFE])
set JUV[D0E]=JUV[D0E]+1
if HaveSavedInteger(ZA,(JFE),-1)then
set i=LoadInteger(ZA,(JFE),-1)
endif
call SaveInteger(ZA,(JFE),i,D0E)
call SaveInteger(VN,(JFE),D0E,i)
call SaveInteger(ZA,(JFE),-1,i+1)
return true
endif
return false
endfunction
function XMX takes integer D0E,integer JFE returns boolean
return IsUnitInGroup(HFV[JFE],JWV[D0E])
endfunction
function XPX takes integer D0E,real x,real y,real z,real r,integer i,integer e1,integer e2 returns nothing
local integer p=(GTV[(QA)])
loop
exitwhen p==0
if XMX(D0E,p)then
call XKX(D0E,p)
if e1!=0 then
set MA=p
set LA=D0E
set PA=i
call TriggerExecute(BJE[(e1)])
endif
endif
if r*r>((HHV[p]-x)*(HHV[p]-x)+(HJV[p]-y)*(HJV[p]-y)+(HKV[p]-z)*(HKV[p]-z))then
call XLX(D0E,p)
if e2!=0 then
set MA=p
set LA=D0E
set PA=i
call TriggerExecute(BJE[(e2)])
endif
endif
set p=(GTV[(p)])
endloop
endfunction
function XQX takes integer D0E,real x,real y,real z,real r,integer i,integer XSX returns nothing
local integer p=(GTV[(QA)])
call JGE(D0E)
loop
exitwhen p==0
if r*r>((HHV[p]-x)*(HHV[p]-x)+(HJV[p]-y)*(HJV[p]-y)+(HKV[p]-z)*(HKV[p]-z))then
call XLX(D0E,p)
if XSX!=0 then
set MA=p
set LA=D0E
set PA=i
call TriggerExecute(BJE[(XSX)])
endif
endif
set p=(GTV[(p)])
endloop
endfunction
function XUX takes integer D0E returns nothing
local unit u=null
loop
set u=FirstOfGroup(JWV[D0E])
exitwhen u==null
call XKX(D0E,GDV[(GetUnitUserData(((u))))])
endloop
call GroupClear(JWV[D0E])
set JUV[D0E]=0
set u=null
endfunction
function XWX takes nothing returns integer
local integer D0E=JHE()
set JWV[D0E]=TYE()
return D0E
endfunction
function CreateProjGroup takes nothing returns integer
return XWX()
endfunction
function GetEnumProjectile takes nothing returns integer
return MA
endfunction
function GetParentProjGroup takes nothing returns integer
return LA
endfunction
function GetForProjGroupData takes nothing returns integer
return PA
endfunction
function GetGlobalProjGroup takes nothing returns integer
return KA
endfunction
function XYX takes nothing returns boolean
local unit u=GetLeavingUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local integer p=GDV[(GetUnitUserData(((u))))]
if p!=0 then
call EHX(p)
else
if(x>TA)then
set x=TA
elseif(x<WA)then
set x=WA
endif
if(y>UA)then
set y=UA
elseif(y<YA)then
set y=YA
endif
call SetUnitX(u,x)
call SetUnitY(u,y)
endif
set u=null
return false
endfunction
function XZX takes nothing returns nothing
local trigger X_X=CreateTrigger()
local region X0X=CreateRegion()
local rect WTE=null
set QA=V7X()
set KA=XWX()
set ZA=InitHashtable()
set VN=InitHashtable()
set NN=Location(.0,.0)
set TA=GetRectMaxX(bj_mapInitialPlayableArea)-64.
set UA=GetRectMaxY(bj_mapInitialPlayableArea)-64.
set WA=GetRectMinX(bj_mapInitialPlayableArea)+64.
set YA=GetRectMinY(bj_mapInitialPlayableArea)+64.
set WTE=Rect(WA,YA,TA,UA)
call RegionAddRect(X0X,WTE)
call TriggerRegisterLeaveRegion(X_X,X0X,null)
call TriggerAddCondition(X_X,Condition(function XYX))
call RemoveRect(WTE)
set X_X=null
set WTE=null
set X0X=null
endfunction
function X1X takes nothing returns nothing
local timer t=GetExpiredTimer()
call RemoveUnit((LoadUnitHandle(EI,(LoadInteger(Q,GetHandleId(((t))),0)),0)))
call YIE(t)
set t=null
endfunction
function X2X takes nothing returns nothing
local timer t=GetExpiredTimer()
call DestroyEffect((LoadEffectHandle(EI,(LoadInteger(Q,GetHandleId(((t))),0)),0)))
call YIE(t)
set t=null
endfunction
function X3X takes nothing returns nothing
local timer t=GetExpiredTimer()
call DestroyLightning((LoadLightningHandle(EI,(LoadInteger(Q,GetHandleId(((t))),0)),0)))
call YIE(t)
set t=null
endfunction
function TT2Death takes nothing returns nothing
local timer t=GetExpiredTimer()
call DestroyTextTag((LoadTextTagHandle(EI,(LoadInteger(Q,GetHandleId(((t))),0)),0)))
call YIE(t)
set t=null
endfunction
function X4X takes integer i returns integer
local integer X5X=i-(i/8191)*8191
loop
exitwhen GN[X5X]==i
if GN[X5X]==0 then
set GN[X5X]=i
return X5X
endif
set X5X=X5X+53
if X5X>=8191 then
set X5X=X5X-8191
endif
endloop
return X5X
endfunction
function X6X takes integer X7X,real X8X,real X9X returns boolean
if X7X!=0 then
set DN[X4X(X7X)]=X8X
set FN[X4X(X7X)]=X9X
return true
endif
return false
endfunction
function OVX takes unit J2E returns real
call MoveLocation(CN,GetUnitX(J2E),GetUnitY(J2E))
return FN[X4X(GetUnitTypeId(J2E))]+GetLocationZ(CN)
endfunction
function OEX takes real M2E,unit J2E returns boolean
return(M2E<=OVX(J2E)and M2E>=(DN[X4X(GetUnitTypeId((J2E)))]))
endfunction
function OXX takes nothing returns nothing
call X6X('n021',BN,115.)
call X6X('n020',BN,115.)
call X6X('n03P',BN,155.)
call X6X('n030',BN,155.)
call X6X('n029',BN,155.)
call X6X('n028',BN,155.)
call X6X('n02V',BN,115.)
call X6X('n02U',BN,115.)
call X6X('n03A',BN,115.)
call X6X('n039',BN,115.)
call X6X('n02B',BN,155.)
call X6X('n02A',BN,155.)
call X6X('n031',BN,115.)
call X6X('n030',BN,115.)
call X6X('n02T',BN,155.)
call X6X('n02S',BN,155.)
call X6X('n02A',BN,155.)
call X6X('n02R',BN,155.)
call X6X('n02Q',BN,155.)
call X6X('n01X',BN,115.)
call X6X('n01W',BN,115.)
call X6X('n03N',BN,115.)
call X6X('n03L',BN,115.)
call X6X('n02H',BN,115.)
call X6X('n02G',BN,115.)
call X6X('n03S',BN,115.)
call X6X('n03Q',BN,115.)
call X6X('n02N',BN,155.)
call X6X('n02M',BN,155.)
call X6X('n02M',BN,155.)
call X6X('n03J',BN,155.)
call X6X('n03G',BN,155.)
//call X6X('n02L',190.,340.)
call X6X('n02K',190.,340.)
call X6X('n03E',BN,115.)
call X6X('n03D',BN,115.)
call X6X('n03E',BN,115.)
call X6X('n02J',BN,155.)
call X6X('n02I',BN,155.)
call X6X('n02D',BN,155.)
call X6X('n02C',BN,155.)
call X6X('n02Z',BN,115.)
call X6X('n02Y',BN,115.)
call X6X('n038',BN,155.)
call X6X('n037',BN,155.)
call X6X('n027',BN,155.)
call X6X('n026',BN,155.)
call X6X('n01Z',BN,115.)
call X6X('n01Y',BN,115.)
call X6X('n01V',BN,115.)
call X6X('n01Y',BN,115.)
call X6X('n03T',BN,155.)
call X6X('n03R',BN,155.)
call X6X('U00Z',BN,155.)
call X6X('U00N',BN,155.)
call X6X('E01R',BN,155.)
call X6X('E00Y',BN,155.)
call X6X('E010',BN,155.)
call X6X('E011',BN,155.)
call X6X('E012',BN,155.)
call X6X('E013',BN,155.)
call X6X('E014',BN,155.)
call X6X('E015',BN,155.)
call X6X('E016',BN,155.)
call X6X('H01F',BN,155.)
call X6X('h01E',BN,115.)
call X6X('o007',BN,115.)
call X6X('h01D',BN,115.)
call X6X('h01B',BN,115.)
call X6X('E017',BN,155.)
call X6X('E018',BN,155.)
call X6X('E019',BN,155.)
call X6X('E01A',BN,155.)
call X6X('E01B',BN,155.)
call X6X('E000',BN,155.)
call X6X('E01C',BN,155.)
call X6X('E01D',BN,155.)
call X6X('E01E',BN,155.)
call X6X('E01F',BN,155.)
call X6X('E01G',BN,155.)
call X6X('E01H',BN,155.)
call X6X('E01J',BN,155.)
call X6X('E01K',BN,155.)
call X6X('E006',BN,155.)
call X6X('E01L',BN,155.)
//call X6X('E01M',BN,155.)
call X6X('E01N',BN,155.)
call X6X('E01O',BN,155.)
call X6X('E01P',BN,155.)
call X6X('E01Q',BN,155.)
call X6X('H00F',BN,155.)
call X6X('U00O',BN,155.)
call X6X('N01T',BN,155.)
call X6X('N01S',BN,155.)
call X6X('n009',BN,155.)
call X6X('n000',BN,155.)
call X6X('n001',BN,155.)
call X6X('n002',BN,155.)
call X6X('n003',BN,155.)
call X6X('n004',BN,155.)
call X6X('n005',BN,155.)
call X6X('n006',BN,155.)
call X6X('n007',BN,155.)
call X6X('n00B',BN,155.)
call X6X('H008',BN,155.)
call X6X('H005',BN,155.)
call X6X('H006',BN,155.)
call X6X('n03C',BN,115.)
call X6X('n03B',BN,115.)
call X6X('e00X',BN,115.)
call X6X('e00G',BN,115.)
call X6X('n02P',BN,115.)
call X6X('n02O',BN,115.)
call X6X('u00S',BN,155.)
call X6X('u00R',BN,155.)
call X6X('u00X',BN,155.)
call X6X('u00Y',BN,155.)
call X6X('u00Q',BN,115.)
call X6X('u00P',BN,115.)
call X6X('u00T',BN,155.)
call X6X('u00U',BN,155.)
call X6X('n02X',BN,115.)
call X6X('n02W',BN,115.)
call X6X('n025',BN,115.)
call X6X('n024',BN,115.)
call X6X('n023',BN,115.)
call X6X('n022',BN,115.)
call X6X('n03H',BN,115.)
call X6X('n03B',BN,115.)
call X6X('n02F',BN,155.)
call X6X('n02R',BN,155.)
call X6X('e01S',BN,155.)
call X6X('e00Z',BN,155.)
call X6X('u00V',BN,155.)
call X6X('u00W',BN,155.)
call X6X('n03F',BN,115.)
call X6X('n03O',BN,115.)
call X6X('n01U',BN,115.)
call X6X('n02E',BN,115.)
call X6X('H009',BN,155.)
call X6X('n02L',190.,340.)
call X6X('h00B',BN,155.)
call X6X('nhrh',190.,340.)
call X6X('nhar',190.,340.)
call X6X('e00A',190.,340.)
call X6X('nhrq',230.,380.)
call X6X('nsqa',BN,155.)
call X6X('nowk',BN,155.)
call X6X('nsbm',BN,155.)
call X6X('nmdr',BN,155.)
call X6X('nwld',BN,155.)
call X6X('ntrd',BN,155.)
call X6X('njgb',BN,155.)
call X6X('nfra',BN,155.)
call X6X('nmgr',BN,155.)
call X6X('nmgw',BN,155.)
call X6X('nlkl',BN,155.)
call X6X('nogl',BN,155.)
call X6X('nano',BN,155.)
call X6X('nsll',BN,155.)
call X6X('nsc3',BN,155.)
call X6X('nspb',BN,115.)
call X6X('nanc',BN,115.)
call X6X('njga',BN,115.)
call X6X('nfrg',BN,115.)
call X6X('nfre',BN,115.)
call X6X('nltl',BN,115.)
call X6X('nlds',BN,115.)
call X6X('nlsn',BN,115.)
call X6X('nomg',BN,115.)
call X6X('nogm',BN,115.)
call X6X('nrzb',BN,115.)
call X6X('ntrs',BN,115.)
call X6X('nssp',BN,115.)
call X6X('E003',BN,155.)
call X6X('E004',BN,155.)
call X6X('nfel',BN,115.)
call X6X('o000',BN,115.)
call X6X('n00S',BN,115.)
call X6X('h00S',BN,115.)
call X6X('n016',BN,155.)
call X6X('n03K',BN,155.)
call X6X('U003',BN,155.)
call X6X('U000',70,220.)
call X6X('N00D',BN,155.)
call X6X('uskm',BN,115.)
call X6X('uske',BN,115.)
call X6X('nsko',BN,115.)
call X6X('nskm',BN,115.)
call X6X('nskf',BN,115.)
call X6X('U004',BN,155.)
call X6X('n013',BN,115.)
call X6X('n01B',BN,115.)
call X6X('e009',BN,155.)
call X6X('e008',BN,155.)
call X6X('e007',BN,155.)
call X6X('e00A',190.,340.)
call X6X('e00C',190.,340.)
endfunction
function OOX takes integer p,unit u returns nothing
local real x=HHV[p]
local real y=HJV[p]
local unit su
if UnitAlive(u)and u!=GZV[p]and IsUnitEnemy(u,GetOwningPlayer(GZV[p]))then
set su=CreateUnit(GetOwningPlayer(GZV[p]),'h007',x,y,.0)
call UnitApplyTimedLife(su,'BTLF',1.)
call UnitAddAbility(su,'A015')
call IssueTargetOrderById(su,852226,u)
call UnitDamageTargetEx((GZV[p]),(u),((G3V[p])+(GetHeroInt(GZV[p],true)*GetUnitAbilityLevel(GZV[p],'A04O')*.9)),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
set su=null
endfunction
function AetherLance__ProjColl takes nothing returns nothing
local integer E3X=MA
local integer TBE=(PA)
if IsUnitEnemy(GZV[E3X],GetOwningPlayer(GZV[TBE]))then
set G5V[E3X]=.5
call SetUnitVertexColor(HFV[E3X],25,100,150,255)
endif
endfunction
function ORX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local location OBX=CNE(Location(GetUnitX(OIX),GetUnitY(OIX)),80.,GetUnitFacing(OIX))
local real OCX=GetLocationX(OBX)
local real ODX=GetLocationY(OBX)
local location OFX=GetUnitLoc(OIX)
local real OGX=1200.
local location OHX=CNE(OFX,OGX,GetUnitFacing(OIX))
local real OJX=GetLocationX(OHX)
local real OKX=GetLocationY(OHX)
local real OLX=Atan2((OKX-ONX),(OJX-OAX))
local integer OMX=0
call MoveLocation(HN,OAX,ONX)
set OMX=XAX(OCX,ODX,75.,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\FrozenOrb.mdx")
set G3V[OMX]=IT[GetUnitAbilityLevel(OIX,'A04O')]
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=1200./800.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(1)
set HCV[OMX]=(1)
call MoveLocation(HN,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(HN),800.)
call RemoveLocation(OFX)
call RemoveLocation(OHX)
call RemoveLocation(OBX)
set OBX=null
set OFX=null
set OHX=null
set OIX=null
endfunction
/*function OPX takes nothing returns boolean
if GetSpellAbilityId()=='A04O' then
call ORX()
endif
return false
endfunction*/
function OQX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function OPX))
set X_X=null*/
call RegisterSpellEffectEvent('A04O', function ORX)
endfunction
function OSX takes nothing returns boolean
return(not IsUnitAlly(GetFilterUnit(),GM)and UnitAlive(GetFilterUnit())and not IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)and not(GetUnitAbilityLevel((GetFilterUnit()),'Avul')>0))!=null
endfunction
function OTX takes unit CBE,location OUX,real U6E,real CHE,damagetype OWX,attacktype OYX,boolean OZX returns nothing
local group O_X=CreateGroup()
local filterfunc O0X=null
local unit O1X=null
set GM=GetOwningPlayer(CBE)
if OZX==false then
set O0X=Filter(function OSX)
endif
call GroupEnumUnitsInRange(O_X,GetLocationX(OUX),GetLocationY(OUX),CHE+24.,O0X)
loop
set O1X=FirstOfGroup(O_X)
call UnitDamageTargetEx(CBE,O1X,U6E,false,true,OYX,OWX,WEAPON_TYPE_WHOKNOWS)
call GroupRemoveUnit(O_X,O1X)
exitwhen O1X==null
endloop
call DestroyGroup(O_X)
set GM=null
set O1X=null
set O_X=null
endfunction
function O2X takes unit CBE,location OUX,real U6E,real CHE,damagetype OWX,attacktype OYX,boolean OZX returns nothing
local group O_X=CreateGroup()
local filterfunc O0X=null
local unit O3X
local unit O1X=null
set GM=GetOwningPlayer(CBE)
if OZX==false then
set O0X=Filter(function OSX)
endif
call GroupEnumUnitsInRange(O_X,GetLocationX(OUX),GetLocationY(OUX),CHE,O0X)
loop
set O1X=FirstOfGroup(O_X)
call UnitDamageTargetEx(CBE,O1X,U6E,false,true,OYX,OWX,WEAPON_TYPE_WHOKNOWS)
set O3X=CreateUnit(GM,'h007',.0,.0,.0)
call UnitApplyTimedLife(O3X,'BTLF',1)
call UnitAddAbility(O3X,'A02R')
call IssueTargetOrderById(O3X,852226,O1X)
call GroupRemoveUnit(O_X,O1X)
exitwhen O1X==null
endloop
call DestroyGroup(O_X)
set O3X=null
set GM=null
set O1X=null
set O_X=null
endfunction
function O4X takes unit u returns real
local real O5X=GetWidgetLife(u)
local real O6X=O5X
local real O7X=.0
local boolean O8X=false
local trigger X_X=GetTriggeringTrigger()
if u!=null and O5X>=.405 then
if GetUnitState(u,UNIT_STATE_MAX_LIFE)<=16. then
call UnitAddAbility(u,'lif&')
endif
if O5X<=30. then
call SetWidgetLife(u,30.)
set O6X=30.
endif
if X_X!=null and IsTriggerEnabled(X_X)then
call DisableTrigger(X_X)
set O8X=true
endif
call UnitDamageTargetEx(u,u,16.,true,false,JN,DAMAGE_TYPE_NORMAL,null)
if O8X then
call EnableTrigger(X_X)
endif
set O7X=(16.-O6X+GetWidgetLife(u))/16.
call UnitRemoveAbility(u,'lif&')
call SetWidgetLife(u,O5X)
set X_X=null
if O7X>=1. then
return 917451.519
elseif O7X<.0 then
return-PHE(O7X+1.)/KN
else
return O7X/(.06*(1.-O7X))
endif
endif
set X_X=null
return .0
endfunction
function O9X takes real U6E,real RVX returns real
if RVX>=.0 then
return U6E/(1.-((RVX*.06)/(1.+.06*RVX)))
else
return U6E/(2.-Pow(.94,-RVX))
endif
endfunction
function REX takes integer p,unit J2E returns nothing
if J2E==(HZV[(p)])then
if OEX(HKV[p],J2E)then
call UnitDamageTargetEx(GZV[p],J2E,G3V[p],false,true,ATTACK_TYPE_CHAOS,LN,WEAPON_TYPE_WHOKNOWS)
call EHX(p)
else
call EKX(p,J2E)
endif
endif
endfunction
function RXX takes integer p,unit J2E returns nothing
if J2E==(HZV[(p)])then
if OEX(HKV[p],J2E)then
call UnitDamageTargetEx(GZV[p],J2E,G3V[p],false,true,ATTACK_TYPE_CHAOS,LN,WEAPON_TYPE_WHOKNOWS)
call SEE(J2E,R2I(G3V[p]))
call EHX(p)
else
call EKX(p,J2E)
endif
endif
endfunction
function ROX takes integer i returns integer
local integer X5X=i-(i/8191)*8191
loop
exitwhen UN[X5X]==i
if UN[X5X]==0 then
set UN[X5X]=i
return X5X
endif
set X5X=X5X+53
if X5X>=8191 then
set X5X=X5X-8191
endif
endloop
return X5X
endfunction
function Attack_GetSource takes nothing returns unit
return QN
endfunction
function Attack_GetTarget takes nothing returns unit
return SN
endfunction
function Attack_GetDamage takes nothing returns real
return TN
endfunction
function Attack_GetAttackData takes nothing returns integer
return PN
endfunction
function Attack_GetType takes nothing returns damagetype
return LN
endfunction
function RRX takes integer id,string RIX,real SZE,real RAX,real RNX,real RBX,real RCX,real RDX returns boolean
local integer ad=(ROX(id))
if J5V[ad]then
return false
else
set JYV[ad]=RIX
set JZV[ad]=SZE
set J0V[ad]=RNX
set J1V[ad]=RBX
set J2V[ad]=RCX
set J3V[ad]=RDX
set J5V[ad]=true
if RAX==.0 then
set J4V[ad]=true
else
set J_V[ad]=RAX
endif
return true
endif
endfunction
function RFX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
local unit RHX=GetTriggerUnit()
local real SVE=GetEventDamage()
local real ax=GetUnitX(RGX)
local real ay=GetUnitY(RGX)
local real tx=GetUnitX(RHX)
local real ty=GetUnitY(RHX)
local real OLX=Atan2((ty-ay),(tx-ax))
local integer ad=(ROX(GetUnitTypeId(RGX)))
local integer p=0
if(CI[NI])and J5V[ad]and SVE>.5 and GetEventDamageSource()!=GetTriggerUnit() and IsUnitEnemy(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit())) then
set DI[NI]=DI[NI]+GetEventDamage()
set p=XAX(ax,ay,J0V[ad],OLX)
set GZV[p]=RGX
call EEX(p,RHX)
set G_V[p]=GetOwningPlayer(RGX)
call V9X(p,JYV[ad])
call V8X(p,J1V[ad])
set G3V[p]=SVE
set G2V[p]=J3V[ad]
set G1V[p]=J2V[ad]
set HEV[p]=true
set G8V[p]=true
set HOV[p]=true
set HCV[p]=(2)
set HBV[p]=(2)
set HAV[p]=(3)
set HNV[p]=(4)
if J4V[ad]then
call XRX(p,tx,ty,GetUnitFlyHeight(RHX)+J0V[ad],JZV[ad])
else
call XIX(p,tx,ty,GetUnitFlyHeight(RHX)+J0V[ad],JZV[ad],J_V[ad])
endif
set QN=RGX
set SN=RHX
set TN=SVE
set PN=ad
call MEE(MN)
endif
set RGX=null
set RHX=null
return false
endfunction
function RJX takes nothing returns nothing
local trigger X_X=CreateTrigger()
set MN=MVE()
call MOE(II,(X_X))
call TriggerAddCondition(X_X,Condition(function RFX))
endfunction
function Blink___Disjoint takes nothing returns nothing
local integer p=(MA)
if HEV[p]then
call EDX(p)
endif
endfunction
function RKX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
//if GetSpellAbilityId()=='Albk' then
call XQX(KA,GetUnitX(OIX),GetUnitY(OIX),.0,400.,0,(2))
//endif
set OIX=null
//return false
endfunction
function RLX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function RKX))*/
call RegisterSpellEffectEvent('AIbk', function RKX)
endfunction
function RMX takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
if J2E==(HZV[(RPX)])and UnitAlive(J2E)then
if OEX(HKV[RPX],J2E)then
if not IsUnitType(J2E,UNIT_TYPE_ANCIENT)then
call UnitDamageTargetEx((GZV[RPX]),(J2E),(((GetUnitState(J2E,UNIT_STATE_MAX_LIFE)*.01)+(GetHeroStr(GZV[RPX],true)))*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx((GZV[RPX]),(J2E),(((GetUnitState(J2E,UNIT_STATE_LIFE)*.04))+1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
endif
call IssueTargetOrderById(J2E,851983,GZV[RPX])
call EHX(RPX)
endif
endif
endfunction
function RTX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(WN,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,(Deg2Rad(GetUnitFacing(OIX))))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\shadowbreath.MDX")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(3)
call EMX(OMX,G1V[OMX])
call MoveLocation(WN,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,600.)
set OIX=null
set EXX=null
endfunction
/*function RUX takes nothing returns boolean
if GetSpellAbilityId()=='A03K' then
call RTX()
endif
return false
endfunction*/
function RWX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function RUX))
set X_X=null*/
call RegisterSpellEffectEvent('A03K', function RTX)
endfunction
function RYX takes integer RPX,unit J2E returns nothing
local unit u=J2E
local real x=GetUnitX(u)+150.*Cos((GetUnitFacing(u)-180.)*bj_DEGTORAD)
local real y=GetUnitY(u)+150.*Sin((GetUnitFacing(u)-180.)*bj_DEGTORAD)
local unit s
local integer li=0
local integer SVE=GetHeroStr(GZV[RPX],true)
local integer hp=GetHeroStr(GZV[RPX],true)
local integer hp2
local integer hpleft
local integer dmg2
local integer dmgleft
if J2E==(HZV[(RPX)])then
set s=CreateUnit(GetOwningPlayer(GZV[RPX]),'nfel',x,y,GetUnitFacing(u))
call SetUnitAbilityLevel(s,'A05T',GetUnitAbilityLevel(GZV[RPX],'A05T')/2)
call UnitApplyTimedLife(s,'BTLF',10.+(I2R(GetHeroStr(GZV[RPX],true))/4.))
if hp >= 100 then
set hp2=hp/100
set hpleft=ModuloInteger(hp,100)
loop
exitwhen li>=hp2
call UnitAddItemById(s,'I03X')
set li=li+1
endloop
set li=0
loop
exitwhen li>=hpleft
call UnitAddItemById(s,'I026')
set li=li+1
endloop
else
loop
exitwhen li==hp
call UnitAddItemById(s,'I026')
set li=li+1
endloop
endif
set li=0
if SVE >= 100 then
set dmg2=SVE/100
set dmgleft=ModuloInteger(SVE,100)
loop
exitwhen li==dmg2
call UnitAddItemById(s,'I03Y')
set li=li+1
endloop
set li=0
loop
exitwhen li>=dmgleft
call UnitAddItemById(s,'I025')
set li=li+1
endloop
else
loop
exitwhen li==SVE
call UnitAddItemById(s,'I025')
set li=li+1
endloop
endif
set li=0
call IssueTargetOrderById(s,851983,u)
call EHX(RPX)
endif
set u=null
set s=null
endfunction
function RZX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetEventDamageSource()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(YN,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\Big Blue.mdx")
//call V9X(OMX,"war3mapImported\\PeeKay's Bonespirit.mdx")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G3V[OMX]=0.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(4)
call EMX(OMX,G1V[OMX])
call MoveLocation(YN,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XIX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,400.,.6)
call SetWidgetLife(OIX,GetWidgetLife(OIX)*.9)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Soulfire Missile2.mdx",OIX,"chest"))
set OIX=null
set EXX=null
endfunction
function R_X takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'S007')==1 and GetRandomInt(1,100)<=4. and GetTriggerUnit()!=GetEventDamageSource() and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())) then
call RZX()
endif
return false
endfunction
function R0X takes nothing returns nothing
local trigger X_X=CreateTrigger()
call TriggerAddCondition(X_X,Condition(function R_X))
call MOE(II,(X_X))
set X_X=null
endfunction
function R1X takes integer D0E returns nothing
call DestroyLightning(J9V[D0E])
set KVV[D0E]=null
set KEV[D0E]=null
set KRV[D0E]=false
set KIV[D0E]=1.
set KXV[D0E]=.0
set KOV[D0E]=.0
call JCE(D0E)
endfunction
function R2X takes unit R3X,unit R4X,string WEE returns nothing
local integer PXE=JBE()
if PXE==KAV then
set KAV=KAV+1
endif
if GetUnitFlyHeight(R3X)==0 then
set KXV[PXE]=50.
else
set KXV[PXE]=GetUnitFlyHeight(R3X)
endif
if GetUnitFlyHeight(R4X)==0 then
set KOV[PXE]=50.
else
set KOV[PXE]=GetUnitFlyHeight(R4X)
endif
set KVV[PXE]=R3X
set KEV[PXE]=R4X
set KRV[PXE]=true
set J9V[PXE]=AddLightningEx(WEE,true,GetUnitX(R3X),GetUnitY(R3X),KXV[PXE],GetUnitX(R4X),GetUnitY(R4X),KOV[PXE])
endfunction
function R5X takes nothing returns nothing
local integer i=1
loop
exitwhen i==KAV
if KRV[(i)]then
call MoveLightningEx(J9V[(i)],true,GetUnitX(KVV[(i)]),GetUnitY(KVV[(i)]),KXV[(i)],GetUnitX(KEV[(i)]),GetUnitY(KEV[(i)]),KOV[(i)])
set KIV[(i)]=KIV[(i)]-.03
if KIV[(i)]<=.0 then
call R1X((i))
else
call SetLightningColor(J9V[(i)],1.,1.,1.,KIV[(i)])
endif
endif
set i=i+1
endloop
endfunction
function R6X takes nothing returns nothing
call TimerStart(KNV,.03,true,function R5X)
endfunction
function R7X takes integer D0E,unit CBE,unit YSE returns nothing
call Z2E(D0E,GetUnitX(CBE),GetUnitY(CBE),GetUnitFlyHeight(CBE)+50.)
set FJV[(D0E)]=(KJV[D0E])
set FQV[(D0E)]=((KHV[D0E])*1.)*300.
call Z6E(D0E,KGV[D0E])
set KDV[D0E]=CBE
set KSV[D0E]=CBE
set KLV[D0E]=LVE()
call Z9E(D0E,YSE)
set F3V[(D0E)]=false
call Z7E(D0E)
endfunction
function R8X takes integer D0E,integer R9X returns nothing
set KBV[D0E]=R9X
set KCV[D0E]=R9X
endfunction
function IVX takes integer D0E returns nothing
call KGE(KLV[D0E])
call Z1E(D0E)
call KXE(D0E)
endfunction
function IEX takes nothing returns boolean
local integer TBE=KZV
local unit IXX=KUV
local boolean b
set KUV=GetFilterUnit()
set b=LNE(TBE)and IXX!=KUV and not(HaveSavedInteger(CX,((KLV[TBE])),GetHandleId((KUV))))and GetUnitTypeId(KUV)!='face'
set KUV=IXX
return b
endfunction
function IOX takes real x,real y returns integer
local integer D0E=JIE()
set K2V[D0E]=x
set K3V[D0E]=y
return D0E
endfunction
globals
group RAINBOW_GROUP=CreateGroup()
endglobals
function IRX takes integer RPX,unit J2E returns nothing//CLUSTER ROCKET
local unit u
local unit FoG
if UnitAlive(J2E)and J2E!=GZV[RPX] and IsUnitEnemy(J2E,GetOwningPlayer(GZV[RPX])) then
if OEX(HKV[RPX],J2E)then
if H0V[RPX] == "war3mapImported\\LightningArrow1.mdx" then
call UnitDamageTargetEx(GZV[RPX],J2E,GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.5,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set u = CreateUnit(GetOwningPlayer(GZV[RPX]),'h007',0.,0.,0.)
call UnitAddAbility(u,'A0FG')
call IssueTargetOrder(u,"purge",J2E)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\StormBolt\\StormBoltMissile.mdl",J2E,"chest"))
call UnitApplyTimedLife(u,'BTLF',1.)
endif
if H0V[RPX] == "Abilities\\Weapons\\FlamingArrow\\FlamingArrowMissile.mdl" then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\BallsOfFireMissile\\BallsOfFireMissile.mdl",J2E,"chest"))
call GroupEnumUnitsInRange(RAINBOW_GROUP,GetUnitX(J2E),GetUnitY(J2E),160.,null)
loop
set FoG=FirstOfGroup(RAINBOW_GROUP)
exitwhen FoG==null
if IsUnitEnemy(FoG,GetOwningPlayer(GZV[RPX])) and UnitAlive(FoG) then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\MagmaMissile2.mdx",FoG,"chest"))
call UnitDamageTargetEx(GZV[RPX],FoG,GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
call GroupRemoveUnit(RAINBOW_GROUP,FoG)
endloop
endif
if H0V[RPX] == "Abilities\\Weapons\\ColdArrow\\ColdArrowMissile.mdl" then
call UnitDamageTargetEx(GZV[RPX],J2E,GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.5,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set u = CreateUnit(GetOwningPlayer(GZV[RPX]),'h007',0.,0.,0.)
call UnitAddAbility(u,'A0D3')
call IssueTargetOrder(u,"thunderbolt",J2E)
call UnitApplyTimedLife(u,'BTLF',1.)
endif
if H0V[RPX] == "war3mapImported\\CentaurArcherMissile.mdx" then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",J2E,"chest"))
call UnitDamageTargetEx(GZV[RPX],J2E,GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*.75,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set u = CreateUnit(GetOwningPlayer(GZV[RPX]),'h007',GetUnitX(J2E),GetUnitY(J2E),0.)
call UnitAddAbility(u,'A0D1')
call SetUnitAbilityLevel(u,'A0D1',GetUnitAbilityLevel(GZV[RPX],'A021'))
call IssueTargetOrder(u,"acidbomb",J2E)
call UnitApplyTimedLife(u,'BTLF',15.)
endif
if H0V[RPX] == "war3mapImported\\s_Enchanted Arrow.mdx" then
call UnitDamageTargetEx(GZV[RPX],J2E,GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.,false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call GroupEnumUnitsInRange(RAINBOW_GROUP,GetUnitX(J2E),GetUnitY(J2E),175.,null)
call DestroyEffect(AddSpecialEffect("war3mapImported\\s_Nature'sBloom Effect.mdx",GetUnitX(J2E),GetUnitY(J2E)))
loop
set FoG=FirstOfGroup(RAINBOW_GROUP)
exitwhen FoG==null
if IsUnitAlly(FoG,GetOwningPlayer(GZV[RPX])) and UnitAlive(FoG) then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",FoG,"chest"))
if GetUnitState(FoG,UNIT_STATE_MAX_LIFE) >= GetWidgetLife(FoG) + (GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.) then
call SetWidgetLife(FoG,GetUnitState(FoG,UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(FoG,GetWidgetLife(FoG) + (GetHeroAgi(GZV[RPX],true)*GetUnitAbilityLevel(GZV[RPX],'A021')*1.))
endif
endif
call GroupRemoveUnit(RAINBOW_GROUP,FoG)
endloop
endif
else
call EKX(RPX,J2E)
endif
endif
set FoG=null
set u =null
endfunction
function IIX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX) + 50. * Cos(GetUnitFacing(OIX) * bj_DEGTORAD)
local real ONX=GetUnitY(OIX) + 50. * Sin(GetUnitFacing(OIX) * bj_DEGTORAD)
local real OJX=GetSpellTargetX()
local real OKX=GetSpellTargetY()
local real CCE=SquareRoot((OAX-OJX)*(OAX-OJX)+(ONX-OKX)*(ONX-OKX))
local real OLX=Atan2((OKX-ONX),(OJX-OAX))
local integer OMX=0
call MoveLocation(VB,OAX,ONX)
set OMX=XAX(OAX,ONX,64.,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\Magic Missile.mdx")
call V8X(OMX,1.)
set G2V[OMX]=0.
set G6V[OMX]=5.
set G8V[OMX]=true
set HVV[OMX]=true
set HNV[OMX]=(6)
call SaveInteger(ZA,0,((OMX)),(IOX(OJX,OKX)))
set OJX=OAX+(CCE*.5)*Cos(OLX)
set OKX=ONX+(CCE*.5)*Sin(OLX)
call MoveLocation(VB,OJX,OKX)
call XIX(OMX,OJX,OKX,GetLocationZ(VB)+600.,1000.,.15)
set OIX=null
endfunction
/*function IAX takes nothing returns boolean
if GetSpellAbilityId()=='A021' then
call IIX()
endif
return false
endfunction*/
function INX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function IAX))*/
call RegisterSpellEffectEvent('A021', function IIX)
endfunction
function IBX takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
if H0V[RPX] == "war3mapImported\\BluefireBolt.mdx" then
if J2E ==HZV[RPX] and UnitAlive(J2E) then
call UnitDamageTargetEx((GZV[RPX]),(J2E),G3V[RPX],false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BluefireBolt.mdx",J2E,"origin"))
call EHX(RPX)
endif
endif
if H0V[RPX] == "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl" then
if J2E!=GZV[RPX]and UnitAlive(J2E)and IsUnitEnemy(J2E,GetOwningPlayer(GZV[RPX]))and not IsUnitType(J2E,UNIT_TYPE_ANCIENT)then
if OEX(HKV[RPX],J2E)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",J2E,"origin"))
if IsUnitType(J2E,UNIT_TYPE_HERO) then
call UnitDamageTargetEx((GZV[RPX]),(J2E),.03*((ZS[GetUnitAbilityLevel(GZV[RPX],'A035')])*1.)+(GetUnitAbilityLevel(GZV[RPX],'A035')*.2*GetHeroInt(GZV[RPX],true)),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx((GZV[RPX]),(J2E),((ZS[GetUnitAbilityLevel(GZV[RPX],'A035')])*1.)+(GetUnitAbilityLevel(GZV[RPX],'A035')*.2*GetHeroInt(GZV[RPX],true)),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
endif
call EHX(RPX)
endif
endif
if J2E!=GZV[RPX]and UnitAlive(J2E)and IsUnitEnemy(J2E,GetOwningPlayer(GZV[RPX]))and IsUnitType(J2E,UNIT_TYPE_ANCIENT) and BRTON then
if OEX(HKV[RPX],J2E)then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl",J2E,"origin"))
if IsUnitType(J2E,UNIT_TYPE_HERO) then
call UnitDamageTargetEx((GZV[RPX]),(J2E),(((ZS[GetUnitAbilityLevel(GZV[RPX],'A035')])*1.)+(GetUnitAbilityLevel(GZV[RPX],'A035')*.2*GetHeroInt(GZV[RPX],true)))*.25,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx((GZV[RPX]),(J2E),(((ZS[GetUnitAbilityLevel(GZV[RPX],'A035')])*1.)+(GetUnitAbilityLevel(GZV[RPX],'A035')*.2*GetHeroInt(GZV[RPX],true)))/3.,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
endif
call EHX(RPX)
endif
endif
endif
endfunction
function ICX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
if GetSpellTargetUnit() !=null then
set EXX=GetSpellTargetUnit()
endif
call MoveLocation(EB,OAX,ONX)
set OMX=XAX(OAX,ONX,64.,Deg2Rad(GetUnitFacing(OIX)))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(6)
call EMX(OMX,G1V[OMX])
call MoveLocation(EB,OJX,OKX)
if GetSpellTargetUnit() !=null then
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1000.)
else
set HEV[OMX]=false
set OJX=GetSpellTargetX()
set OKX=GetSpellTargetY()
call MoveLocation(EB,OJX,OKX)
call XRX(OMX,OJX,OKX,GetLocationZ(EB)+65.,1000.)
endif
set OIX=null
set EXX=null
endfunction
/*function IDX takes nothing returns boolean
if GetSpellAbilityId()=='A035' then
call ICX()
endif
return false
endfunction*/
function IFX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function IDX))
set X_X=null*/
call RegisterSpellEffectEvent('A035', function ICX)
endfunction
function IGX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetEventDamageSource()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
local location IHX
local location IJX
set OJX=GetUnitX(EXX)
set OKX=GetUnitY(EXX)
set IHX=Location(OJX,OKX)
set IJX=CNE(IHX,GetRandomReal(150.,200.),GetRandomReal(.0,360.))
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(XB,OJX,OKX)
set OMX=XAX(GetLocationX(IJX),GetLocationY(IJX),1800.+GetLocationZ(XB),OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Weapons\\RockBoltMissile\\RockBoltMissile.mdl")
call V8X(OMX,1.)
set G2V[OMX]=.0
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=false
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HBV[OMX]=(7)
set HCV[OMX]=(8)
call EMX(OMX,G1V[OMX])
call MoveLocation(XB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1500.)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",EXX,"chest"))
call RemoveLocation(IHX)
call RemoveLocation(IJX)
set IHX=null
set IJX=null
set OIX=null
set EXX=null
endfunction
function IKX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B01S')!=0 and GetRandomInt(1,100)<=GetUnitAbilityLevel(GetTriggerUnit(),'A03M')*2 and GetTriggerUnit()!=GetEventDamageSource() and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())) then
call IGX()
endif
return false
endfunction
function ILX takes nothing returns nothing
local trigger X_X=CreateTrigger()
call TriggerAddCondition(X_X,Condition(function IKX))
call MOE(II,(X_X))
set X_X=null
endfunction
function IMX takes nothing returns boolean
local unit IPX
local real x
local real y
local integer lvl
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RB))then
set x=GetUnitX(RB)
set y=GetUnitY(RB)
set lvl = GetUnitAbilityLevel(RB,'A006')
set IPX=CreateUnit((GetOwningPlayer(RB)),'h007',x,y,.0)
call UnitApplyTimedLife(IPX,'BTLF',1.)
call UnitAddAbility(IPX,'A0CT')
call SetUnitAbilityLevel(IPX,'A0CT',lvl)
call IssueTargetOrderById(IPX,852231,GetFilterUnit())
call UnitDamageTargetEx(RB,GetFilterUnit(),(GetHeroStr(RB,true)+GetHeroInt(RB,true))*.45*lvl,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
set IPX=null
return false
endfunction
function IQX takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
if IsUnitEnemy(J2E,GetOwningPlayer(GZV[RPX]))and UnitAlive(J2E)then
if OEX(HKV[RPX],J2E)then
set RB=GZV[RPX]
call GroupEnumUnitsInRange(OB,RQX,RSX,225.,Filter(function IMX))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Firaga.mdx",J2E,"origin"))
call EHX(RPX)
endif
endif
endfunction
function ISX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(IB,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,(Deg2Rad(GetUnitFacing(OIX))))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\OrbOfFire.mdx")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(7)
call EMX(OMX,G1V[OMX])
call MoveLocation(IB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,650.)
set OIX=null
set EXX=null
endfunction
/*function ITX takes nothing returns boolean
if GetSpellAbilityId()=='A006' then
call ISX()
endif
return false
endfunction*/
function IUX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function ITX))
set X_X=null*/
call RegisterSpellEffectEvent('A006', function ISX)
endfunction
function IWX takes nothing returns boolean
local unit u
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(NB))then
set u=CreateUnit(GetOwningPlayer(NB),'h007',GetUnitX(NB),GetUnitY(NB),.0)
call UnitAddAbility(u,'A028')
call SetUnitAbilityLevel(u,'A028',GetUnitAbilityLevel(NB,'A017'))
call IssueTargetOrderById(u,852095,GetFilterUnit())
call UnitApplyTimedLife(u,'BTLF',1.)
endif
set u=null
return false
endfunction
function IYX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
local location IHX
local location IJX
set OJX=GetSpellTargetX()
set OKX=GetSpellTargetY()
set IHX=Location(OJX,OKX)
set IJX=CNE(IHX,GetRandomReal(800.,1000.),GetRandomReal(.0,360.))
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(BB,OJX,OKX)
set OMX=XAX(GetLocationX(IJX),GetLocationY(IJX),1200.+GetLocationZ(BB),OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\MagmaMissile2.mdx")
call V8X(OMX,12.)
set G2V[OMX]=.0
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=false
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HBV[OMX]=(9)
call MoveLocation(BB,OJX,OKX)
call XRX(OMX,OJX,OKX,GetLocationZ(BB),1200.)
call RemoveLocation(IHX)
call RemoveLocation(IJX)
set IHX=null
set IJX=null
set OIX=null
endfunction
/*function IZX takes nothing returns boolean
if GetSpellAbilityId()=='A017' then
call IYX()
endif
return false
endfunction*/
function I_X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function IZX))
set X_X=null*/
call RegisterSpellEffectEvent('A017', function IYX)
endfunction
function I0X takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
local unit IPX
if J2E==(HZV[(RPX)])and IsUnitAliveBJ(J2E)then
if OEX(HKV[RPX],J2E)then
set IPX=CreateUnit((GetOwningPlayer(GZV[RPX])),'h007',RQX,RSX,.0)
call UnitApplyTimedLife(IPX,'BTLF',1.)
call UnitAddAbility(IPX,'A09O')
call SetUnitAbilityLevel(IPX,'A09O',GetUnitAbilityLevel(GZV[RPX],'A02E'))
if IsUnitType(J2E,UNIT_TYPE_ANCIENT) then
call UnitDamageTargetEx(GZV[RPX],J2E,(GetUnitAbilityLevel(GZV[RPX],'A02E')*.10*GetUnitAbilityLevel(GZV[RPX],'A02E')*GetHeroInt(GZV[RPX],true))+40.,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx(GZV[RPX],J2E,GetUnitAbilityLevel(GZV[RPX],'A02E')*.10*GetUnitAbilityLevel(GZV[RPX],'A02E')*GetHeroInt(GZV[RPX],true),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
endif
call IssueTargetOrderById(IPX,852095,J2E)
call EHX(RPX)
endif
endif
set IPX=null
endfunction
function I1X takes nothing returns nothing
local unit OIX=LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local real CDE=Atan2(GetUnitY(EXX)-GetUnitY(OIX),GetUnitX(EXX)-GetUnitX(OIX))
local integer OMX=0
call MoveLocation(CB,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,CDE)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(8)
call EMX(OMX,G1V[OMX])
call MoveLocation(CB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1500.)
set OIX=null
set EXX=null
endfunction
/*function I2X takes nothing returns boolean
if GetSpellAbilityId()=='A02E' then
call I1X()
endif
return false
endfunction*/
function I3X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function I2X))
set X_X=null*/
call RegisterSpellEffectEvent('A02E', function I1X)
endfunction
function I4X takes integer RPX,unit uu returns nothing
local unit u2=uu
local unit su
if UnitAlive(u2)and IsUnitEnemy(u2,G_V[RPX])then
call UnitDamageTargetEx((GZV[RPX]),(u2),((G3V[RPX])*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
if IsUnitType(u2,UNIT_TYPE_ANCIENT)==false then
set su=CreateUnit(G_V[RPX],'h007',HHV[RPX],HJV[RPX],.0)
call UnitApplyTimedLife(su,'BTLF',1.)
call UnitAddAbility(su,'A040')
call IssueTargetOrderById(su,852226,u2)
endif
call EHX(RPX)
endif
set u2=null
set su=null
endfunction
function I5X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local integer p=0
local real tx
local real ty
local real a
local real tf
local real I6X
if LOV[PXE]==0 then
call JRE(PXE)
call ReleaseTimer(t)
call EHX(p)
else
set tf=GetRandomReal(LVV[PXE]-K8V[PXE],LVV[PXE]+K8V[PXE])
set tx=(((LEV[PXE])*1.)+((3000.)*1.)*Cos(((tf)*1.)*bj_DEGTORAD))
set ty=(((LXV[PXE])*1.)+((3000.)*1.)*Sin(((tf)*1.)*bj_DEGTORAD))
set a=tf*bj_DEGTORAD
call MoveLocation(DB,LEV[PXE],LXV[PXE])
set p=XAX(LEV[PXE],LXV[PXE],65.,a)
set GZV[p]=K9V[PXE]
set G_V[p]=GetOwningPlayer(K9V[PXE])
call V9X(p,"war3mapImported\\BlizMissile.mdx")
set G3V[p]=AT[GetUnitAbilityLevel(K9V[PXE],'A041')]
call V8X(p,.8)
set G2V[p]=60.
set G8V[p]=true
set HVV[p]=true
set HOV[p]=true
set G1V[p]=72.
set HCV[p]=(9)
set HBV[p]=(10)
call MoveLocation(DB,tx,ty)
set I6X=GetLocationZ(DB)
if I6X<=0 then
set I6X=-I6X
endif
call XRX(p,tx,ty,65.+I6X,800.)
set LOV[PXE]=LOV[PXE]-1
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function I5X)
endif
set t=null
endfunction
function I7X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local integer I8X=20+(3*GetUnitAbilityLevel(OIX,'A041'))
local real cx=(((GetUnitX(OIX))*1.)+((80.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real cy=(((GetUnitY(OIX))*1.)+((80.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real UAE=QTE(GetUnitX(OIX),GetUnitY(OIX),x,y)-180.
local real CDE
local real K0E=GetUnitFacing(OIX)
local real tx
local real ty
local real tf
local real a
local timer t=NewTimer()
local integer PXE=JOE()
if UAE>=820 then
set UAE=820.
endif
if UAE<=.0 then
set UAE=.0
endif
set CDE=(180.-UAE*.213414634)/2.
set K7V[PXE]=UAE
set K8V[PXE]=CDE
set K9V[PXE]=OIX
set LVV[PXE]=K0E
set LEV[PXE]=cx
set LXV[PXE]=cy
set LOV[PXE]=I8X
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function I5X)
set t=null
set OIX=null
endfunction
/*function I9X takes nothing returns boolean
if GetSpellAbilityId()=='A041' then
call I7X()
endif
return false
endfunction*/
function AVX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function I9X))
set X_X=null*/
call RegisterSpellEffectEvent('A041', function I7X)
endfunction
function AEX takes integer p,unit u returns nothing
local real x=GetUnitX(u)
local real y=GetUnitY(u)
if UnitAlive(u)and u!=GZV[p]then
call UnitDamageTargetEx((GZV[p]),(u),((G3V[p])*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call SetUnitX(u,x+(600.*.03125)*Cos(EOX(p)))
call SetUnitY(u,y+(600.*.03125)*Sin(EOX(p)))
call EKX(p,u)
endif
endfunction
function AXX takes integer p,destructable d returns nothing
call KillDestructable(d)
endfunction
function GravityBall___ProjColl takes nothing returns nothing
local integer E3X=MA
local integer TBE=(PA)
if GZV[E3X]!=GZV[TBE]then
call ECX(E3X,HHV[E3X]+((600.*2.75)*.03125)*Cos(EOX(TBE)),HJV[E3X]+((600.*2.75)*.03125)*Sin(EOX(TBE)),HKV[E3X],true)
endif
endfunction
function AOX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=GetSpellTargetX()
local real OKX=GetSpellTargetY()
local real OLX=Atan2((OKX-ONX),(OJX-OAX))
local integer OMX=0
call MoveLocation(FB,OAX,ONX)
set OMX=XAX(OAX,ONX,GetUnitFlyHeight(OIX)+50.+GetLocationZ(FB),OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Undead\\DarkSummoning\\DarkSummonMissile.mdl")
set G3V[OMX]=100.*.03125
call V8X(OMX,1.5)
set G2V[OMX]=50.
set G4V[OMX]=3000./800.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=true
set G1V[OMX]=150.
set G0V[OMX]=150.
set HIV[OMX]=(11)
set HCV[OMX]=(10)
set HBV[OMX]=(12)
set HDV[OMX]=(1)
call MoveLocation(FB,OJX,OKX)
call XRX(OMX,OJX,OKX,50.+GetLocationZ(FB),800.)
set OIX=null
endfunction
/*function ARX takes nothing returns boolean
if GetSpellAbilityId()=='A005' then
call AOX()
endif
return false
endfunction*/
function AIX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function ARX))*/
call RegisterSpellEffectEvent('A005', function AOX)
endfunction
function AAX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local location IHX=GetSpellTargetLoc()
local location IJX=CNE(IHX,400.,GetUnitFacing(OIX)-90.)
local location ANX=CNE(IHX,400.,GetUnitFacing(OIX)+90.)
local integer OMX=0
local integer ABX=0
local integer ACX=0
if EXX==null then
set OJX=GetSpellTargetX()
set OKX=GetSpellTargetY()
else
set OJX=GetUnitX(EXX)
set OKX=GetUnitY(EXX)
endif
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(GB,OAX,ONX)
set OMX=XAX(OAX,ONX,GetUnitFlyHeight(OIX)+50.+GetLocationZ(GB),OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
set G3V[OMX]=(500*GetUnitAbilityLevel(OIX,'A022')*GetUnitAbilityLevel(OIX,'A022'))+(2*GetHeroStr(OIX,true)* GetUnitAbilityLevel(OIX,'A022'))
call V8X(OMX,2.)
set G2V[OMX]=50.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=false
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HBV[OMX]=(13)
call EMX(OMX,G1V[OMX])
call MoveLocation(GB,OJX,OKX)
if EXX!=null then
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+50.+GetLocationZ(GB),1000.)
else
set JFV[OMX]=true
set JGV[OMX]=40+(GetUnitAbilityLevel(OIX,'A022')*5)
set JCV[OMX]=.01
set JDV[OMX]=.01
call XIX(OMX,OJX,OKX,GetLocationZ(GB),1000.,.35)
endif
set ABX=XAX(OAX,ONX,GetUnitFlyHeight(OIX)+50.+GetLocationZ(GB),OLX)
set GZV[ABX]=OIX
set G_V[ABX]=GetOwningPlayer(OIX)
call V9X(ABX,"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
set G3V[ABX]=500*GetUnitAbilityLevel(OIX,'A022')
call V8X(ABX,2.)
set G2V[ABX]=50.
set G8V[ABX]=true
set HVV[ABX]=true
set HOV[ABX]=false
set HXV[ABX]=false
set G1V[ABX]=64.
set G0V[ABX]=64.
set HBV[ABX]=(13)
call EMX(ABX,G1V[ABX])
call MoveLocation(GB,OJX,OKX)
if EXX!=null then
call EEX(ABX,EXX)
set HEV[ABX]=true
call XRX(ABX,OJX,OKX,GetUnitFlyHeight(EXX)+50.+GetLocationZ(GB),1000.)
else
set JFV[ABX]=true
set JGV[ABX]=30+(GetUnitAbilityLevel(OIX,'A022')*5)
set JCV[ABX]=.0
set JDV[ABX]=.0
call XIX(ABX,GetLocationX(IJX),GetLocationY(IJX),GetLocationZ(GB),1000.,.35)
endif
set ACX=XAX(OAX,ONX,GetUnitFlyHeight(OIX)+50.+GetLocationZ(GB),OLX)
set GZV[ACX]=OIX
set G_V[ACX]=GetOwningPlayer(OIX)
call V9X(ACX,"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
set G3V[ACX]=500*GetUnitAbilityLevel(OIX,'A022')
call V8X(ACX,2.)
set G2V[ACX]=50.
set G8V[ACX]=true
set HVV[ACX]=true
set HOV[ACX]=false
set HXV[ACX]=false
set G1V[ACX]=64.
set G0V[ACX]=64.
set HBV[ACX]=(13)
call EMX(ACX,G1V[ACX])
call MoveLocation(GB,OJX,OKX)
if EXX!=null then
call EEX(ACX,EXX)
set HEV[ACX]=true
call XRX(ACX,OJX,OKX,GetUnitFlyHeight(EXX)+50.+GetLocationZ(GB),1000.)
else
set JFV[ACX]=true
set JGV[ACX]=30+(GetUnitAbilityLevel(OIX,'A022')*5)
set JCV[ACX]=.0
set JDV[ACX]=.0
call XIX(ACX,GetLocationX(ANX),GetLocationY(ANX),GetLocationZ(GB),1000.,.35)
endif
call RemoveLocation(IHX)
call RemoveLocation(IJX)
call RemoveLocation(ANX)
set IHX=null
set IJX=null
set ANX=null
set OIX=null
set EXX=null
endfunction
/*function ADX takes nothing returns boolean
if GetSpellAbilityId()=='A022' then
call AAX()
endif
return false
endfunction*/
function AFX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function ADX))
set X_X=null*/
call RegisterSpellEffectEvent('A022', function AAX)
endfunction
function AGX takes integer RPX,unit uu returns nothing
local unit u2=uu
local real a=bj_RADTODEG*Atan2(GetUnitY(u2)-HJV[RPX],GetUnitX(u2)-HHV[RPX])
if UnitAlive(u2)and IsUnitEnemy(u2,G_V[RPX]) and not IsUnitType(u2,UNIT_TYPE_STRUCTURE)then
if IsUnitType(u2,UNIT_TYPE_ANCIENT) and not BRTON then
call UnitDamageTargetEx((GZV[RPX]),(u2),((G3V[RPX])/3.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
else
if BRTON and IsUnitType(u2,UNIT_TYPE_ANCIENT) then
call UnitDamageTargetEx((GZV[RPX]),(u2),((G3V[RPX])*3.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx((GZV[RPX]),(u2),((G3V[RPX])*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
endif
endif
call M6E(u2,25.+(5.*GetUnitAbilityLevel(GZV[RPX],'A06S'))+(((H4V[(RPX)]/.03125)-1300.)/20.),.2,a,"war3mapImported\\SlideWater.mdx",.0,false,false)
call EHX(RPX)
endif
set u2=null
endfunction
function AHX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local integer p=0
local real tx
local real ty
local real a
local real tf
local real I6X
local real cx=(((GetUnitX(LCV[PXE]))*1.)+((80.)*1.)*Cos(((GetUnitFacing(LCV[PXE]))*1.)*bj_DEGTORAD))
local real cy=(((GetUnitY(LCV[PXE]))*1.)+((80.)*1.)*Sin(((GetUnitFacing(LCV[PXE]))*1.)*bj_DEGTORAD))
if LHV[PXE]==0 then
call JXE(PXE)
call ReleaseTimer(t)
call EHX(p)
else
set tf=GetRandomReal(LDV[PXE]-LBV[PXE],LDV[PXE]+LBV[PXE])
set tx=(((LFV[PXE])*1.)+((3000.)*1.)*Cos(((tf)*1.)*bj_DEGTORAD))
set ty=(((LGV[PXE])*1.)+((3000.)*1.)*Sin(((tf)*1.)*bj_DEGTORAD))
set a=tf*bj_DEGTORAD
call MoveLocation(HB,LFV[PXE],LGV[PXE])
set p=XAX(cx,cy,65.,a)
set GZV[p]=LCV[PXE]
set G_V[p]=GetOwningPlayer(LCV[PXE])
call V9X(p,"Abilities\\Weapons\\SeaElementalMissile\\SeaElementalMissile.mdl")
set G3V[p]=GetHeroInt(LCV[PXE],true)*GetUnitAbilityLevel(LCV[PXE],'A06S')
call V8X(p,1.)
set G2V[p]=60.
set G8V[p]=true
set HVV[p]=true
set HOV[p]=true
set G1V[p]=72.
set HIV[p]=(14)
set HCV[p]=(11)
set HBV[p]=(15)
set JGV[p]=1300
call MoveLocation(HB,tx,ty)
set I6X=GetLocationZ(HB)
if I6X<=0 then
set I6X=-I6X
endif
call XRX(p,tx,ty,65.+I6X,1300.)
call M6E(LCV[PXE],5.,.02,GetUnitFacing(LCV[PXE])-180.,"war3mapImported\\SlideWater.mdx",.0,false,false)
set LHV[PXE]=LHV[PXE]-1
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function AHX)
endif
set t=null
endfunction
function AJX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local integer I8X=30
local real cx=(((GetUnitX(OIX))*1.)+((80.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real cy=(((GetUnitY(OIX))*1.)+((80.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local real UAE=QTE(GetUnitX(OIX),GetUnitY(OIX),x,y)-180.
local real CDE
local real K0E=GetUnitFacing(OIX)
local real tx
local real ty
local real tf
local real a
local timer t=NewTimer()
local integer PXE=JEE()
if UAE>=820 then
set UAE=820.
endif
if UAE<=.0 then
set UAE=.0
endif
set CDE=(180.-UAE*.213414634)/2.
set LNV[PXE]=UAE
set LBV[PXE]=CDE
set LCV[PXE]=OIX
set LDV[PXE]=K0E
set LFV[PXE]=cx
set LGV[PXE]=cy
set LHV[PXE]=I8X
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function AHX)
set t=null
set OIX=null
endfunction
/*function AKX takes nothing returns boolean
if GetSpellAbilityId()=='A06S' then
call AJX()
endif
return false
endfunction*/
function ALX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function AKX))
set X_X=null*/
call RegisterSpellEffectEvent('A06S', function AJX)
endfunction
function AMX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call UnitPauseTimedLife(LMV[PXE],false)
call UnitRemoveAbility(LMV[PXE],'A05H')
call DestroyEffect(LPV[PXE])
call ReleaseTimer(GetExpiredTimer())
call JVE(PXE)
set t=null
endfunction
function APX takes integer RPX,unit J2E returns nothing
local timer t
local integer i
local integer PXE=0
if J2E==(HZV[(RPX)])then
if UnitAlive(J2E)and GetUnitAbilityLevel(J2E,'A05H')!=1 then
call UnitPauseTimedLife(J2E,true)
call UnitAddAbility(J2E,'A05H')
set t=NewTimer()
set PXE=H9E()
set LMV[PXE]=J2E
set LPV[PXE]=AddSpecialEffectTarget("war3mapImported\\AirEssence.mdx",J2E,"origin")
call SetTimerData(t,PXE)
call TimerStart(t,10.*I2R(GetUnitAbilityLevel(GZV[RPX],'A04Y')),false,function AMX)
if GetRandomInt(1,100)<=2*GetUnitAbilityLevel(GZV[RPX],'A04Y')then
call UnitRemoveAbility(GZV[RPX],'A04W')
call UnitAddAbility(GZV[RPX],'A04W')
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",GZV[RPX],"chest"))
endif
if GetRandomInt(1,100)<=GetUnitAbilityLevel(GZV[RPX],'A04Y')and GetUnitAbilityLevel(GZV[RPX],'A04X')!=0 then
set i=GetUnitAbilityLevel(GZV[RPX],'A04X')
call UnitRemoveAbility(GZV[RPX],'A04X')
call UnitAddAbility(GZV[RPX],'A04X')
call SetUnitAbilityLevel(GZV[RPX],'A04X',i)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\s_Nature'sBloom Effect.mdx",GZV[RPX],"chest"))
endif
endif
call EHX(RPX)
elseif GetOwningPlayer(J2E)==GetOwningPlayer(GZV[RPX])and not IsUnitType(J2E,UNIT_TYPE_HERO)and UnitAlive(J2E)and GetUnitAbilityLevel(J2E,'A05H')!=1 then
call UnitPauseTimedLife(J2E,true)
call UnitAddAbility(J2E,'A05H')
set t=NewTimer()
set PXE=H9E()
set LMV[PXE]=J2E
set LPV[PXE]=AddSpecialEffectTarget("war3mapImported\\AirEssence.mdx",J2E,"origin")
call SetTimerData(t,PXE)
call TimerStart(t,5.*I2R(GetUnitAbilityLevel(GZV[RPX],'A04Y')),false,function AMX)
endif
set t=null
endfunction
function AQX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(JB,OAX,ONX)
set OMX=XAX(OAX,ONX,64.,Deg2Rad(GetUnitFacing(OIX)))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Weapons\\SorceressMissile\\SorceressMissile.mdl")
call V8X(OMX,3.5)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=128.
set G0V[OMX]=64.
set HCV[OMX]=(12)
call EMX(OMX,G1V[OMX])
call MoveLocation(JB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1000.)
set OIX=null
set EXX=null
endfunction
/*function ASX takes nothing returns boolean
if GetSpellAbilityId()=='A04Y' then
call AQX()
endif
return false
endfunction*/
function ATX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function ASX))
set X_X=null*/
call RegisterSpellEffectEvent('A04Y', function AQX)
endfunction
function AUX takes nothing returns boolean
if GetOwningPlayer(GetFilterUnit())==GetOwningPlayer(LB)and not IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)and UnitAlive(GetFilterUnit())then
if MB+GetWidgetLife(GetFilterUnit())>=GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(GetFilterUnit(),GetUnitState(GetFilterUnit(),UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(GetFilterUnit(),GetWidgetLife(GetFilterUnit())+MB)
endif
endif
return false
endfunction
function AWX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if LYV[PXE]==1000 then
call DestroyEffect(LWV[PXE])
call ReleaseTimer(GetExpiredTimer())
call H8E(PXE)
else
set LB=LUV[PXE]
set MB=LZV[PXE]
call GroupEnumUnitsInRange(KB,GetUnitX(LUV[PXE]),GetUnitY(LUV[PXE]),600.,Filter(function AUX))
set LYV[PXE]=LYV[PXE]+1
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function AWX)
endif
set t=null
endfunction
function AYX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if LYV[PXE]==1000 then
call DestroyEffect(LWV[PXE])
call ReleaseTimer(GetExpiredTimer())
call H8E(PXE)
else
if LZV[PXE]+GetWidgetLife(LUV[PXE])>=GetUnitState(LUV[PXE],UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(LUV[PXE],GetUnitState(LUV[PXE],UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(LUV[PXE],GetWidgetLife(LUV[PXE])+LZV[PXE])
endif
set LYV[PXE]=LYV[PXE]+1
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function AYX)
endif
set t=null
endfunction
function AZX takes integer RPX,unit J2E returns nothing
local integer li=0
local integer hp=(7*GetUnitAbilityLevel(GZV[RPX],'A05B')) + 2*PC
local timer t
local integer PXE=0
if LWMON and not GAMEM then
set hp=(7*GetUnitAbilityLevel(GZV[RPX],'A05B')) + (GetHeroLevel(GZV[RPX])/3)
endif
if J2E==(HZV[(RPX)])and UnitAlive(J2E)then
if GetRandomInt(1,100)<=GetUnitAbilityLevel(GZV[RPX],'A05B')then
set t=NewTimer()
set PXE=H7E()
set LUV[PXE]=J2E
set LWV[PXE]=AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Tranquility\\Tranquility.mdl",J2E,"origin")
set LYV[PXE]=0
set LZV[PXE]=I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))*20.*I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))/2000.
if(LZV[PXE]*2000.)+GetWidgetLife(J2E)>=GetUnitState(J2E,UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(J2E,GetUnitState(J2E,UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(J2E,GetWidgetLife(J2E)+(LZV[PXE]*2000.))
endif
loop
exitwhen li==hp
if GetUnitAbilityLevel(J2E,'BTLF') != 0 then
call UnitAddItemById(J2E,'I021')
endif
set li=li+1
endloop
set li=0
call UnitAddAbility(J2E,'A04Z')
call SetUnitAbilityLevel(J2E,'A04Z',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call UnitAddAbility(J2E,'A052')
call SetUnitAbilityLevel(J2E,'A052',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ForestBolt.mdx",J2E,"origin"))
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function AWX)
call EHX(RPX)
else
set t=NewTimer()
set PXE=H7E()
set LUV[PXE]=J2E
set LWV[PXE]=AddSpecialEffectTarget("war3mapImported\\EmeraldPortal.mdx",J2E,"origin")
set LYV[PXE]=0
set LZV[PXE]=I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))*20.*I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))/2000.
if(LZV[PXE]*2000.)+GetWidgetLife(J2E)>=GetUnitState(J2E,UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(J2E,GetUnitState(J2E,UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(J2E,GetWidgetLife(J2E)+(LZV[PXE]*2000.))
endif
loop
exitwhen li==hp
if GetUnitAbilityLevel(J2E,'BTLF') != 0 then
call UnitAddItemById(J2E,'I021')
endif
set li=li+1
endloop
set li=0
call UnitAddAbility(J2E,'A04Z')
call SetUnitAbilityLevel(J2E,'A04Z',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call UnitAddAbility(J2E,'A052')
call SetUnitAbilityLevel(J2E,'A052',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ForestBolt.mdx",J2E,"origin"))
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function AYX)
call EHX(RPX)
endif
else
if GetOwningPlayer(J2E)==GetOwningPlayer(GZV[RPX])and not IsUnitType(J2E,UNIT_TYPE_HERO)and UnitAlive(J2E) and GetUnitTypeId(J2E) != 'n01C' and GetUnitTypeId(J2E) != 'n01G' then
set t=NewTimer()
set PXE=H7E()
set LUV[PXE]=J2E
set LWV[PXE]=AddSpecialEffectTarget("war3mapImported\\EmeraldPortal.mdx",J2E,"origin")
set LYV[PXE]=0
set LZV[PXE]=I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))*10.*I2R(GetUnitAbilityLevel(GZV[RPX],'A05B'))/2000.
if(LZV[PXE]*2000.)+GetWidgetLife(J2E)>=GetUnitState(J2E,UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(J2E,GetUnitState(J2E,UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(J2E,GetWidgetLife(J2E)+(LZV[PXE]*2000.))
endif
call UnitAddAbility(J2E,'A050')
call SetUnitAbilityLevel(J2E,'A050',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call UnitAddAbility(J2E,'A053')
call SetUnitAbilityLevel(J2E,'A053',GetUnitAbilityLevel(GZV[RPX],'A05B'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ForestBolt.mdx",J2E,"origin"))
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function AYX)
endif
endif
set t=null
endfunction
function A_X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(PB,OAX,ONX)
set OMX=XAX(OAX,ONX,64.,Deg2Rad(GetUnitFacing(OIX)))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Weapons\\KeeperGroveMissile\\KeeperGroveMissile.mdl")
call V8X(OMX,2.5)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=128.
set G0V[OMX]=64.
set HCV[OMX]=(13)
call EMX(OMX,G1V[OMX])
call MoveLocation(PB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1000.)
set OIX=null
set EXX=null
endfunction
/*function A0X takes nothing returns boolean
if GetSpellAbilityId()=='A05B' then
call A_X()
endif
return false
endfunction*/
function A1X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function A0X))
set X_X=null*/
call RegisterSpellEffectEvent('A05B', function A_X)
endfunction
function A2X takes integer RPX,unit J2E returns nothing
local unit u
local integer li=0
local integer SVE=(2*GetUnitAbilityLevel(GZV[RPX],'A054')) + PC
if LWMON and not GAMEM then
set SVE=(2*GetUnitAbilityLevel(GZV[RPX],'A054')) + (GetHeroLevel(GZV[RPX])*3/2)
endif
if J2E==(HZV[(RPX)])and UnitAlive(J2E)then
if GetRandomInt(1,100)<=GetUnitAbilityLevel(GZV[RPX],'A054')then
call UnitAddAbility(J2E,'A056')
call SetUnitAbilityLevel(J2E,'A056',GetUnitAbilityLevel(GZV[RPX],'A054'))
call UnitAddAbility(J2E,'A058')
call SetUnitAbilityLevel(J2E,'A058',GetUnitAbilityLevel(GZV[RPX],'A054'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BlessingofElun.mdx",J2E,"origin"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\RedCharkaExplosion.mdx",J2E,"origin"))
loop
exitwhen li==SVE
if GetUnitAbilityLevel(J2E,'BTLF') != 0 then
call UnitAddItemById(J2E,'I022')
endif
set li=li+1
endloop
set li=0
set u=CreateUnit(GetOwningPlayer(J2E),'h007',GetUnitX(J2E),GetUnitY(J2E),.0)
call UnitApplyTimedLife(u,'BTLF',1.)
call UnitAddAbility(u,'A055')
call SetUnitAbilityLevel(u,'A055','A054')
call IssueImmediateOrderById(u,852164)
call EHX(RPX)
else
call UnitAddAbility(J2E,'A056')
call SetUnitAbilityLevel(J2E,'A056',GetUnitAbilityLevel(GZV[RPX],'A054'))
call UnitAddAbility(J2E,'A058')
call SetUnitAbilityLevel(J2E,'A058',GetUnitAbilityLevel(GZV[RPX],'A054'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BlessingofElun.mdx",J2E,"origin"))
loop
exitwhen li==SVE
if GetUnitAbilityLevel(J2E,'BTLF') != 0 then
call UnitAddItemById(J2E,'I022')
endif
set li=li+1
endloop
set li=0
call EHX(RPX)
endif
else
if GetOwningPlayer(J2E)==GetOwningPlayer(GZV[RPX])and not IsUnitType(J2E,UNIT_TYPE_HERO)and UnitAlive(J2E)then
call UnitAddAbility(J2E,'A057')
call SetUnitAbilityLevel(J2E,'A057',GetUnitAbilityLevel(GZV[RPX],'A054'))
call UnitAddAbility(J2E,'A059')
call SetUnitAbilityLevel(J2E,'A059',GetUnitAbilityLevel(GZV[RPX],'A054'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BlessingofElun.mdx",J2E,"origin"))
endif
endif
endfunction
function A3X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(QB,OAX,ONX)
set OMX=XAX(OAX,ONX,64.,Deg2Rad(GetUnitFacing(OIX)))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Weapons\\BlackKeeperMissile\\BlackKeeperMissile.mdl")
call V8X(OMX,2.5)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=128.
set G0V[OMX]=64.
set HCV[OMX]=(14)
call EMX(OMX,G1V[OMX])
call MoveLocation(QB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1000.)
set OIX=null
set EXX=null
endfunction
/*function A4X takes nothing returns boolean
if GetSpellAbilityId()=='A054' then
call A3X()
endif
return false
endfunction*/
function A5X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function A4X))
set X_X=null*/
call RegisterSpellEffectEvent('A054', function A3X)
endfunction
function A6X takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
local unit IPX
if J2E==(HZV[(RPX)])and IsUnitAliveBJ(J2E)then
if OEX(HKV[RPX],J2E)then
set IPX=CreateUnit((GetOwningPlayer(GZV[RPX])),'h007',RQX,RSX,.0)
call UnitApplyTimedLife(IPX,'BTLF',1.)
call UnitAddAbility(IPX,'A08A')
call IssueTargetOrderById(IPX,852585,J2E)
call EHX(RPX)
endif
endif
set IPX=null
endfunction
function A7X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
call MoveLocation(SB,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,(Deg2Rad(GetUnitFacing(OIX))))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\StrongDrink\\BrewmasterMissile.mdl")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(15)
call EMX(OMX,G1V[OMX])
call MoveLocation(SB,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XIX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,1500.,.15)
set OIX=null
set EXX=null
endfunction
/*function A8X takes nothing returns boolean
if GetSpellAbilityId()=='A02R' then
call A7X()
endif
return false
endfunction*/
function A9X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function A8X))
set X_X=null*/
call RegisterSpellEffectEvent('A02R', function A7X)
endfunction
function NVX takes integer RPX,unit J2E returns nothing
if UnitAlive(J2E)and J2E!=GZV[RPX]and GetUnitTypeId(J2E)!='hpea' then
if OEX(HKV[RPX],J2E)then
if J2E==(HZV[(RPX)])then
call UnitDamageTargetEx((GZV[RPX]),(J2E),((G3V[RPX])*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
else
call UnitDamageTargetEx((GZV[RPX]),(J2E),((G3V[RPX]/2.)*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
endif
call EHX(RPX)
else
call EKX(RPX,J2E)
endif
endif
endfunction
function NEX takes integer RPX,destructable MGE returns nothing
call KillDestructable(MGE)
call EHX(RPX)
endfunction
function NXX takes nothing returns nothing
local integer OMX=0
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local unit EXX=GetOrderTargetUnit()
local real OJX=GetOrderPointX()
local real OKX=GetOrderPointY()
local real angl=.0
if EXX!=null then
set OJX=GetUnitX(EXX)
set OKX=GetUnitY(EXX)
elseif GetOrderTargetDestructable()!=null then
set OJX=GetDestructableX(GetOrderTargetDestructable())
set OKX=GetDestructableY(GetOrderTargetDestructable())
endif
set OMX=XAX(OAX,ONX,GetUnitFlyHeight(OIX)+50.,Atan2((OKX-ONX),(OJX-OAX)))
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
set G3V[OMX]=10.
call V9X(OMX,"Abilities\\Weapons\\WyvernSpear\\WyvernSpearMissile.mdl")
call V8X(OMX,.75)
set G2V[OMX]=50.
set G1V[OMX]=32.
set G8V[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set HCV[OMX]=(16)
set HBV[OMX]=(16)
set HDV[OMX]=(2)
set HNV[OMX]=(17)
call EMX(OMX,G1V[OMX]*.5)
call MoveLocation(TB,OJX,OKX)
if EXX!=null then
call EEX(OMX,EXX)
set HEV[OMX]=true
call XIX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+50.+GetLocationZ(TB),600.,.2)
else
set OJX=OJX+GetRandomReal(.0,200.)*Cos(GetRandomReal(.0,2.*bj_PI))
set OKX=OKX+GetRandomReal(.0,200.)*Cos(GetRandomReal(.0,2.*bj_PI))
call XIX(OMX,OJX,OKX,GetLocationZ(TB),600.,.2)
endif
if GetUnitTypeId(OIX)=='hpea' then
call DisableTrigger(UB)
call PauseUnit(OIX,true)
call IssueImmediateOrderById(OIX,851972)
call PauseUnit(OIX,false)
call EnableTrigger(UB)
endif
set EXX=null
set OIX=null
endfunction
function NOX takes nothing returns boolean
if GetUnitTypeId(GetTriggerUnit())=='hpea' or GetUnitTypeId(GetTriggerUnit())=='hgry' then
call NXX()
endif
return false
endfunction
function NRX takes nothing returns nothing
set UB=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(UB,Player(0),EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerRegisterPlayerUnitEvent(UB,Player(0),EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER,null)
call TriggerAddCondition(UB,Condition(function NOX))
endfunction
function NIX takes integer p,unit u returns nothing
local real x=HHV[p]
local real y=HJV[p]
local location NAX=Location(x,y)
local location NNX=GetUnitLoc(u)
if UnitAlive(u)and u!=GZV[p]and IsUnitEnemy(u,GetOwningPlayer(GZV[p]))and not(GetUnitAbilityLevel((u),'Avul')>0)and not IsUnitType(u,UNIT_TYPE_STRUCTURE)then
call UnitDamageTargetEx((GZV[p]),(u),((G3V[p])*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call M6E((u),((400.)*1.),((1.)*1.),((AngleBetweenPoints(NAX,NNX))*1.),null,150.,false,false)
call EKX(p,u)
endif
call RemoveLocation(NAX)
call RemoveLocation(NNX)
set NAX=null
set NNX=null
endfunction
function NBX takes integer p,destructable d returns nothing
local real NCX=HHV[p]
local real NDX=HJV[p]
local location NFX=Location(NCX,NDX)
local real NGX=.0
local unit u
local unit u2
local unit u3
local unit CBE=GZV[p]
local real SVE=G3V[p]
local real tx=GetDestructableX(d)
local real ty=GetDestructableY(d)
local real a=QWE(EOX(p),HHV[p],HJV[p],tx,ty)*bj_RADTODEG
local real nx=(((HHV[p])*1.)+((500.)*1.)*Cos(((a)*1.)*bj_DEGTORAD))
local real ny=(((HJV[p])*1.)+((500.)*1.)*Sin(((a)*1.)*bj_DEGTORAD))
if JGV[p]>=(501.+(I2R(GetUnitAbilityLevel(CBE,'A04C'))*100.))then
call EHX(p)
call O2X(CBE,NFX,(SVE*I2R(GetUnitAbilityLevel(CBE,'A04C'))),300.,DAMAGE_TYPE_NORMAL,ATTACK_TYPE_NORMAL,false)
set u=CreateUnit(GetOwningPlayer(CBE),'h00M',NCX,NDX,.0)
call KillUnit(u)
loop
exitwhen NGX==360.
call O2X(CBE,CNE(NFX,500.,NGX),(SVE*I2R(GetUnitAbilityLevel(CBE,'A04C'))),300.,DAMAGE_TYPE_NORMAL,ATTACK_TYPE_NORMAL,false)
set u=CreateUnitAtLoc(GetOwningPlayer(CBE),'h00M',CNE(NFX,500.,NGX),.0)
call KillUnit(u)
set u2=CreateUnitAtLoc(GetOwningPlayer(CBE),'h00M',CNE(NFX,300.,NGX),.0)
call KillUnit(u2)
set u3=CreateUnitAtLoc(GetOwningPlayer(CBE),'h00M',CNE(NFX,150.,NGX),.0)
call KillUnit(u3)
set NGX=NGX+(360./18.)
endloop
else
set JGV[p]=JGV[p]+50
call MoveLocation(WB,nx,ny)
call EFX(p,false)
call XRX(p,nx,ny,30.+GetLocationZ(WB),I2R(JGV[p]))
endif
set CBE=null
set u=null
set u2=null
set u3=null
call RemoveLocation(NFX)
set NFX=null
endfunction
function Shockwave__ProjColl takes nothing returns nothing
local integer E3X=MA
local integer TBE=(PA)
if IsUnitEnemy(GZV[E3X],GetOwningPlayer(GZV[TBE]))then
call ECX(E3X,HHV[E3X]+((700.*2.75)*.03125)*Cos(EOX(TBE)),HJV[E3X]+((700.*2.75)*.03125)*Sin(EOX(TBE)),HKV[E3X],true)
endif
endfunction
function NHX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local location OFX=GetUnitLoc(OIX)
local real OGX=(I2R(GetUnitAbilityLevelSwapped('A04C',OIX))*(2250.+(125.*I2R(GetUnitAbilityLevelSwapped('A04C',OIX)))))
local location OHX=CNE(OFX,OGX,GetUnitFacing(OIX))
local real OJX=GetLocationX(OHX)
local real OKX=GetLocationY(OHX)
local real OLX=Atan2((OKX-ONX),(OJX-OAX))
local integer OMX=0
call DestroyEffect(AddSpecialEffect("war3mapImported\\FireNova2.mdx",OAX,ONX))
call MoveLocation(WB,OAX,ONX)
set OMX=XAX(OAX,ONX,30.,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\Tectonicfury.mdx")
set G3V[OMX]=((I2R(GetUnitAbilityLevelSwapped('A04C',OIX)))*4000.)*.03125
call V8X(OMX,.9)
set G2V[OMX]=30.
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=true
set G1V[OMX]=172.
set G0V[OMX]=172.
set HIV[OMX]=(18)
set HCV[OMX]=(17)
set HDV[OMX]=(3)
set JFV[OMX]=false
set JGV[OMX]=350
set JCV[OMX]=.0
set JDV[OMX]=1.
call MoveLocation(WB,OJX,OKX)
call XRX(OMX,OJX,OKX,30.+GetLocationZ(WB),350.)
call RemoveLocation(OFX)
call RemoveLocation(OHX)
set OFX=null
set OHX=null
set OIX=null
endfunction
/*function NJX takes nothing returns boolean
if GetSpellAbilityId()=='A04C' then
call NHX()
endif
return false
endfunction*/
function NKX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function NJX))
set X_X=null*/
call RegisterSpellEffectEvent('A04C', function NHX)
endfunction
function NLX takes integer D0E returns nothing
call RemoveUnit(L2V[D0E])
set L2V[D0E]=null
call H6E(D0E)
endfunction
function NMX takes integer D0E returns nothing
if L3V[D0E]==NX then
call H4E(D0E)
call NLX(D0E)
endif
endfunction
function NPX takes nothing returns boolean
local integer D0E=L4V[(0)]
loop
exitwhen D0E==0
call NMX(D0E)
set D0E=L4V[D0E]
endloop
return false
endfunction
function NQX takes integer D0E returns nothing
set L5V[L4V[(0)]]=D0E
set L4V[D0E]=L4V[(0)]
set L4V[(0)]=D0E
set L5V[D0E]=(0)
endfunction
function NSX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function NPX))
endfunction
function NTX takes unit J2E returns nothing
local integer D0E=H5E()
set L2V[D0E]=J2E
set L3V[D0E]=NX+R2I(3./.03125)
call NQX(D0E)
endfunction
function SlowProjectiles___ResetFunc takes nothing returns nothing
local integer p=MA
set G5V[p]=1.
endfunction
function SlowProjectiles___SlowFunc takes nothing returns nothing
local integer p=MA
set HEV[p]=false
set G5V[p]=.1
endfunction
function NUX takes integer D0E returns nothing
call XJX(MNV[D0E],(5))
call NTX(MVV[D0E])
call DestroyEffect(MEV[D0E])
set L9V[D0E]=null
set MVV[D0E]=null
set MEV[D0E]=null
call XDX(MNV[D0E])
call H3E(D0E)
endfunction
function NWX takes integer D0E returns nothing
if MOV[D0E]==NX then
call H1E(D0E)
call NUX(D0E)
else
if MXV[D0E]==.0 then
call SetUnitTimeScale(MVV[D0E],.0)
else
set MXV[D0E]=MXV[D0E]-.03125
endif
set YB=L9V[D0E]
call XPX(MNV[D0E],MRV[D0E],MIV[D0E],MAV[D0E],700.,D0E,(5),(6))
endif
endfunction
function NYX takes nothing returns boolean
local integer D0E=MBV[(0)]
loop
exitwhen D0E==0
call NWX(D0E)
set D0E=MBV[D0E]
endloop
return false
endfunction
function NZX takes integer D0E returns nothing
set MCV[MBV[(0)]]=D0E
set MBV[D0E]=MBV[(0)]
set MBV[(0)]=D0E
set MCV[D0E]=(0)
endfunction
function N_X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function NYX))
endfunction
function N0X takes unit OIX,real x,real y returns integer
local integer D0E=H2E()
call MoveLocation(ZB,x,y)
set L9V[D0E]=OIX
set MVV[D0E]=CreateUnit(GetOwningPlayer(OIX),'u001',x,y,.0)
set MEV[D0E]=AddSpecialEffectTarget("SlowTime.mdl",MVV[D0E],"origin")
set MOV[D0E]=NX+R2I(15./.03125)
set MNV[D0E]=XWX()
set MXV[D0E]=1.
set MRV[D0E]=x
set MIV[D0E]=y
set MAV[D0E]=40.+GetLocationZ(ZB)
call SetUnitX(MVV[D0E],x)
call SetUnitY(MVV[D0E],y)
call UnitAddAbility(MVV[D0E],'Amrf')
call UnitRemoveAbility(MVV[D0E],'Amrf')
call SetUnitScale(MVV[D0E],1.66,.0,.0)
call SetUnitFlyHeight(MVV[D0E],170.,.0)
call NZX(D0E)
return D0E
endfunction
function N1X takes nothing returns nothing
//if GetSpellAbilityId()=='A020' then
call N0X(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
//endif
//return false
endfunction
function N2X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function N1X))*/
call RegisterSpellEffectEvent('A020', function N1X)
endfunction
function N3X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
local location IHX
local location IJX
set OJX=GetSpellTargetX()
set OKX=GetSpellTargetY()
set IHX=Location(OJX,OKX)
set IJX=CNE(IHX,GetRandomReal(800.,1000.),GetRandomReal(.0,360.))
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(VC,OJX,OKX)
set OMX=XAX(GetLocationX(IJX),GetLocationY(IJX),900.+GetLocationZ(VC),OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\RollingKegMissle.mdx")
call V8X(OMX,2.5)
set G2V[OMX]=.0
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=false
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HBV[OMX]=(19)
call MoveLocation(VC,OJX,OKX)
call XRX(OMX,OJX,OKX,GetLocationZ(VC),1000.)
call RemoveLocation(IHX)
call RemoveLocation(IJX)
set IHX=null
set IJX=null
set OIX=null
endfunction
/*function N4X takes nothing returns boolean
if GetSpellAbilityId()=='A03J' then
call N3X()
endif
return false
endfunction*/
function N5X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function N4X))
set X_X=null*/
call RegisterSpellEffectEvent('A03J', function N3X)
endfunction
function N6X takes integer RPX,unit J2E returns nothing
local real RQX=GetUnitX(J2E)
local real RSX=GetUnitY(J2E)
local unit IPX
if J2E==(HZV[(RPX)])and UnitAlive(J2E)then
if OEX(HKV[RPX],J2E)then
if GetUnitAbilityLevel(J2E,'BEsh')!=1 then
set IPX=CreateUnit((GetOwningPlayer(GZV[RPX])),'h007',RQX,RSX,.0)
call UnitApplyTimedLife(IPX,'BTLF',21.)
call UnitAddAbility(IPX,'A0FA')
call SetUnitAbilityLevel(IPX,'A0FA',R2I(G3V[RPX]))
call IssueTargetOrderById(IPX,852527,J2E)
endif
call EHX(RPX)
endif
endif
set IPX=null
endfunction
function N7X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real OJX=.0
local real OKX=.0
local real OLX=.0
local integer OMX=0
set OLX=Atan2((OKX-ONX),(OJX-OAX))
call MoveLocation(EC,OAX,ONX)
set OMX=XAX(OAX,ONX,65.,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"war3mapImported\\EvilMissileofShadowyDOOMV3.mdx")
call V8X(OMX,1.)
set G2V[OMX]=60.
set G3V[OMX]=I2R(GetUnitAbilityLevel(OIX,'A088'))
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set HXV[OMX]=false
set G1V[OMX]=64.
set G0V[OMX]=64.
set HCV[OMX]=(18)
call EMX(OMX,G1V[OMX])
call MoveLocation(EC,OJX,OKX)
call EEX(OMX,EXX)
set HEV[OMX]=true
call XRX(OMX,OJX,OKX,GetUnitFlyHeight(EXX)+65.,500.)
set OIX=null
set EXX=null
endfunction
/*function N8X takes nothing returns boolean
if GetSpellAbilityId()=='A088' then
call N7X()
endif
return false
endfunction*/
function N9X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function N8X))
set X_X=null*/
call RegisterSpellEffectEvent('A088', function N7X)
endfunction
function BVX takes integer p,unit u returns nothing
local real x=HHV[p]
local real y=HJV[p]
local unit su
if UnitAlive(u)and u!=GZV[p]and IsUnitEnemy(u,GetOwningPlayer(GZV[p]))then
set su=CreateUnit(GetOwningPlayer(GZV[p]),'h007',x,y,.0)
call UnitApplyTimedLife(su,'BTLF',1.)
call UnitAddAbility(su,'A047')
call SetUnitAbilityLevel(su,'A047',GetUnitAbilityLevel(GZV[p],'A046'))
call IssueTargetOrderById(su,852144,u)
call UnitDamageTargetEx((GZV[p]),(u),(((G3V[p])+(GetHeroInt(GZV[p],true)*5.*GetUnitAbilityLevel(GZV[p],'A046')))*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
endif
set su=null
endfunction
function Vertigo__ProjColl takes nothing returns nothing
local integer E3X=MA
local integer TBE=(PA)
if IsUnitEnemy(GZV[E3X],GetOwningPlayer(GZV[TBE]))then
call ECX(E3X,HHV[E3X]+((700.*2.75)*.03125)*Cos(EOX(TBE)),HJV[E3X]+((700.*2.75)*.03125)*Sin(EOX(TBE)),HKV[E3X],true)
endif
endfunction
function BEX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local real BXX=(((OAX)*1.)+((500.)*1.)*Cos(((GetUnitFacing(OIX)-180.)*1.)*bj_DEGTORAD))
local real BOX=(((ONX)*1.)+((500.)*1.)*Sin(((GetUnitFacing(OIX)-180.)*1.)*bj_DEGTORAD))
local real BRX
local real BIX
local real OJX=(((BXX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real OKX=(((BOX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
local real OLX=Atan2((OKX-BOX),(OJX-BXX))
local real I6X
local integer OMX=0
call MoveLocation(XC,OAX,ONX)
set I6X=GetLocationZ(XC)
call MoveLocation(XC,BXX,BOX)
set OMX=XAX(BXX,BOX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=600*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((125.)*1.)*Cos(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((125.)*1.)*Sin(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=2*50*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((250.)*1.)*Cos(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((250.)*1.)*Sin(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=2*50*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((375.)*1.)*Cos(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((375.)*1.)*Sin(((GetUnitFacing(OIX)-90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((375.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((375.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=2*50*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((125.)*1.)*Cos(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((125.)*1.)*Sin(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=2*50*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((250.)*1.)*Cos(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((250.)*1.)*Sin(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=2*50*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set BRX=(((BXX)*1.)+((375.)*1.)*Cos(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set BIX=(((BOX)*1.)+((375.)*1.)*Sin(((GetUnitFacing(OIX)+90.)*1.)*bj_DEGTORAD))
set OJX=(((BRX)*1.)+((4500.)*1.)*Cos(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OKX=(((BIX)*1.)+((4500.)*1.)*Sin(((GetUnitFacing(OIX))*1.)*bj_DEGTORAD))
set OLX=Atan2((OKX-BIX),(OJX-BRX))
set OMX=XAX(BRX,BIX,75.+I6X,OLX)
set GZV[OMX]=OIX
set G_V[OMX]=GetOwningPlayer(OIX)
call V9X(OMX,"Abilities\\Spells\\Other\\Tornado\\TornadoElemental.mdl")
set G3V[OMX]=400*(I2R(GetUnitAbilityLevel(OIX,'A046')))*(I2R(GetUnitAbilityLevel(OIX,'A046')))
call V8X(OMX,1.)
set G2V[OMX]=50.
set G4V[OMX]=5000./1100.
set G9V[OMX]=true
set G8V[OMX]=true
set HVV[OMX]=true
set HOV[OMX]=true
set G1V[OMX]=125.
set G0V[OMX]=125.
set HIV[OMX]=(20)
set HCV[OMX]=(19)
set HBV[OMX]=(21)
call MoveLocation(XC,OJX,OKX)
call XRX(OMX,OJX,OKX,75.+GetLocationZ(XC),1100.)
set OIX=null
endfunction
/*function BAX takes nothing returns boolean
if GetSpellAbilityId()=='A046' then
call BEX()
endif
return false
endfunction*/
function BNX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function BAX))
set X_X=null*/
call RegisterSpellEffectEvent('A046', function BEX)
endfunction
function BBX takes integer D0E,unittype ut returns nothing
set M1V[D0E]=true
set M2V[D0E]=ut
endfunction
function BCX takes integer D0E,string WEE,string TUE returns nothing
set PIV[D0E]=true
set PAV[D0E]=WEE
set PNV[D0E]=TUE
endfunction
function s__xedamage_isInUse takes nothing returns boolean
return(PFV>0)
endfunction
function BDX takes unit u,attacktype a,damagetype d returns real
local real hp=GetWidgetLife(u)
local real BFX=GetUnitState(u,UNIT_STATE_MANA)
local real r
local real fc=.01
call SetUnitX(OC,GetUnitX(u))
call SetUnitY(OC,GetUnitY(u))
call SetUnitOwner(OC,GetOwningPlayer(u),false)
set r=hp
if(hp<.01*3.)then
call SetWidgetLife(u,hp+.01*3.)
set r=hp+.01*3.
set fc=GetWidgetLife(u)-hp+.000000001
endif
set PGV=true
call UnitDamageTarget(OC,u,fc,false,false,a,d,null)
set PGV=false
call SetUnitOwner(OC,Player(PLAYER_NEUTRAL_PASSIVE),false)
if(BFX>GetUnitState(u,UNIT_STATE_MANA))then
call SetUnitState(u,UNIT_STATE_MANA,BFX)
set r=1
else
set r=(r-GetWidgetLife(u))/fc
endif
call SetWidgetLife(u,hp)
return r
endfunction
function BGX takes integer D0E,unit CBE,unit YSE,boolean BHX returns real
local player p=GetOwningPlayer(CBE)
local boolean BJX=IsUnitAlly(YSE,p)
local boolean BKX=IsUnitEnemy(YSE,p)
local boolean BLX=BJX
local real f
local real BMX=1.
local integer i
if(MJV[D0E]!=MLV[D0E])then
set BLX=BJX and not(GetPlayerAlliance(GetOwningPlayer(YSE),p,ALLIANCE_HELP_REQUEST))
set BJX=BJX and not(BLX)
endif
if(not MJV[D0E])and BJX then
return .0
elseif(not MKV[D0E])and BKX then
return .0
elseif((not MHV[D0E])and(CBE==YSE))then
return .0
elseif(not MLV[D0E])and BLX then
return .0
elseif(M1V[D0E]and IsUnitType(YSE,M2V[D0E]))then
return .0
elseif(MPV[D0E]and not IsUnitVisible(YSE,p))then
return .0
elseif(MQV[D0E]and not IsUnitType(YSE,UNIT_TYPE_DEAD))then
return .0
elseif(not(MSV[D0E])and IsUnitType(YSE,UNIT_TYPE_DEAD))then
return .0
endif
set f=1.
if(IsUnitAlly(YSE,p))then
set f=f*M0V[D0E]
if(f<=-.000000001)then
set f=-f
set BMX=-1.
endif
endif
if(M3V[D0E]and not IsUnitType(YSE,M4V[D0E]))then
return .0
endif
set i=M9V[D0E]-1
loop
exitwhen(i<0)
if(IsUnitType(YSE,M5V[M6V[D0E]+i]))then
set f=f*M7V[M8V[D0E]+i]
if(f<=-.000000001)then
set f=-f
set BMX=-1.
endif
endif
set i=i-1
endloop
set i=PRV[D0E]-1
loop
exitwhen(i<0)
if(GetUnitAbilityLevel(YSE,PVV[PEV[D0E]+i])>0)then
set f=f*PXV[POV[D0E]+i]
if(f<=-.000000001)then
set f=-f
set BMX=-1.
endif
endif
set i=i-1
endloop
set f=f*BMX
if(f<.000000001)and(f>-.000000001)then
return .0
endif
if(M_V[D0E]or not BHX)then
return f
endif
set f=f*BDX(YSE,MWV[D0E],MUV[D0E])
if(f<.000000001)and(f>-.000000001)then
return .0
endif
return f
endfunction
function BPX takes integer D0E,unit CBE,unit YSE,real U6E returns boolean
local damagetype dt=PBV
local attacktype at=PCV
local integer tg=PDV
local real f=BGX(D0E,CBE,YSE,false)
local real pl
if(f!=.0)then
set PBV=MUV[D0E]
set PCV=MWV[D0E]
set PDV=MZV[D0E]
set PFV=PFV+1
set pl=GetWidgetLife(YSE)
call UnitDamageTargetEx(CBE,YSE,f*U6E,false,MMV[D0E],MWV[D0E],MUV[D0E],MYV[D0E])
set PFV=PFV-1
set PDV=tg
set PBV=dt
set PCV=at
if(pl!=GetWidgetLife(YSE))then
if(PIV[D0E])then
call DestroyEffect(AddSpecialEffectTarget(PAV[D0E],YSE,PNV[D0E]))
endif
return true
endif
endif
return false
endfunction
function BQX takes nothing returns boolean
local unit YSE=GetFilterUnit()
local integer D0E=PHV
local real f
local real hp
if(not IsUnitInRangeXY(YSE,PLV[D0E],PMV[D0E],PPV[D0E]))then
set YSE=null
return false
endif
set f=BGX(D0E,PKV[D0E],YSE,false)
if(f!=.0)then
set PJV[D0E]=PJV[D0E]+1
if(PIV[D0E])then
set hp=GetWidgetLife(YSE)
endif
call UnitDamageTargetEx(PKV[D0E],YSE,f*PQV[D0E],false,MMV[D0E],MWV[D0E],MUV[D0E],MYV[D0E])
if(PIV[D0E]and(hp>GetWidgetLife(YSE)))then
call DestroyEffect(AddSpecialEffectTarget(PAV[D0E],YSE,PNV[D0E]))
endif
endif
set PHV=D0E
set YSE=null
return false
endfunction
function BSX takes nothing returns boolean
local destructable YSE=GetFilterDestructable()
local integer D0E=PHV
local real dx=PLV[D0E]-GetDestructableX(YSE)
local real dy=PMV[D0E]-GetDestructableY(YSE)
if(dx*dx+dy*dy>=PPV[D0E]+.000000001)then
set YSE=null
return false
endif
set PJV[D0E]=PJV[D0E]+1
if(PIV[D0E])then
call DestroyEffect(AddSpecialEffectTarget(PAV[D0E],YSE,PNV[D0E]))
endif
call UnitDamageTargetEx(PKV[D0E],YSE,PQV[D0E],false,MMV[D0E],MWV[D0E],MUV[D0E],MYV[D0E])
set PHV=D0E
set YSE=null
return false
endfunction
function BWX takes nothing returns nothing
set PWV=Rect(0,0,0,0)
set PSV=Condition(function BQX)
set PTV=Condition(function BSX)
set PUV=CreateGroup()
endfunction
function BYX takes nothing returns nothing
set OC=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'e005',.0,.0,.0)
call UnitAddAbility(OC,'Aloc')
call BWX()
endfunction
function BZX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
local unit SVE=GetTriggerUnit()
if GetUnitAbilityLevel(RGX,'A05P')==1 then
if bj_RADTODEG*Atan2(GetUnitY(SVE)-GetUnitY(RGX),GetUnitX(SVE)-GetUnitX(RGX))<=(GetUnitFacing(SVE)-340.)or bj_RADTODEG*Atan2(GetUnitY(SVE)-GetUnitY(RGX),GetUnitX(SVE)-GetUnitX(RGX))>=(GetUnitFacing(SVE)-20.)then
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(RGX,SVE,GetEventDamage(),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",SVE,"chest"))
endif
else
if(CI[NI])then
call DisableTrigger(GetTriggeringTrigger())
call Y0E(RGX,SVE,GetEventDamage(),ATTACK_TYPE_CHAOS,false,false)
call EnableTrigger(GetTriggeringTrigger())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",SVE,"chest"))
endif
endif
endif
endif
set RGX=null
set SVE=null
return false
endfunction
function B_X takes nothing returns nothing
local trigger X_X=CreateTrigger()
call MOE(II,(X_X))
call TriggerAddCondition(X_X,Condition(function BZX))
endfunction
function B0X takes integer D0E returns nothing
call ShowUnit(P1V[D0E],false)
call KillUnit(P1V[D0E])
set P1V[D0E]=null
set P0V[D0E]=null
call H_E(D0E)
endfunction
function B1X takes integer D0E returns nothing
if P2V[D0E]==NX then
call HYE(D0E)
call B0X(D0E)
else
call SetUnitX(P1V[D0E],GetUnitX(P0V[D0E]))
call SetUnitY(P1V[D0E],GetUnitY(P0V[D0E]))
endif
endfunction
function B2X takes nothing returns boolean
local integer D0E=P3V[(0)]
loop
exitwhen D0E==0
call B1X(D0E)
set D0E=P3V[D0E]
endloop
return false
endfunction
function B3X takes integer D0E returns nothing
set P4V[P3V[(0)]]=D0E
set P3V[D0E]=P3V[(0)]
set P3V[(0)]=D0E
set P4V[D0E]=(0)
endfunction
function B4X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function B2X))
endfunction
function B5X takes unit J2E,real CDE returns integer
local integer D0E=HZE()
set P0V[D0E]=J2E
set P1V[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),GetUnitTypeId(J2E),GetUnitX(J2E),GetUnitY(J2E),CDE)
call UnitAddAbility(P1V[D0E],'Aloc')
call SetUnitPathing(P1V[D0E],false)
call SetUnitTimeScale(P1V[D0E],3.)
call SetUnitVertexColor(P1V[D0E],255,255,255,80)
call SetUnitScale(P1V[D0E],1.5,.0,.0)
call SetUnitX(P1V[D0E],GetUnitX(J2E))
call SetUnitY(P1V[D0E],GetUnitY(J2E))
call SetUnitAnimation(P1V[D0E],"attack")
call SetUnitOwner(P1V[D0E],GetOwningPlayer(P0V[D0E]),true)
call SetUnitOwner(P1V[D0E],Player(PLAYER_NEUTRAL_PASSIVE),false)
call UnitDamageTargetEx(P1V[D0E],P1V[D0E],.0,false,false,null,null,WEAPON_TYPE_METAL_LIGHT_SLICE)
set P2V[D0E]=NX+R2I(.2/.03125)
call B3X(D0E)
return D0E
endfunction
function Defend___OnImpact takes nothing returns nothing
local integer p=MA
local integer d=(PA)
local real x=GetUnitX(P8V[d])
local real y=GetUnitY(P8V[d])
local real a=Atan2((HJV[p]-y),(HHV[p]-x))
local integer j=(GetUnitUserData((P8V[d])))
if GetRandomReal(.0,1.)<=.5 and not IsUnitAlly(GZV[p],GetOwningPlayer(P8V[d]))and UnitAlive(P8V[d])then
if not XMX(AC[j],p)then
set HEV[p]=false
set JGV[p]=0
call ERX(p,x+500.*Cos(a),y+500.*Sin(a),.0,true)
call DestroyEffect(AddSpecialEffectTarget("RandomSlash.mdl",P8V[d],"origin"))
call B5X(P8V[d],a*bj_RADTODEG)
endif
endif
call XLX(AC[j],p)
endfunction
function B6X takes integer D0E returns nothing
call XUX(AC[(GetUnitUserData((P8V[D0E])))])
call XDX(QVV[D0E])
set RC[(GetUnitUserData((P8V[D0E])))]=false
set IC[(GetUnitUserData((P8V[D0E])))]=0
set P8V[D0E]=null
call HWE(D0E)
endfunction
function B7X takes integer D0E returns nothing
if P9V[D0E]==NX then
call HTE(D0E)
call B6X(D0E)
else
call XQX(QVV[D0E],GetUnitX(P8V[D0E]),GetUnitY(P8V[D0E]),.0,200.,D0E,(8))
endif
endfunction
function B8X takes nothing returns boolean
local integer D0E=QEV[(0)]
loop
exitwhen D0E==0
call B7X(D0E)
set D0E=QEV[D0E]
endloop
return false
endfunction
function B9X takes integer D0E returns nothing
set QXV[QEV[(0)]]=D0E
set QEV[D0E]=QEV[(0)]
set QEV[(0)]=D0E
set QXV[D0E]=(0)
endfunction
function CVX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function B8X))
endfunction
function CEX takes unit J2E,integer id returns integer
local integer D0E=HUE()
set P8V[D0E]=J2E
set P9V[D0E]=NX+R2I(15./.03125)
set QVV[D0E]=XWX()
set RC[id]=true
set IC[id]=D0E
if AC[id]==0 then
set AC[id]=XWX()
endif
call B9X(D0E)
return D0E
endfunction
function CXX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local integer id=(GetUnitUserData((OIX)))
//if GetSpellAbilityId()=='A01Z' then
if not RC[id]then
call CEX(OIX,id)
else
call XUX(AC[id])
set P9V[IC[id]]=NX+R2I(15./.03125)
endif
//endif
set OIX=null
//return false
endfunction
function COX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function CXX))*/
call RegisterSpellEffectEvent('A01Z', function CXX)
endfunction
function CRX takes integer D0E returns nothing
call ShowUnit(QNV[D0E],false)
call KillUnit(QNV[D0E])
set QNV[D0E]=null
set QAV[D0E]=null
call HSE(D0E)
endfunction
function CIX takes integer D0E returns nothing
if QBV[D0E]==NX then
call HPE(D0E)
call CRX(D0E)
else
call SetUnitX(QNV[D0E],GetUnitX(QAV[D0E]))
call SetUnitY(QNV[D0E],GetUnitY(QAV[D0E]))
endif
endfunction
function CAX takes nothing returns boolean
local integer D0E=QCV[(0)]
loop
exitwhen D0E==0
call CIX(D0E)
set D0E=QCV[D0E]
endloop
return false
endfunction
function CNX takes integer D0E returns nothing
set QDV[QCV[(0)]]=D0E
set QCV[D0E]=QCV[(0)]
set QCV[(0)]=D0E
set QDV[D0E]=(0)
endfunction
function CBX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function CAX))
endfunction
function CCX takes unit J2E,real CDE returns integer
local integer D0E=HQE()
set QAV[D0E]=J2E
set QNV[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),GetUnitTypeId(J2E),GetUnitX(J2E),GetUnitY(J2E),CDE)
call UnitAddAbility(QNV[D0E],'Aloc')
call SetUnitPathing(QNV[D0E],false)
call SetUnitTimeScale(QNV[D0E],3.)
call SetUnitVertexColor(QNV[D0E],255,255,255,80)
call SetUnitScale(QNV[D0E],1.5,.0,.0)
call SetUnitX(QNV[D0E],GetUnitX(J2E))
call SetUnitY(QNV[D0E],GetUnitY(J2E))
call SetUnitAnimation(QNV[D0E],"attack")
call SetUnitOwner(QNV[D0E],GetOwningPlayer(QAV[D0E]),true)
call SetUnitOwner(QNV[D0E],Player(PLAYER_NEUTRAL_PASSIVE),false)
call UnitDamageTargetEx(QNV[D0E],QNV[D0E],.0,false,false,null,null,WEAPON_TYPE_METAL_LIGHT_SLICE)
set QBV[D0E]=NX+R2I(.2/.03125)
call CNX(D0E)
return D0E
endfunction
function DefendItem___OnImpact takes nothing returns nothing
local integer p=MA
local integer d=(PA)
local real x=GetUnitX(QJV[d])
local real y=GetUnitY(QJV[d])
local real a=Atan2((HJV[p]-y),(HHV[p]-x))
local integer j=(GetUnitUserData((QJV[d])))
if GetRandomReal(.0,1.)<=.5 and not IsUnitAlly(GZV[p],GetOwningPlayer(QJV[d]))and UnitAlive(QJV[d])then
if not XMX(CC[j],p)then
set HEV[p]=false
set JGV[p]=0
call ERX(p,x+500.*Cos(a),y+500.*Sin(a),.0,true)
call DestroyEffect(AddSpecialEffectTarget("RandomSlash.mdl",QJV[d],"origin"))
call CCX(QJV[d],a*bj_RADTODEG)
endif
endif
call XLX(CC[j],p)
endfunction
function CDX takes integer D0E returns nothing
call XUX(CC[(GetUnitUserData((QJV[D0E])))])
call XDX(QLV[D0E])
set NC[(GetUnitUserData((QJV[D0E])))]=false
set BC[(GetUnitUserData((QJV[D0E])))]=0
set QJV[D0E]=null
call HME(D0E)
endfunction
function CFX takes integer D0E returns nothing
if QKV[D0E]==NX then
call HKE(D0E)
call CDX(D0E)
else
call XQX(QLV[D0E],GetUnitX(QJV[D0E]),GetUnitY(QJV[D0E]),.0,200.,D0E,(9))
endif
endfunction
function CGX takes nothing returns boolean
local integer D0E=QMV[(0)]
loop
exitwhen D0E==0
call CFX(D0E)
set D0E=QMV[D0E]
endloop
return false
endfunction
function CHX takes integer D0E returns nothing
set QPV[QMV[(0)]]=D0E
set QMV[D0E]=QMV[(0)]
set QMV[(0)]=D0E
set QPV[D0E]=(0)
endfunction
function CJX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function CGX))
endfunction
function CKX takes unit J2E,integer id returns integer
local integer D0E=HLE()
set QJV[D0E]=J2E
set QKV[D0E]=NX+R2I(20./.03125)
set QLV[D0E]=XWX()
set NC[id]=true
set BC[id]=D0E
if CC[id]==0 then
set CC[id]=XWX()
endif
call CHX(D0E)
return D0E
endfunction
function CLX takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local integer id=(GetUnitUserData((OIX)))
//if GetSpellAbilityId()=='A04E' then
if not NC[id]then
call CKX(OIX,id)
else
call XUX(CC[id])
set QKV[BC[id]]=NX+R2I(20./.03125)
endif
//endif
set OIX=null
//return false
endfunction
function CMX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function CLX))*/
call RegisterSpellEffectEvent('A04E', function CLX)
endfunction
function CPX takes integer D0E returns nothing
call ShowUnit(QWV[D0E],false)
call KillUnit(QWV[D0E])
set QWV[D0E]=null
set QUV[D0E]=null
call HJE(D0E)
endfunction
function CQX takes integer D0E returns nothing
if QYV[D0E]==NX then
call HGE(D0E)
call CPX(D0E)
else
call SetUnitX(QWV[D0E],GetUnitX(QUV[D0E]))
call SetUnitY(QWV[D0E],GetUnitY(QUV[D0E]))
endif
endfunction
function CSX takes nothing returns boolean
local integer D0E=QZV[(0)]
loop
exitwhen D0E==0
call CQX(D0E)
set D0E=QZV[D0E]
endloop
return false
endfunction
function CTX takes integer D0E returns nothing
set Q_V[QZV[(0)]]=D0E
set QZV[D0E]=QZV[(0)]
set QZV[(0)]=D0E
set Q_V[D0E]=(0)
endfunction
function CUX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function CSX))
endfunction
function CWX takes unit J2E,real CDE returns integer
local integer D0E=HHE()
set QUV[D0E]=J2E
set QWV[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),GetUnitTypeId(J2E),GetUnitX(J2E),GetUnitY(J2E),CDE)
call UnitAddAbility(QWV[D0E],'Aloc')
call SetUnitPathing(QWV[D0E],false)
call SetUnitTimeScale(QWV[D0E],3.)
call SetUnitVertexColor(QWV[D0E],255,255,255,80)
call SetUnitScale(QWV[D0E],1.5,.0,.0)
call SetUnitX(QWV[D0E],GetUnitX(J2E))
call SetUnitY(QWV[D0E],GetUnitY(J2E))
call SetUnitAnimation(QWV[D0E],"attack")
call SetUnitOwner(QWV[D0E],GetOwningPlayer(QUV[D0E]),true)
call SetUnitOwner(QWV[D0E],Player(PLAYER_NEUTRAL_PASSIVE),false)
call UnitDamageTargetEx(QWV[D0E],QWV[D0E],.0,false,false,null,null,WEAPON_TYPE_METAL_LIGHT_SLICE)
set QYV[D0E]=NX+R2I(.2/.03125)
call CTX(D0E)
return D0E
endfunction
function DefendRockTrolls___OnImpact takes nothing returns nothing
local integer p=MA
local integer d=(PA)
local real x=GetUnitX(Q3V[d])
local real y=GetUnitY(Q3V[d])
local real a=Atan2((HJV[p]-y),(HHV[p]-x))
local integer j=(GetUnitUserData((Q3V[d])))
if GetRandomReal(.0,1.)<=.25+(I2R(XT)/10.)and not IsUnitAlly(GZV[p],GetOwningPlayer(Q3V[d]))and UnitAlive(Q3V[d])then
if not XMX(GC[j],p)then
set HEV[p]=false
set JGV[p]=0
call ERX(p,x+500.*Cos(a),y+500.*Sin(a),.0,true)
call DestroyEffect(AddSpecialEffectTarget("RandomSlash.mdl",Q3V[d],"origin"))
call CWX(Q3V[d],a*bj_RADTODEG)
endif
endif
call XLX(GC[j],p)
endfunction
function CYX takes integer D0E returns nothing
call XUX(GC[(GetUnitUserData((Q3V[D0E])))])
call XDX(Q5V[D0E])
set DC[(GetUnitUserData((Q3V[D0E])))]=false
set FC[(GetUnitUserData((Q3V[D0E])))]=0
set Q3V[D0E]=null
call HFE(D0E)
endfunction
function CZX takes integer D0E returns nothing
if Q4V[D0E]==NX then
call HCE(D0E)
call CYX(D0E)
else
call XQX(Q5V[D0E],GetUnitX(Q3V[D0E]),GetUnitY(Q3V[D0E]),.0,200.,D0E,(10))
endif
endfunction
function C_X takes nothing returns boolean
local integer D0E=Q6V[(0)]
loop
exitwhen D0E==0
call CZX(D0E)
set D0E=Q6V[D0E]
endloop
return false
endfunction
function C0X takes integer D0E returns nothing
set Q7V[Q6V[(0)]]=D0E
set Q6V[D0E]=Q6V[(0)]
set Q6V[(0)]=D0E
set Q7V[D0E]=(0)
endfunction
function C1X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function C_X))
endfunction
function C2X takes unit J2E,integer id returns integer
local integer D0E=HDE()
set Q3V[D0E]=J2E
set Q4V[D0E]=NX+R2I(30./.03125)
set Q5V[D0E]=XWX()
set DC[id]=true
set FC[id]=D0E
if GC[id]==0 then
set GC[id]=XWX()
endif
call C0X(D0E)
return D0E
endfunction
function C3X takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local integer id=(GetUnitUserData((OIX)))
//if GetSpellAbilityId()=='A08C' then
if not DC[id]then
call C2X(OIX,id)
else
call XUX(GC[id])
set Q4V[FC[id]]=NX+R2I(30./.03125)
endif
//endif
set OIX=null
//return false
endfunction
function C4X takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function C3X))*/
call RegisterSpellEffectEvent('A08C', function C3X)
endfunction
function C5X takes integer D0E returns nothing
local real sx=GetUnitX(SEV[D0E])
local real sy=GetUnitY(SEV[D0E])
local real tx=GetUnitX(SXV[D0E])
local real ty=GetUnitY(SXV[D0E])
local real OLX=Atan2((ty-sy),(tx-sx))
local integer OMX=0
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",SEV[D0E],"origin"))
set OMX=XAX(sx,sy,J0V[SIV[D0E]],OLX)
set GZV[OMX]=SEV[D0E]
call EEX(OMX,SXV[D0E])
set G_V[OMX]=GetOwningPlayer(SEV[D0E])
call V8X(OMX,J1V[SIV[D0E]])
set G1V[OMX]=J2V[SIV[D0E]]
set G2V[OMX]=J3V[SIV[D0E]]
set HEV[OMX]=true
set G8V[OMX]=true
set HOV[OMX]=true
if GetRandomReal(.0,1.)<=I2R(GetUnitAbilityLevel(GZV[OMX],'A026'))*.05 then
call V9X(OMX,"war3mapImported\\s_Enchanted Arrow.mdl")
set G3V[OMX]=SOV[D0E]*((GetUnitAbilityLevel(SEV[D0E],'A026'))*2)
set HCV[OMX]=(20)
else
call V9X(OMX,JYV[SIV[D0E]])
set G3V[OMX]=SOV[D0E]
set HCV[OMX]=(2)
endif
set HBV[OMX]=(2)
set HAV[OMX]=(3)
set HNV[OMX]=(4)
if J4V[SIV[D0E]]then
call XRX(OMX,tx,ty,GetUnitFlyHeight(SXV[D0E])+J0V[SIV[D0E]],JZV[SIV[D0E]])
else
call XIX(OMX,tx,ty,GetUnitFlyHeight(SXV[D0E])+J0V[SIV[D0E]],JZV[SIV[D0E]],J_V[SIV[D0E]])
endif
set SEV[D0E]=null
set SXV[D0E]=null
call HBE(D0E)
endfunction
function C6X takes integer D0E returns nothing
if SRV[D0E]==NX then
call HAE(D0E)
call C5X(D0E)
endif
endfunction
function C7X takes nothing returns boolean
local integer D0E=SAV[(0)]
loop
exitwhen D0E==0
call C6X(D0E)
set D0E=SAV[D0E]
endloop
return false
endfunction
function C8X takes integer D0E returns nothing
set SNV[SAV[(0)]]=D0E
set SAV[D0E]=SAV[(0)]
set SAV[(0)]=D0E
set SNV[D0E]=(0)
endfunction
function C9X takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function C7X))
endfunction
function DVX takes unit DEX,unit DXX,real DOX,integer XHX returns integer
local integer D0E=HNE()
set SEV[D0E]=DEX
set SXV[D0E]=DXX
set SOV[D0E]=DOX
set SIV[D0E]=XHX
set SRV[D0E]=NX+R2I(.15/.03125)
call C8X(D0E)
return D0E
endfunction
function DRX takes nothing returns boolean
local unit CBE=(QN)
local unit YSE=(SN)
local real U6E=(TN)
local integer ad=(PN)
if GetUnitAbilityLevel(CBE,'A026')>=1 and IsUnitEnemy(CBE,GetOwningPlayer(YSE)) then
if GetRandomReal(.0,1.)<=(.1+(I2R(GetUnitAbilityLevel(CBE,'A026'))*.08))then
call DVX(CBE,YSE,U6E,ad)
endif
endif
set CBE=null
set YSE=null
return false
endfunction
function DIX takes nothing returns nothing
local trigger X_X=CreateTrigger()
call MOE(MN,(X_X))
call TriggerAddCondition(X_X,Condition(function DRX))
endfunction
function DAX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
if GetUnitAbilityLevel(RGX,'B049')==1 and GetUnitTypeId(RGX) != 'U00Z' then
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
call SetUnitState(RGX,UNIT_STATE_MANA,GetUnitState(RGX,UNIT_STATE_MANA)+(GetUnitState(RGX,UNIT_STATE_MAX_MANA)*.005))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",RGX,"origin"))
endif
else
if(CI[NI])then
call SetUnitState(RGX,UNIT_STATE_MANA,GetUnitState(RGX,UNIT_STATE_MANA)+(GetUnitState(RGX,UNIT_STATE_MAX_MANA)*.005))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl",RGX,"origin"))
endif
endif
endif
set RGX=null
return false
endfunction
function DNX takes nothing returns nothing
local trigger X_X=CreateTrigger()
call MOE(II,(X_X))
call TriggerAddCondition(X_X,Condition(function DAX))
endfunction
function DBX takes nothing returns nothing
call RRX('n03A',"Abilities\\Weapons\\PoisonArrow\\PoisonArrowMissile.mdl",1200.,.15,65.,1.,64.,60.)
call RRX('n03N',"Abilities\\Weapons\\BristleBackMissile\\BristleBackMissile.mdl",1500.,.15,65.,1.,64.,60.)
call RRX('n039',"abilities\\weapons\\TuskarSpear\\TuskarSpear.mdl",1200.,.15,65.,1.,64.,60.)
call RRX('n03S',"Abilities\\Weapons\\snapMissile\\snapMissile.mdl",1900.,.0,65.,1.,64.,60.)
call RRX('n03Q',"Abilities\\Weapons\\snapMissile\\snapMissile.mdl",1900.,.0,65.,1.,64.,60.)
call RRX('E01R',"Abilities\\Weapons\\KeeperGroveMissile\\KeeperGroveMissile.mdl",1200.,.1,65.,1.,64.,60.)
call RRX('E011',"Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('E013',"Abilities\\Spells\\Other\\FrostArrows\\NagaColdArrowMissile.mdl",1500.,.15,65.,1.,64.,60.)
call RRX('E01B',"Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl",1200.,.15,65.,1.,64.,60.)
call RRX('E01D',"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('E01F',"Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('E01K',"Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl",900.,.15,65.,1.,64.,60.)
call RRX('E01Q',"Abilities\\Weapons\\GyroCopter\\GyroCopterMissile.mdl",1500.,.1,65.,1.,64.,60.)
call RRX('U00O',"darkmissile.mdx",900.,.0,65.,1.,64.,60.)
call RRX('N01T',"Abilities\\Weapons\\MoonPriestessMissile\\MoonPriestessMissile.mdl",1600.,.15,65.,1.,64.,60.)
call RRX('N01S',"Abilities\\Weapons\\MoonPriestessMissile\\MoonPriestessMissile.mdl",1600.,.15,65.,1.,64.,60.)
call RRX('n02H',"Abilities\\Weapons\\PoisonArrow\\PoisonArrowMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('n031',"Abilities\\Weapons\\VoidWalkerMissile\\VoidWalkerMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('n01Z',"Abilities\\Weapons\\Banditmissile\\Banditmissile.mdl",800.,.5,65.,1.,64.,60.)
call RRX('e00X',"Abilities\\Weapons\\Arrow\\ArrowMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('e00G',"Abilities\\Weapons\\Arrow\\ArrowMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('n03B',"Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl",900.,.0,65.,1.,64.,60.)
call RRX('n03C',"Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl",900.,.0,65.,1.,64.,60.)
call RRX('n031',"Abilities\\Weapons\\VoidWalkerMissile\\VoidWalkerMissile.mdl",900.,.0,65.,1.,64.,60.)
call RRX('nwgs',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('E01G',"Abilities\\Weapons\\SentinelMissile\\SentinelMissile.mdl",900.,.1,65.,1.,64.,60.)
call RRX('n02L',"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",800.,.1,240.,1.,64.,50.)
call RRX('n02K',"Abilities\\Weapons\\FrostWyrmMissile\\FrostWyrmMissile.mdl",800.,.1,240.,1.,64.,50.)
call RRX('H009',"Abilities\\Spells\\NightElf\\SpiritOfVengeance\\SpiritOfVengeanceBirthMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('nhrq',"Abilities\\Weapons\\GargoyleMissile\\GargoyleMissile.mdl",1000.,.0,240.,1.,64.,50.)
call RRX('nhar',"Abilities\\Weapons\\HarpyMissile\\HarpyMissile.mdl",1500.,.15,240.,1.,64.,50.)
call RRX('nhrh',"Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl",1200.,.15,240.,1.,64.,50.)
call RRX('nfre',"Abilities\\Weapons\\LichMissile\\LichMissile.mdl",1200.,.15,65.,1.,64.,60.)
call RRX('nlds',"Abilities\\Weapons\\MakuraMissile\\MakuraMissile.mdl",900.,.0,65.,1.,64.,60.)
call RRX('nsll',"Abilities\\Weapons\\RedDragonBreath\\RedDragonMissile.mdl",900.,.15,65.,1.,64.,128.)
call RRX('nssp',"Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl",1200.,.15,65.,1.,64.,60.)
call RRX('h01D',"war3mapImported\\Prismatic Missile Fixed.mdx",1100.,.15,65.,1.,64.,60.)
call RRX('E003',"Abilities\\Weapons\\DemonHunterMissile\\DemonHunterMissile.mdl",900.,.0,65.,1.,64.,60.)
call RRX('n00G',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00R',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00H',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00I',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00J',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00K',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00N',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00O',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00P',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('n00Q',"Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl",1400.,.0,270.,1.,64.,50.)
call RRX('u00U',"Abilities\\Weapons\\ColdArrow\\ColdArrowMissile.mdl",1500.,.15,65.,1.,64.,60.)
call RRX('u00T',"Abilities\\Spells\\Other\\BlackArrow\\BlackArrowMissile.mdl",1050.,.0,65.,1.,64.,60.)
call RRX('U003',"war3mapImported\\BlueBasiliskMissile.mdx",700.,.15,65.,1.,64.,60.)
call RRX('U000',"Abilities\\Spells\\NightElf\\SpiritOfVengeance\\SpiritOfVengeanceBirthMissile.mdl",1000.,.05,110.,1.2,64.,80.)
call RRX('nskf',"Abilities\\Weapons\\FlamingArrow\\FlamingArrowMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('nskm',"Abilities\\Weapons\\Arrow\\ArrowMissile.mdl",900.,.15,65.,1.,64.,60.)
call RRX('uskm',"Abilities\\Weapons\\SkeletalMageMissile\\SkeletalMageMissile.mdl",900.,.1,65.,1.,64.,60.)
endfunction
function DCX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
set DI[NI]=DI[NI]+GetEventDamage()
endif
else
set DI[NI]=DI[NI]+GetEventDamage()
endif
set RGX=null
return false
endfunction
function DDX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A09D')>0 and GetTriggerUnit() != GetEventDamageSource() then
call DCX()
endif
return false
endfunction
function DFX takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function DDX))
call MOE(II,(t))
set t=null
endfunction
function DGX takes integer D0E returns nothing
if SGV[D0E]!=null then
call DestroyEffect(SGV[D0E])
endif
call NTX(SFV[D0E])
set SFV[D0E]=null
set SGV[D0E]=null
call HIE(D0E)
endfunction
function DHX takes integer D0E returns nothing
if SHV[D0E]==NX then
call HOE(D0E)
call DGX(D0E)
endif
endfunction
function DJX takes nothing returns boolean
local integer D0E=SJV[(0)]
loop
exitwhen D0E==0
call DHX(D0E)
set D0E=SJV[D0E]
endloop
return false
endfunction
function DKX takes integer D0E returns nothing
set SKV[SJV[(0)]]=D0E
set SJV[D0E]=SJV[(0)]
set SJV[(0)]=D0E
set SKV[D0E]=(0)
endfunction
function DLX takes nothing returns nothing
call TriggerAddCondition(BX,Condition(function DJX))
endfunction
function DMX takes real x,real y returns integer
local integer D0E=HRE()
set SFV[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'e001',x,y,.0)
set SGV[D0E]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl",SFV[D0E],"origin")
set SHV[D0E]=NX+R2I(.1/.03125)
call SetUnitScale(SFV[D0E],1.5,.0,.0)
call UnitAddAbility(SFV[D0E],'Amrf')
call UnitRemoveAbility(SFV[D0E],'Amrf')
call SetUnitFlyHeight(SFV[D0E],100.,.0)
call SetUnitPathing(SFV[D0E],false)
call PauseUnit(SFV[D0E],true)
call SetUnitX(SFV[D0E],x)
call SetUnitY(SFV[D0E],y)
call DKX(D0E)
return D0E
endfunction
function TimeWarp___WarpProjectiles takes nothing returns nothing
local integer p=(MA)
local real x=.0
local real y=.0
set HEV[p]=true
call DestroyEffect(L8E("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl",HHV[p],HJV[p],HKV[p]-30.))
set x=HHV[p]+500.*Cos(EOX(p))
set y=HJV[p]+500.*Sin(EOX(p))
call ECX(p,x,y,HKV[p],false)
set x=HQV[p]+500.*Cos(EOX(p))
set y=HSV[p]+500.*Sin(EOX(p))
call ERX(p,x,y,HTV[p],false)
call DestroyEffect(L8E("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl",HHV[p],HJV[p],HKV[p]-30.))
endfunction
function DPX takes nothing returns nothing
//if GetSpellAbilityId()=='A025' then
call DMX(GetSpellTargetX(),GetSpellTargetY())
call XQX(KA,GetSpellTargetX(),GetSpellTargetY(),.0,400.,0,(11))
//endif
//return false
endfunction
function DQX takes nothing returns nothing
/*local trigger X_X=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(X_X,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(X_X,Condition(function DPX))*/
call RegisterSpellEffectEvent('A025', function DPX)
endfunction
function DSX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
if GetUnitAbilityLevel(RGX,'A094')!=0 and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(RGX)) then
if(CI[NI])then
call UnitRemoveAbility(RGX,'A096')
call UnitRemoveAbility(RGX,'B02N')
call UnitRemoveAbility(RGX,'A094')
endif
endif
set RGX=null
return false
endfunction
function DTX takes nothing returns nothing
local trigger X_X=CreateTrigger()
call MOE(II,(X_X))
call TriggerAddCondition(X_X,Condition(function DSX))
endfunction
function DUX takes nothing returns boolean
local unit RGX=GetEventDamageSource()
local unit SVE=GetTriggerUnit()
local real r
if GetUnitAbilityLevel(RGX,'A093')!=0 and IsUnitEnemy(SVE,GetOwningPlayer(RGX)) then
if GetRandomInt(0,100)<=8+2*GetUnitAbilityLevel(RGX,'A093')then
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
set r=GetUnitAbilityLevel(RGX,'A093')*.001*GetEventDamage()
call UnitDamageTargetEx(SVE,RGX,r,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\BrewmasterMissile\\BrewmasterMissile.mdl",RGX,"chest"))
call UnitAddAbility(RGX,'A094')
call UnitAddAbility(RGX,'A096')
endif
else
if(CI[NI])then
set r=GetUnitAbilityLevel(RGX,'A093')*.001*GetEventDamage()
call UnitDamageTargetEx(SVE,RGX,r,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\BrewmasterMissile\\BrewmasterMissile.mdl",RGX,"chest"))
call UnitAddAbility(RGX,'A094')
call UnitAddAbility(RGX,'A096')
endif
endif
endif
else
if GetUnitAbilityLevel(SVE,'A093')!=0 then
if GetRandomInt(0,100)<=8+2*GetUnitAbilityLevel(SVE,'A093')then
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
set r=GetUnitAbilityLevel(SVE,'A093')*10
call UnitDamageTargetEx(RGX,SVE,r,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\BrewmasterMissile\\BrewmasterMissile.mdl",SVE,"chest"))
call UnitAddAbility(SVE,'A094')
call UnitAddAbility(SVE,'A096')
endif
else
if(CI[NI])then
set r=GetUnitAbilityLevel(SVE,'A093')*10
call UnitDamageTargetEx(RGX,SVE,r,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\BrewmasterMissile\\BrewmasterMissile.mdl",SVE,"chest"))
call UnitAddAbility(SVE,'A094')
call UnitAddAbility(SVE,'A096')
endif
endif
endif
endif
endif
set RGX=null
set SVE=null
return false
endfunction
function DWX takes nothing returns nothing
local trigger X_X=CreateTrigger()
call MOE(II,(X_X))
call TriggerAddCondition(X_X,Condition(function DUX))
endfunction
constant function DYX takes integer DZX,integer D_X returns real
return(D_X*DZX*.5)
endfunction
function D0X takes integer D1X returns nothing
set MUV[D1X]=DAMAGE_TYPE_FORCE
set MWV[D1X]=ATTACK_TYPE_NORMAL
call BBX(D1X,UNIT_TYPE_STRUCTURE)
set MPV[D1X]=true
set MHV[D1X]=true
set MJV[D1X]=true
set M0V[D1X]=-1.
endfunction
function D2X takes unit u,integer s returns boolean
return not IsUnitType(u,UNIT_TYPE_DEAD)and GetUnitTypeId(u)!=0 and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false and IsUnitType(u,UNIT_TYPE_MAGIC_IMMUNE) == false and IsUnitEnemy(u,GetOwningPlayer(SQV[s]))and IsUnitVisible(u,GetOwningPlayer(SQV[s]))
endfunction
function D3X takes unit c,unit o returns integer
local integer D0E=HEE()
local integer i=0
local real x=GetUnitX(c)
local real y=GetUnitY(c)
local real a
set TIV[D0E]=GetUnitAbilityLevel(o,'A08L')
set TRV[D0E]=12
set TVV[D0E]=(25.+(2.*TIV[D0E]))
set SQV[D0E]=c
set SSV[D0E]=o
set TOV[D0E]=NewTimer()
loop
exitwhen i==TRV[D0E]
set a=i*HC/TRV[D0E]
set SWV[SYV[D0E]+i]=YBE(x,y,a)
call YHE(SWV[SYV[D0E]+i],"Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl")
call YCE(SWV[SYV[D0E]+i],1.4)
call SetUnitFlyHeight(DPV[(SWV[SYV[D0E]+i])],((100.)*1.),0)
set S4V[S5V[D0E]+i]=a
set i=i+1
endloop
call GroupAddUnit(KC,c)
return D0E
endfunction
function D4X takes nothing returns boolean
return D2X(GetFilterUnit(),TAV)
endfunction
function D5X takes nothing returns nothing
local integer D0E=GetTimerData(GetExpiredTimer())
local real x=GetUnitX(SQV[D0E])
local real y=GetUnitY(SQV[D0E])
local integer i=0
local real x1
local real y1
local real x2
local real y2
local real OLX
local real M3E
local real M4E
local real dx
local real dy
local real CCE
if TVV[D0E]>.0 and not IsUnitType(SQV[D0E],UNIT_TYPE_DEAD)then
set TVV[D0E]=TVV[D0E]-.025
loop
exitwhen i==TRV[D0E]
set S4V[S5V[D0E]+i]=S4V[S5V[D0E]+i]+.15
set S6V[S7V[D0E]+i]=x+(150.+(TIV[D0E])*0)*Cos(S4V[S5V[D0E]+i])
set S8V[S9V[D0E]+i]=y+(150.+(TIV[D0E])*0)*Sin(S4V[S5V[D0E]+i])
if not SZV[S_V[D0E]+i]then
call SetUnitX(DPV[(SWV[SYV[D0E]+i])],((S6V[S7V[D0E]+i])*1.))
call SetUnitY(DPV[(SWV[SYV[D0E]+i])],((S8V[S9V[D0E]+i])*1.))
set TAV=D0E
set STV[SUV[D0E]+i]=(ZEE(null,(((GetUnitX(DPV[(SWV[SYV[D0E]+i])])))*1.),(((GetUnitY(DPV[(SWV[SYV[D0E]+i])])))*1.),(((500.+(TIV[D0E])*0))*1.),(Condition(function D4X))))
if STV[SUV[D0E]+i]!=null then
set SZV[S_V[D0E]+i]=true
endif
else
if not S0V[S1V[D0E]+i]then
set x1=(GetUnitX(DPV[(SWV[SYV[D0E]+i])]))
set y1=(GetUnitY(DPV[(SWV[SYV[D0E]+i])]))
set x2=GetUnitX(STV[SUV[D0E]+i])
set y2=GetUnitY(STV[SUV[D0E]+i])
set dx=x2-x1
set dy=y2-y1
set OLX=Atan2(dy,dx)
set M3E=x1+(800.*.025+(TIV[D0E])*.0)*Cos(OLX)
set M4E=y1+(800.*.025+(TIV[D0E])*.0)*Sin(OLX)
set CCE=SquareRoot(dx*dx+dy*dy)
if(CCE>80.)then
call SetUnitX(DPV[(SWV[SYV[D0E]+i])],((M3E)*1.))
call SetUnitY(DPV[(SWV[SYV[D0E]+i])],((M4E)*1.))
call SetUnitFacing(DPV[(SWV[SYV[D0E]+i])],((OLX)*1.)*bj_RADTODEG)
if CCE>1000. or IsUnitType(STV[SUV[D0E]+i],UNIT_TYPE_DEAD)then
set S0V[S1V[D0E]+i]=true
set STV[SUV[D0E]+i]=null
endif
else
if not IsUnitType(STV[SUV[D0E]+i],UNIT_TYPE_DEAD)then
call BCX(JC,"","origin")
call BPX(JC,SSV[D0E],STV[SUV[D0E]+i],DYX(TIV[D0E],GetHeroInt(SSV[D0E],true)))
set TEV[TXV[D0E]+i]=true
endif
set S0V[S1V[D0E]+i]=true
set STV[SUV[D0E]+i]=null
endif
else
if not S2V[S3V[D0E]+i]then
set x1=(GetUnitX(DPV[(SWV[SYV[D0E]+i])]))
set y1=(GetUnitY(DPV[(SWV[SYV[D0E]+i])]))
set x2=GetUnitX(SQV[D0E])
set y2=GetUnitY(SQV[D0E])
set dx=x2-x1
set dy=y2-y1
set OLX=Atan2(dy,dx)
set M3E=x1+(800.*.025+(TIV[D0E])*.0)*Cos(OLX)
set M4E=y1+(800.*.025+(TIV[D0E])*.0)*Sin(OLX)
set CCE=SquareRoot(dx*dx+dy*dy)
if(CCE>80.)then
call SetUnitX(DPV[(SWV[SYV[D0E]+i])],((M3E)*1.))
call SetUnitY(DPV[(SWV[SYV[D0E]+i])],((M4E)*1.))
call SetUnitFacing(DPV[(SWV[SYV[D0E]+i])],((OLX)*1.)*bj_RADTODEG)
else
if not IsUnitType(SQV[D0E],UNIT_TYPE_DEAD)and TEV[TXV[D0E]+i]then
call BCX(JC,"","origin")
call BPX(JC,SSV[D0E],SQV[D0E],DYX(TIV[D0E],GetHeroInt(SSV[D0E],true))*(.05+(TIV[D0E])*.01))
endif
set S2V[S3V[D0E]+i]=true
endif
else
set x1=(GetUnitX(DPV[(SWV[SYV[D0E]+i])]))
set y1=(GetUnitY(DPV[(SWV[SYV[D0E]+i])]))
set x2=S6V[S7V[D0E]+i]
set y2=S8V[S9V[D0E]+i]
set dx=x2-x1
set dy=y2-y1
set OLX=Atan2(dy,dx)
set M3E=x1+(800.*.025+(TIV[D0E])*.0)*Cos(OLX)
set M4E=y1+(800.*.025+(TIV[D0E])*.0)*Sin(OLX)
set CCE=SquareRoot(dx*dx+dy*dy)
if(CCE>80.)then
call SetUnitX(DPV[(SWV[SYV[D0E]+i])],((M3E)*1.))
call SetUnitY(DPV[(SWV[SYV[D0E]+i])],((M4E)*1.))
call SetUnitFacing(DPV[(SWV[SYV[D0E]+i])],((OLX)*1.)*bj_RADTODEG)
else
set S2V[S3V[D0E]+i]=false
set S0V[S1V[D0E]+i]=false
set SZV[S_V[D0E]+i]=false
set TEV[TXV[D0E]+i]=false
call SetUnitX(DPV[(SWV[SYV[D0E]+i])],((S6V[S7V[D0E]+i])*1.))
call SetUnitY(DPV[(SWV[SYV[D0E]+i])],((S8V[S9V[D0E]+i])*1.))
endif
endif
endif
endif
set i=i+1
endloop
else
call HXE(D0E)
endif
endfunction
function D7X takes nothing returns nothing
local integer D0E
//if(GetSpellAbilityId()=='A08L')then
set D0E=D3X(GetSpellTargetUnit(),GetTriggerUnit())
call SetTimerData(((TOV[D0E])),(D0E))
call TimerStart(TOV[D0E],.025,true,function D5X)
//endif
//return false
endfunction
function D8X takes nothing returns boolean
local unit c=GetSpellTargetUnit()
local unit u=GetTriggerUnit()
if GetSpellAbilityId()=='A08L' and IsUnitInGroup(c,KC)then
call Q_E(GetOwningPlayer(u),"Another instance is running for this unit.")
call PauseUnit(u,true)
call IssueImmediateOrderById(u,851972)
call PauseUnit(u,false)
endif
set c=null
set u=null
return false
endfunction
function D9X takes nothing returns nothing
local trigger t
/*call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function D7X))*/
call RegisterSpellEffectEvent('A08L', function D7X)
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CHANNEL)
call TriggerAddCondition(t,Condition(function D8X))
set JC=H0E()
call D0X(JC)
endfunction
function FVX takes nothing returns nothing
local player p=Player(0)
local unit u
local integer unitID
local trigger t
local real O5X
set X6V=CreateUnit(p,'h007',-508.6,-4608.7,139.575)
endfunction
function FEX takes nothing returns nothing
local player p=Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real O5X
set XZV=CreateUnit(p,'ncop',8000.,-4480.,270.)
set X_V=CreateUnit(p,'ncop',4800.,-4480.,270.)
set OVV=CreateUnit(p,'ncop',1280.,-3840.,270.)
set XQV=CreateUnit(p,'ncop',-1280.,-6400.,270.)
set X0V=CreateUnit(p,'ncop',-4800.,-4480.,270.)
set X1V=CreateUnit(p,'ncop',-8000.,-4480.,270.)
set X2V=CreateUnit(p,'ncop',-8704.,576.,270.)
set X3V=CreateUnit(p,'ncop',-4096.,576.,270.)
set X4V=CreateUnit(p,'ncop',4096.,576.,270.)
set XYV=CreateUnit(p,'ncop',8704.,576.,270.)
set X7V=CreateUnit(p,'ncop',1280.,-4864.,270.)
set X8V=CreateUnit(p,'ncop',.0,-6400.,270.)
set X9V=CreateUnit(p,'ncop',-1280.,-4928.,270.)
set u=CreateUnit(p,'ncp3',-6400.,-3072.,270.)
set u=CreateUnit(p,'ncp3',6400.,-3072.,270.)
set XDV=CreateUnit(p,'ncop',-256.,-3840.,270.)
//set XCV=CreateUnit(p,'ncop',1280.,-6400.,270.)
set XBV=CreateUnit(p,'ncop',1280.,-4608.,270.)
set XNV=CreateUnit(p,'ncop',-1280.,-4672.,270.)
set XAV=CreateUnit(p,'ncop',-1280.,-4416.,270.)
set QoBC=CreateUnit(p,'ncop',-1280.,-3950.,270.)
set XIV=CreateUnit(p,'ncop',-1280.,-5440.,270.)
set XRV=CreateUnit(p,'ncop',-1280.,-5952.,270.)
set XOV=CreateUnit(p,'ncop',-1280.,-6208.,270.)
set XXV=CreateUnit(p,'ncop',-512.,-3840.,270.)
set XFV=CreateUnit(p,'ncop',-768.,-3840.,270.)
set XJV=CreateUnit(p,'ncop',.0,-3840.,270.)
set XKV=CreateUnit(p,'ncop',256.,-3840.,270.)
set XLV=CreateUnit(p,'ncop',256.,-6400.,270.)
set XUV=CreateUnit(p,'ncop',-512.,-6400.,270.)
set XTV=CreateUnit(p,'ncop',-768.,-6400.,270.)
set XSV=CreateUnit(p,'ncop',512.,-6400.,270.)
set XEV=CreateUnit(p,'ncop',1280.,-4352.,270.)
set XVV=CreateUnit(p,'ncop',1280.,-5632.,270.)
set E9V=CreateUnit(p,'ncop',1280.,-4096.,270.)
set E8V=CreateUnit(p,'ncop',1280.,-5120.,270.)
set E6V=CreateUnit(p,'ncop',-256.,-6400.,270.)
set E5V=CreateUnit(p,'ncop',768.,-6400.,270.)
set E1V=CreateUnit(p,'ncop',-1280.,-5696.,270.)
set XGV=CreateUnit(p,'ncop',1280.,-5376.,270.)
set E3V=CreateUnit(p,'ncop',-1280.,-4160.,270.)
set XHV=CreateUnit(p,'ncop',-1024.,-3840.,270.)
set OXV=CreateUnit(p,'ncop',1280.,-5888.,270.)
set OEV=CreateUnit(p,'ncop',1024.,-3840.,270.)
set E2V=CreateUnit(p,'ncop',768.,-3840.,270.)
set OOV=CreateUnit(p,'ncop',1024.,-6400.,270.)
set XPV=CreateUnit(p,'ncop',512.,-3840.,270.)
set X5V=CreateUnit(p,'ncop',-1280.,-5184.,270.)
set XWV=CreateUnit(p,'ncop',-1024.,-6400.,270.)
set PeHC=CreateUnit(p,'ncop',1280.,-6400.,270.)
endfunction
function FXX takes nothing returns nothing
local player p=Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real O5X
set u=CreateUnit(p,'n014',-4930.,-256.,270.)
set u=CreateUnit(p,'n014',7890.,-256.,270.)
set u=CreateUnit(p,'n015',5056.,-256.,270.)
set u=CreateUnit(p,'n015',-7776.,-256.,270.)
set u=CreateUnit(p,'n00X',5912.6,-2795.3,270.)
set u=CreateUnit(p,'n00F',-7424.,-2816.,270.)
set u=CreateUnit(p,'n00F',5376.,-2816.,270.)
set u=CreateUnit(p,'n008',-5376.,-2752.,270.)
set u=CreateUnit(p,'n008',7424.,-2752.,270.)
set u=CreateUnit(p,'h00P',4343.7,6583.3,99.03)
set u=CreateUnit(p,'n00V',-6400.,-2752.,270.)
set u=CreateUnit(p,'n00V',6400.,-2752.,270.)
set u=CreateUnit(p,'n00A',-5888.,-2752.,270.)
set u=CreateUnit(p,'n00A',6912.,-2752.,270.)
set u=CreateUnit(p,'h00P',8451.6,6568.6,81.35)
set u=CreateUnit(p,'h00P',-4345.3,6549.4,87.75)
set u=CreateUnit(p,'h00P',-8443.3,6562.7,175.83)
set E4V=CreateUnit(p,'n00T',-5461.8,-2841.6,154.164)
set u=CreateUnit(p,'n00W',7005.1,-2668.5,332.152)
set u=CreateUnit(p,'n00W',6678.2,-2753.6,33.242)
set E7V=CreateUnit(p,'n00T',7347.9,-2833.5,152.812)
set u=CreateUnit(p,'n00X',-6935.7,-2761.4,270.)
set u=CreateUnit(p,'n012',6392.1,-2714.8,269.43)
set u=CreateUnit(p,'n00W',-5797.1,-2695.3,335.062)
set u=CreateUnit(p,'n00W',-6121.,-2800.,41.582)
set u=CreateUnit(p,'n00Y',-7446.6,-2740.8,285.488)
set u=CreateUnit(p,'n00Y',5355.3,-2720.5,284.201)
set u=CreateUnit(p,'n00Z',5371.6,-2765.2,270.031)
set u=CreateUnit(p,'n00Z',-7444.1,-2767.1,358.778)
set u=CreateUnit(p,'n00Z',-6914.4,-2767.4,107.362)
set u=CreateUnit(p,'n00Z',-6403.8,-2765.,179.154)
set u=CreateUnit(p,'n00Z',-5891.9,-2759.2,90.267)
set u=CreateUnit(p,'n00Z',-5392.2,-2762.2,87.966)
set u=CreateUnit(p,'n00Z',5888.9,-2756.6,276.534)
set u=CreateUnit(p,'n00Z',6388.4,-2774.7,.755)
set u=CreateUnit(p,'n00Z',7415.7,-2761.2,269.231)
set u=CreateUnit(p,'n00Z',6899.3,-2767.3,359.794)
set u=CreateUnit(p,'n00Z',7846.5,-277.1,180.02)
set u=CreateUnit(p,'n00Z',4970.6,-259.2,180.725)
set u=CreateUnit(p,'n00Z',-7837.4,-246.7,270.19)
set u=CreateUnit(p,'n00Z',-4952.,-276.,89.753)
set u=CreateUnit(p,'n00Z',-2.,-5120.6,41.12)
set u=CreateUnit(p,'n010',-7734.4,-262.8,269.539)
set u=CreateUnit(p,'n010',5069.8,-256.6,271.808)
set u=CreateUnit(p,'n010',4902.1,-259.2,271.494)
set u=CreateUnit(p,'n010',-7899.7,-260.6,268.611)
set u=CreateUnit(p,'n011',-7038.8,-2701.4,302.079)
set u=CreateUnit(p,'n011',5979.9,-2711.2,215.388)
set u=CreateUnit(p,'n011',-6804.6,-2671.9,234.768)
set u=CreateUnit(p,'n011',5779.5,-2716.4,311.923)
set u=CreateUnit(p,'n012',-6410.5,-2712.7,269.43)
set u=null
endfunction
function FOX takes nothing returns nothing
local player p
local unit u
local integer unitID
local trigger t
local real O5X
set p=Player(0)
set u=CreateUnit(p,'h000',6400.,2816.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(1)
set u=CreateUnit(p,'h000',6400.,3328.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(2)
set u=CreateUnit(p,'h000',6400.,3840.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(3)
set u=CreateUnit(p,'h000',6400.,4352.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(4)
set u=CreateUnit(p,'h000',6400.,4864.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(5)
set u=CreateUnit(p,'h000',-6400.,2816.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(6)
set u=CreateUnit(p,'h000',-6400.,3328.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(7)
set u=CreateUnit(p,'h000',-6400.,3840.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(8)
set u=CreateUnit(p,'h000',-6400.,4352.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p=Player(9)
set u=CreateUnit(p,'h000',-6400.,4864.,270.)
call UnitAddItemToSlotById(u,'wcyc',0)
call UnitAddItemToSlotById(u,'wshs',1)
call UnitAddItemToSlotById(u,'woms',2)
call UnitAddItemToSlotById(u,'wlsd',3)
set p = null
set u = null
endfunction
function FRX takes nothing returns nothing
local weathereffect we
set GU=Rect(-6592.,-3264.,-6208.,-2880.)
set HU=Rect(6208.,-3264.,6592.,-2880.)
set JU=Rect(-9088.,6528.,-7808.,6784.)
set KU=Rect(-4992.,6528.,-3712.,6784.)
set LU=Rect(3712.,6528.,4992.,6784.)
set MU=Rect(7808.,6528.,9088.,6784.)
set PU=Rect(-1536.,-6656.,1536.,-3584.)
set QU=Rect(-9472.,-6912.,-3328.,7520.)
set SU=Rect(3328.,-6880.,9472.,7552.)
set TU=Rect(-7168.,2560.,-5632.,6880.)
set UU=Rect(5632.,2688.,7168.,7008.)
set WU=Rect(-1472.,-3808.,-1344.,-3680.)
set YU=Rect(-1088.,-3776.,-960.,-3648.)
set ZU=Rect(-832.,-3776.,-704.,-3648.)
set VW=Rect(-576.,-3776.,-448.,-3648.)
set EW=Rect(-320.,-3776.,-192.,-3648.)
set XW=Rect(-64.,-3776.,64.,-3648.)
set OW=Rect(192.,-3776.,320.,-3648.)
set RW=Rect(448.,-3776.,576.,-3648.)
set IW=Rect(704.,-3776.,832.,-3648.)
set AW=Rect(960.,-3776.,1088.,-3648.)
set NW=Rect(1344.,-3808.,1472.,-3680.)
set BW=Rect(1344.,-4160.,1472.,-4032.)
set CW=Rect(1344.,-4416.,1472.,-4288.)
set DW=Rect(1344.,-4672.,1472.,-4544.)
set FW=Rect(1344.,-4928.,1472.,-4800.)
set GW=Rect(1344.,-5184.,1472.,-5056.)
set HW=Rect(1344.,-5440.,1472.,-5312.)
set JW=Rect(1344.,-5696.,1472.,-5568.)
set KW=Rect(1344.,-5952.,1472.,-5824.)
set LW=Rect(1344.,-6560.,1472.,-6432.)
set MW=Rect(960.,-6592.,1088.,-6464.)
set PW=Rect(704.,-6592.,832.,-6464.)
set QW=Rect(448.,-6592.,576.,-6464.)
set SW=Rect(192.,-6592.,320.,-6464.)
set TW=Rect(-64.,-6592.,64.,-6464.)
set UW=Rect(-320.,-6592.,-192.,-6464.)
set WW=Rect(-576.,-6592.,-448.,-6464.)
set YW=Rect(-832.,-6592.,-704.,-6464.)
set ZW=Rect(-1088.,-6592.,-960.,-6464.)
set VY=Rect(-1440.,-6624.,-1312.,-6496.)
set EY=Rect(-1472.,-6304.,-1344.,-6176.)
set XY=Rect(-1472.,-6016.,-1344.,-5888.)
set OY=Rect(-1472.,-5760.,-1344.,-5632.)
set RY=Rect(-1472.,-5504.,-1344.,-5376.)
set IY=Rect(-1472.,-5248.,-1344.,-5120.)
set AY=Rect(-1472.,-4992.,-1344.,-4864.)
set NY=Rect(-1472.,-4736.,-1344.,-4608.)
set BY=Rect(-1472.,-4480.,-1344.,-4320.)
set CY=Rect(-1472.,-4256.,-1344.,-4096.)
endfunction
function FIX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[1])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function FAX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==1)
endfunction
function FNX takes nothing returns boolean
return(ST==false)
endfunction
function FBX takes nothing returns boolean
return(FNX())
endfunction
function FCX takes nothing returns nothing
if(FBX())then
call SetUnitAbilityLevelSwapped('A00O',GetTriggerUnit(),XT)
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'SCae')
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',XT)
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'SCae')
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',XT)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
call UnitAddAbility(GetTriggerUnit(),'A04K')
call UnitAddAbility(GetTriggerUnit(),'A01R')
call SetUnitAbilityLevel(GetTriggerUnit(),'A01R',5)
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'A00O')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FAX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function FFX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[2])
endfunction
function FGX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==2)
endfunction
function FHX takes nothing returns boolean
return(ST==false)
endfunction
function FJX takes nothing returns boolean
return(FHX())
endfunction
function FKX takes nothing returns nothing
if(FJX())then
call SetUnitAbilityLevelSwapped('AIcb',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'AIcb')
call UnitRemoveAbility(GetTriggerUnit(),'Afzy')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FGX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function FMX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[3])
endfunction
function FPX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==3)
endfunction
function FQX takes nothing returns boolean
return(ST==false)
endfunction
function FSX takes nothing returns boolean
return(FQX())
endfunction
function FTX takes nothing returns nothing
if(FSX())then
call SetUnitAbilityLevelSwapped('AEar',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'AEar')
endif
if XT ==2 then
call SetUnitAbilityLevelSwapped('AEar',GetTriggerUnit(),1)
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('AEar',GetTriggerUnit(),2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'SCae')
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',XT)
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
call UnitAddAbility(GetTriggerUnit(),'SCae')
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',XT)
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'AEar')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FPX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function FWX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[4])
endfunction
function FYX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==4)
endfunction
function FZX takes nothing returns boolean
return(ST==false)
endfunction
function F_X takes nothing returns boolean
return(FZX())
endfunction
function F0X takes nothing returns nothing
if(F_X())then
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),XT)
call SetUnitAbilityLevel(GetTriggerUnit(),'AChv',XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
call UnitRemoveAbility(GetTriggerUnit(),'A04P')
call UnitRemoveAbility(GetTriggerUnit(),'A03R')
endif
if XT ==2 then
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),1)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),1)
call SetUnitAbilityLevel(GetTriggerUnit(),'AChv',1)
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),2)
call SetUnitAbilityLevel(GetTriggerUnit(),'AChv',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A08F')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A08F')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
call UnitRemoveAbility(GetTriggerUnit(),'A03R')
call UnitRemoveAbility(GetTriggerUnit(),'AChv')
call UnitRemoveAbility(GetTriggerUnit(),'A04P')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FYX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function F2X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[5])
endfunction
function F3X takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==5)
endfunction
function F4X takes nothing returns boolean
return(ST==false)
endfunction
function F5X takes nothing returns boolean
return(F4X())
endfunction
function F6X takes nothing returns nothing
local unit u
local real x
local real y
local integer playern
if(F5X())then
//call SetUnitAbilityLevelSwapped('Aenr',GetTriggerUnit(),XT)
if BRTON then
set x = GetUnitX(GetTriggerUnit())
set y = GetUnitY(GetTriggerUnit())
set playern = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
call RemoveUnit(GetTriggerUnit())
set u = CreateUnit(Player(playern),'n01B',x,y,270.)
call RemoveGuardPosition(u)
call SetUnitPathing(u,false)
call TriggerRegisterUnitEvent(SetPathing_AggroTrigger,u,EVENT_UNIT_ACQUIRED_TARGET)
call GroupAddUnit(PATHING_GROUP,u)
call SetUnitAcquireRange(u,900.)
if XT ==4 then
call SetUnitScale(u,1.1,1.1,1.1)
call UnitAddAbility(u,'A0BH')
call UnitAddAbility(u,'A01X')
endif
if XT ==5 then
call SetUnitScale(u,1.3,1.3,1.3)
call UnitAddAbility(u,'A0BH')
call SetUnitAbilityLevel(u,'A0BH',2)
call UnitAddAbility(u,'Absk')
call UnitAddAbility(u,'A01X')
endif
call UnitAddAbility(u,'A06Q')
else
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A034')
endif
if XT ==2 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A034',1)
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A034',2)
endif
if XT ==4 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A034',3)
endif
if XT ==5 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A034',3)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endif
else
//call UnitRemoveAbility(GetTriggerUnit(),'Aenr')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(F3X())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
set u =null
endfunction
function F8X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[6])
endfunction
function F9X takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==6)
endfunction
function GVX takes nothing returns boolean
return(ST==false)
endfunction
function GEX takes nothing returns boolean
return(GVX())
endfunction
function GXX takes nothing returns nothing
if(GEX())then
call SetUnitAbilityLevelSwapped('Afbt',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('AIcb',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACct',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'ACct')
call UnitRemoveAbility(GetTriggerUnit(),'Afbt')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call SetUnitAbilityLevel(GetTriggerUnit(),'ACct',1)
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'ACct',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BH',2)
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'Afbt')
call UnitRemoveAbility(GetTriggerUnit(),'AIcb')
call UnitRemoveAbility(GetTriggerUnit(),'ACvp')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'Apiv')
call UnitRemoveAbility(GetTriggerUnit(),'A0EV')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(F9X())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function GRX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[7])
endfunction
function GIX takes nothing returns boolean
return(bj_forLoopAIndex==ModuloInteger(bj_forLoopAIndex,40))and(ModuloInteger(bj_forLoopAIndex,40)==7)
endfunction
function GAX takes nothing returns boolean
return(ST==false)
endfunction
function GNX takes nothing returns boolean
return(GAX())
endfunction
function GBX takes nothing returns nothing
if(GNX())then
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A01R',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Afbt',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'Afbt')
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call SetUnitAbilityLevel(GetTriggerUnit(),'A01R',1)
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A01R',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A0BD')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'Afbt')
call UnitRemoveAbility(GetTriggerUnit(),'AIcb')
call UnitRemoveAbility(GetTriggerUnit(),'ACvp')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'Apiv')
call UnitRemoveAbility(GetTriggerUnit(),'A0EV')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GIX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function GDX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[8])
endfunction
function GFX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==8)
endfunction
function GGX takes nothing returns boolean
return(ST==false)
endfunction
function GHX takes nothing returns boolean
return(GGX())
endfunction
function GJX takes nothing returns nothing
if(GHX())then
call SetUnitAbilityLevelSwapped('ACen',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A06A')
call UnitRemoveAbility(GetTriggerUnit(),'Aspd')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A06A')
call UnitAddAbility(GetTriggerUnit(),'A0BK')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A06A')
call UnitAddAbility(GetTriggerUnit(),'A0BK')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BK',2)
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'ACen',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A08K')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A08E')
call UnitAddAbility(GetTriggerUnit(),'A08K')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'A03R')
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'ACen')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GFX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function GLX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[9])
endfunction
function GMX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==9)
endfunction
function GPX takes nothing returns boolean
return(ST==false)
endfunction
function GQX takes nothing returns boolean
return(GPX())
endfunction
function GSX takes nothing returns nothing
if(GQX())then
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACav',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A08C')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A03R')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'Ansk',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'ACav',2)
endif
if XT ==4 then
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'ACav')
call UnitRemoveAbility(GetTriggerUnit(),'A03R')
call UnitRemoveAbility(GetTriggerUnit(),'A01Z')
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GMX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function GUX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[10])
endfunction
function GWX takes nothing returns boolean
return(ModuloInteger(bj_forLoopAIndex,40)==10)
endfunction
function GYX takes nothing returns boolean
return(ST==false)
endfunction
function GZX takes nothing returns boolean
return(GYX())
endfunction
function G_X takes nothing returns nothing
if(GZX())then
call SetUnitAbilityLevelSwapped('Ahea',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'Ahea')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call SetUnitAbilityLevel(GetTriggerUnit(),'Ahea',1)
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',1)
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'Ahea',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'SCae',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'ANic')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'ANic')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A01X')
endif
else
call UnitRemoveAbility(GetTriggerUnit(),'Ahea')
call UnitRemoveAbility(GetTriggerUnit(),'SCae')
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=200
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GWX())then
call UnitAddAbility(GetTriggerUnit(),PT[bj_forLoopAIndex])
call SetUnitAbilityLevelSwapped(PT[bj_forLoopAIndex],GetTriggerUnit(),XT)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function G1X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[11])
endfunction
function G2X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACua',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACac',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Ambd',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A04P')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A04P')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'Ambd',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function G4X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[12])
endfunction
function G5X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'ANic')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT == 3 then
call SetUnitAbilityLevel(GetTriggerUnit(),'Ansk',2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BH',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function G7X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[13])
endfunction
function G8X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A0EG',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A01T')
endif
if XT ==2 then
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A0EG',GetTriggerUnit(),2)
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A0EG',GetTriggerUnit(),2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'S009')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'S009')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HVX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[14])
endfunction
function HEX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ANbh',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A06P',GetTriggerUnit(),100)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A06O')
call UnitRemoveAbility(GetTriggerUnit(),'ANic')
call UnitRemoveAbility(GetTriggerUnit(),'ANbh')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A06O')
endif
if XT ==4 then
call UnitRemoveAbility(GetTriggerUnit(),'A06P')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'A04H')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'A06P')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HOX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[15])
endfunction
function HRX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A01W',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A01T')
call UnitRemoveAbility(GetTriggerUnit(),'A01W')
endif
if XT ==2 then
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A01W',GetTriggerUnit(),2)
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),3)
call SetUnitAbilityLevelSwapped('A01W',GetTriggerUnit(),3)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'S009')
call UnitAddAbility(GetTriggerUnit(),'A0BM')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'S009')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BM',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HAX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[16])
endfunction
function HNX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACav',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A03R')
//call UnitRemoveAbility(GetTriggerUnit(),'A04H')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
//call UnitRemoveAbility(GetTriggerUnit(),'A04H')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),3)
call SetUnitAbilityLevelSwapped('ACav',GetTriggerUnit(),3)
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
call UnitAddAbility(GetTriggerUnit(),'A04H')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HCX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())==PK[17])
endfunction
function HDX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACac',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A04K')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A04K')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('ACac',GetTriggerUnit(),3)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),3)
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BH',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HGX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[18])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function HHX takes nothing returns boolean
return(XT==1)
endfunction
function HJX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A01R',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'SCae')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('A01R',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),3)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'ANic')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'ANic')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if(HHX())then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HLX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[19])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function HMX takes nothing returns boolean
return(XT==1)
endfunction
function HPX takes nothing returns boolean
return(XT==1)
endfunction
function HQX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACev')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACev')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),3)
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),3)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
if(HMX())then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
if(HPX())then
call UnitRemoveAbility(GetTriggerUnit(),'A04R')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HTX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[20])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function HUX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'ACbn')
call UnitRemoveAbility(GetTriggerUnit(),'A06N')
call UnitRemoveAbility(GetTriggerUnit(),'Aspo')
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A06N')
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),3)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A01X')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'Ambd')
call SetUnitAbilityLevelSwapped('Ambd',GetTriggerUnit(),5)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function HYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[21])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function HZX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACcb',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACba',GetTriggerUnit(),XT)
if BRTON then
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
endif
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'ACnr')
call UnitRemoveAbility(GetTriggerUnit(),'A08I')
call UnitRemoveAbility(GetTriggerUnit(),'A08J')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'A04P')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),5)
call SetUnitAbilityLevelSwapped('A0BC',GetTriggerUnit(),2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function H0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[22])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function H1X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Afbt',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A01R',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'Afbt')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A01R')
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT == 3 then
call SetUnitAbilityLevelSwapped('A01R',GetTriggerUnit(),2)
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call SetUnitAbilityLevelSwapped('A0BH',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),5)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function H3X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[23])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function H4X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Ambd',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
call UnitRemoveAbility(GetTriggerUnit(),'ACcs')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'A04H')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'Absk')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A01X')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function H6X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[24])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function H7X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACf2',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACcw',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A06N')
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A06N')
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BM')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call UnitAddAbility(GetTriggerUnit(),'A0BM')
call SetUnitAbilityLevelSwapped('A0BM',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),5)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function H9X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[26])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JVX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACpv',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'ANic')
call UnitRemoveAbility(GetTriggerUnit(),'ACpv')
call UnitRemoveAbility(GetTriggerUnit(),'Afzy')
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'ANic')
call UnitRemoveAbility(GetTriggerUnit(),'ACpv')
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call SetUnitAbilityLevelSwapped('A0BH',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A0BC',GetTriggerUnit(),2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JXX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[27])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JOX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Afbt',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACcs')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACcs')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A04H')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'Absk')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JIX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[28])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JAX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A037',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A037')
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A037')
call UnitRemoveAbility(GetTriggerUnit(),'Ansk')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A03Z')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A01Z')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A03Z')
call UnitAddAbility(GetTriggerUnit(),'A01Z')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',5)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JBX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[29])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JCX takes nothing returns boolean
return(XT==1)
endfunction
function JDX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Apoi',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Ambd',GetTriggerUnit(),XT)
if XT ==1 then
call UnitAddAbility(GetTriggerUnit(),'A0BK')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BK',2)
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'Apoi')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'Apoi')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call UnitAddAbility(GetTriggerUnit(),'Absk')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',3)
endif
if(JCX())then
call UnitRemoveAbility(GetTriggerUnit(),'A04R')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JGX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[30])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JHX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A01T')
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A01T')
call UnitRemoveAbility(GetTriggerUnit(),'A08K')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',2)
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BD')
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BD',3)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JKX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[31])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JLX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Ambd',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'ACcs')
call UnitRemoveAbility(GetTriggerUnit(),'ACuf')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
call UnitRemoveAbility(GetTriggerUnit(),'ACcs')
call UnitRemoveAbility(GetTriggerUnit(),'ACuf')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'S009')
call UnitAddAbility(GetTriggerUnit(),'A0BM')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A0BM')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A04H')
call UnitAddAbility(GetTriggerUnit(),'S009')
call UnitAddAbility(GetTriggerUnit(),'A01X')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BM',2)
call SetUnitAbilityLevel(GetTriggerUnit(),'A04P',3)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JPX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[32])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JQX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACat',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'SCae')
call UnitRemoveAbility(GetTriggerUnit(),'A0F6')
call UnitRemoveAbility(GetTriggerUnit(),'ACuf')
call UnitRemoveAbility(GetTriggerUnit(),'ACbl')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
call UnitRemoveAbility(GetTriggerUnit(),'A0F6')
call UnitRemoveAbility(GetTriggerUnit(),'ACuf')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'AEar')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'AEar')
call SetUnitAbilityLevel(GetTriggerUnit(),'AEar',3)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JTX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[33])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JUX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACac',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('SCae',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A04K')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACac')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A04K')
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'ACac')
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Afzy')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function JYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[35])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function JZX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACvp',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'S009')
call UnitRemoveAbility(GetTriggerUnit(),'ACvp')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'S009')
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
if XT == 5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Afzy')
call UnitAddAbility(GetTriggerUnit(),'A04K')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevel(GetTriggerUnit(),'A0BC',2)
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function J0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[36])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function J1X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A037',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('AIcb',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
call UnitRemoveAbility(GetTriggerUnit(),'A037')
call UnitRemoveAbility(GetTriggerUnit(),'AIcb')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
call UnitRemoveAbility(GetTriggerUnit(),'A037')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
call UnitAddAbility(GetTriggerUnit(),'A04S')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function J3X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[37])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function J4X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A0EJ',GetTriggerUnit(),XT)
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
call UnitRemoveAbility(GetTriggerUnit(),'A0EJ')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'AIsr')
call UnitRemoveAbility(GetTriggerUnit(),'A0EJ')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function J6X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[39])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function J7X takes nothing returns nothing
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'A0EJ')
call UnitRemoveAbility(GetTriggerUnit(),'ACev')
call UnitRemoveAbility(GetTriggerUnit(),'ACct')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A04S')
call UnitRemoveAbility(GetTriggerUnit(),'A0EJ')
call UnitRemoveAbility(GetTriggerUnit(),'ACev')
call UnitRemoveAbility(GetTriggerUnit(),'ACct')
call UnitRemoveAbility(GetTriggerUnit(),'Ambd')
endif
if XT ==4 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
if XT ==5 then
call UnitAddAbility(GetTriggerUnit(),'A04K')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function J9X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==PK[25])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KVX takes nothing returns boolean
return(XT==1)
endfunction
function KEX takes nothing returns nothing
if XT ==1 then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACmi')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT ==2 then
call UnitRemoveAbility(GetTriggerUnit(),'A08F')
call UnitRemoveAbility(GetTriggerUnit(),'A083')
call UnitRemoveAbility(GetTriggerUnit(),'ACmi')
call UnitRemoveAbility(GetTriggerUnit(),'A08E')
endif
if XT ==4 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BH')
call UnitAddAbility(GetTriggerUnit(),'A04S')
endif
if XT ==5 then
call SetUnitScale(GetTriggerUnit(),1.5,1.5,1.5)
call UnitAddAbility(GetTriggerUnit(),'Absk')
call UnitAddAbility(GetTriggerUnit(),'A04S')
call UnitAddAbility(GetTriggerUnit(),'A04P')
call UnitAddAbility(GetTriggerUnit(),'A0BC')
call SetUnitAbilityLevelSwapped('A0BC',GetTriggerUnit(),2)
call SetUnitAbilityLevelSwapped('A04P',GetTriggerUnit(),3)
endif
if(KVX())then
call UnitRemoveAbility(GetTriggerUnit(),'A04R')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KOX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[4])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KRX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ANak',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KAX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[5])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KNX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KCX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[7])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KDX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACct',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KGX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[13])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KHX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A0EG',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KKX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[14])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KLX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACbh',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KPX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[15])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KQX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KTX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[16])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KUX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function KYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[17])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function KZX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACpv',GetTriggerUnit(),XT)
if XT==1 then
call UnitRemoveAbility(GetTriggerUnit(),'ACpv')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function K0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[18])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function K1X takes nothing returns boolean
return(XT<=2)
endfunction
function K2X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACbh',GetTriggerUnit(),XT)
if(K1X())then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function K4X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[20])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function K5X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function K7X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[21])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function K8X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACcb',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LVX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[22])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LEX takes nothing returns nothing
if XT<=2 then
call UnitRemoveAbility(GetTriggerUnit(),'Absk')
endif
call SetUnitAbilityLevelSwapped('ACct',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LOX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[24])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LRX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AChv',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('ACcw',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LAX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[26])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LNX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACpv',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LCX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[27])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LDX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Afbt',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LGX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[28])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LHX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A037',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Ansk',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LKX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[29])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LLX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Apoi',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LPX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[30])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LQX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A01T',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LTX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[32])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LUX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function LYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[36])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function LZX takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A037',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function L0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[37])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function L1X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('AIsr',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('A0EJ',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function L3X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[38])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function L4X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('ACsw',GetTriggerUnit(),XT)
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function L6X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())==MC[39])and(GetUnitAbilityLevelSwapped('A06Q',GetTriggerUnit())==0)
endfunction
function L7X takes nothing returns nothing
call SetUnitAbilityLevelSwapped('Aspo',GetTriggerUnit(),XT)
call UnitAddAbility(GetTriggerUnit(),'A06Q')
endfunction
function Trig_AMSettings_Func080002001001001 takes nothing returns boolean
return(GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER)
endfunction
function Trig_AMSettings_Func080002001001002 takes nothing returns boolean
return(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_AMSettings_Func080002001001 takes nothing returns boolean
return GetBooleanAnd((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING))
endfunction
function Trig_AMSettings_Func080002001002 takes nothing returns boolean
return(IsPlayerAlly(GetFilterPlayer(),Player(0)))
endfunction
function MVX takes nothing returns boolean
return GetBooleanAnd((GetBooleanAnd((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING))),(IsPlayerAlly(GetFilterPlayer(),Player(0))))
endfunction
function Trig_AMSettings_Func081002001001001 takes nothing returns boolean
return(GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER)
endfunction
function Trig_AMSettings_Func081002001001002 takes nothing returns boolean
return(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_AMSettings_Func081002001001 takes nothing returns boolean
return GetBooleanAnd((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING))
endfunction
function Trig_AMSettings_Func081002001002 takes nothing returns boolean
return(IsPlayerAlly(GetFilterPlayer(),Player(5)))
endfunction
function MEX takes nothing returns boolean
return GetBooleanAnd((GetBooleanAnd((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING))),(IsPlayerAlly(GetFilterPlayer(),Player(5))))
endfunction
function Trig_AMSettings_Func082002001001 takes nothing returns boolean
return(GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER)
endfunction
function Trig_AMSettings_Func082002001002 takes nothing returns boolean
return(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING)
endfunction
function MXX takes nothing returns boolean
return GetBooleanAnd((GetPlayerController(GetFilterPlayer())==MAP_CONTROL_USER),(GetPlayerSlotState(GetFilterPlayer())==PLAYER_SLOT_STATE_PLAYING))
endfunction
function MOX takes nothing returns nothing
call LeaderboardAddItemBJ(GetEnumPlayer(),NS[1],GetPlayerName(GetEnumPlayer()),0)
endfunction
function MRX takes nothing returns nothing
call LeaderboardAddItemBJ(GetEnumPlayer(),NS[2],GetPlayerName(GetEnumPlayer()),0)
endfunction
function MIX takes nothing returns nothing
set PQ="% Badassery: "
set QQ[1]='E00Y'
set QQ[2]='E010'
set QQ[3]='E011'
set QQ[4]='E012'
set QQ[5]='E013'
set QQ[6]='E014'
set QQ[7]='E015'
set QQ[8]='E016'
set QQ[9]='E017'
set QQ[10]='E018'
set QQ[11]='E019'
set QQ[12]='E01A'
set QQ[13]='E01B'
set QQ[14]='E000'
set QQ[15]='E01C'
set QQ[16]='E01D'
set QQ[17]='E01E'
set QQ[18]='E01F'
set QQ[19]='E01G'
set QQ[20]='E01H'
set QQ[21]='E01J'
set QQ[22]='E01K'
set QQ[23]='E01L'
set QQ[24]='E01M'
set QQ[25]='E01N'
set QQ[26]='E01O'
set QQ[27]='E01P'
set QQ[28]='E01Q'
set QQ[29]='H00F'
set QQ[30]='U00Z'
set QQ[31]='U00O'
set QQ[32]='U003'
set QQ[33]='U00N'
set QQ[34]='N00D'
set QQ[35]='N01S'
set QQ[36]='E003'
set QQ[37]='E004'
set QQ[38]='E006'
set QQ[39]='U004'
set QQ[40]='U000'
set QQ[41]='H01F'
set SQ[1]="ReplaceableTextures\\CommandButtons\\BTNProudmoore.blp"
set SQ[2]="ReplaceableTextures\\CommandButtons\\BTNArthas.tga"
set SQ[3]="ReplaceableTextures\\CommandButtons\\BTNSorceress.tga"
set SQ[4]="ReplaceableTextures\\CommandButtons\\BTNBeastMaster.tga"
set SQ[5]="ReplaceableTextures\\CommandButtons\\BTNNagaSeaWitch.blp"
set SQ[6]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheClaw.tga"
set SQ[7]="ReplaceableTextures\\CommandButtons\\BTNChaosBlademaster.blp"
set SQ[8]="ReplaceableTextures\\CommandButtons\\BTNFireBrewmaster.blp"
set SQ[9]="ReplaceableTextures\\CommandButtons\\BTNNagaSummoner.tga"
set SQ[10]="ReplaceableTextures\\CommandButtons\\BTNGarithos.blp"
set SQ[11]="ReplaceableTextures\\CommandButtons\\BTNJaina.tga"
set SQ[12]="ReplaceableTextures\\CommandButtons\\BTNEarthBrewmaster.blp"
set SQ[13]="ReplaceableTextures\\CommandButtons\\BTNStormBrewmaster.blp"
set SQ[14]="ReplaceableTextures\\CommandButtons\\BTN_EyeOfShadows.blp"
set SQ[15]="ReplaceableTextures\\CommandButtons\\BTNTheCaptain.tga"
set SQ[16]="ReplaceableTextures\\CommandButtons\\BTNDarkTrollWarlord.blp"
set SQ[17]="ReplaceableTextures\\CommandButtons\\BTNSpellBreaker.tga"
set SQ[18]="ReplaceableTextures\\CommandButtons\\BTNAssassin.tga"
set SQ[19]="ReplaceableTextures\\CommandButtons\\BTNHuntress.blp"
set SQ[20]="ReplaceableTextures\\CommandButtons\\BTNHeroWarden.tga"
set SQ[21]="ReplaceableTextures\\CommandButtons\\BTNTauren.blp"
set SQ[22]="ReplaceableTextures\\CommandButtons\\BTNDruidOfTheTalon.blp"
set SQ[23]="ReplaceableTextures\\CommandButtons\\BTNHeroDemonHunter.tga"
set SQ[24]="ReplaceableTextures\\CommandButtons\\BTNEredarRed.blp"
set SQ[25]="ReplaceableTextures\\CommandButtons\\BTNMilitia.tga"
set SQ[26]="ReplaceableTextures\\CommandButtons\\BTNChaosWarlockGreen.tga"
set SQ[27]="ReplaceableTextures\\CommandButtons\\BTNHeroPaladin.blp"
set SQ[28]="ReplaceableTextures\\CommandButtons\\BTNHeroTinker.blp"
set SQ[29]="ReplaceableTextures\\CommandButtons\\BTNHeroMountainKing.blp"
set SQ[30]="ReplaceableTextures\\CommandButtons\\BTNRedDemon.blp"
set SQ[31]="ReplaceableTextures\\CommandButtons\\BTNLichVersion2.blp"
set SQ[32]="ReplaceableTextures\\CommandButtons\\BTNnagaWow1.blp"
set SQ[33]="ReplaceableTextures\\CommandButtons\\BTNWraith2.blp"
set SQ[34]="ReplaceableTextures\\CommandButtons\\BTNBansheeRanger.blp"
set SQ[35]="ReplaceableTextures\\CommandButtons\\BTNSylvanusWindrunner.blp"
set SQ[36]="ReplaceableTextures\\CommandButtons\\BTNFurion.blp"
set SQ[37]="ReplaceableTextures\\CommandButtons\\BTNbonecrusherGS.blp"
set SQ[38]="ReplaceableTextures\\CommandButtons\\BTNicons_4202_btn.blp"
set SQ[39]="ReplaceableTextures\\CommandButtons\\BTNicons_4953_btn.blp"
set SQ[40]="ReplaceableTextures\\CommandButtons\\BTNAetherConstructIcon.blp"
set SQ[41]="ReplaceableTextures\\CommandButtons\\BTNDragonKnight.blp"
set TQ=41
set WQ="Enfo FFB"
set YQ="West Side"
set ZQ="East Side"
call DestroyTrigger(R1)
endfunction
function MNX takes nothing returns nothing
if GetPlayerName(GetEnumPlayer()) == "Strikest#1504" or GetPlayerName(GetEnumPlayer()) == "Coffee_Culture" or GetPlayerName(GetEnumPlayer()) == "tyrea1" or GetPlayerName(GetEnumPlayer()) == "Waffle(est)" or GetPlayerName(GetEnumPlayer()) == "Mike#22559" or GetPlayerName(GetEnumPlayer()) == "kicka55#21791" then
if GetPlayerName(GetEnumPlayer()) == "Coffee_Culture"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFFFF0303C|r|cFFFF1603o|r|cFFFF2903f|r|cFFFF3C03f|r|cFFFF5002e|r|cFFFF6302e|r|cFFFF7602_|r|cFFFF8902C|r|cFFFF9C02u|r|cFFFFAF02l|r|cFFFFC301t|r|cFFFFD601u|r|cFFFFE901r|r|cFFFFFC01e|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFFFF0303C|r|cFFFF1603o|r|cFFFF2903f|r|cFFFF3C03f|r|cFFFF5002e|r|cFFFF6302e|r|cFFFF7602_|r|cFFFF8902C|r|cFFFF9C02u|r|cFFFFAF02l|r|cFFFFC301t|r|cFFFFD601u|r|cFFFFE901r|r|cFFFFFC01e|r")
endif
if GetPlayerName(GetEnumPlayer()) == "tyrea1"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF20C000t|r|cFF44DA05y|r|cFF68F40Are|r|cFF44DA05a|r|cFF20C0001|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF20C000t|r|cFF44DA05y|r|cFF68F40Are|r|cFF44DA05a|r|cFF20C0001|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Waffle(est)"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF214BF6W|r|cFF1C6AF6a|r|cFF1788F7f|r|cFF12A7F7f|r|cFF0DC5F8l|r|cFF08E4F8e|r|cFF0DC5F8(|r|cFF12A7F7e|r|cFF1788F7s|r|cFF1C6AF6t|r|cFF214BF6)|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF214BF6W|r|cFF1C6AF6a|r|cFF1788F7f|r|cFF12A7F7f|r|cFF0DC5F8l|r|cFF08E4F8e|r|cFF0DC5F8(|r|cFF12A7F7e|r|cFF1788F7s|r|cFF1C6AF6t|r|cFF214BF6)|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Mike#22559"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|c006f0000C|r|c007e0034a|r|c008d0068l|r|c00800080uh|r|c00ab5556a|r|c00d5aa2bl|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|c006f0000C|r|c007e0034a|r|c008d0068l|r|c00800080uh|r|c00ab5556a|r|c00d5aa2bl|r")
endif
if GetPlayerName(GetEnumPlayer()) == "kicka55#21791"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|c0000ff00k|r|c0025ff00i|r|c0049ff00c|r|c006eff00k|r|c0092ff00a|r|c00b7ff005|r|c00dbff005|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|c0000ff00k|r|c0025ff00i|r|c0049ff00c|r|c006eff00k|r|c0092ff00a|r|c00b7ff005|r|c00dbff005|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Strikest#1504" then
if GetRandomInt(0,100) >= 50 then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF08B7F2S|r|cFF2B9DF3t|r|cFF4D83F3r|r|cFF7069F4i|r|cFF934EF5k|r|cFFB634F6e|r|cFFD81AF6s|r|cFFFB00F7t|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF08B7F2S|r|cFF2B9DF3t|r|cFF4D83F3r|r|cFF7069F4i|r|cFF934EF5k|r|cFFB634F6e|r|cFFD81AF6s|r|cFFFB00F7t|r")
else
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF540081S|r|cFF6B0082t|r|cFF830082r|r|cFF9A0083i|r|cFFB20183k|r|cFFC90184e|r|cFFE10184s|r|cFFF80185t|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),"|cFF540081S|r|cFF6B0082t|r|cFF830082r|r|cFF9A0083i|r|cFFB20183k|r|cFFC90184e|r|cFFE10184s|r|cFFF80185t|r")
endif
endif
else
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),(BS[(1+GetPlayerId(GetEnumPlayer()))]+(GetPlayerName(GetEnumPlayer())+"|r")))
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[1])+2),(BS[(1+GetPlayerId(GetEnumPlayer()))]+(GetPlayerName(GetEnumPlayer())+"|r")))
endif
set WS[(1+GetPlayerId(GetEnumPlayer()))]=YS
set CT[(1+GetPlayerId(GetEnumPlayer()))]=(YS+2)
set YS=(YS+1)
endfunction
function MBX takes nothing returns nothing
if GetPlayerName(GetEnumPlayer()) != "Strikest#1504" and GetPlayerName(GetEnumPlayer()) != "Coffee_Culture" and GetPlayerName(GetEnumPlayer()) != "tyrea1" and GetPlayerName(GetEnumPlayer()) != "Waffle(est)" and GetPlayerName(GetEnumPlayer()) != "Mike#22559" and GetPlayerName(GetEnumPlayer()) != "kicka55#21791" then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),(BS[(1+GetPlayerId(GetEnumPlayer()))]+(GetPlayerName(GetEnumPlayer())+"|r")))
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),(BS[(1+GetPlayerId(GetEnumPlayer()))]+(GetPlayerName(GetEnumPlayer())+"|r")))
else
if GetPlayerName(GetEnumPlayer()) == "Coffee_Culture" then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFFFF0303C|r|cFFFF1603o|r|cFFFF2903f|r|cFFFF3C03f|r|cFFFF5002e|r|cFFFF6302e|r|cFFFF7602_|r|cFFFF8902C|r|cFFFF9C02u|r|cFFFFAF02l|r|cFFFFC301t|r|cFFFFD601u|r|cFFFFE901r|r|cFFFFFC01e|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFFFF0303C|r|cFFFF1603o|r|cFFFF2903f|r|cFFFF3C03f|r|cFFFF5002e|r|cFFFF6302e|r|cFFFF7602_|r|cFFFF8902C|r|cFFFF9C02u|r|cFFFFAF02l|r|cFFFFC301t|r|cFFFFD601u|r|cFFFFE901r|r|cFFFFFC01e|r")
endif
if GetPlayerName(GetEnumPlayer()) == "tyrea1"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF20C000t|r|cFF44DA05y|r|cFF68F40Are|r|cFF44DA05a|r|cFF20C0001|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF20C000t|r|cFF44DA05y|r|cFF68F40Are|r|cFF44DA05a|r|cFF20C0001|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Waffle(est)"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF214BF6W|r|cFF1C6AF6a|r|cFF1788F7f|r|cFF12A7F7f|r|cFF0DC5F8l|r|cFF08E4F8e|r|cFF0DC5F8(|r|cFF12A7F7e|r|cFF1788F7s|r|cFF1C6AF6t|r|cFF214BF6)|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF214BF6W|r|cFF1C6AF6a|r|cFF1788F7f|r|cFF12A7F7f|r|cFF0DC5F8l|r|cFF08E4F8e|r|cFF0DC5F8(|r|cFF12A7F7e|r|cFF1788F7s|r|cFF1C6AF6t|r|cFF214BF6)|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Mike#22559"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|c006f0000C|r|c007e0034a|r|c008d0068l|r|c00800080uh|r|c00ab5556a|r|c00d5aa2bl|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|c006f0000C|r|c007e0034a|r|c008d0068l|r|c00800080uh|r|c00ab5556a|r|c00d5aa2bl|r")
endif
if GetPlayerName(GetEnumPlayer()) == "kicka55#21791"then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|c0000ff00k|r|c0025ff00i|r|c0049ff00c|r|c006eff00k|r|c0092ff00a|r|c00b7ff005|r|c00dbff005|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|c0000ff00k|r|c0025ff00i|r|c0049ff00c|r|c006eff00k|r|c0092ff00a|r|c00b7ff005|r|c00dbff005|r")
endif
if GetPlayerName(GetEnumPlayer()) == "Strikest#1504" then
if GetRandomInt(0,100) >= 50 then
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF08B7F2S|r|cFF2B9DF3t|r|cFF4D83F3r|r|cFF7069F4i|r|cFF934EF5k|r|cFFB634F6e|r|cFFD81AF6s|r|cFFFB00F7t|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF08B7F2S|r|cFF2B9DF3t|r|cFF4D83F3r|r|cFF7069F4i|r|cFF934EF5k|r|cFFB634F6e|r|cFFD81AF6s|r|cFFFB00F7t|r")
else
call MultiboardSetItemValueBJ(AS[1],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF540081S|r|cFF6B0082t|r|cFF830082r|r|cFF9A0083i|r|cFFB20183k|r|cFFC90184e|r|cFFE10184s|r|cFFF80185t|r")
call MultiboardSetItemValueBJ(AS[2],1,(LeaderboardGetPlayerIndexBJ(GetEnumPlayer(),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),"|cFF540081S|r|cFF6B0082t|r|cFF830082r|r|cFF9A0083i|r|cFFB20183k|r|cFFC90184e|r|cFFE10184s|r|cFFF80185t|r")
endif
endif
endif
set WS[(1+GetPlayerId(GetEnumPlayer()))]=YS
set CT[(1+GetPlayerId(GetEnumPlayer()))]=(YS+2)
set YS=(YS+1)
endfunction
function MCX takes nothing returns nothing
call TriggerRegisterPlayerEventLeave(N1,GetEnumPlayer())
endfunction
function MDX takes nothing returns nothing
set VS[1]=C4E(Condition(function MVX))
set VS[2]=C4E(Condition(function MEX))
set ES=C4E(Condition(function MXX))
set XS[1]="|cffff0303"
set XS[2]="|cff999999"
set OS=10
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=OS
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set RS=(RS+"l")
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateLeaderboardBJ(VS[1],"T1 LEADERBOARD")
call LeaderboardDisplayBJ(false,bj_lastCreatedLeaderboard)
set NS[1]=bj_lastCreatedLeaderboard
call CreateLeaderboardBJ(VS[2],"T2 LEADERBOARD")
call LeaderboardDisplayBJ(false,bj_lastCreatedLeaderboard)
set NS[2]=bj_lastCreatedLeaderboard
call ForForce(VS[1],function MOX)
call ForForce(VS[2],function MRX)
//call CreateMultiboardBJ(4,(CountPlayersInForceBJ(ES)+6),(WQ+(" [ "+((BS[1]+("0|r : "+(BS[7]+"00|r")))+("]"+("- "+RT))))))
call CreateMultiboardBJ(4,(CountPlayersInForceBJ(ES)+4),(WQ+(" [ "+((BS[1]+("0|r : "+(BS[7]+"00|r")))+("]"+("- "+RT))))))
call MultiboardDisplay(bj_lastCreatedMultiboard,false)
set AS[1]=bj_lastCreatedMultiboard
//call CreateMultiboardBJ(4,(CountPlayersInForceBJ(ES)+6),(WQ+(" [ "+((BS[1]+("0|r : "+(BS[7]+"00|r")))+("]"+("- "+RT))))))
call CreateMultiboardBJ(4,(CountPlayersInForceBJ(ES)+4),(WQ+(" [ "+((BS[1]+("0|r : "+(BS[7]+"00|r")))+("]"+("- "+RT))))))
call MultiboardDisplay(bj_lastCreatedMultiboard,false)
set AS[2]=bj_lastCreatedMultiboard
call MultiboardSetItemStyleBJ(AS[1],0,0,true,false)
call MultiboardSetItemStyleBJ(AS[2],0,0,true,false)
call MultiboardSetItemWidthBJ(AS[1],0,0,9.)
call MultiboardSetItemWidthBJ(AS[2],0,0,9.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemColorBJ(AS[bj_forLoopAIndex],2,0,80.,80.,80.,0)
call MultiboardSetItemColorBJ(AS[bj_forLoopAIndex],3,0,80.,25.,15.,0)
call MultiboardSetItemColorBJ(AS[bj_forLoopAIndex],4,0,10.,55.,10.,0)
call MultiboardSetItemColorBJ(AS[bj_forLoopAIndex],0,2,100,70.,70.,0)
call MultiboardSetItemColorBJ(AS[bj_forLoopAIndex],0,(CountPlayersInForceBJ(VS[1])+4),70.,70.,100.,0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(AS[1],1,2,(YQ+(" - "+(I2S(SC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[2],1,2,(YQ+(" - "+(I2S(SC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[1],1,(CountPlayersInForceBJ(VS[1])+4),(ZQ+(" - "+(I2S(TC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[2],1,(CountPlayersInForceBJ(VS[1])+4),(ZQ+(" - "+(I2S(TC)+" Lives"))))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if not LWMON then
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],2,1,(BS[9]+"L|r"))
else
//call MultiboardSetItemWidthBJ(AS[bj_forLoopAIndex], 2, 1, 12. )
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],2,1,(BS[9]+"$$$|r"))
endif
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],3,1,(BS[15]+"K|r"))
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],4,1,(BS[15]+"D|r"))
//call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],1,(CountPlayersInForceBJ(ES)+6),PQ)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForForce(VS[1],function MNX)
set YS=(YS+2)
call ForForce(VS[2],function MBX)
set bj_forLoopBIndex=2
set bj_forLoopBIndexEnd=4
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemWidthBJ(AS[1],bj_forLoopBIndex,0,2.)
call MultiboardSetItemWidthBJ(AS[2],bj_forLoopBIndex,0,2.)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
//call MultiboardSetItemValueBJ(AS[1],2,(CountPlayersInForceBJ(ES)+6),"0%")
//call MultiboardSetItemValueBJ(AS[2],2,(CountPlayersInForceBJ(ES)+6),"0%")
set bj_forLoopBIndex=2
set bj_forLoopBIndexEnd=(2+CountPlayersInForceBJ(VS[1]))
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemValueBJ(AS[1],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],4,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],4,bj_forLoopBIndex,"0")
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopBIndex=(CountPlayersInForceBJ(VS[1])+4)
set bj_forLoopBIndexEnd=(CountPlayersInForceBJ(ES)+4)
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemValueBJ(AS[1],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],4,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],4,bj_forLoopBIndex,"0")
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=0
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GetLocalPlayer()==Player(bj_forLoopAIndex))then
call MultiboardDisplay(AS[1],true)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=5
set bj_forLoopAIndexEnd=8
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GetLocalPlayer()==Player(bj_forLoopAIndex))then
call MultiboardDisplay(AS[2],true)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ForForce(ES,function MCX)
call EnableTrigger(A1)
call EnableTrigger(N1)
call EnableTrigger(B1)
call DestroyTrigger(I1)
call MultiboardDisplay(AS[1],true)
endfunction
function MGX takes nothing returns boolean
return(DS)
endfunction
function MHX takes nothing returns boolean
return(CS==60)
endfunction
function MJX takes nothing returns boolean
return(CS>=10)
endfunction
function MKX takes nothing returns boolean
return(GetUnitTypeId(MQ[(1+GetPlayerId(GetEnumPlayer()))])==QQ[bj_forLoopAIndex])
endfunction
function MLX takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=TQ
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(MKX())then
set IS[(1+GetPlayerId(GetEnumPlayer()))]=bj_forLoopAIndex
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function MMX takes nothing returns nothing
if(MGX())then
set CS=(CS+1)
endif
if(MHX())then
set CS=0
set FS=(FS+1)
endif
if(MJX())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetTitleText(AS[bj_forLoopAIndex],(WQ+(" ["+((BS[14]+((I2S(FS)+"|r : ")+(BS[14]+((I2S(CS)+"|r")+("] - "+RT)))))+""))))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetTitleText(AS[bj_forLoopAIndex],(WQ+(" ["+((BS[14]+((I2S(FS)+"|r : ")+(BS[14]+((I2S(CS)+"|r")+("] - "+RT)))))+""))))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
call ForForce(ES,function MLX)
endfunction
function MQX takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=4
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemColorBJ(AS[1],bj_forLoopAIndex,CT[(1+GetPlayerId(GetTriggerPlayer()))],20.,20.,20,0)
call MultiboardSetItemColorBJ(AS[2],bj_forLoopAIndex,CT[(1+GetPlayerId(GetTriggerPlayer()))],20.,20.,20,0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call MultiboardSetItemValueBJ(AS[1],1,CT[(1+GetPlayerId(GetTriggerPlayer()))],(("|cff333333"+GetPlayerName(GetTriggerPlayer()))+"|r"))
call MultiboardSetItemValueBJ(AS[2],1,CT[(1+GetPlayerId(GetTriggerPlayer()))],(("|cff333333"+GetPlayerName(GetTriggerPlayer()))+"|r"))
endfunction
function MTX takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))!=null
endfunction
function MUX takes nothing returns boolean
return(IsPlayerAlly(GetOwningPlayer(GetTriggerUnit()),Player(0)))
endfunction
function MWX takes nothing returns nothing
if not LWMON then
if(MUX())then
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],2,(LeaderboardGetPlayerIndexBJ(GetOwningPlayer(GetTriggerUnit()),NS[1])+2),I2S(GetHeroLevel(GetTriggerUnit())))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
else
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],2,(LeaderboardGetPlayerIndexBJ(GetOwningPlayer(GetTriggerUnit()),NS[2])+(CountPlayersInForceBJ(VS[1])+4)),I2S(GetHeroLevel(GetTriggerUnit())))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endif
endfunction
function MZX takes nothing returns boolean
return((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))and((1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))<=10))!=null
endfunction
function M_X takes nothing returns boolean
return(MZX())
endfunction
function M0X takes nothing returns boolean
return((1+GetPlayerId(GetOwningPlayer(GetDyingUnit())))<=5)
endfunction
function M1X takes nothing returns nothing
if(M0X())then
set HT[1]=(HT[1]+1)
else
set HT[2]=(HT[2]+1)
endif
set BT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=(BT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+1)
call MultiboardSetItemValueBJ(AS[1],4,CT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],I2S(BT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
call MultiboardSetItemValueBJ(AS[2],4,CT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],I2S(BT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],4,2,I2S(HT[1]))
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],4,(CountPlayersInForceBJ(VS[1])+4),I2S(HT[2]))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function M3X takes nothing returns boolean
return((GetOwningPlayer(GetTriggerUnit())==Player(10))or(GetOwningPlayer(GetTriggerUnit())==Player(11))) and GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_USER and GetOwningPlayer(GetTriggerUnit()) != Player(PLAYER_NEUTRAL_PASSIVE) and GetOwningPlayer(GetTriggerUnit()) != GetOwningPlayer(GetKillingUnit()) and GetKillingUnit() != null
endfunction
function M4X takes nothing returns boolean
return(M3X())
endfunction
function M5X takes nothing returns boolean
return((1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))<=5)
endfunction
function M6X takes nothing returns boolean
return((1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))<=10)
endfunction
function M7X takes nothing returns nothing
if(M6X())then
if(M5X())then
set GT[1]=(GT[1]+1)
else
set GT[2]=(GT[2]+1)
endif
set FT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]=(FT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]+1)
call MultiboardSetItemValueBJ(AS[1],3,CT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))],I2S(FT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]))
call MultiboardSetItemValueBJ(AS[2],3,CT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))],I2S(FT[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],3,2,I2S(GT[1]))
call MultiboardSetItemValueBJ(AS[bj_forLoopAIndex],3,(CountPlayersInForceBJ(VS[1])+4),I2S(GT[2]))
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endif
endfunction
function M9X takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),10,11)==I2S((1+GetPlayerId(GetTriggerPlayer()))))
endfunction
function PVX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function PEX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function PXX takes nothing returns boolean
return(WT[(1+GetPlayerId(GetTriggerPlayer()))]==false)
endfunction
function POX takes nothing returns nothing
if(PXX())then
set WT[(1+GetPlayerId(GetTriggerPlayer()))]=true
call DisplayTimedTextToForce(C4E(Condition(function PEX)),10.,"|cffffcc00You have been promoted to pick advanced heroes.|r")
else
call DisplayTimedTextToForce(C4E(Condition(function PVX)),10.,"|cffffcc00You already are promoted.|r")
endif
endfunction
function PIX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function PAX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function PNX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function PBX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function PCX takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("West Side: "+I2S(CountUnitsInGroup(CUE(Player(11),Condition(function PIX))))))
//call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("West 2: "+I2S(CountUnitsInGroup(CUE(Player(11),Condition(function PAX))))))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("East Side: "+I2S(CountUnitsInGroup(CUE(Player(10),Condition(function PNX))))))
//call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,("East 2: "+I2S(CountUnitsInGroup(CUE(Player(9),Condition(function PBX))))))
endfunction
function PFX takes nothing returns boolean
return(IsUnitAliveBJ(LC[(1+GetPlayerId(GetTriggerPlayer()))]))and(OD[(1+GetPlayerId(GetTriggerPlayer()))]==false)and(JT[(1+GetPlayerId(GetTriggerPlayer()))]==false)
endfunction
function PGX takes nothing returns boolean
return(VL[(1+GetPlayerId(GetTriggerPlayer()))]!=null)
endfunction
function PHX takes nothing returns boolean
return(PL[(1+GetPlayerId(GetTriggerPlayer()))]!=null)
endfunction
function PJX takes nothing returns nothing
call RemoveUnit(LC[(1+GetPlayerId(GetTriggerPlayer()))])
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=null
set MT[(1+GetPlayerId(GetTriggerPlayer()))]=0
set LC[(1+GetPlayerId(GetTriggerPlayer()))]=null
call CreateNUnitsAtLoc(1,'ushd',GetTriggerPlayer(),GetPlayerStartLocationLoc(GetTriggerPlayer()),bj_UNIT_FACING)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),GetPlayerStartLocationLoc(GetTriggerPlayer()),.3)
if(PGX())then
call KillUnit(VL[(1+GetPlayerId(GetTriggerPlayer()))])
set VL[(1+GetPlayerId(GetTriggerPlayer()))]=null
endif
if(PHX())then
call KillUnit(PL[(1+GetPlayerId(GetTriggerPlayer()))])
set PL[(1+GetPlayerId(GetTriggerPlayer()))]=null
endif
endfunction
function PLX takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,5)=="-zoom")
endfunction
function PMX takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))=="")
endfunction
function PPX takes nothing returns boolean
return(WD>=3000.)
endfunction
function PQX takes nothing returns boolean
return(WD<=500.)
endfunction
function PSX takes nothing returns nothing
if(PMX())then
return
endif
set WD=S2R(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,WD,.2)
if(PPX())then
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,3000.,.2)
set WD=3000.
endif
if(PQX())then
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,500.,.2)
set WD=500.
endif
endfunction
function PUX takes nothing returns boolean
return(not(SubStringBJ(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString()))=="" or GetUnitTypeId(LC[(1+GetPlayerId(GetTriggerPlayer()))])!='E011'))
endfunction
function PWX takes nothing returns nothing
local real r=S2R(SubStringBJ(GetEventPlayerChatString(),5,StringLength(GetEventPlayerChatString())))
local real PYX=(I2R(GetUnitAbilityLevel(LC[(1+GetPlayerId(GetTriggerPlayer()))],'A02E'))*100.)+500.
if r<=300. then
set r=300.
endif
if r>=PYX then
set r=PYX
endif
set CQ[(1+GetPlayerId(GetTriggerPlayer()))]=r
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"Targeting range of Targeted Magic set to "+I2S(R2I(r)))
endfunction
function P_X takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,StringLength(GetEventPlayerChatString()))=="")
endfunction
function P0X takes nothing returns nothing
call SetUnitAcquireRange(GetEnumUnit(),YD)
endfunction
function P1X takes nothing returns nothing
call SetUnitAcquireRange(GetEnumUnit(),60.)
endfunction
function P2X takes nothing returns boolean
return(YD<=60.)
endfunction
function P3X takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function P4X takes nothing returns nothing
if(P_X())then
return
endif
set YD=S2R(SubStringBJ(GetEventPlayerChatString(),8,StringLength(GetEventPlayerChatString())))
set BK=CYE(GetTriggerPlayer())
call ForGroupBJ(BK,function P0X)
if(P2X())then
call ForGroupBJ(BK,function P1X)
set YD=60.
endif
call DisplayTextToForce(C4E(Condition(function P3X)),("Acquisition Range set to "+R2S(YD)))
call DestroyGroup(BK)
endfunction
function P6X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if UnitAlive(TDV[PXE])then
call KillUnit(TDV[PXE])
endif
call HVE(PXE)
call ReleaseTimer(GetExpiredTimer())
set t=null
endfunction
function P7X takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=G9E()
set TDV[PXE]=LC[(1+GetPlayerId(GetTriggerPlayer()))]
call SetTimerData(t,PXE)
call TimerStart(t,10.,false,function P6X)
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,10.,"Your hero will be killed in ten seconds.")
set t=null
endfunction
function P9X takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QVX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QEX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QXX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QOX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QRX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QIX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QAX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QNX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QBX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QCX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QDX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QFX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QGX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QHX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QJX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QKX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QLX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QMX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QPX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QQX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QSX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QTX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QUX takes nothing returns boolean
return(GetTriggerPlayer()==GetFilterPlayer())
endfunction
function QWX takes nothing returns nothing
call DisplayTimedTextToForce(C4E(Condition(function P9X)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QVX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QEX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QXX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QOX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QRX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QIX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QAX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QNX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QBX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QCX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QDX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QFX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QGX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QHX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QJX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QKX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QLX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QMX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QPX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QQX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QSX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QTX)),.01," ")
call DisplayTimedTextToForce(C4E(Condition(function QUX)),.01," ")
endfunction
function QZX takes nothing returns nothing
set DQ[1]='I009'
set FQ[1]='I008'
set HQ[1]='I007'
set GQ[1]='I000'
set DQ[2]='I00I'
set FQ[2]='I00H'
set HQ[2]='I00F'
set GQ[2]='I00W'
set DQ[3]='I00O'
set FQ[3]='I00O'
set HQ[3]='I00O'
set JQ[3]='I00O'
set GQ[3]='I012'
set DQ[4]='I00X'
set FQ[4]='I00Y'
set GQ[4]='I01L'
set DQ[5]='I00I'
set FQ[5]='I01M'
set GQ[5]='I01N'
set DQ[6]='I00S'
set FQ[6]='I002'
set HQ[6]='I00Q'
set JQ[6]='I00P'
set GQ[6]='I01Q'
set DQ[7]='I01Q'
set FQ[7]='I012'
set GQ[7]='I01R'
set DQ[8]='I007'
set FQ[8]='I007'
set HQ[8]='I007'
set GQ[8]='I01T'
set DQ[9]='I01T'
set FQ[9]='I000'
set GQ[9]='I01S'
set DQ[10]='I01S'
set FQ[10]='I024'
set GQ[10]='I01U'
set DQ[11]='I00Q'
set FQ[11]='I00Q'
set GQ[11]='I01V'
set DQ[12]='I01V'
set FQ[12]='I01V'
set GQ[12]='I01W'
set DQ[13]='I01L'
set FQ[13]='I012'
set GQ[13]='I01X'
set DQ[14]='I003'
set FQ[14]='I004'
set HQ[14]='I001'
set GQ[14]='I01Z'
set DQ[15]='I00M'
set FQ[15]='I00M'
set HQ[15]='I00M'
set JQ[15]='I00M'
set GQ[15]='I00Q'
set DQ[16]='I00N'
set FQ[16]='I00N'
set HQ[16]='I00N'
set JQ[16]='I00N'
set GQ[16]='I00P'
set DQ[17]='I00L'
set FQ[17]='I00L'
set HQ[17]='I00L'
set JQ[17]='I00L'
set GQ[17]='I002'
set DQ[18]='I00R'
set FQ[18]='I00R'
set HQ[18]='I00R'
set JQ[18]='I00R'
set GQ[18]='I00S'
set DQ[19]='I00E'
set FQ[19]='I01Y'
set GQ[19]='I020'
set DQ[20]='I00J'
set FQ[20]='I01Y'
set GQ[20]='I023'
set DQ[21]='I00F'
set FQ[21]='I028'
set GQ[21]='I027'
set DQ[22]='I00J'
set FQ[22]='I00N'
set HQ[22]='I00E'
set GQ[22]='I029'
set DQ[23]='I00H'
set FQ[23]='I002'
set HQ[23]='I00J'
set GQ[23]='I02A'
set DQ[24]='I00J'
set FQ[24]='I00Q'
set HQ[24]='I00J'
set GQ[24]='I02C'
set DQ[25]='I01S'
set FQ[25]='I00Q'
set GQ[25]='I02D'
set DQ[26]='I02D'
set FQ[26]='I02C'
set GQ[26]='I02E'
set DQ[27]='I02D'
set FQ[27]='I02D'
set GQ[27]='I02F'
set DQ[28]='I02E'
set FQ[28]='I00X'
set GQ[28]='I02G'
set DQ[29]='I005'
set FQ[29]='I009'
set HQ[29]='I02B'
set GQ[29]='I02H'
set DQ[30]='I00Z'
set FQ[30]='I02H'
set GQ[30]='I02I'
set DQ[31]='I01O'
set FQ[31]='I01O'
set HQ[31]='I00Z'
set GQ[31]='I02J'
set DQ[32]='I01Q'
set FQ[32]='I00Z'
set GQ[32]='I02K'
set DQ[33]='I01W'
set FQ[33]='I02L'
set HQ[33]='I00Q'
set GQ[33]='I02M'
set DQ[34]='I02M'
set FQ[34]='I00H'
set GQ[34]='I02N'
set DQ[35]='I02N'
set FQ[35]='I02N'
set HQ[35]='I02D'
set GQ[35]='I02O'
set DQ[36]='I002'
set FQ[36]='I002'
set HQ[36]='I002'
set JQ[36]='I00O'
set GQ[36]='I02S'
set DQ[37]='I01Z'
set FQ[37]='I002'
set GQ[37]='I02R'
set DQ[38]='I02R'
set FQ[38]='I02S'
set HQ[38]='I02S'
set JQ[38]='I010'
set KQ[38]='I010'
set GQ[38]='I02T'
set DQ[39]='I030'
set FQ[39]='I02T'
set HQ[39]='I00W'
set GQ[39]='I02V'
set DQ[40]='I00X'
set FQ[40]='I00X'
set HQ[40]='I02S'
set JQ[40]='I00W'
set GQ[40]='I02U'
set DQ[41]='I01N'
set FQ[41]='I01N'
set HQ[41]='I02A'
set GQ[41]='I02W'
set DQ[42]='I00D'
set FQ[42]='I00D'
set HQ[42]='I00E'
set JQ[42]='I00E'
set GQ[42]='I02Y'
set DQ[43]='I02S'
set FQ[43]='I02T'
set HQ[43]='I012'
set GQ[43]='I02Z'
set DQ[44]='I02S'
set FQ[44]='I00I'
set HQ[44]='I00I'
set GQ[44]='I030'
set DQ[45]='I00R'
set FQ[45]='I029'
set HQ[45]='I027'
set GQ[45]='I032'
set DQ[46]='I02R'
set FQ[46]='I01Q'
set HQ[46]='I00X'
set GQ[46]='I036'
set DQ[47]='I00E'
set FQ[47]='I00R'
set HQ[47]='I00S'
set GQ[47]='I037'
set DQ[48]='I002'
set FQ[48]='I02A'
set HQ[48]='I02A'
set GQ[48]='I038'
set DQ[49]='I002'
set FQ[49]='I03A'
set HQ[49]='I00L'
set GQ[49]='I039'
set DQ[50]='I039'
set FQ[50]='I039'
set HQ[50]='I012'
set GQ[50]='I03B'
set DQ[51]='I033'
set FQ[51]='I035'
set HQ[51]='I034'
set GQ[51]='I03C'
set DQ[52]='I02F'
set FQ[52]='I029'
set HQ[52]='I01Q'
set GQ[52]='I03D'
set DQ[53]='I00M'
set FQ[53]='I02D'
set HQ[53]='I02B'
set GQ[53]='I03E'
set DQ[54]='I00P'
set FQ[54]='I00P'
set HQ[54]='I00D'
set GQ[54]='I03F'
set DQ[55]='I002'
set FQ[55]='I00D'
set HQ[55]='I00H'
set GQ[55]='I03V'
set DQ[56]='I027'
set FQ[56]='I023'
set HQ[56]='I00H'
set JQ[56]='I00Q'
set KQ[56]='I00P'
set GQ[56]='I040'
set DQ[57]='I01M'
set FQ[57]='I023'
set HQ[57]='I00X'
set GQ[57]='I041'
set DQ[58]='I027'
set FQ[58]='I00N'
set HQ[58]='I00E'
set GQ[58]='I045'
set DQ[59]='I036'
set FQ[59]='I02S'
set HQ[59]='I02S'
set GQ[59]='I048'
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=59
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call WRE((DQ[bj_forLoopAIndex]),(FQ[bj_forLoopAIndex]),(HQ[bj_forLoopAIndex]),(JQ[bj_forLoopAIndex]),(KQ[bj_forLoopAIndex]),(LQ[bj_forLoopAIndex]),(GQ[bj_forLoopAIndex]),"","",false,0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function SEX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if QTE(TKV[PXE],TLV[PXE],TQV[PXE],TSV[PXE])<60. or TTV[PXE]<=.0 then
call DestroyEffect(TWV[PXE])
call G8E(PXE)
call ReleaseTimer(t)
else
set TMV[PXE]=(((TKV[PXE])*1.)+((60.)*1.)*Cos(((TUV[PXE])*1.)*bj_DEGTORAD))
set TPV[PXE]=(((TLV[PXE])*1.)+((60.)*1.)*Sin(((TUV[PXE])*1.)*bj_DEGTORAD))
call SetUnitX(TJV[PXE],TMV[PXE])
call SetUnitY(TJV[PXE],TPV[PXE])
set TKV[PXE]=GetUnitX(TJV[PXE])
set TLV[PXE]=GetUnitY(TJV[PXE])
set TTV[PXE]=TTV[PXE]-60.
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function SEX)
endif
set t=null
endfunction
function SXX takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=G7E()
set TJV[PXE]=GetTriggerUnit()
set TKV[PXE]=GetUnitX(TJV[PXE])
set TLV[PXE]=GetUnitY(TJV[PXE])
set TMV[PXE]=GetSpellTargetX()
set TPV[PXE]=GetSpellTargetY()
set TQV[PXE]=GetSpellTargetX()
set TSV[PXE]=GetSpellTargetY()
set TTV[PXE]=QTE(TKV[PXE],TLV[PXE],TMV[PXE],TPV[PXE])
set TUV[PXE]=QUE(TKV[PXE],TLV[PXE],TMV[PXE],TPV[PXE])
set TWV[PXE]=AddSpecialEffectTarget("war3mapImported\\ShadowRibbon.mdx",TJV[PXE],"chest")
call SetUnitAnimation(TJV[PXE],"spell")
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function SEX)
set t=null
endfunction
/*function SOX takes nothing returns boolean
if GetSpellAbilityId()=='A09J' then
call SXX()
endif
return false
endfunction*/
function SRX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call SetUnitVertexColor(T0V[PXE],255,255,255,255)
call SetHeroAgi(T0V[PXE],GetHeroAgi(T0V[PXE],false)-T1V[PXE],true)
call UnitRemoveAbility(T0V[PXE],'A09N')
call DestroyEffect(T2V[PXE])
call G6E(PXE)
call ReleaseTimer(t)
set t=null
endfunction
function SIX takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=G5E()
set T0V[PXE]=GetTriggerUnit()
set T1V[PXE]=GetHeroAgi(T0V[PXE],true)*GetUnitAbilityLevel(T0V[PXE],'A09K')
set T2V[PXE]=AddSpecialEffectTarget("war3mapImported\\void.mdx",T0V[PXE],"chest")
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"origin"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"hand left"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"hand right"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"head"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"foot left"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadeMissile.mdx",T0V[PXE],"foot right"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadowCannon.mdx",T0V[PXE],"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\PeterifyVer.2.mdx",T0V[PXE],"chest"))
call SetHeroAgi(T0V[PXE],GetHeroAgi(T0V[PXE],false)+T1V[PXE],true)
call SetUnitVertexColor(T0V[PXE],50,50,50,100)
call UnitAddAbility(T0V[PXE],'A09N')
call SetTimerData(t,PXE)
call TimerStart(t,10.+(3*GetUnitAbilityLevel(T0V[PXE],'A09K')),false,function SRX)
set t=null
endfunction
function SAX takes nothing returns nothing
//if GetSpellAbilityId()=='A09K' and
if GetUnitAbilityLevel(GetTriggerUnit(),'A09N')!=1 then
call SIX()
endif
//return false
endfunction
function SNX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call UnitRemoveAbility(T6V[PXE],'A09D')
call DestroyEffect(T7V[PXE])
call ReleaseTimer(t)
call G4E(PXE)
set t=null
endfunction
function SBX takes nothing returns boolean
local unit u=GetTriggerUnit()
local unit RGX=GetEventDamageSource()
local real d=GetEventDamage()*2
local timer t
local integer PXE
if(J5V[(ROX((GetUnitTypeId(RGX))))])then
if(BI[NI])==(LN)then
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",u,"origin"))
call UnitAddAbility(u,'A09D')
set t=NewTimer()
set PXE=G3E()
set T6V[PXE]=u
set T7V[PXE]=AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",T6V[PXE],"chest")
call SetTimerData(t,PXE)
call TimerStart(t,10.,false,function SNX)
endif
else
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl",u,"origin"))
call UnitAddAbility(u,'A09D')
set t=NewTimer()
set PXE=G3E()
set T6V[PXE]=u
set T7V[PXE]=AddSpecialEffectTarget("Abilities\\Spells\\Items\\StaffOfSanctuary\\Staff_Sanctuary_Target.mdl",T6V[PXE],"chest")
call SetTimerData(t,PXE)
call TimerStart(t,10.,false,function SNX)
endif
set u=null
set RGX=null
set t=null
return false
endfunction
function SCX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A09B')>0 and GetTriggerUnit()!=GetEventDamageSource()and GetRandomInt(1,100)<=40 and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<=GetEventDamage()and GetUnitAbilityLevel(GetTriggerUnit(),'A09D')!=1 and GetEventDamage() > 0 then
call SBX()
endif
return false
endfunction
/*function SDX takes nothing returns boolean
return(GetSpellAbilityId()=='A06I')
endfunction*/
function SFX takes nothing returns boolean
return(ZT==0)
endfunction
function SGX takes nothing returns boolean
return(GetSpellTargetUnit()==null)
endfunction
function SHX takes nothing returns nothing
if(SFX())then
call EnableTrigger(W1)
endif
if(SGX())then
set VU=(VU+1)
set ZT=(ZT+1)
set EU[VU]=true
set XU[VU]=GetTriggerUnit()
call SetUnitPathing(XU[VU],false)
set OU[VU]=1200.
set RU[VU]=GetUnitFacing(XU[VU])
else
set VU=(VU+1)
set ZT=(ZT+1)
set EU[VU]=true
set XU[VU]=GetSpellTargetUnit()
call SetUnitPathing(XU[VU],false)
if IsUnitEnemy(GetSpellTargetUnit(),GetOwningPlayer(GetTriggerUnit())) and IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_HERO) then
set OU[VU]=425.
else
set OU[VU]=1200.
endif
set RU[VU]=GetUnitFacing(XU[VU])
endif
endfunction
function SKX takes nothing returns boolean
return(OU[IU]<=.0)or(IsTerrainPathableBJ(NU,PATHING_TYPE_WALKABILITY))
endfunction
function SLX takes nothing returns boolean
return(ZT==0)
endfunction
function SMX takes nothing returns boolean
return(SKX())
endfunction
function SPX takes nothing returns boolean
return(EU[IU])
endfunction
function SQX takes nothing returns nothing
set IU=1
loop
exitwhen IU>VU
if(SPX())then
set AU=GetUnitLoc(XU[IU])
set NU=CNE(AU,20.,RU[IU])
if(SMX())then
call SetUnitPathing(XU[IU],true)
set EU[IU]=false
set ZT=(ZT-1)
if(SLX())then
set VU=0
call DisableTrigger(GetTriggeringTrigger())
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",GetUnitX(XU[IU]),GetUnitY(XU[IU])))
call RemoveLocation(AU)
call RemoveLocation(NU)
else
call SetUnitX(XU[IU],GetLocationX(NU))
call SetUnitY(XU[IU],GetLocationY(NU))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl",GetUnitX(XU[IU]),GetUnitY(XU[IU])))
set OU[IU]=(OU[IU]-20.)
call RemoveLocation(AU)
call RemoveLocation(NU)
endif
endif
set IU=IU+1
endloop
endfunction
function STX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='E000')
endfunction
function SUX takes nothing returns nothing
call KillUnit(PL[(1+GetPlayerId(GetTriggerPlayer()))])
set PL[bj_forLoopAIndex]=null
set TT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
endfunction
function SYX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if not UnitAlive(UCV[PXE])then
call G0E(PXE)
call ReleaseTimer(GetExpiredTimer())
endif
if UDV[PXE]==.0 then
call SetUnitFlyHeight(UCV[PXE],.0,.0)
call UnitDamageTargetEx(UBV[PXE],UCV[PXE],(I2R(GetUnitAbilityLevel(UBV[PXE],'A062'))*3*GetHeroStr(UBV[PXE],true))+250.+(650.*I2R(GetUnitAbilityLevel(UBV[PXE],'A062'))),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call G0E(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set UDV[PXE]=UDV[PXE]-20.
call SetUnitFlyHeight(UCV[PXE],UDV[PXE],.0)
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function SYX)
endif
set t=null
endfunction
function SZX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if not UnitAlive(UCV[PXE])then
call G0E(PXE)
call ReleaseTimer(GetExpiredTimer())
else
if UDV[PXE]==400. then
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function SYX)
else
if UDV[PXE]==.0 then
call UnitDamageTargetEx(UBV[PXE],UCV[PXE],(I2R(GetUnitAbilityLevel(UBV[PXE],'A062'))*GetHeroStr(UBV[PXE],true)*1.)+200.+(350.*I2R(GetUnitAbilityLevel(UBV[PXE],'A062'))),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
set UDV[PXE]=UDV[PXE]+20.
call SetUnitFlyHeight(UCV[PXE],UDV[PXE],.0)
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function SZX)
endif
endif
set t=null
endfunction
function S_X takes nothing returns boolean
local timer t
local integer PXE=G_E()
local unit u
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(OIV))then
set u=CreateUnit(GetOwningPlayer(OIV),'h007',GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),.0)
call UnitApplyTimedLife(u,'BTLF',1.)
call UnitAddAbility(u,'A05X')
call SetUnitAbilityLevel(u,'A05X',GetUnitAbilityLevel(OIV,'A062'))
call IssueTargetOrderById(u,852095,GetFilterUnit())
set t=NewTimer()
set UBV[PXE]=OIV
set UCV[PXE]=GetFilterUnit()
set UDV[PXE]=.0
if GetUnitAbilityLevel(UCV[PXE],'Amrf')==0 then
call UnitAddAbility(UCV[PXE],'Amrf')
call UnitRemoveAbility(UCV[PXE],'Amrf')
endif
call DestroyEffect(AddSpecialEffect("war3mapImported\\ImpaleMissTarget_Portrait.mdx",GetUnitX(UCV[PXE]),GetUnitY(UCV[PXE])))
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function SZX)
else
call G0E(PXE)
endif
set t=null
set u=null
return false
endfunction
function S0X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real r=.0
local real x2
local real y2
if UXV[PXE]>=1200. then
call G2E(PXE)
call ReleaseTimer(GetExpiredTimer())
else
loop
exitwhen r==360.
set x2=UOV[PXE]+UXV[PXE]*Cos(r*bj_DEGTORAD)
set y2=URV[PXE]+UXV[PXE]*Sin(r*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ImpaleMissTarget.mdx",x2,y2))
set OIV=UEV[PXE]
call GroupEnumUnitsInRange(ORV,x2,y2,150.,Filter(function S_X))
set r=r+(360./12.)
endloop
set UXV[PXE]=UXV[PXE]+150.
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function S0X)
endif
set t=null
endfunction
function S1X takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local integer PXE=G1E()
local timer t=NewTimer()
set UEV[PXE]=u
set UXV[PXE]=150.
set UOV[PXE]=x
set URV[PXE]=y
set OIV=u
call DestroyEffect(AddSpecialEffect("war3mapImported\\ImpaleMissTarget.mdx",x,y))
call GroupEnumUnitsInRange(ORV,x,y,150.,Filter(function S_X))
call SetTimerData(t,PXE)
call TimerStart(t,.03,false,function S0X)
set t=null
set u=null
endfunction
/*function S2X takes nothing returns boolean
if GetSpellAbilityId()=='A062' then
call S1X()
endif
return false
endfunction*/
function S3X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call SetUnitAbilityLevel(UJV[PXE],'A05T',GetUnitAbilityLevel(UJV[PXE],'A05T')-1)
call GZE(PXE)
call ReleaseTimer(GetExpiredTimer())
set t=null
endfunction
function S4X takes nothing returns nothing
local timer t
local integer PXE
local unit u=GetTriggerUnit()
if GetRandomInt(0,100)<=33 then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\EvilMissileofShadowyDOOMV3.mdx",u,"chest"))
endif
if GetUnitAbilityLevel(u,'A05T')<((GetUnitAbilityLevel(u,'A05Z')*10)+1)then
call SetUnitAbilityLevel(u,'A05T',GetUnitAbilityLevel(u,'A05T')+1)
set t=NewTimer()
set PXE=GYE()
set UJV[PXE]=u
call SetTimerData(t,PXE)
call TimerStart(t,I2R(GetUnitAbilityLevel(u,'A05Z'))*2.,false,function S3X)
endif
set t=null
set u=null
endfunction
function S5X takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A05Z')!=0 and GetTriggerUnit()!=GetEventDamageSource()and IsUnitEnemy(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit())) and GetUnitAbilityLevel(GetTriggerUnit(),'A05T')<101 then
call S4X()
endif
return false
endfunction
function S6X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real x1
local real x2
local real y1
local real y2
local real dx
local real dy
local real d
local real a
local real nx
local real ny
if not UnitAlive(UPV[PXE])or not UnitAlive(UQV[PXE])then
call UnitRemoveAbility(UQV[PXE],'A05U')
call GWE(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set x1=GetUnitX(UPV[PXE])
set y1=GetUnitY(UPV[PXE])
set x2=GetUnitX(UQV[PXE])
set y2=GetUnitY(UQV[PXE])
set dx=x2-x1
set dy=y2-y1
set d=SquareRoot(dx*dx+dy*dy)
set a=Atan2(y2-y1,x2-x1)*bj_RADTODEG
if d<=15. then
set nx=x1+d*Cos((a+1.)*bj_DEGTORAD)
set ny=y1+d*Sin((a+1.)*bj_DEGTORAD)
else
set nx=x1+(d-(1.))*Cos((a+1.)*bj_DEGTORAD)
set ny=y1+(d-(1.))*Sin((a+1.)*bj_DEGTORAD)
endif
call SetUnitPathing(UQV[PXE],false)
call SetUnitX(UQV[PXE],nx)
call SetUnitY(UQV[PXE],ny)
call SetUnitPathing(UQV[PXE],true)
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function S6X)
endif
set t=null
endfunction
function S7X takes nothing returns boolean
local timer t
local integer PXE
local unit S8X=GetFilterUnit()
if IsUnitEnemy(S8X,GetOwningPlayer(OBV))and UnitAlive(S8X)and GetUnitAbilityLevel(S8X,'A05U')!=1 then
set t=NewTimer()
set PXE=GUE()
set UPV[PXE]=OBV
set UQV[PXE]=S8X
set USV[PXE]=GetUnitAbilityLevel(ONV,'A060')
call UnitAddAbility(S8X,'A05U')
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function S6X)
endif
set S8X=null
set t=null
return false
endfunction
function S9X takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if not UnitAlive(UYV[PXE])then
call GTE(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set OBV=UYV[PXE]
set ONV=UZV[PXE]
call GroupEnumUnitsInRange(OAV,U_V[PXE],U0V[PXE],449.,Filter(function S7X))
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function S9X)
endif
set t=null
endfunction
function TVX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit s=CreateUnit(GetOwningPlayer(u),'h00R',GetUnitX(u),GetUnitY(u),.0)
local timer t=NewTimer()
local integer PXE=GSE()
call DestroyEffect(AddSpecialEffect("war3mapImported\\Desecrate2.mdx",GetUnitX(u),GetUnitY(u)))
call SetUnitAbilityLevel(s,'A05V',GetUnitAbilityLevel(u,'A060'))
call UnitApplyTimedLife(s,'BTLF',(GetUnitAbilityLevel(u,'A060')*2)+5.)
set ONV=u
set OBV=s
call GroupEnumUnitsInRange(OAV,GetUnitX(s),GetUnitY(s),449.,Filter(function S7X))
set UYV[PXE]=s
set UZV[PXE]=u
set U_V[PXE]=GetUnitX(s)
set U0V[PXE]=GetUnitY(s)
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function S9X)
set t=null
set u=null
set s=null
endfunction
/*function TEX takes nothing returns boolean
if GetSpellAbilityId()=='A060' then
call TVX()
endif
return false
endfunction*/
/*function TAX takes nothing returns boolean
return(GetSpellAbilityId()=='A05I')
endfunction*/
function TNX takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A09C')
call SetUnitAbilityLevelSwapped('A09C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetTriggerUnit())
endfunction
function Trig_Eggsacks_Func004001 takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h00S')
endfunction
function Trig_Eggsacks_Func004002 takes nothing returns boolean
return(IsUnitEnemy(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function TCX takes nothing returns boolean
return(GetBooleanAnd((GetUnitTypeId(GetTriggerUnit())=='h00S'),(IsUnitEnemy(GetKillingUnit(),GetOwningPlayer(GetTriggerUnit())))))
endfunction
function TDX takes nothing returns nothing
set XK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'n02E',GetOwningPlayer(GetTriggerUnit()),XK,bj_UNIT_FACING)
call RemoveLocation(XK)
endfunction
/*function TGX takes nothing returns boolean
return(GetSpellAbilityId()=='A06A')
endfunction*/
function THX takes nothing returns nothing
local real x1=GetUnitX(GetSpellTargetUnit())+150.*Cos(.0*bj_DEGTORAD)
local real y1=GetUnitY(GetSpellTargetUnit())+150.*Sin(.0*bj_DEGTORAD)
local real x2=GetUnitX(GetSpellTargetUnit())+150.*Cos(45.*bj_DEGTORAD)
local real y2=GetUnitY(GetSpellTargetUnit())+150.*Sin(45.*bj_DEGTORAD)
local real x3=GetUnitX(GetSpellTargetUnit())+150.*Cos(90.*bj_DEGTORAD)
local real y3=GetUnitY(GetSpellTargetUnit())+150.*Sin(90.*bj_DEGTORAD)
local real x4=GetUnitX(GetSpellTargetUnit())+150.*Cos(135.*bj_DEGTORAD)
local real y4=GetUnitY(GetSpellTargetUnit())+150.*Sin(135.*bj_DEGTORAD)
local real x5=GetUnitX(GetSpellTargetUnit())+150.*Cos(180.*bj_DEGTORAD)
local real y5=GetUnitY(GetSpellTargetUnit())+150.*Sin(180.*bj_DEGTORAD)
local real x6=GetUnitX(GetSpellTargetUnit())+150.*Cos(225.*bj_DEGTORAD)
local real y6=GetUnitY(GetSpellTargetUnit())+150.*Sin(225.*bj_DEGTORAD)
local real x7=GetUnitX(GetSpellTargetUnit())+150.*Cos(270.*bj_DEGTORAD)
local real y7=GetUnitY(GetSpellTargetUnit())+150.*Sin(270.*bj_DEGTORAD)
local real x8=GetUnitX(GetSpellTargetUnit())+150.*Cos(315.*bj_DEGTORAD)
local real y8=GetUnitY(GetSpellTargetUnit())+150.*Sin(315.*bj_DEGTORAD)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x1,y1,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x2,y2,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x3,y3,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x4,y4,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x5,y5,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x6,y6,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x7,y7,270.)
call CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h00S',x8,y8,270.)
endfunction
constant function TKX takes integer DZX returns real
return 3.
endfunction
function TLX takes unit c,unit u returns boolean
if GetUnitState(u,UNIT_STATE_LIFE)>.0 then
if IsUnitType(u,UNIT_TYPE_FLYING)==false then
if GetUnitAbilityLevel(u,'Avul')<=0 then
if IsUnitEnemy(u,GetOwningPlayer(c))then
return IsUnitType(u,UNIT_TYPE_STRUCTURE)==false
endif
endif
endif
endif
return false
endfunction
function TMX takes nothing returns boolean
return GetUnitTypeId(GetAttacker())=='n02F'
endfunction
function TPX takes nothing returns nothing
local integer DGE=0
local integer id
loop
exitwhen DGE==WXV
set id=NEE[DGE]
set WIV[NXE[id]]=WIV[NXE[id]]+.5
if WIV[NXE[id]]>=WRV[NXE[id]]then
call UnitRemoveAbility(WOV[NXE[id]],'A068')
call MNE(WOV[NXE[id]])
set WOV[NXE[id]]=null
call GME(NXE[id])
set WXV=WXV-1
set NEE[DGE]=NEE[WXV]
elseif not PZE(WOV[NXE[id]])then
call UnitRemoveAbility(WOV[NXE[id]],'A068')
call MNE(WOV[NXE[id]])
set WOV[NXE[id]]=null
call GME(NXE[id])
set WXV=WXV-1
set NEE[DGE]=NEE[WXV]
else
set DGE=DGE+1
endif
endloop
if WXV==0 then
call PauseTimer(WEV)
endif
endfunction
function TQX takes unit TSX,real CIE,integer DZX returns nothing
local integer DGE
if WXV==0 then
call TimerStart(WEV,.5,true,function TPX)
endif
if GetUnitAbilityLevel(TSX,'A068')>0 then
set DGE=(LoadInteger(Q,GetHandleId((TSX)),0))
call UnitRemoveAbility(TSX,'A068')
else
call MAE(TSX)
set DGE=(LoadInteger(Q,GetHandleId((TSX)),0))
set NXE[DGE]=GLE()
set NEE[WXV]=DGE
set WXV=WXV+1
endif
set WOV[NXE[DGE]]=TSX
set WRV[NXE[DGE]]=CIE
set WIV[NXE[DGE]]=.0
call UnitAddAbility(TSX,'A068')
call SetUnitAbilityLevel(TSX,'A068',DZX)
endfunction
function TTX takes integer D0E returns nothing
local integer DZX
local real z
local real cx
local real cy
local real cz
local real UEE
set WJV[D0E]=WJV[D0E]+40.
if WKV[D0E]>=WJV[D0E]and GetUnitState(WDV[D0E],UNIT_STATE_LIFE)>.0 then
set cx=GetUnitX(WDV[D0E])
set cy=GetUnitY(WDV[D0E])
set cz=PTE(cx,cy)
set WLV[D0E]=WLV[D0E]+WPV[D0E]
set WMV[D0E]=WMV[D0E]+WQV[D0E]
set z=PTE(WLV[D0E],WMV[D0E])
set UEE=PUE(WSV[WTV[D0E]+1],WSV[WTV[D0E]],WSV[WTV[D0E]+2],WJV[D0E]/WKV[D0E])+(WSV[WTV[D0E]]-z)
call MoveLightningEx(WGV[D0E],true,cx,cy,cz+100.,WLV[D0E],WMV[D0E],UEE+55.+z)
call SetUnitPosition(WCV[D0E],WLV[D0E],WMV[D0E])
call SetUnitFlyHeight(WCV[D0E],UEE,0)
else
if IsUnitEnemy(WCV[D0E],GetOwningPlayer(WDV[D0E]))then
set DZX=GetUnitAbilityLevel(WDV[D0E],'A069')
call TQX(WCV[D0E],TKX(1),1)
call UnitDamageTarget(WDV[D0E],WCV[D0E],GetUnitState(WCV[D0E],UNIT_STATE_LIFE)/5.,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",WLV[D0E],WMV[D0E]))
call DestroyEffect(AddSpecialEffect("Doodads\\Dungeon\\Terrain\\EggSack\\EggSack1.mdl",WLV[D0E],WMV[D0E]))
call SetUnitPathing(WCV[D0E],true)
if GetUnitTypeId(WCV[D0E]) != 'U003' then
call SetUnitFlyHeight(WCV[D0E],GetUnitDefaultFlyHeight(WCV[D0E]),250.)
else
call SetUnitFlyHeight(WCV[D0E],0.,250.)
endif
set WYV[D0E]=false
endif
endfunction
function TUX takes integer D0E returns nothing
call DestroyEffect(WFV[D0E])
call DestroyLightning(WGV[D0E])
set WCV[D0E]=null
set WDV[D0E]=null
set WFV[D0E]=null
call GKE(D0E)
endfunction
function TWX takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==WWV
if not WZV[NOE[DGE]]then
if WYV[NOE[DGE]]then
call TTX(NOE[DGE])
set DGE=DGE+1
else
call TUX(NOE[DGE])
set WWV=WWV-1
set NOE[DGE]=NOE[WWV]
endif
else
set DGE=DGE+1
endif
endloop
if WWV==0 then
call PauseTimer(WUV)
endif
endfunction
function TYX takes integer PXE returns integer
if WWV==0 then
call TimerStart(WUV,.03,true,function TWX)
endif
set NOE[WWV]=PXE
set WYV[NOE[WWV]]=true
set WZV[NOE[WWV]]=false
set WWV=WWV+1
return WWV
endfunction
function TZX takes integer D0E returns nothing
if YXV[D0E]>0 then
set W5V[D0E]=W5V[D0E]+W9V[D0E]
set W6V[D0E]=W6V[D0E]+YVV[D0E]
set YXV[D0E]=YXV[D0E]-15.
call MoveLightningEx(W4V[D0E],true,W5V[D0E],W6V[D0E],YEV[D0E],W7V[D0E],W8V[D0E],YEV[D0E])
call DestroyEffect(W3V[D0E])
set W3V[D0E]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageDeathCaster.mdl",W2V[D0E],"chest")
else
set YIV[D0E]=false
endif
endfunction
function T_X takes integer D0E returns nothing
call DestroyEffect(W3V[D0E])
call RemoveUnit(W2V[D0E])
call DestroyLightning(W4V[D0E])
set W3V[D0E]=null
set W2V[D0E]=null
set W4V[D0E]=null
call GHE(D0E)
endfunction
function T0X takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==YRV
if not YAV[NRE[DGE]]then
if YIV[NRE[DGE]]then
call TZX(NRE[DGE])
set DGE=DGE+1
else
call T_X(NRE[DGE])
set YRV=YRV-1
set NRE[DGE]=NRE[YRV]
endif
else
set DGE=DGE+1
endif
endloop
if YRV==0 then
call PauseTimer(YOV)
endif
endfunction
function T1X takes integer PXE returns integer
if YRV==0 then
call TimerStart(YOV,.03,true,function T0X)
endif
set NRE[YRV]=PXE
set YIV[NRE[YRV]]=true
set YAV[NRE[YRV]]=false
set YRV=YRV+1
return YRV
endfunction
function T2X takes integer D0E returns nothing
local integer T3X
local integer T4X
local real x=GetUnitX(YJV[D0E])
local real y=GetUnitY(YJV[D0E])
local real tx
local real ty
local real z
local real CDE=Atan2(YFV[D0E]-y,YDV[D0E]-x)
local boolean T5X=false
local unit t
local unit a
local group g
set YDV[D0E]=YDV[D0E]+15.*Cos(CDE)
set YFV[D0E]=YFV[D0E]+15.*Sin(CDE)
set YHV[D0E]=PPE(YDV[D0E],YFV[D0E],x,y)
set z=PTE(YDV[D0E],YFV[D0E])
call MoveLightningEx(YMV[D0E],true,x,y,YGV[D0E],YDV[D0E],YFV[D0E],YGV[D0E])
call PME(YKV[D0E])
call SetUnitFlyHeight(YKV[D0E],YGV[D0E]-z,0)
call SetUnitX(YKV[D0E],YDV[D0E])
call SetUnitY(YKV[D0E],YFV[D0E])
call SetUnitFacing(YKV[D0E],CDE*57.2957795)
set g=PSE(150.,YDV[D0E],YFV[D0E])
call GroupRemoveUnit(g,YJV[D0E])
call GroupRemoveUnit(g,YKV[D0E])
loop
set a=FirstOfGroup(g)
exitwhen a==null
call GroupRemoveUnit(g,a)
if TLX(YJV[D0E],a)then
set t=a
set T5X=true
endif
endloop
if YHV[D0E]>=1350. or not RectContainsCoords(OGV,YDV[D0E],YFV[D0E])or UnitAlive(YJV[D0E])==false then
set T3X=GGE()
set W2V[T3X]=YKV[D0E]
set W3V[T3X]=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageDeathCaster.mdl",YKV[D0E],"chest")
set W4V[T3X]=YMV[D0E]
set W5V[T3X]=x
set W6V[T3X]=y
set W9V[T3X]=15.*Cos(CDE)
set YVV[T3X]=15.*Sin(CDE)
set W7V[T3X]=YDV[D0E]
set W8V[T3X]=YFV[D0E]
set YEV[T3X]=YGV[D0E]
set YXV[T3X]=PPE(x,y,YDV[D0E],YFV[D0E])
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl",YJV[D0E],"origin"))
call SetUnitFlyHeight(YKV[D0E],YGV[D0E]-z,0)
call SetUnitX(YKV[D0E],YDV[D0E])
call SetUnitY(YKV[D0E],YFV[D0E])
call T1X(T3X)
set YSV[D0E]=false
elseif T5X then
set T4X=GJE()
set WCV[T4X]=t
set WDV[T4X]=YJV[D0E]
set WJV[T4X]=.0
set WGV[T4X]=YMV[D0E]
set WHV[T4X]=GetUnitState(t,UNIT_STATE_LIFE)/4
set WLV[T4X]=GetUnitX(t)
set WMV[T4X]=GetUnitY(t)
set tx=x+OFV*Cos(CDE)
set ty=y+OFV*Sin(CDE)
set CDE=Atan2(ty-WMV[T4X],tx-WLV[T4X])
set WPV[T4X]=40.*Cos(CDE)
set WQV[T4X]=40.*Sin(CDE)
set WKV[T4X]=PPE(WLV[T4X],WMV[T4X],tx,ty)
set WSV[WTV[T4X]]=GetUnitDefaultFlyHeight(t)+PTE(WLV[T4X],WMV[T4X])
set WSV[WTV[T4X]+1]=(((WKV[T4X])*1.)*.2)
set WSV[WTV[T4X]+2]=PTE(tx,ty)
set WFV[T4X]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Web\\Web_AirTarget.mdl",t,"chest")
call PME(t)
call TYX(T4X)
call RemoveUnit(YKV[D0E])
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl",YJV[D0E],"origin"))
call SetUnitPathing(t,false)
set YSV[D0E]=false
set t=null
endif
set g=null
endfunction
function T6X takes integer D0E returns nothing
call DestroyEffect(YLV[D0E])
set YJV[D0E]=null
set YKV[D0E]=null
set YLV[D0E]=null
set YMV[D0E]=null
call GFE(D0E)
endfunction
function T7X takes nothing returns nothing
local integer DGE=0
loop
exitwhen DGE==YQV
if not YTV[NIE[DGE]]then
if YSV[NIE[DGE]]then
call T2X(NIE[DGE])
set DGE=DGE+1
else
call T6X(NIE[DGE])
set YQV=YQV-1
set NIE[DGE]=NIE[YQV]
endif
else
set DGE=DGE+1
endif
endloop
if YQV==0 then
call PauseTimer(YPV)
endif
endfunction
function T8X takes integer PXE returns integer
if YQV==0 then
call TimerStart(YPV,.03,true,function T7X)
endif
set NIE[YQV]=PXE
set YSV[NIE[YQV]]=true
set YTV[NIE[YQV]]=false
set YQV=YQV+1
return YQV
endfunction
function T9X takes nothing returns nothing
local real lx=GetUnitX(GetTriggerUnit())
local real ly=GetUnitY(GetTriggerUnit())
local integer YXE=GDE()
local real CDE
local real x
local real y
local real z
set YJV[YXE]=GetAttacker()
set x=GetUnitX(YJV[YXE])
set y=GetUnitY(YJV[YXE])
set CDE=Atan2(ly-y,lx-x)
set YDV[YXE]=x+15.*Cos(CDE)
set YFV[YXE]=y+15.*Sin(CDE)
set z=PTE(YDV[YXE],YFV[YXE])
set YGV[YXE]=GetUnitDefaultFlyHeight(YJV[YXE])+100.+z
set YHV[YXE]=.0
set YMV[YXE]=AddLightningEx("LEAS",true,YDV[YXE],YFV[YXE],YGV[YXE],YDV[YXE],YFV[YXE],YGV[YXE])
call SetLightningColor(YMV[YXE],.15,1.,.1,.82)
set YKV[YXE]=CreateUnit(Player(14),'h007',YDV[YXE],YFV[YXE],CDE*57.2957795)
set YLV[YXE]=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Web\\Webmissile.mdl",YKV[YXE],"chest")
call PME(YKV[YXE])
call SetUnitFlyHeight(YKV[YXE],YGV[YXE]-z,0)
call SetUnitX(YKV[YXE],YDV[YXE])
call SetUnitY(YKV[YXE],YFV[YXE])
call T8X(YXE)
endfunction
function UVX takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='H009')
endfunction
function UEX takes nothing returns boolean
return(GetRandomInt(1,100)>=50)
endfunction
function UXX takes nothing returns nothing
if(UEX())then
set XK=GetUnitLoc(GetTriggerUnit())
call IssuePointOrderByIdLoc(GetAttacker(),852555,XK)
call RemoveLocation(XK)
else
call IssueImmediateOrderById(GetAttacker(),852599)
endif
endfunction
function URX takes nothing returns nothing
local unit k=GetKillingUnit()
local real x=GetUnitX(k)
local real y=GetUnitY(k)
local integer i=1
local integer p
local real f=GetUnitFacing(k)
local unit u
loop
exitwhen i==41
if MC[i]==GetUnitTypeId(k)then
set p=GetPlayerId(GetOwningPlayer(k))
call SetUnitOwner(k,Player(PLAYER_NEUTRAL_PASSIVE),true)
call ShowUnit(k,false)
call KillUnit(k)
set u=CreateUnit(Player(p),PK[i],x,y,f)
call DestroyEffect(AddSpecialEffect("war3mapImported\\ChaosExplosion.mdx",x,y))
call UnitAddAbility(u,'S004')
endif
set i=i+1
endloop
set i=0
loop
exitwhen i==41
if PK[i]==GetUnitTypeId(k)then
call ZUE(k,100.)
call DestroyEffect(AddSpecialEffect("BigBloodEX-NoSplat-NoGutz.mdx",x,y))
call UnitAddAbility(u,'S004')
endif
set i=i+1
endloop
if GetUnitAbilityLevel(k,'S004')>0 then
call SetUnitAbilityLevel(k,'S004',GetUnitAbilityLevel(k,'S004')+1)
else
call UnitAddAbility(u,'S004')
endif
if GetUnitAbilityLevel(k,'S004')==4 then
call ZWE(k,500.)
call ZZE(k,1.)
endif
set k=null
set u=null
endfunction
function UIX takes nothing returns boolean
if not IsUnitType(GetKillingUnit(),UNIT_TYPE_HERO)and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)and GetPlayerController(GetOwningPlayer(GetKillingUnit()))==MAP_CONTROL_COMPUTER and NOOBM then
call URX()
endif
return false
endfunction
function UAX takes nothing returns nothing
local unit a=GetEventDamageSource()
local unit u=GetTriggerUnit()
local real RVX=O4X(u)
local real SVE=O9X(GetEventDamage(),RVX)
if RVX>0 then
if(J5V[(ROX((GetUnitTypeId(a))))])then
if(BI[NI])==(LN)then
set DI[NI]=DI[NI]+GetEventDamage()
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx((a),(u),((SVE)*1.),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
endif
else
if(CI[NI])then
set DI[NI]=DI[NI]+GetEventDamage()
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx((a),(u),((SVE)*1.),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
endif
endif
endif
set a=null
set u=null
endfunction
function UNX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B00T')>0 and((BI[NI])==DAMAGE_TYPE_NORMAL)and GetTriggerUnit()!=GetEventDamageSource() and GetUnitAbilityLevel(GetTriggerUnit(),'B04X')!=1 and GetUnitAbilityLevel(GetTriggerUnit(),'A09D')!=1 then
call UAX()
endif
return false
endfunction
function UBX takes nothing returns nothing
local unit a=GetEventDamageSource()
local unit u=GetTriggerUnit()
local real d=GetEventDamage()*2
if(J5V[(ROX((GetUnitTypeId(a))))])then
if(BI[NI])==(LN) or (BI[NI])==(DAMAGE_TYPE_LIGHTNING)then
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
if GetUnitTypeId(u)=='n016' then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"origin"))
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
endif
endif
else
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
if GetUnitTypeId(u)=='n016' then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"origin"))
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
endif
endif
set u=null
set a=null
endfunction
function UCX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A08B')>0 and GetTriggerUnit()!=GetEventDamageSource()and GetRandomInt(1,100)<=40 and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<=GetEventDamage()then
call UBX()
endif
return false
endfunction
function UDX takes nothing returns nothing
local unit att=GetEventDamageSource()
local unit u=GetTriggerUnit()
local real d=GetEventDamage()*5
local unit a = LC[(1+GetPlayerId(GetOwningPlayer(att)))]
if(J5V[(ROX((GetUnitTypeId(att))))])then
if(BI[NI])==(LN)or(BI[NI])==(DAMAGE_TYPE_LIGHTNING)then
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
if GetUnitAbilityLevel(u,'A08K') !=0 then //GetUnitTypeId(u)=='n029' or GetUnitTypeId(u)=='n01V' or GetUnitTypeId(u)=='n03K' or GetUnitTypeId(u)=='n027' then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"origin"))
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(a,'I033') or UnitHasItemOfTypeBJ(a,'I03C') then
call UnitRemoveAbility(u,'A08E')
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Dark Execution.mdx",u,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\OrbOfDeath\\OrbOfDeathMissile.mdl",a,"chest"))
if GetUnitAbilityLevel(u,'A08K') !=0 then
call UnitRemoveAbility(u,'A08K')
if UnitHasItemOfTypeBJ(a,'I033') then
call RemoveItem( GetItemOfTypeFromUnitBJ(a, 'I033') )
call UnitAddItemByIdSwapped( 'I035',a )
endif
else
call UnitRemoveAbility(u,'A08F')
if UnitHasItemOfTypeBJ(a,'I033') then
call RemoveItem( GetItemOfTypeFromUnitBJ(a, 'I033') )
call UnitAddItemByIdSwapped( 'I034',a )
endif
endif
endif
endif
else
set DI[NI]=DI[NI]+GetEventDamage()
if GetUnitState(u,UNIT_STATE_LIFE)>=GetUnitState(u,UNIT_STATE_MAX_LIFE)then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_MAX_LIFE))
else
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+d)
endif
if GetUnitAbilityLevel(u,'A08K') !=0 then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"chest"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",u,"origin"))
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",u,"origin"))
endif
if UnitHasItemOfTypeBJ(a,'I033') or UnitHasItemOfTypeBJ(a,'I03C') then
call UnitRemoveAbility(u,'A08E')
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Dark Execution.mdx",u,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\OrbOfDeath\\OrbOfDeathMissile.mdl",a,"chest"))
if GetUnitAbilityLevel(u,'A08K') !=0 then
call UnitRemoveAbility(u,'A08K')
if UnitHasItemOfTypeBJ(a,'I033') then
call RemoveItem( GetItemOfTypeFromUnitBJ(a, 'I033') )
call UnitAddItemByIdSwapped( 'I035',a )
endif
else
call UnitRemoveAbility(u,'A08F')
if UnitHasItemOfTypeBJ(a,'I033') then
call RemoveItem( GetItemOfTypeFromUnitBJ(a, 'I033') )
call UnitAddItemByIdSwapped( 'I034',a )
endif
endif
endif
endif
set u=null
set a=null
set att = null
endfunction
function UFX takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A08E')>0 and GetTriggerUnit()!=GetEventDamageSource()and GetRandomInt(1,100)<=60+5*XT and GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<=GetEventDamage()then
call UDX()
endif
return false
endfunction
function UJX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n038')and(GetOwningPlayer(GetTriggerUnit())==Player(10))
endfunction
function Trig_Turtle_Boss_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n037')
endfunction
function Trig_Turtle_Boss_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(10)))
endfunction
function UKX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n037'),(IsUnitAlly(GetFilterUnit(),Player(10))))
endfunction
function ULX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A037')
endfunction
function UMX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function UKX)),function ULX)
endfunction
function UQX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n038')and(GetOwningPlayer(GetTriggerUnit())==Player(11))
endfunction
function Trig_Turtle_Boss_2_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n037')
endfunction
function Trig_Turtle_Boss_2_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(11)))
endfunction
function USX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n037'),(IsUnitAlly(GetFilterUnit(),Player(11))))
endfunction
function UTX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A037')
endfunction
function UUX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function USX)),function UTX)
endfunction
function UYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n025')and(GetOwningPlayer(GetTriggerUnit())==Player(11))
endfunction
function Trig_Tree_Poison_Boss_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n024')
endfunction
function Trig_Tree_Poison_Boss_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(11)))
endfunction
function UZX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n024'),(IsUnitAlly(GetFilterUnit(),Player(11))))
endfunction
function U_X takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'Aspo')
endfunction
function U0X takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function UZX)),function U_X)
endfunction
function U2X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n02F')and(GetOwningPlayer(GetTriggerUnit())==Player(11))
endfunction
function Trig_Spider_Boss_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='h00S')
endfunction
function Trig_Spider_Boss_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(11)))
endfunction
function U3X takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='h00S'),(IsUnitAlly(GetFilterUnit(),Player(11))))
endfunction
function U4X takes nothing returns nothing
call ExplodeUnitBJ(GetEnumUnit())
endfunction
function U5X takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function U3X)),function U4X)
endfunction
function U7X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n02F')and(GetOwningPlayer(GetTriggerUnit())==Player(10))
endfunction
function Trig_Spider_Boss_2_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='h00S')
endfunction
function Trig_Spider_Boss_2_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(10)))
endfunction
function U8X takes nothing returns boolean
if not BRTON then
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='h00S'),(IsUnitAlly(GetFilterUnit(),Player(10))))
else
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n00S'),(IsUnitAlly(GetFilterUnit(),Player(10))))
endif
endfunction
function U9X takes nothing returns nothing
call ExplodeUnitBJ(GetEnumUnit())
endfunction
function WVX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function U8X)),function U9X)
endfunction
function WXX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n025')and(GetOwningPlayer(GetTriggerUnit())==Player(10))
endfunction
function Trig_Tree_Poison_Boss_2_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n024')
endfunction
function Trig_Tree_Poison_Boss_2_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(10)))
endfunction
function WOX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n024'),(IsUnitAlly(GetFilterUnit(),Player(10))))
endfunction
function WRX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'Aspo')
endfunction
function WIX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function WOX)),function WRX)
endfunction
function WNX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n023')and(GetOwningPlayer(GetTriggerUnit())==Player(11))
endfunction
function Trig_Invis_Boss_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n022')
endfunction
function Trig_Invis_Boss_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(11)))
endfunction
function WBX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n022'),(IsUnitAlly(GetFilterUnit(),Player(11))))
endfunction
function WCX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0EV')
endfunction
function WDX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function WBX)),function WCX)
endfunction
function WGX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n023')and(GetOwningPlayer(GetTriggerUnit())==Player(10))
endfunction
function Trig_Invis_Boss_2_Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n022')
endfunction
function Trig_Invis_Boss_2_Func002001002002 takes nothing returns boolean
return(IsUnitAlly(GetFilterUnit(),Player(10)))
endfunction
function WHX takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())=='n022'),(IsUnitAlly(GetFilterUnit(),Player(10))))
endfunction
function WJX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0EV')
endfunction
function WKX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function WHX)),function WJX)
endfunction
/*function WMX takes nothing returns boolean
return((GetSpellAbilityId()=='Absk')and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false))!=null
endfunction*/
function WPX takes nothing returns nothing
call SetUnitPathing(GetTriggerUnit(),false)
endfunction
/*function WSX takes nothing returns boolean
return(GetSpellAbilityId()=='A06O')
endfunction*/
function WTX takes nothing returns nothing
call SetUnitPathing(GetTriggerUnit(),false)
endfunction
function WWX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='e00X')and(GetOwningPlayer(GetTriggerUnit())==Player(11))
endfunction
function Trig_Ranger_Boss_Armor_Remove_2_Func002001002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))!=null
endfunction
function Trig_Ranger_Boss_Armor_Remove_2_Func002001002002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),Player(11)))
endfunction
function WYX takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)),(IsUnitEnemy(GetFilterUnit(),Player(11)))))!=null
endfunction
function WZX takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0EQ')
endfunction
function W_X takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function WYX)),function WZX)
endfunction
function W1X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A04S',GetEventDamageSource())==1)and(GetEventDamage()>=1.)and(not((BI[NI])!=(LN)))and(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))])
endfunction
function W2X takes nothing returns nothing
set FK=GetUnitLoc(GetEventDamageSource())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetEventDamageSource()),FK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0D5')
call IssueTargetOrder(bj_lastCreatedUnit,"acidbomb",GetTriggerUnit())
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"war3mapImported\\Shield Breaker.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(FK)
endfunction
function W4X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A04S',GetEventDamageSource())==1)and(GetEventDamage()>=1.)and(not(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))]))
endfunction
function W5X takes nothing returns nothing
set FK=GetUnitLoc(GetEventDamageSource())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetEventDamageSource()),FK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0D5')
call IssueTargetOrder(bj_lastCreatedUnit,"acidbomb",GetTriggerUnit())
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"war3mapImported\\Shield Breaker.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(FK)
endfunction
function W7X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='e00X')and(GetOwningPlayer(GetTriggerUnit())==Player(10))
endfunction
function Trig_Ranger_Boss_Armor_Remove_Func002001002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO))!=null
endfunction
function Trig_Ranger_Boss_Armor_Remove_Func002001002002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),Player(10)))
endfunction
function W8X takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)),(IsUnitEnemy(GetFilterUnit(),Player(10)))))!=null
endfunction
function W9X takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),'A0EQ')
endfunction
function YVX takes nothing returns nothing
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function W8X)),function W9X)
endfunction
function YXX takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='h00B')
endfunction
function Trig_Tank_AI_Func001Func001Func002C takes nothing returns boolean
return true
endfunction
function YOX takes nothing returns boolean
return(GetRandomInt(1,100)>=25)
endfunction
function YRX takes nothing returns boolean
return(GetRandomInt(1,100)>=50)
endfunction
function YIX takes nothing returns nothing
if(YRX())then
set XK=GetUnitLoc(GetTriggerUnit())
set LK=CNE(XK,256.,GetUnitFacing(GetAttacker()))
call IssuePointOrderByIdLoc(GetAttacker(),852580,LK)
call RemoveLocation(XK)
call RemoveLocation(LK)
else
if(YOX())then
set XK=GetUnitLoc(GetTriggerUnit())
set LK=CNE(XK,256.,GetUnitFacing(GetAttacker()))
call IssuePointOrderByIdLoc(GetAttacker(),852224,LK)
call RemoveLocation(XK)
call RemoveLocation(LK)
else
if((true))then
set XK=GetUnitLoc(GetTriggerUnit())
call IssuePointOrderByIdLoc(GetAttacker(),852652,XK)
call RemoveLocation(XK)
endif
endif
endif
endfunction
function YNX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h00B')
endfunction
function YBX takes nothing returns nothing
call SetUnitAcquireRange(GetTriggerUnit(),600.)
endfunction
function YDX takes nothing returns boolean
return(not(GetUnitAbilityLevel(GetTriggerUnit(),'A000')!=1))and(not(GetRandomInt(1,100)>1))
endfunction
function YFX takes nothing returns nothing
local item i=(GetItemOfTypeFromUnitBJ(GetTriggerUnit(),'I01O'))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Shield Breaker.mdx",GetTriggerUnit(),"origin"))
call RemoveItem(i)
call SetWidgetLife(GetTriggerUnit(),GetWidgetLife(GetTriggerUnit())/4.)
set i=null
endfunction
function YHX takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I01U')
endfunction
function YJX takes nothing returns nothing
call ZWE(GetTriggerUnit(),500.)
endfunction
function YLX takes nothing returns boolean
return(GetItemTypeId(GetManipulatedItem())=='I01U')
endfunction
function YMX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A078',GetTriggerUnit())!=1)
endfunction
function YPX takes nothing returns nothing
if(YMX())then
call ZYE(GetTriggerUnit())
endif
endfunction
function YTX takes nothing returns nothing
local integer YUX
//if GetSpellAbilityId()=='A00J' then
set YUX=LFE()
set KHV[(YUX)]=((.0)*1.)
set KJV[(YUX)]=("war3mapImported\\Barrage des arcanes.mdx")
set KGV[(YUX)]=((1800)*1.)
set KFV[(YUX)]=((9999)*1.)
set KMV[(YUX)]=(false)
set KPV[(YUX)]=(false)
call R8X(YUX,5)
call R7X(YUX,GetSpellAbilityUnit(),GetSpellTargetUnit())
//endif
endfunction
function YWX takes nothing returns nothing
local integer YUX
//if GetSpellAbilityId()=='A014' then
set YUX=LGE()
set KHV[(YUX)]=((.6)*1.)
set KJV[(YUX)]=("war3mapImported\\Barrage des arcanes.mdx")
set KGV[(YUX)]=((2000)*1.)
set KFV[(YUX)]=((900)*1.)
set KMV[(YUX)]=(false)
set KPV[(YUX)]=(false)
call R8X(YUX,5)
call R7X(YUX,GetSpellAbilityUnit(),GetSpellTargetUnit())
//endif
endfunction
function YZX takes nothing returns nothing
local integer YUX
//if GetSpellAbilityId()=='A00C' then
set YUX=LDE()
set KHV[(YUX)]=((.4)*1.)
set KJV[(YUX)]=("war3mapImported\\ArcaneMissileComplete.mdx")
set KGV[(YUX)]=((1400)*1.)
set KFV[(YUX)]=((750)*1.)
set KMV[(YUX)]=(true)
set KPV[(YUX)]=(false)
call R8X(YUX,GetUnitAbilityLevel(GetSpellAbilityUnit(),'A00C')+5)
set YYV[YUX]=GetUnitAbilityLevel(GetSpellAbilityUnit(),'A00C')-1
call R7X(YUX,GetSpellAbilityUnit(),GetSpellTargetUnit())
//endif
endfunction
function Y_X takes nothing returns nothing
local effect Y0X
set Y0X=bj_lastCreatedEffect
call CRE(2.5)
call DestroyEffect(Y0X)
set Y0X = null
endfunction
function Y2X takes nothing returns boolean
return(GetUnitTypeId(GetSummonedUnit())=='o001')
endfunction
function Trig_FocusMoonbeam_Func001001 takes nothing returns boolean
return(GetUnitTypeId(UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])=='o001')
endfunction
function Y3X takes nothing returns nothing
if((GetUnitTypeId(UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])=='o001'))then
call RemoveUnit(UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endif
set UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetSummonedUnit()
endfunction
function Y5X takes nothing returns boolean
return(GetUnitAbilityLevel(LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],'B048')==1 or GetUnitAbilityLevel(GetEventDamageSource(),'B048')==1)and(GetRandomInt(1,100)<=50)and(GetEventDamage()>.0)and(not(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))))and(BI[NI]==LN or BI[NI]==DAMAGE_TYPE_LIGHTNING)and(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))])
endfunction
function Y6X takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(GetEventDamageSource(),GetTriggerUnit(),GetEventDamage(),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
set OK=GetUnitLoc(GetTriggerUnit())
call CreateTextTagLocBJ((I2S(R2I((GetEventDamage()*2.)))+"!"),OK,0,10.,100.,.0,.0,0)
call RemoveLocation(OK)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
endfunction
function Y8X takes nothing returns boolean
return(GetUnitAbilityLevel(LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],'B048')==1 or GetUnitAbilityLevel(GetEventDamageSource(),'B048')==1)and(GetRandomInt(1,100)<=50)and(GetEventDamage()>.0)and(not(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))))and(not(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))]))
endfunction
function Y9X takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(GetEventDamageSource(),GetTriggerUnit(),GetEventDamage(),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
set OK=GetUnitLoc(GetTriggerUnit())
call CreateTextTagLocBJ((I2S(R2I((GetEventDamage()*2.)))+"!"),OK,0,10.,100.,.0,.0,0)
call RemoveLocation(OK)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
endfunction
/*function ZEX takes nothing returns boolean
return GetSpellAbilityId()=='A07U'
endfunction*/
function ZXX takes nothing returns nothing
local unit ZOX=GetTriggerUnit()
local unit ZRX=GetSpellTargetUnit()
local real ZIX=KT[GetUnitAbilityLevel(ZOX,'A07U')]
local trigger ZAX
local integer loc_integer01
local real ZNX=GetUnitX(ZRX)-75*Cos(GetUnitFacing(ZRX)*bj_DEGTORAD)
local real ZBX=GetUnitY(ZRX)-75*Sin(GetUnitFacing(ZRX)*bj_DEGTORAD)
call SetUnitX(ZOX,ZNX)
call SetUnitY(ZOX,ZBX)
call SetUnitFacing(ZOX,GetUnitFacing(ZRX))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadowyMissileofEvilDOOMV2.mdx",ZOX,"origin"))
if IsUnitEnemy(ZRX,GetOwningPlayer(ZOX))then
call UnitDamageTarget(ZOX,ZRX,ZIX,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call IssueTargetOrderById(ZOX,851983,ZRX)
endif
set ZOX=null
set ZRX=null
set ZAX=null
endfunction
function ZCX takes nothing returns boolean
return GetSpellAbilityId()=='A07U'
endfunction
function ZDX takes nothing returns nothing
local unit ZFX=GetTriggerUnit()
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\ShadowyMissileofEvilDOOMV2.mdx",ZFX,"origin"))
call SAE('h00J',GetUnitX(ZFX),GetUnitY(ZFX),GetUnitFacing(ZFX),.5,"spell",2.)
set ZFX=null
endfunction
constant function ZGX takes integer ZHX returns boolean
local boolean array ZJX
set ZJX[1]=true
set ZJX[2]=true
return ZJX[ZHX]
endfunction
constant function ZKX takes integer ZHX returns integer
local integer array ZLX
set ZLX[1]='A07R'
set ZLX[2]=10
set ZLX[3]=900
set ZLX[4]=4
set ZLX[5]='A07S'
return ZLX[ZHX]
endfunction
constant function ZMX takes integer ZHX returns string
local string array ZPX
set ZPX[1]="war3mapImported\\ShadowRibbon.mdx"
set ZPX[2]="war3mapImported\\Doomsday.mdx"
set ZPX[3]=""
set ZPX[4]="war3mapImported\\ShadowbindTarget.mdx"
return ZPX[ZHX]
endfunction
function ZQX takes unit ZSX,unit MME returns boolean
return IsUnitEnemy(MME,GetOwningPlayer(ZSX))and GetWidgetLife(MME)>.405 and not IsUnitType(MME,UNIT_TYPE_STRUCTURE)and not IsUnitType(MME,UNIT_TYPE_MECHANICAL)and not IsUnitType(MME,UNIT_TYPE_MAGIC_IMMUNE)and IsUnitVisible(MME,GetOwningPlayer(ZSX))and not(GetUnitAbilityLevel((MME),'Avul')>0)
endfunction
function ZTX takes nothing returns boolean
return GetSpellAbilityId()==ZKX(1)
endfunction
function ZUX takes nothing returns boolean
return R2I(GetEventDamage())>.0 and GetOwningPlayer(GetEventDamageSource())!=GetOwningPlayer(GetTriggerUnit()) and LoadUnitHandle(FF,GetHandleId(GetEventDamageSource()),1) == GetEventDamageSource()
endfunction
function ZWX takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),ZKX(1))>0 and GetTriggerUnit()==LoadUnitHandle(FF,GetHandleId(GetAttacker()),StringHash("Omnislash Caster Target"))
endfunction
function ZYX takes nothing returns nothing
local unit ZSX=GetEventDamageSource()
local unit MME=GetTriggerUnit()
local integer ZZX=GetHandleId(ZSX)
local unit Z_X=null
local group Z0X=CreateGroup()
local integer Z1X=LoadInteger(FF,ZZX,StringHash("Omnislash Caster Now"))
local trigger Z2X=null
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call DestroyEffect(AddSpecialEffectTarget(ZMX(4),MME,"origin"))
call GroupEnumUnitsInRange(Z0X,GetUnitX(ZSX),GetUnitY(ZSX),I2R(ZKX(3)),null)
loop
set Z_X=GroupPickRandomUnit(Z0X)
exitwhen ZQX(ZSX,Z_X)or Z_X==null
call GroupRemoveUnit(Z0X,Z_X)
endloop
if(Z_X!=null and GetWidgetLife(Z_X)>.405)or ZQX(ZSX,LoadUnitHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Target")))then
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call SaveUnitHandle(FF,ZZX,StringHash("Omnislash Caster Target"),Z_X)
call SaveInteger(FF,ZZX,StringHash("Omnislash Caster Now"),Z1X+1)
call SaveReal(FF,ZZX,StringHash("Omnislash Caster Time"),.0)
call DestroyEffect(AddSpecialEffect(ZMX(2),GetUnitX(ZSX),GetUnitY(ZSX)))
if Z_X!=null then
call SetUnitX(ZSX,(GetUnitX(Z_X)-75*Cos(GetUnitFacing(Z_X)*bj_DEGTORAD)))
call SetUnitY(ZSX,(GetUnitY(Z_X)-75*Sin(GetUnitFacing(Z_X)*bj_DEGTORAD)))
endif
call DestroyEffect(AddSpecialEffect(ZMX(3),GetUnitX(ZSX),GetUnitY(ZSX)))
set Z2X=CreateTrigger()
set OHV=Z2X
set OJV=ZZX
call TriggerRegisterUnitEvent(Z2X,Z_X,EVENT_UNIT_ATTACKED)
call SaveTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger"),Z2X)
call TriggerAddCondition(Z2X,Condition(function ZWX))
call ExecuteFunc("Z3X")
else
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Target"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Actions"))
call SaveInteger(FF,ZZX,StringHash("Omnislash Caster Now"),Z1X+990)
call DestroyEffect(LoadEffectHandle(FF,ZZX,StringHash("Omnislash Caster Effect")))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Effect"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Time"))
call SetUnitVertexColor(ZSX,112,128,144,255)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,false)
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02A',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02W',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I038',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02A',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02W',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I038',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02A',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02W',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I038',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02A',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02W',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I038',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02A',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02W',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I038',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02A',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02W',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I038',5)
endif
endif
set ZSX=null
set MME=null
set Z_X=null
call DestroyGroup(Z0X)
set Z0X=null
set Z2X=null
endfunction
function Z4X takes nothing returns nothing
local unit ZSX=GetAttacker()
local integer ZZX=GetHandleId(ZSX)
local trigger Z2X=CreateTrigger()
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call TriggerRegisterUnitEvent(Z2X,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call SaveTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger"),Z2X)
call TriggerAddCondition(Z2X,Condition(function ZUX))
call SaveTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action"),TriggerAddAction(Z2X,function ZYX))
set ZSX=null
set Z2X=null
endfunction
function Z3X takes nothing returns nothing
call SaveTriggerActionHandle(FF,OJV,StringHash("Omnislash Caster Trigger Action"),TriggerAddAction(OHV,function Z4X))
endfunction
function Z5X takes unit ZSX,boolean Z6X returns nothing
local unit Z_X=null
local group Z0X=CreateGroup()
local integer ZZX=GetHandleId(ZSX)
local integer Z7X=0
local integer Z1X=LoadInteger(FF,ZZX,StringHash("Omnislash Caster Now"))
local trigger Z2X=null
if Z6X==false then
call GroupEnumUnitsInRange(Z0X,GetUnitX(ZSX),GetUnitY(ZSX),I2R(ZKX(3)),null)
loop
set Z_X=GroupPickRandomUnit(Z0X)
exitwhen ZQX(ZSX,Z_X)or Z_X==null
call GroupRemoveUnit(Z0X,Z_X)
endloop
if(Z_X!=null and GetWidgetLife(Z_X)>.405)or ZQX(ZSX,LoadUnitHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Target")))then
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call SaveUnitHandle(FF,ZZX,StringHash("Omnislash Caster Target"),Z_X)
call SaveInteger(FF,ZZX,StringHash("Omnislash Caster Now"),Z1X+1)
call SaveReal(FF,ZZX,StringHash("Omnislash Caster Time"),.0)
set Z2X=CreateTrigger()
call TriggerRegisterUnitEvent(Z2X,Z_X,EVENT_UNIT_ATTACKED)
call SaveTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger"),Z2X)
call TriggerAddCondition(Z2X,Condition(function ZWX))
call SaveTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action"),TriggerAddAction(Z2X,function Z4X))
call DestroyEffect(AddSpecialEffect(ZMX(2),GetUnitX(ZSX),GetUnitY(ZSX)))
call SetUnitX(ZSX,(GetUnitX(Z_X)-75*Cos(GetUnitFacing(Z_X)*bj_DEGTORAD)))
call SetUnitY(ZSX,(GetUnitY(Z_X)-75*Sin(GetUnitFacing(Z_X)*bj_DEGTORAD)))
call DestroyEffect(AddSpecialEffect(ZMX(3),GetUnitX(ZSX),GetUnitY(ZSX)))
else
call TriggerRemoveAction(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,ZZX,StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,ZZX,StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Target"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Actions"))
call SaveInteger(FF,ZZX,StringHash("Omnislash Caster Now"),Z1X+990)
call DestroyEffect(LoadEffectHandle(FF,ZZX,StringHash("Omnislash Caster Effect")))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Effect"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Time"))
call SetUnitVertexColor(ZSX,112,128,144,100)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,false)
call SetUnitPathing(ZSX,true)
call SetUnitVertexColor(ZSX,112,128,144,255)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,false)
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02A',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02W',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I038',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02A',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02W',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I038',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02A',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02W',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I038',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02A',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02W',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I038',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02A',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02W',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I038',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02A',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02W',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I038',5)
endif
call Z5X(ZSX,true)
endif
else
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Target"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Actions"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Now"))
call DestroyEffect(LoadEffectHandle(FF,ZZX,StringHash("Omnislash Caster Effect")))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Effect"))
call RemoveSavedHandle(FF,ZZX,StringHash("Omnislash Caster Time"))
call SetUnitVertexColor(ZSX,112,128,144,255)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,false)
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02A',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02W',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I038',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02A',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02W',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I038',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02A',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02W',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I038',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02A',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02W',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I038',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02A',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02W',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I038',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02A',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02W',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I038',5)
endif
call SetUnitPathing(ZSX,true)
call UnitRemoveAbility(ZSX,ZKX(5))
if GetLocalPlayer()==GetOwningPlayer(ZSX)then
call ClearSelection()
call SelectUnit(ZSX,true)
endif
endif
set Z_X=null
call DestroyGroup(Z0X)
set Z0X=null
set Z2X=null
endfunction
function Z8X takes nothing returns nothing
local timer Z9X=GetExpiredTimer()
local integer ZZX=GetHandleId(Z9X)
local unit ZSX=LoadUnitHandle(FF,ZZX,1)
local integer VVO=GetHandleId(ZSX)
local integer VEO=LoadInteger(FF,VVO,StringHash("Omnislash Caster Actions"))
local integer Z1X=LoadInteger(FF,VVO,StringHash("Omnislash Caster Now"))
local real VXO=LoadReal(FF,VVO,StringHash("Omnislash Caster Time"))+.025
local integer Z7X=0
call SetUnitPathing(ZSX,false)
call SetUnitVertexColor(ZSX,112,128,144,100)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,true)
call IssueTargetOrderById(ZSX,851983,LoadUnitHandle(FF,VVO,StringHash("Omnislash Caster Target")))
loop
if IsUnitSelected(ZSX,Player(Z7X))and ZGX(1)then
if GetLocalPlayer()==Player(Z7X)then
call SelectUnit(ZSX,false)
endif
endif
exitwhen Z7X>12
set Z7X=Z7X+1
endloop
if VXO<2.2 then
call SaveReal(FF,VVO,StringHash("Omnislash Caster Time"),VXO)
else
call SaveReal(FF,VVO,StringHash("Omnislash Caster Time"),0)
if Z1X<VEO then
call Z5X(ZSX,false)
endif
endif
if ZQX(ZSX,LoadUnitHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Target")))==false then
call Z5X(ZSX,false)
endif
if Z1X>=VEO then
call SetUnitPathing(ZSX,true)
call SetUnitVertexColor(ZSX,112,128,144,255)
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,false)
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02A',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I02W',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I038',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02A',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I02W',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I038',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02A',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I02W',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I038',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02A',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I02W',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I038',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02A',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I02W',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I038',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I042' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02A',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I043' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I02W',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I044' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I038',5)
endif
call Z5X(ZSX,true)
call DestroyTimer(Z9X)
call FlushChildHashtable(FF,ZZX)
endif
set Z9X=null
set ZSX=null
endfunction
function VOO takes nothing returns nothing
local timer Z9X=CreateTimer()
local integer ZZX=GetHandleId(Z9X)
local unit ZSX=GetSpellAbilityUnit()
local unit MME=GetSpellTargetUnit()
local integer VRO=GetUnitAbilityLevel(ZSX,ZKX(1))
local integer VEO=ZKX(2)*VRO
local effect VIO=AddSpecialEffectTarget(ZMX(1),ZSX,"weapon")
local trigger Z2X=CreateTrigger()
call UnitAddAbility(ZSX,ZKX(5))
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I042',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I043',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,0)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,0))
call UnitAddItemToSlotById(ZSX,'I044',0)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I042',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I043',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,1)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,1))
call UnitAddItemToSlotById(ZSX,'I044',1)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I042',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I043',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,2)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,2))
call UnitAddItemToSlotById(ZSX,'I044',2)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I042',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I043',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,3)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,3))
call UnitAddItemToSlotById(ZSX,'I044',3)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I042',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I043',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,4)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,4))
call UnitAddItemToSlotById(ZSX,'I044',4)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I02A' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I042',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I02W' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I043',5)
endif
if GetItemTypeId(UnitItemInSlot(ZSX,5)) == 'I038' then
call RemoveItem(UnitItemInSlot(ZSX,5))
call UnitAddItemToSlotById(ZSX,'I044',5)
endif
call UnitRemoveBuffs(ZSX,false,true)
call SetUnitInvulnerable(ZSX,true)
call SetUnitPathing(ZSX,false)
call SetUnitVertexColor(ZSX,112,128,144,100)
call TriggerSleepAction(0)
call TriggerRemoveAction(LoadTriggerHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger")),LoadTriggerActionHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action")))
call DestroyTrigger(LoadTriggerHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Target"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Actions"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Now"))
call DestroyEffect(LoadEffectHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Effect")))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Effect"))
call RemoveSavedHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Time"))
call SaveUnitHandle(FF,ZZX,1,ZSX)
call SaveUnitHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Target"),MME)
call SaveInteger(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Actions"),VEO)
call SaveInteger(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Now"),0)
call SaveEffectHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Effect"),VIO)
call SaveReal(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Time"),0)
call TriggerRegisterUnitEvent(Z2X,MME,EVENT_UNIT_ATTACKED)
call SaveTriggerHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger"),Z2X)
call TriggerAddCondition(Z2X,Condition(function ZWX))
call SaveTriggerActionHandle(FF,GetHandleId(ZSX),StringHash("Omnislash Caster Trigger Action"),TriggerAddAction(Z2X,function Z4X))
call SetUnitX(ZSX,(GetUnitX(MME)-75*Cos(GetUnitFacing(MME)*bj_DEGTORAD)))
call SetUnitY(ZSX,(GetUnitY(MME)-75*Sin(GetUnitFacing(MME)*bj_DEGTORAD)))
call TimerStart(Z9X,.025,true,function Z8X)
set Z9X=null
set ZSX=null
set MME=null
set VIO=null
set Z2X=null
endfunction
function VNO takes integer VRO returns real
if VRO==1 then
return 650.
elseif VRO==2 then
return 625.
elseif VRO==3 then
return 600.
elseif VRO==4 then
return 575.
elseif VRO==5 then
return 550.
elseif VRO==6 then
return 525.
elseif VRO==7 then
return 500.
elseif VRO==8 then
return 475.
elseif VRO==9 then
return 450.
elseif VRO==10 then
return 425.
endif
return .0
endfunction
function VBO takes nothing returns integer
local integer d=GIE()
local real CDE=90
local integer i=0
local real x
local real y
local location as=GetUnitLoc(GetSpellTargetUnit())
local location VCO=CNE(as,GetRandomReal(450.,800.),GetRandomReal(.0,360.))
set Y1V[d]=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),'h007',VCO,.0)
call UnitApplyTimedLife(Y1V[d],'BTLF',(1))
call RemoveLocation(as)
call RemoveLocation(VCO)
set as=null
set VCO=null
set ZRV[d]=GetSpellTargetUnit()
set Y3V[d]=GetOwningPlayer(Y1V[d])
set ZAV[d]=GetUnitX(ZRV[d])
set ZNV[d]=GetUnitY(ZRV[d])
set ZBV[d]=GetUnitX(Y1V[d])
set ZCV[d]=GetUnitY(Y1V[d])
set ZQV[d]=GetUnitAbilityLevel(LC[(1+GetPlayerId(GetOwningPlayer(Y1V[d])))],'A004')
set ZSV[d]=Atan2(ZNV[d]-ZCV[d],ZAV[d]-ZBV[d])
set Y6V[Y7V[d]]=ZBV[d]+45*Cos(ZSV[d]+(bj_DEGTORAD*90))
set ZVV[ZEV[d]]=ZCV[d]+45*Sin(ZSV[d]+(bj_DEGTORAD*-90))
call MoveLocation(OKV,ZBV[d],ZCV[d])
set x=ZBV[d]+20*Cos(ZSV[d]+(180*bj_DEGTORAD))
set y=ZCV[d]+20*Sin(ZSV[d]+(180*bj_DEGTORAD))
set Y2V[d]=CreateUnit(Y3V[d],'h00K',x,y,ZSV[d]*bj_RADTODEG)
set ZLV[d]=GetUnitFlyHeight(Y2V[d])
set ZJV[d]=-200.
call UnitAddAbility(Y2V[d],'Aloc')
set ZIV[d]=CreateUnit(Y3V[d],'h001',ZBV[d],ZCV[d],bj_UNIT_FACING)
call IssueTargetOrder(ZIV[d],"slow",ZRV[d])
set ZMV[d]=AddSpecialEffectTarget("war3mapImported\\ShadowbindTarget.mdx",Y2V[d],"hand, left")
set ZPV[d]=AddSpecialEffectTarget("war3mapImported\\ShadowbindTarget.mdx",Y2V[d],"hand, right")
set Y6V[Y7V[d]]=ZBV[d]+45*Cos(ZSV[d]+(bj_DEGTORAD*CDE))
set ZVV[ZEV[d]]=ZCV[d]+45*Sin(ZSV[d]+(bj_DEGTORAD*CDE))
set Y6V[Y7V[d]+1]=ZBV[d]+45*Cos(ZSV[d]-(bj_DEGTORAD*CDE))
set ZVV[ZEV[d]+1]=ZCV[d]+45*Sin(ZSV[d]-(bj_DEGTORAD*CDE))
set Y8V[Y9V[d]]=ZAV[d]+45*Cos(ZSV[d]+(bj_DEGTORAD*CDE))
set ZXV[ZOV[d]]=ZNV[d]+45*Sin(ZSV[d]+(bj_DEGTORAD*CDE))
set Y8V[Y9V[d]+1]=ZAV[d]+45*Cos(ZSV[d]-(bj_DEGTORAD*CDE))
set ZXV[ZOV[d]+1]=ZNV[d]+45*Sin(ZSV[d]-(bj_DEGTORAD*CDE))
loop
exitwhen i==2
set CDE=-90.
set Y4V[Y5V[d]+i]=AddLightningEx("SPLK",true,Y6V[Y7V[d]+i],ZVV[ZEV[d]+i],ZJV[d],Y8V[Y9V[d]+i],ZXV[ZOV[d]+i],ZKV[d])
set i=i+1
endloop
set ZHV[d]=((ZQV[d])*9999.)
set ZDV[d]=VNO(ZQV[d])
set ZGV[d]=(((ZQV[d])*1.5)+10.)
set ZFV[d]=((ZQV[d])*15.)
return d
endfunction
function VDO takes nothing returns boolean
local integer d=PRE()
local integer i=0
local real CDE=90
local real x
local real y
local real dx
local real dy
local boolean b=false
local real UAE
local real r
set ZTV[d]=ZTV[d]+.04
call IssueTargetOrder(ZIV[d],"slow",ZRV[d])
set ZSV[d]=Atan2(ZNV[d]-ZCV[d],ZAV[d]-ZBV[d])
call SetUnitFacingTimed(Y2V[d],ZSV[d]*bj_RADTODEG,.0)
call QueueUnitAnimation(Y2V[d],"stand, channel")
set ZAV[d]=GetUnitX(ZRV[d])
set ZNV[d]=GetUnitY(ZRV[d])
set dx=ZAV[d]-ZBV[d]
set dy=ZNV[d]-ZCV[d]
if false then
set ZBV[d]=GetUnitX(Y1V[d])
set ZCV[d]=GetUnitY(Y1V[d])
endif
set x=ZBV[d]+20*Cos(ZSV[d]+(180*bj_DEGTORAD))
set y=ZCV[d]+20*Sin(ZSV[d]+(180*bj_DEGTORAD))
call SetUnitX(Y2V[d],x)
call SetUnitY(Y2V[d],y)
set Y6V[Y7V[d]]=ZBV[d]+45*Cos(ZSV[d]+(bj_DEGTORAD*CDE))
set ZVV[ZEV[d]]=ZCV[d]+45*Sin(ZSV[d]+(bj_DEGTORAD*CDE))
set Y6V[Y7V[d]+1]=ZBV[d]+45*Cos(ZSV[d]-(bj_DEGTORAD*CDE))
set ZVV[ZEV[d]+1]=ZCV[d]+45*Sin(ZSV[d]-(bj_DEGTORAD*CDE))
set Y8V[Y9V[d]]=ZAV[d]+45*Cos(ZSV[d]+(bj_DEGTORAD*CDE))
set ZXV[ZOV[d]]=ZNV[d]+45*Sin(ZSV[d]+(bj_DEGTORAD*CDE))
set Y8V[Y9V[d]+1]=ZAV[d]+45*Cos(ZSV[d]-(bj_DEGTORAD*CDE))
set ZXV[ZOV[d]+1]=ZNV[d]+45*Sin(ZSV[d]-(bj_DEGTORAD*CDE))
set UAE=(dx*dx+dy*dy)
call MoveLocation(OKV,ZAV[d],ZNV[d])
set ZKV[d]=GetLocationZ(OKV)+GetUnitFlyHeight(ZRV[d])+45
call MoveLocation(OKV,GetUnitX(Y2V[d]),GetUnitY(Y2V[d]))
set ZJV[d]=(GetLocationZ(OKV)+ZLV[d])+.0
loop
exitwhen i==2
set CDE=-90.
call MoveLightningEx(Y4V[Y5V[d]+i],true,Y6V[Y7V[d]+i],ZVV[ZEV[d]+i],ZJV[d],Y8V[Y9V[d]+i],ZXV[ZOV[d]+i],ZKV[d])
set i=i+1
endloop
set r=ZDV[d]+400
set r=r*r
if UAE>ZDV[d]*ZDV[d]and UAE<r and not M5E(ZRV[d])and not IsUnitType(ZRV[d],UNIT_TYPE_MAGIC_IMMUNE)then
call M6E(ZRV[d],400,.4,(bj_RADTODEG*ZSV[d])+180,"none.mdl",0,true,false)
set b=true
endif
if not b and(dx*dx+dy*dy)>ZDV[d]*ZDV[d]then
call M6E(ZRV[d],ZFV[d],.4,(bj_RADTODEG*ZSV[d])+180,"none.mdl",0,true,false)
endif
if ZTV[d]>=ZGV[d]or(dx*dx+dy*dy)>ZHV[d]*ZHV[d]or not UnitAlive(ZRV[d])or ZRV[d]==null then
call UnitRemoveAbility(ZRV[d],'B02X')
call UnitRemoveAbility(ZRV[d],'B02X')
call DestroyLightning(Y4V[Y5V[d]])
call DestroyLightning(Y4V[Y5V[d]+1])
call DestroyEffect(ZMV[d])
call DestroyEffect(ZPV[d])
call KillUnit(Y2V[d])
call KillUnit(ZIV[d])
call GAE(d)
return true
endif
return false
endfunction
/*function VFO takes nothing returns boolean
return GetSpellAbilityId()=='A004'
endfunction*/
function VGO takes nothing returns nothing
call PFE(function VDO,VBO(),.04)
call PFE(function VDO,VBO(),.04)
endfunction
function VHO takes integer VRO returns real
if VRO==1 then
return 400.
elseif VRO==2 then
return 500.
elseif VRO==3 then
return 600.
elseif VRO==4 then
return 700.
elseif VRO==5 then
return 800.
elseif VRO==6 then
return 1000.
elseif VRO==7 then
return 1200.
elseif VRO==8 then
return 1500.
elseif VRO==9 then
return 1800.
elseif VRO==10 then
return 2000.
endif
return .0
endfunction
function VJO takes integer VRO returns real
return 200.
endfunction
function VKO takes nothing returns integer
local integer d=GOE()
local real CDE=90
local integer i=0
local real x
local real y
local location as=GetUnitLoc(GetTriggerUnit())
local location VCO=CNE(as,150.,GetUnitFacing(GetTriggerUnit()))
set ZZV[d]=CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),'h007',VCO,.0)
call UnitApplyTimedLife(ZZV[d],'BTLF',(2))
call RemoveLocation(as)
call RemoveLocation(VCO)
set as=null
set VCO=null
set VEE[d]=GetSpellTargetUnit()
set Z0V[d]=GetOwningPlayer(ZZV[d])
set VOE[d]=GetUnitX(VEE[d])
set VRE[d]=GetUnitY(VEE[d])
set VIE[d]=GetUnitX(ZZV[d])
set VAE[d]=GetUnitY(ZZV[d])
set VLE[d]=GetUnitAbilityLevel(LC[(1+GetPlayerId(GetOwningPlayer(ZZV[d])))],'A09F')
set VME[d]=Atan2(VRE[d]-VAE[d],VOE[d]-VIE[d])
set Z3V[Z4V[d]]=VIE[d]+45*Cos(VME[d]+(bj_DEGTORAD*90))
set Z7V[Z8V[d]]=VAE[d]+45*Sin(VME[d]+(bj_DEGTORAD*-90))
call MoveLocation(OLV,VIE[d],VAE[d])
set x=VIE[d]+20*Cos(VME[d]+(180*bj_DEGTORAD))
set y=VAE[d]+20*Sin(VME[d]+(180*bj_DEGTORAD))
set Z_V[d]=CreateUnit(Z0V[d],'h00K',x,y,VME[d]*bj_RADTODEG)
set VHE[d]=GetUnitFlyHeight(Z_V[d])
set VFE[d]=-200.
call UnitAddAbility(Z_V[d],'Aloc')
set VXE[d]=CreateUnit(Z0V[d],'h001',VIE[d],VAE[d],bj_UNIT_FACING)
call IssueTargetOrder(VXE[d],"stop",VEE[d])
set VJE[d]=AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",Z_V[d],"hand, left")
set VKE[d]=AddSpecialEffectTarget("war3mapImported\\OrbOfCorruption.mdx",Z_V[d],"hand, right")
set Z3V[Z4V[d]]=VIE[d]+45*Cos(VME[d]+(bj_DEGTORAD*CDE))
set Z7V[Z8V[d]]=VAE[d]+45*Sin(VME[d]+(bj_DEGTORAD*CDE))
set Z3V[Z4V[d]+1]=VIE[d]+45*Cos(VME[d]-(bj_DEGTORAD*CDE))
set Z7V[Z8V[d]+1]=VAE[d]+45*Sin(VME[d]-(bj_DEGTORAD*CDE))
set Z5V[Z6V[d]]=VOE[d]+45*Cos(VME[d]+(bj_DEGTORAD*CDE))
set Z9V[VVE[d]]=VRE[d]+45*Sin(VME[d]+(bj_DEGTORAD*CDE))
set Z5V[Z6V[d]+1]=VOE[d]+45*Cos(VME[d]-(bj_DEGTORAD*CDE))
set Z9V[VVE[d]+1]=VRE[d]+45*Sin(VME[d]-(bj_DEGTORAD*CDE))
loop
exitwhen i==2
set CDE=-90.
set Z1V[Z2V[d]+i]=AddLightningEx("SPLK",true,Z3V[Z4V[d]+i],Z7V[Z8V[d]+i],VFE[d],Z5V[Z6V[d]+i],Z9V[VVE[d]+i],VGE[d])
set i=i+1
endloop
set VDE[d]=((VLE[d])*9999.)
set VNE[d]=VHO(VLE[d])
set VCE[d]=(20.+(10.*(VLE[d])))
set VBE[d]=VJO(VLE[d])
return d
endfunction
function VLO takes nothing returns boolean
local integer d=PRE()
local integer i=0
local real CDE=90
local real x
local real y
local real dx
local real dy
local boolean b=false
local real UAE
local real r
set VPE[d]=VPE[d]+.04
call IssueTargetOrder(VXE[d],"stop",VEE[d])
set VME[d]=Atan2(VRE[d]-VAE[d],VOE[d]-VIE[d])
call SetUnitFacingTimed(Z_V[d],VME[d]*bj_RADTODEG,.0)
call QueueUnitAnimation(Z_V[d],"stand, channel")
set VOE[d]=GetUnitX(VEE[d])
set VRE[d]=GetUnitY(VEE[d])
set dx=VOE[d]-VIE[d]
set dy=VRE[d]-VAE[d]
if false then
set VIE[d]=GetUnitX(ZZV[d])
set VAE[d]=GetUnitY(ZZV[d])
endif
set x=VIE[d]+20*Cos(VME[d]+(180*bj_DEGTORAD))
set y=VAE[d]+20*Sin(VME[d]+(180*bj_DEGTORAD))
call SetUnitX(Z_V[d],x)
call SetUnitY(Z_V[d],y)
set Z3V[Z4V[d]]=VIE[d]+45*Cos(VME[d]+(bj_DEGTORAD*CDE))
set Z7V[Z8V[d]]=VAE[d]+45*Sin(VME[d]+(bj_DEGTORAD*CDE))
set Z3V[Z4V[d]+1]=VIE[d]+45*Cos(VME[d]-(bj_DEGTORAD*CDE))
set Z7V[Z8V[d]+1]=VAE[d]+45*Sin(VME[d]-(bj_DEGTORAD*CDE))
set Z5V[Z6V[d]]=VOE[d]+45*Cos(VME[d]+(bj_DEGTORAD*CDE))
set Z9V[VVE[d]]=VRE[d]+45*Sin(VME[d]+(bj_DEGTORAD*CDE))
set Z5V[Z6V[d]+1]=VOE[d]+45*Cos(VME[d]-(bj_DEGTORAD*CDE))
set Z9V[VVE[d]+1]=VRE[d]+45*Sin(VME[d]-(bj_DEGTORAD*CDE))
set UAE=(dx*dx+dy*dy)
call MoveLocation(OLV,VOE[d],VRE[d])
set VGE[d]=GetLocationZ(OLV)+GetUnitFlyHeight(VEE[d])+45
call MoveLocation(OLV,GetUnitX(Z_V[d]),GetUnitY(Z_V[d]))
set VFE[d]=(GetLocationZ(OLV)+VHE[d])+.0
loop
exitwhen i==2
set CDE=-90.
call MoveLightningEx(Z1V[Z2V[d]+i],true,Z3V[Z4V[d]+i],Z7V[Z8V[d]+i],VFE[d],Z5V[Z6V[d]+i],Z9V[VVE[d]+i],VGE[d])
set i=i+1
endloop
set r=VNE[d]+400
set r=r*r
if UAE>VNE[d]*VNE[d]and UAE<r and not M5E(VEE[d])then
call M6E(VEE[d],400,.4,(bj_RADTODEG*VME[d])+180,"none.mdl",0,true,false)
set b=true
endif
if not b and(dx*dx+dy*dy)>VNE[d]*VNE[d]then
call M6E(VEE[d],VBE[d],.4,(bj_RADTODEG*VME[d])+180,"none.mdl",0,true,false)
endif
if VPE[d]>=VCE[d]or(dx*dx+dy*dy)>VDE[d]*VDE[d]or not UnitAlive(VEE[d])or VEE[d]==null then
call UnitRemoveAbility(VEE[d],'B02X')
call UnitRemoveAbility(VEE[d],'B02X')
call DestroyLightning(Z1V[Z2V[d]])
call DestroyLightning(Z1V[Z2V[d]+1])
call DestroyEffect(VJE[d])
call DestroyEffect(VKE[d])
call KillUnit(Z_V[d])
call KillUnit(VXE[d])
call GRE(d)
return true
endif
return false
endfunction
/*function VMO takes nothing returns boolean
return GetSpellAbilityId()=='A09F'
endfunction*/
function VPO takes nothing returns nothing
call PFE(function VLO,VKO(),.04)
call UnitAddAbility(GetSpellTargetUnit(),'A09G')
call UnitAddAbility(GetSpellTargetUnit(),'A09H')
call SetUnitAbilityLevel(GetSpellTargetUnit(),'A09G',GetUnitAbilityLevel(GetTriggerUnit(),'A09F'))
call SetUnitAbilityLevel(GetSpellTargetUnit(),'A09H',GetUnitAbilityLevel(GetTriggerUnit(),'A09F'))
call SetUnitVertexColor(GetSpellTargetUnit(),50,50,50,100)
if GetUnitAbilityLevel(GetSpellTargetUnit(),'A04P')!=0 then
call UnitRemoveAbility(GetSpellTargetUnit(),'A04P')
endif
if GetUnitAbilityLevel(GetSpellTargetUnit(),'A0E0')!=0 then
call UnitRemoveAbility(GetSpellTargetUnit(),'A0E0')
endif
if GetUnitAbilityLevel(GetSpellTargetUnit(),'A04S')!=0 then
call UnitRemoveAbility(GetSpellTargetUnit(),'A04S')
endif
call UnitApplyTimedLife(GetSpellTargetUnit(),'BTLF',20.+(10.*GetUnitAbilityLevel(GetTriggerUnit(),'A09F')))
endfunction
function VQO takes integer VRO returns real
if VRO==1 then
return 600.
elseif VRO==2 then
return 800.
elseif VRO==3 then
return 700.
elseif VRO==4 then
return 600.
endif
return .0
endfunction
function VSO takes nothing returns integer
local integer d=GEE()
local real CDE=90
local integer i=0
local real x
local real y
set VUE[d]=GetTriggerUnit()
set V8E[d]=GetSpellTargetUnit()
set VYE[d]=GetOwningPlayer(VUE[d])
set EVE[d]=GetUnitX(V8E[d])
set EEE[d]=GetUnitY(V8E[d])
set EXE[d]=GetUnitX(VUE[d])
set EOE[d]=GetUnitY(VUE[d])
set EHE[d]=GetUnitAbilityLevel(VUE[d],'A00F')
set EJE[d]=Atan2(EEE[d]-EOE[d],EVE[d]-EXE[d])
set V0E[V1E[d]]=EXE[d]+45*Cos(EJE[d]+(bj_DEGTORAD*90))
set V4E[V5E[d]]=EOE[d]+45*Sin(EJE[d]+(bj_DEGTORAD*-90))
call MoveLocation(OMV,EXE[d],EOE[d])
set x=EXE[d]+20*Cos(EJE[d]+(180*bj_DEGTORAD))
set y=EOE[d]+20*Sin(EJE[d]+(180*bj_DEGTORAD))
set VWE[d]=CreateUnit(VYE[d],'h007',x,y,EJE[d]*bj_RADTODEG)
set EDE[d]=GetUnitFlyHeight(VWE[d])
set EBE[d]=-150.
call UnitAddAbility(VWE[d],'Aloc')
set V9E[d]=CreateUnit(VYE[d],'h007',EXE[d],EOE[d],bj_UNIT_FACING)
call IssueTargetOrder(V9E[d],"",V8E[d])
set EFE[d]=AddSpecialEffectTarget("",VWE[d],"hand, left")
set EGE[d]=AddSpecialEffectTarget("",VWE[d],"hand, right")
set V0E[V1E[d]]=EXE[d]+45*Cos(EJE[d]+(bj_DEGTORAD*CDE))
set V4E[V5E[d]]=EOE[d]+45*Sin(EJE[d]+(bj_DEGTORAD*CDE))
set V0E[V1E[d]+1]=EXE[d]+45*Cos(EJE[d]-(bj_DEGTORAD*CDE))
set V4E[V5E[d]+1]=EOE[d]+45*Sin(EJE[d]-(bj_DEGTORAD*CDE))
set V2E[V3E[d]]=EVE[d]+45*Cos(EJE[d]+(bj_DEGTORAD*CDE))
set V6E[V7E[d]]=EEE[d]+45*Sin(EJE[d]+(bj_DEGTORAD*CDE))
set V2E[V3E[d]+1]=EVE[d]+45*Cos(EJE[d]-(bj_DEGTORAD*CDE))
set V6E[V7E[d]+1]=EEE[d]+45*Sin(EJE[d]-(bj_DEGTORAD*CDE))
loop
exitwhen i==2
set CDE=-90.
set VZE[V_E[d]+i]=AddLightningEx("PONC",true,V0E[V1E[d]+i],V4E[V5E[d]+i],EBE[d],V2E[V3E[d]+i],V6E[V7E[d]+i],ECE[d])
set i=i+1
endloop
set ENE[d]=((EHE[d])*9999.)
set ERE[d]=VQO(EHE[d])
set EAE[d]=((EHE[d])*99999.)
set EIE[d]=((EHE[d])*200.)
return d
endfunction
function VTO takes nothing returns boolean
local integer d=PRE()
local integer i=0
local real CDE=90
local real x
local real y
local real dx
local real dy
local boolean b=false
local real UAE
local real r
set EKE[d]=EKE[d]+.04
call IssueTargetOrder(V9E[d],"",V8E[d])
set EJE[d]=Atan2(EEE[d]-EOE[d],EVE[d]-EXE[d])
call SetUnitFacingTimed(VWE[d],EJE[d]*bj_RADTODEG,.0)
call QueueUnitAnimation(VWE[d],"spell")
set EVE[d]=GetUnitX(V8E[d])
set EEE[d]=GetUnitY(V8E[d])
set dx=EVE[d]-EXE[d]
set dy=EEE[d]-EOE[d]
if false then
set EXE[d]=GetUnitX(VUE[d])
set EOE[d]=GetUnitY(VUE[d])
endif
set x=EXE[d]+20*Cos(EJE[d]+(180*bj_DEGTORAD))
set y=EOE[d]+20*Sin(EJE[d]+(180*bj_DEGTORAD))
call SetUnitX(VWE[d],x)
call SetUnitY(VWE[d],y)
set V0E[V1E[d]]=EXE[d]+45*Cos(EJE[d]+(bj_DEGTORAD*CDE))
set V4E[V5E[d]]=EOE[d]+45*Sin(EJE[d]+(bj_DEGTORAD*CDE))
set V0E[V1E[d]+1]=EXE[d]+45*Cos(EJE[d]-(bj_DEGTORAD*CDE))
set V4E[V5E[d]+1]=EOE[d]+45*Sin(EJE[d]-(bj_DEGTORAD*CDE))
set V2E[V3E[d]]=EVE[d]+45*Cos(EJE[d]+(bj_DEGTORAD*CDE))
set V6E[V7E[d]]=EEE[d]+45*Sin(EJE[d]+(bj_DEGTORAD*CDE))
set V2E[V3E[d]+1]=EVE[d]+45*Cos(EJE[d]-(bj_DEGTORAD*CDE))
set V6E[V7E[d]+1]=EEE[d]+45*Sin(EJE[d]-(bj_DEGTORAD*CDE))
set UAE=(dx*dx+dy*dy)
call MoveLocation(OMV,EVE[d],EEE[d])
set ECE[d]=GetLocationZ(OMV)+GetUnitFlyHeight(V8E[d])+45
call MoveLocation(OMV,GetUnitX(VWE[d]),GetUnitY(VWE[d]))
set EBE[d]=(GetLocationZ(OMV)+EDE[d])+.0
loop
exitwhen i==2
set CDE=-90.
call MoveLightningEx(VZE[V_E[d]+i],true,V0E[V1E[d]+i],V4E[V5E[d]+i],EBE[d],V2E[V3E[d]+i],V6E[V7E[d]+i],ECE[d])
set i=i+1
endloop
set r=ERE[d]+400
set r=r*r
if UAE>ERE[d]*ERE[d]and UAE<r and not M5E(V8E[d])then
call M6E(V8E[d],400,.4,(bj_RADTODEG*EJE[d])+180,"war3mapImported\\SpiritWalkerChange3.mdx",0,true,false)
set b=true
endif
if not b and(dx*dx+dy*dy)>ERE[d]*ERE[d]then
call M6E(V8E[d],EIE[d],.4,(bj_RADTODEG*EJE[d])+180,"war3mapImported\\SpiritWalkerChange3.mdx",0,true,false)
endif
if EKE[d]>=EAE[d]or(dx*dx+dy*dy)>ENE[d]*ENE[d]or not UnitAlive(V8E[d])or V8E[d]==null then
call UnitRemoveAbility(V8E[d],'B000')
call UnitRemoveAbility(V8E[d],'B000')
call DestroyLightning(VZE[V_E[d]])
call DestroyLightning(VZE[V_E[d]+1])
call DestroyEffect(EFE[d])
call DestroyEffect(EGE[d])
call KillUnit(VWE[d])
call KillUnit(V9E[d])
call GXE(d)
return true
endif
return false
endfunction
/*function VUO takes nothing returns boolean
return GetSpellAbilityId()=='A00F'
endfunction*/
function VWO takes nothing returns nothing
call PFE(function VTO,VSO(),.04)
endfunction
function VYO takes nothing returns integer
local integer PXE=GVE()
if EYE[PXE]==null then
set EYE[PXE]=CreateGroup()
endif
return PXE
endfunction
function VZO takes integer D0E returns nothing
if D0E==null then
return
elseif(EPE[D0E]!=-1)then
return
endif
call GroupClear(EYE[(D0E)])
set EPE[D0E]=ELE
set ELE=D0E
endfunction
function V_O takes nothing returns boolean
local unit u=GetFilterUnit()
if UnitAlive(u)and IsUnitEnemy(u,GetOwningPlayer(OSV))and not IsUnitInGroup(u,OQV)then
if GetUnitAbilityLevel(u,'A06V')!=1 then
call UnitAddAbility(u,'A06V')
endif
call UnitDamageTargetEx((OSV),(u),((I2R(OTV*GetHeroInt(OSV,true)))*.4),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call GroupAddUnit(OQV,u)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl",u,"origin"))
endif
set u=null
return false
endfunction
function V0O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real x
local real y
if EUE[PXE]<=0 then
call RemoveUnit(ESE[PXE])
call VZO(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set EWE[PXE]=EWE[PXE]+4.
set x=(((GetUnitX(EQE[PXE]))*1.)+((400.)*1.)*Cos(((EWE[PXE])*1.)*bj_DEGTORAD))
set y=(((GetUnitY(EQE[PXE]))*1.)+((400.)*1.)*Sin(((EWE[PXE])*1.)*bj_DEGTORAD))
call SetUnitX(ESE[PXE],x)
call SetUnitY(ESE[PXE],y)
if GetUnitFlyHeight(EQE[PXE])>0 then
call SetUnitFlyHeight(ESE[PXE],GetUnitFlyHeight(EQE[PXE]),0)
endif
set OSV=EQE[PXE]
set OTV=ETE[PXE]
set OQV=EYE[PXE]
call GroupEnumUnitsInRange(OPV,x,y,116.,Filter(function V_O))
set EUE[PXE]=EUE[PXE]-4
call SetTimerData(t,PXE)
call TimerStart(t,.0325,false,function V0O)
endif
set t=null
endfunction
function V1O takes nothing returns nothing
local unit OIX=GetTriggerUnit()
local real OAX=GetUnitX(OIX)
local real ONX=GetUnitY(OIX)
local integer i
local real a
local real OJX
local real OKX
local timer t=NewTimer()
local integer PXE=VYO()
if GetSpellAbilityId()=='A06S' then
set i=GetUnitAbilityLevel(OIX,'A06S')
set a=.0
elseif GetSpellAbilityId()=='A07V' then
set i=GetUnitAbilityLevel(OIX,'A07V')
set a=90.
elseif GetSpellAbilityId()=='A06T' then
set i=GetUnitAbilityLevel(OIX,'A06T')
set a=180.
elseif GetSpellAbilityId()=='A08L' then
set i=GetUnitAbilityLevel(OIX,'A08L')
set a=270.
endif
set a=a+GetUnitFacing(OIX)
set OJX=(((OAX)*1.)+((400.)*1.)*Cos(((a)*1.)*bj_DEGTORAD))
set OKX=(((ONX)*1.)+((400.)*1.)*Sin(((a)*1.)*bj_DEGTORAD))
set EQE[PXE]=OIX
set ETE[PXE]=i
set EUE[PXE]=360*i
set EWE[PXE]=a
set ESE[PXE]=CreateUnit(GetOwningPlayer(OIX),'h00T',OJX,OKX,.0)
call SetUnitPathing(ESE[PXE],false)
call UnitAddAbility(ESE[PXE],'Amrf')
call SetTimerData(t,PXE)
call TimerStart(t,.0325,false,function V0O)
set OIX=null
set t=null
endfunction
/*function V2O takes nothing returns boolean
if GetSpellAbilityId()=='A06S' or GetSpellAbilityId()=='A07V' or GetSpellAbilityId()=='A06T' or GetSpellAbilityId()=='A08L' then
call V1O()
endif
return false
endfunction*/
function V4O takes unit U0E,unit YSE returns boolean
return IsUnitEnemy(YSE,GetOwningPlayer(U0E))and not(IsUnitType(YSE,UNIT_TYPE_STRUCTURE))and not(IsUnitType(YSE,UNIT_TYPE_MAGIC_IMMUNE))
endfunction
function V5O takes unit U0E,unit YSE returns boolean
return IsUnitEnemy(YSE,GetOwningPlayer(U0E))and not(IsUnitType(YSE,UNIT_TYPE_STRUCTURE))and not(IsUnitType(YSE,UNIT_TYPE_MAGIC_IMMUNE))
endfunction
function V6O takes real x,real y returns real
call MoveLocation(OUV,x,y)
return GetLocationZ(OUV)
endfunction
function V7O takes nothing returns nothing
local timer t=GetExpiredTimer()
call RemoveUnit(LoadUnitHandle(OYV,GetHandleId(t),0))
call FlushChildHashtable(OYV,GetHandleId(t))
call DestroyTimer(t)
set t=null
endfunction
function V8O takes unit J2E,real V9O returns nothing
local timer t=CreateTimer()
call SaveUnitHandle(OYV,GetHandleId(t),0,J2E)
call TimerStart(t,V9O,false,function V7O)
set t=null
endfunction
function EVO takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=LoadUnitHandle(OYV,GetHandleId(t),0)
call PauseUnit(u,true)
call SetUnitX(u,LoadReal(OYV,GetHandleId(t),1))
call SetUnitY(u,LoadReal(OYV,GetHandleId(t),2))
call SetUnitAnimation(u,"spell")
call QueueUnitAnimation(u,"spell")
call FlushChildHashtable(OYV,GetHandleId(t))
call DestroyTimer(t)
set t=null
set u=null
endfunction
function EEO takes unit J2E returns nothing
local timer t=CreateTimer()
call SaveUnitHandle(OYV,GetHandleId(t),0,J2E)
call SaveReal(OYV,GetHandleId(t),1,GetUnitX(J2E))
call SaveReal(OYV,GetHandleId(t),2,GetUnitY(J2E))
call TimerStart(t,0,false,function EVO)
set t=null
endfunction
function EXO takes timer t returns nothing
local integer Id=GetHandleId(t)
call V8O(LoadUnitHandle(OYV,Id,2),2)
call DestroyGroup(LoadGroupHandle(OYV,Id,5))
call DestroyGroup(LoadGroupHandle(OYV,Id,6))
call RemoveDestructable(LoadDestructableHandle(OYV,Id,10))
call RemoveDestructable(LoadDestructableHandle(OYV,Id,11))
call RemoveDestructable(LoadDestructableHandle(OYV,Id,12))
call RemoveDestructable(LoadDestructableHandle(OYV,Id,13))
call FlushChildHashtable(OYV,Id)
call DestroyTimer(t)
endfunction
function EOO takes unit U0E,group ERO returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local unit O3X
local unit u
local timer t
loop
set u=FirstOfGroup(ERO)
exitwhen u==null
call GroupRemoveUnit(ERO,u)
if IsUnitInGroup(u,LoadGroupHandle(OYV,Id,5))then
set t=LoadTimerHandle(OYV,Id,GetHandleId(u))
call PauseUnit(u,false)
call SetUnitTimeScale(u,1)
call GroupRemoveUnit(LoadGroupHandle(OYV,Id,5),u)
call RemoveUnit(LoadUnitHandle(OYV,GetHandleId(t),2))
call DestroyEffect(LoadEffectHandle(OYV,GetHandleId(t),4))
call FlushChildHashtable(OYV,GetHandleId(t))
call DestroyTimer(t)
set t=null
endif
if not IsUnitInGroup(u,LoadGroupHandle(OYV,Id,6))and GetWidgetLife(u)>.405 and V6O(GetUnitX(u),GetUnitY(u))+GetUnitFlyHeight(u)<=LoadReal(OYV,Id,3)+O3V and V5O(U0E,u)then
set O3X=CreateUnit(GetOwningPlayer(U0E),'h007',GetUnitX(u),GetUnitY(u),0)
call UnitAddAbility(O3X,'A06U')
call SetUnitAbilityLevel(O3X,'A06U',LoadInteger(OYV,Id,1))
call IssueTargetOrder(O3X,"frostnova",u)
call V8O(O3X,1)
call GroupAddUnit(LoadGroupHandle(OYV,Id,6),u)
endif
endloop
set O3X=null
endfunction
function EIO takes nothing returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local real EAO=LoadReal(OYV,Id,4)-.04
local unit U0E
local unit u
call SaveReal(OYV,Id,4,EAO)
call GroupEnumUnitsInRange(OWV,GetUnitX(LoadUnitHandle(OYV,Id,2)),GetUnitY(LoadUnitHandle(OYV,Id,2)),(1-EAO/1.4)*O2V[LoadInteger(OYV,Id,1)]*1.3,null)
call EOO(LoadUnitHandle(OYV,Id,0),OWV)
if EAO<=0 then
call EOO(LoadUnitHandle(OYV,Id,0),LoadGroupHandle(OYV,Id,5))
call EXO(GetExpiredTimer())
endif
endfunction
function ENO takes nothing returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local unit U0E=LoadUnitHandle(OYV,Id,0)
local real x=GetUnitX(U0E)
local real y=GetUnitY(U0E)
local real K0E=GetUnitFacing(U0E)*bj_DEGTORAD
local real EBO=O2V[LoadInteger(OYV,Id,1)]*1.18/450
local real EAO=LoadReal(OYV,Id,4)-.04
call SaveReal(OYV,Id,4,EAO)
if EAO>=.78 then
if EAO>=2 then
call SaveReal(OYV,Id,4,1.04)
call TimerStart(GetExpiredTimer(),.04,true,function ENO)
return
endif
call SetUnitX(U0E,x+770*EBO*.04*Cos(K0E))
call SetUnitY(U0E,y+770*EBO*.04*Sin(K0E))
call SetUnitFlyHeight(U0E,280+LoadReal(OYV,Id,3)-V6O(x,y)+(1.04-EAO)*231*EBO,0)
elseif EAO>=.52 then
call SetUnitTimeScale(U0E,1)
call SetUnitX(U0E,x+461*EBO*.04*Cos(K0E))
call SetUnitY(U0E,y+461*EBO*.04*Sin(K0E))
call SetUnitFlyHeight(U0E,280+LoadReal(OYV,Id,3)-V6O(x,y)+(240-EAO*231)*EBO,0)
elseif EAO>=.26 then
call SetUnitX(U0E,x+309*EBO*.04*Cos(K0E))
call SetUnitY(U0E,y+309*EBO*.04*Sin(K0E))
call SetUnitFlyHeight(U0E,280+LoadReal(OYV,Id,3)-V6O(x,y)+(EAO*77+80)*EBO,0)
elseif EAO>=0 then
call SetUnitX(U0E,x+193*EBO*.04*Cos(K0E))
call SetUnitY(U0E,y+193*EBO*.04*Sin(K0E))
call SetUnitFlyHeight(U0E,280+LoadReal(OYV,Id,3)-V6O(x,y)+(EAO*461-20)*EBO,0)
elseif EAO>-.4 then
call SetUnitFlyHeight(U0E,280+LoadReal(OYV,Id,3)-V6O(x,y)+EAO*650,0)
else
call SetUnitFlyHeight(U0E,30.,0)
call PauseUnit(U0E,false)
call SetUnitInvulnerable(U0E,false)
call SetUnitPosition(U0E,x,y)
call SaveReal(OYV,Id,4,1.4)
call SaveGroupHandle(OYV,Id,6,CreateGroup())
call TimerStart(GetExpiredTimer(),.04,true,function EIO)
endif
set U0E=null
endfunction
function ECO takes nothing returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local unit U0E=LoadUnitHandle(OYV,Id,0)
call SetUnitAnimation(U0E,"attack")
call QueueUnitAnimation(U0E,"stand")
call SetUnitTimeScale(U0E,.5)
call SetUnitAnimation(LoadUnitHandle(OYV,Id,2),"death")
call FlushChildHashtable(OYV,GetHandleId(LoadTimerHandle(OYV,Id,6)))
call DestroyTimer(LoadTimerHandle(OYV,Id,6))
call SaveReal(OYV,Id,4,3)
call TimerStart(GetExpiredTimer(),1.26,false,function ENO)
endfunction
function EDO takes nothing returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local integer EFO=LoadInteger(OYV,Id,0)
local unit YSE=LoadUnitHandle(OYV,Id,1)
local real x
local real y
if LoadBoolean(OYV,Id,3)then
set x=GetUnitX(LoadUnitHandle(OYV,Id,2))-GetUnitX(YSE)
set y=GetUnitY(LoadUnitHandle(OYV,Id,2))-GetUnitY(YSE)
if x*x+y*y<=90000 and not IsUnitHidden(YSE)then
call SaveBoolean(OYV,Id,3,false)
call PauseUnit(YSE,true)
call SetUnitTimeScale(YSE,0)
call TimerStart(GetExpiredTimer(),.04,true,function EDO)
else
call DestroyEffect(LoadEffectHandle(OYV,Id,4))
call RemoveUnit(LoadUnitHandle(OYV,Id,2))
call GroupRemoveUnit(LoadGroupHandle(OYV,EFO,5),YSE)
call FlushChildHashtable(OYV,Id)
call DestroyTimer(GetExpiredTimer())
endif
elseif GetWidgetLife(YSE)>O_V[LoadInteger(OYV,EFO,1)]*2 then
call UnitDamageTargetEx(LoadUnitHandle(OYV,EFO,0),YSE,O_V[LoadInteger(OYV,EFO,1)],false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
set YSE=null
endfunction
function EGO takes nothing returns nothing
call SaveEffectHandle(OYV,GetHandleId(GetExpiredTimer()),4,AddSpecialEffectTarget("war3mapImported\\SeaAura.mdx",LoadUnitHandle(OYV,GetHandleId(GetExpiredTimer()),1),"origin"))
call TimerStart(GetExpiredTimer(),.3,false,function EDO)
endfunction
function EHO takes nothing returns nothing
local integer Id=LoadInteger(OYV,GetHandleId(GetExpiredTimer()),0)
local group g=LoadGroupHandle(OYV,Id,5)
local real x
local real y
local unit YSE
local unit EJO
local timer t
call GroupEnumUnitsInRange(OWV,GetUnitX(LoadUnitHandle(OYV,Id,2)),GetUnitY(LoadUnitHandle(OYV,Id,2)),O2V[LoadInteger(OYV,Id,1)],null)
loop
set YSE=FirstOfGroup(OWV)
exitwhen YSE==null or(not IsUnitInGroup(YSE,g)and GetWidgetLife(YSE)>.405 and V6O(GetUnitX(YSE),GetUnitY(YSE))+GetUnitFlyHeight(YSE)<=LoadReal(OYV,Id,3)+O3V and V4O(LoadUnitHandle(OYV,Id,0),YSE))
call GroupRemoveUnit(OWV,YSE)
endloop
call GroupClear(OWV)
if YSE!=null then
set x=GetUnitX(YSE)
set y=GetUnitY(YSE)
call GroupAddUnit(g,YSE)
call SetSoundPosition(OZV,x,y,200)
call StartSound(OZV)
set EJO=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'n018',x,y,0)
call UnitAddAbility(EJO,'Amrf')
call UnitRemoveAbility(EJO,'Amrf')
call SetUnitX(EJO,x)
call SetUnitY(EJO,y)
call SetUnitFlyHeight(EJO,LoadReal(OYV,Id,3)-V6O(x,y),0)
call SetUnitAnimation(EJO,"death")
set t=CreateTimer()
call SaveInteger(OYV,GetHandleId(t),0,Id)
call SaveUnitHandle(OYV,GetHandleId(t),1,YSE)
call SaveUnitHandle(OYV,GetHandleId(t),2,EJO)
call SaveBoolean(OYV,GetHandleId(t),3,true)
call SaveTimerHandle(OYV,Id,GetHandleId(YSE),t)
call TimerStart(t,.4,false,function EGO)
set t=null
set EJO=null
set YSE=null
endif
set g=null
endfunction
function EKO takes nothing returns nothing
local timer t=CreateTimer()
local integer Id=GetHandleId(GetExpiredTimer())
local integer ELO=LoadInteger(OYV,Id,1)
call SaveGroupHandle(OYV,Id,5,CreateGroup())
call SaveTimerHandle(OYV,Id,6,t)
call SaveInteger(OYV,GetHandleId(t),0,Id)
call TimerStart(t,O1V[ELO],true,function EHO)
call TimerStart(GetExpiredTimer(),O0V[ELO],false,function ECO)
set t=null
endfunction
function EMO takes nothing returns nothing
local integer Id=GetHandleId(GetExpiredTimer())
local unit U0E=LoadUnitHandle(OYV,Id,0)
local real QCE=O2V[LoadInteger(OYV,Id,1)]*1.18/450
local real EAO=LoadReal(OYV,Id,4)-.04
call SetUnitFlyHeight(U0E,RMaxBJ(0,280+LoadReal(OYV,Id,3)-V6O(GetUnitX(U0E),GetUnitY(U0E))-EAO*200*QCE),0)
if EAO>0 then
call SaveReal(OYV,Id,4,EAO)
else
call SetUnitAnimation(U0E,"stand channel")
call QueueUnitAnimation(U0E,"stand channel")
call QueueUnitAnimation(U0E,"stand channel")
call TimerStart(GetExpiredTimer(),1.8,false,function EKO)
endif
set U0E=null
endfunction
function EPO takes unit U0E,integer ELO returns nothing
local timer t=CreateTimer()
local integer Id=GetHandleId(t)
local real ux=GetUnitX(U0E)
local real uy=GetUnitY(U0E)
local real CHE=O2V[ELO]*1.18
local real CDE=GetUnitFacing(U0E)*bj_DEGTORAD
local real x=ux+CHE*Cos(CDE)
local real y=uy+CHE*Sin(CDE)
local unit EQO=CreateUnit(GetOwningPlayer(U0E),'n019',x,y,CDE*bj_RADTODEG+180)
call UnitAddAbility(EQO,'Amrf')
call UnitRemoveAbility(EQO,'Amrf')
call SetUnitX(EQO,x)
call SetUnitY(EQO,y)
call SetUnitFlyHeight(EQO,260,0)
call SetUnitScale(EQO,CHE/450,1,1)
call SetUnitAnimation(EQO,"birth")
call SetUnitInvulnerable(U0E,true)
call EEO(U0E)
call UnitAddAbility(U0E,'Amrf')
call UnitRemoveAbility(U0E,'Amrf')
call SaveUnitHandle(OYV,Id,0,U0E)
call SaveInteger(OYV,Id,1,ELO)
call SaveUnitHandle(OYV,Id,2,EQO)
call SaveReal(OYV,Id,3,V6O(x,y))
call SaveReal(OYV,Id,4,2)
call SaveDestructableHandle(OYV,Id,10,CreateDestructable('YTfc',ux,uy,0,1,0))
call SaveDestructableHandle(OYV,Id,11,CreateDestructable('YTfc',x+CHE*Cos(CDE),y+CHE*Sin(CDE),0,1,0))
call SaveDestructableHandle(OYV,Id,12,CreateDestructable('YTfc',x+CHE*Cos(CDE+bj_PI*.5),y+CHE*Sin(CDE+bj_PI*.5),0,1,0))
call SaveDestructableHandle(OYV,Id,13,CreateDestructable('YTfc',x+CHE*Cos(CDE-bj_PI*.5),y+CHE*Sin(CDE-bj_PI*.5),0,1,0))
call TimerStart(t,.04,true,function EMO)
set EQO=null
set t=null
endfunction
function ESO takes nothing returns nothing
//if GetSpellAbilityId()=='A06T' then
call EPO(GetTriggerUnit(),GetUnitAbilityLevel(GetTriggerUnit(),'A06T'))
//endif
//return false
endfunction
function ETO takes nothing returns boolean
local real x1=GetUnitX(O5V)
local real y1=GetUnitY(O5V)
local real x2=GetUnitX(GetFilterUnit())
local real y2=GetUnitY(GetFilterUnit())
local real a=bj_RADTODEG*Atan2(y2-y1,x2-x1)
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(O5V))then
call M6E(GetFilterUnit(),124.,.6,a,"war3mapImported\\SlideWater.mdx",.0,false,false)
endif
return false
endfunction
function EUO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real x1=E2E[PXE]
local real y1=E3E[PXE]
local real x2=GetUnitX(E1E[PXE])
local real y2=GetUnitY(E1E[PXE])
local real d=SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
local unit u
if E4E[PXE]<=0 then
call DestroyEffect(E5E[PXE])
if GetUnitAbilityLevel(E1E[PXE],'B00R')!=1 then
call ZYE(E1E[PXE])
endif
call UnitRemoveAbility(E1E[PXE],'A078')
call F9E(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set O5V=E1E[PXE]
call GroupEnumUnitsInRange(O4V,GetUnitX(E1E[PXE]),GetUnitY(E1E[PXE]),170.,Filter(function ETO))
if d>=30. then
set u=CreateUnit(GetOwningPlayer(E1E[PXE]),'n01A',x2,y2,.0)
call SetUnitAbilityLevel(u,'S008',GetUnitAbilityLevel(E1E[PXE],'A07V'))
call SetUnitAbilityLevel(u,'A080',GetUnitAbilityLevel(E1E[PXE],'A07V'))
call IssueImmediateOrderById(u,852177)
//call UnitApplyTimedLife(u,'BTLF',(I2R(E4E[PXE])*.02))
call UnitApplyTimedLife(u,'BTLF',8.)
set E2E[PXE]=x2
set E3E[PXE]=y2
endif
call ZWE(E1E[PXE],500.)
set E4E[PXE]=E4E[PXE]-1
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function EUO)
endif
set t=null
set u=null
endfunction
function EWO takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=F8E()
set E1E[PXE]=GetTriggerUnit()
set E2E[PXE]=GetUnitX(E1E[PXE])
set E3E[PXE]=GetUnitY(E1E[PXE])
set E5E[PXE]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\CrushingWave\\CrushingWaveMissile.mdl",E1E[PXE],"origin")
set E4E[PXE]=500+50*GetUnitAbilityLevel(E1E[PXE],'A07V')
call UnitAddAbility(E1E[PXE],'A078')
call ZWE(E1E[PXE],500.)
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function EUO)
set t=null
endfunction
/*function EYO takes nothing returns boolean
if GetSpellAbilityId()=='A07V' then
call EWO()
endif
return false
endfunction*/
function EZO takes nothing returns nothing
set O8V[1]=7
set O8V[2]=7
set O7V=2
endfunction
constant function E_O takes integer DZX,integer LZE returns real
return 50.+(LZE*2.5*DZX)
endfunction
function E0O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer D0E=GetTimerData(t)
if XIE[D0E]then
call RemoveUnit(E9E[D0E])
else
call SetUnitTimeScale(E9E[D0E],1.5)
endif
call DestroyEffect(XRE[D0E])
call ReleaseTimer(t)
call F7E(D0E)
set t=null
endfunction
function E1O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer D0E=GetTimerData(t)
local location CJE=Location(GetUnitX(XEE[D0E]),GetUnitY(XEE[D0E]))
call Y0E(XVE[D0E],XEE[D0E],(XXE[D0E]*.9),ATTACK_TYPE_CHAOS,false,false)
call OTX(XVE[D0E],CJE,(XXE[D0E]*.1),256.,DAMAGE_TYPE_NORMAL,ATTACK_TYPE_CHAOS,false)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\NewDirtEXNofire.mdx",XEE[D0E],"origin"))
call TimerStart(XOE[D0E],.25,false,function E0O)
call RemoveLocation(CJE)
set t=null
set CJE=null
endfunction
function E2O takes boolean b,integer E3O,unit U0E,unit S8X,real SVE,real x,real y returns nothing
local integer D0E=F6E()
if b then
set E9E[D0E]=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'E002',x,y,GetUnitFacing(U0E))
call UnitApplyTimedLife(E9E[D0E],1,2)
call SetUnitColor(E9E[D0E],GetPlayerColor(GetOwningPlayer(U0E)))
call SetUnitVertexColor(E9E[D0E],255,255,255,O6V)
call SetUnitAnimationByIndex(E9E[D0E],E3O)
if GetRandomInt(0,100) >= 50 then
call SetUnitAnimationByIndex(U0E,E3O)
endif
else
set E9E[D0E]=U0E
endif
set XIE[D0E]=b
set XVE[D0E]=U0E
set XEE[D0E]=S8X
set XXE[D0E]=SVE
set XOE[D0E]=NewTimer()
call SetUnitTimeScale(E9E[D0E],1.5)
set XRE[D0E]=AddSpecialEffectTarget("war3mapImported\\BeneficAura.MDX",E9E[D0E],"weapon")
call SetTimerData(((XOE[D0E])),(D0E))
call TimerStart(XOE[D0E],.5,false,function E1O)
endfunction
function E4O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer D0E=GetTimerData(t)
if not(IsUnitType(XKE[D0E],UNIT_TYPE_DEAD)or GetUnitTypeId(XKE[D0E])==0)and not(IsUnitType(XLE[D0E],UNIT_TYPE_DEAD)or GetUnitTypeId(XLE[D0E])==0)and XHE[D0E]!=XJE[D0E]and XCE[D0E]==GetUnitX(XKE[D0E])and XDE[D0E]==GetUnitY(XKE[D0E])then
if XHE[D0E]==0 then
set bj_lastCreatedUnit=CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h007',XCE[D0E],XDE[D0E],GetUnitFacing(XKE[D0E]))
call UnitApplyTimedLife(bj_lastCreatedUnit,1,1)
call SetUnitAbilityLevel(bj_lastCreatedUnit,'A02B',XGE[D0E])
call IssueTargetOrderById(bj_lastCreatedUnit,852095,XLE[D0E])
call E2O(false,XME[D0E],XKE[D0E],XLE[D0E],XFE[D0E],XCE[D0E],XDE[D0E])
else
call E2O(true,XME[D0E],XKE[D0E],XLE[D0E],XFE[D0E],XCE[D0E],XDE[D0E])
endif
set XHE[D0E]=XHE[D0E]+1
else
call ReleaseTimer(t)
call F5E(D0E)
endif
set t=null
endfunction
function E5O takes nothing returns nothing
local integer D0E=F4E()
local integer LZE=GetHeroStr(GetTriggerUnit(),true)
set XGE[D0E]=GetUnitAbilityLevel(GetTriggerUnit(),'A027')
set XPE[D0E]=NewTimer()
set XHE[D0E]=0
set XJE[D0E]=((XGE[D0E])+5)
set XFE[D0E]=E_O(XGE[D0E],LZE)
set XKE[D0E]=GetTriggerUnit()
set XLE[D0E]=GetSpellTargetUnit()
set XCE[D0E]=GetUnitX(XKE[D0E])
set XDE[D0E]=GetUnitY(XKE[D0E])
set XME[D0E]=O8V[GetRandomInt(1,O7V)]
call SetTimerData(((XPE[D0E])),(D0E))
call SetUnitAnimationByIndex(XKE[D0E],XME[D0E])
call TimerStart(XPE[D0E],.15,true,function E4O)
endfunction
/*function E6O takes nothing returns boolean
if GetSpellAbilityId()=='A027' then
call E5O()
endif
return false
endfunction*/
function E7O takes nothing returns nothing
/*local trigger t=CreateTrigger()
call EZO()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function E6O))
set t=null*/
call EZO()
call RegisterSpellEffectEvent('A027', function E5O)
endfunction
function E8O takes nothing returns boolean
return(GetSpellAbilityId()=='A0AX')
endfunction
function E9O takes nothing returns nothing
local real XVO=GetUnitX(GetTriggerUnit())
local real XEO=GetUnitY(GetTriggerUnit())
local unit XXO=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h007',XVO,XEO,.0)
call UnitApplyTimedLife(XXO,'BTLF',1.)
call UnitAddAbility(XXO,'A02Z')
call SetUnitAbilityLevel(XXO,'A02Z',GetUnitAbilityLevel(GetTriggerUnit(),'A0AX'))
call IssueTargetOrderById(XXO,852226,GetSpellTargetUnit())
set XXO=null
endfunction
//function XRO takes nothing returns boolean
//return(GetSpellAbilityId()=='A03H')
//endfunction
//function XIO takes nothing returns nothing
//call SetWidgetLife(GetTriggerUnit(),GetWidgetLife(GetTriggerUnit())-(GetWidgetLife(GetTriggerUnit())/5.))
//call U_E(GetTriggerUnit(),GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),200.,110.,.0,1,5+(GetUnitAbilityLevel(GetTriggerUnit(),'A03H')),.33,(4+I2R(GetUnitAbilityLevel(GetTriggerUnit(),'A03H'))),(GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)*.1),.8,false,true,true,"war3mapImported\\ChaosExplosion.mdx",ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
//endfunction
function XNO takes nothing returns boolean
return(GetSpellAbilityId()=='A0AY')
endfunction
function XBO takes nothing returns nothing
local real XVO=GetUnitX(GetTriggerUnit())
local real XEO=GetUnitY(GetTriggerUnit())
local unit XXO=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h007',XVO,XEO,.0)
call UnitApplyTimedLife(XXO,'BTLF',1.)
call UnitAddAbility(XXO,'A030')
call SetUnitAbilityLevel(XXO,'A030',GetUnitAbilityLevel(GetTriggerUnit(),'A0AY'))
call IssueTargetOrderById(XXO,852587,GetSpellTargetUnit())
set XXO=null
endfunction
function XDO takes nothing returns boolean
return(GetSpellAbilityId()=='A01L')
endfunction
function XFO takes nothing returns nothing
local real XVO=GetUnitX(GetTriggerUnit())
local real XEO=GetUnitY(GetTriggerUnit())
local unit XXO=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h007',XVO,XEO,.0)
call UnitApplyTimedLife(XXO,'BTLF',10.)
call UnitAddAbility(XXO,'A031')
call SetUnitAbilityLevel(XXO,'A031',GetUnitAbilityLevel(GetTriggerUnit(),'A01L'))
call IssueTargetOrderById(XXO,852119,GetSpellTargetUnit())
set XXO=null
endfunction
function XHO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A03A',GetAttacker())>0)
endfunction
function XJO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local unit u=XUE[PXE]
local integer i=XWE[PXE]
if GetUnitAbilityLevel(u,'A01J')==1 then
call SetHeroAgi(u,GetHeroAgi(u,false)+i,true)
elseif GetUnitAbilityLevel(u,'A038')==1 then
call SetHeroInt(u,GetHeroInt(u,false)+i,true)
elseif GetUnitAbilityLevel(u,'A039')==1 then
call SetHeroStr(u,GetHeroStr(u,false)+i,true)
endif
call ReleaseTimer(GetExpiredTimer())
call F3E(PXE)
set t=null
set u=null
endfunction
function XKO takes nothing returns nothing
local unit u=GetAttacker()
local timer t
local integer i=GetUnitAbilityLevel(u,'A03A')
local real CIE=(I2R(i)*2) +5.
local integer PXE=F2E()
set XUE[PXE]=u
set XWE[PXE]=i
if GetUnitAbilityLevel(u,'A01J')==1 then
call SetHeroAgi(u,GetHeroAgi(u,false)-i,true)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest"))
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,CIE,false,function XJO)
elseif GetUnitAbilityLevel(u,'A038')==1 then
call SetHeroInt(u,GetHeroInt(u,false)-i,true)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest"))
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,CIE,false,function XJO)
elseif GetUnitAbilityLevel(u,'A039')==1 and GetHeroStr(u,false)>=i then
call SetHeroStr(u,GetHeroStr(u,false)-i,true)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl",u,"chest"))
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,CIE,false,function XJO)
else
call F3E(PXE)
endif
set u=null
set t=null
endfunction
function XMO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if OQE[PXE]==.0 then
call DestroyEffect(OPE[PXE])
call F_E(PXE)
call ReleaseTimer(GetExpiredTimer())
else
call UnitDamageTargetEx((OLE[PXE]),(OME[PXE]),((I2R(GetUnitAbilityLevel(OLE[PXE],'A042'))*5.)*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
set OQE[PXE]=OQE[PXE]-.5
call SetTimerData(t,PXE)
call TimerStart(t,.25,false,function XMO)
endif
set t=null
endfunction
function XPO takes nothing returns boolean
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RVV))and OrderId2String(GetUnitCurrentOrder(RVV))=="stampede" then
call UnitDamageTargetEx((RVV),(GetFilterUnit()),(((I2R(GetUnitAbilityLevel(RVV,'A042'))*150.*I2R(GetUnitAbilityLevel(RVV,'A042')))*1.)+(I2R(GetUnitAbilityLevel(RVV,'A042'))*GetHeroInt(RVV,true)*2)),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
endif
return false
endfunction
function XQO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
set RVV=X0E[PXE]
if OrderId2String(GetUnitCurrentOrder(X0E[PXE]))!="stampede" or OGE[PXE]<=.0 or not UnitAlive(X0E[PXE]) then
call ReleaseTimer(GetExpiredTimer())
call DestroyEffect(OIE[PXE])
call DestroyEffect(OAE[PXE])
call DestroyEffect(ONE[PXE])
call DestroyEffect(OBE[PXE])
call DestroyEffect(OCE[PXE])
call DestroyEffect(ODE[PXE])
call DestroyEffect(OFE[PXE])
call F1E(PXE)
else
call GroupEnumUnitsInRange(O9V,X1E[PXE],X2E[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X3E[PXE],X4E[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X5E[PXE],X6E[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X7E[PXE],X8E[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X9E[PXE],OVE[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,OEE[PXE],OXE[PXE],174.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,OOE[PXE],ORE[PXE],174.,Filter(function XPO))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X1E[PXE],X2E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X3E[PXE],X4E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X5E[PXE],X6E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X7E[PXE],X8E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X9E[PXE],OVE[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",OEE[PXE],OXE[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",OOE[PXE],ORE[PXE]))
set OGE[PXE]=OGE[PXE]-.5
call SetTimerData(t,PXE)
call TimerStart(t,.5,false,function XQO)
endif
set t=null
endfunction
function XSO takes nothing returns nothing
local real CDE=GetUnitFacing(GetTriggerUnit())
local timer t=NewTimer()
local integer PXE=F0E()
set X0E[PXE]=GetTriggerUnit()
set X1E[PXE]=GetSpellTargetX()
set X2E[PXE]=GetSpellTargetY()
set OIE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",X1E[PXE],X2E[PXE])
set X3E[PXE]=X1E[PXE]+300.*Cos((CDE+90.)*bj_DEGTORAD)
set X4E[PXE]=X2E[PXE]+300.*Sin((CDE+90.)*bj_DEGTORAD)
set OAE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",X3E[PXE],X4E[PXE])
set X5E[PXE]=X1E[PXE]+600.*Cos((CDE+90.)*bj_DEGTORAD)
set X6E[PXE]=X2E[PXE]+600.*Sin((CDE+90.)*bj_DEGTORAD)
set ONE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",X5E[PXE],X6E[PXE])
set X7E[PXE]=X1E[PXE]+900.*Cos((CDE+90.)*bj_DEGTORAD)
set X8E[PXE]=X2E[PXE]+900.*Sin((CDE+90.)*bj_DEGTORAD)
set OBE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",X7E[PXE],X8E[PXE])
set X9E[PXE]=X1E[PXE]+300.*Cos((CDE-90.)*bj_DEGTORAD)
set OVE[PXE]=X2E[PXE]+300.*Sin((CDE-90.)*bj_DEGTORAD)
set OCE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",X9E[PXE],OVE[PXE])
set OEE[PXE]=X1E[PXE]+600.*Cos((CDE-90.)*bj_DEGTORAD)
set OXE[PXE]=X2E[PXE]+600.*Sin((CDE-90.)*bj_DEGTORAD)
set ODE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",OEE[PXE],OXE[PXE])
set OOE[PXE]=X1E[PXE]+900.*Cos((CDE-90.)*bj_DEGTORAD)
set ORE[PXE]=X2E[PXE]+900.*Sin((CDE-90.)*bj_DEGTORAD)
set OFE[PXE]=AddSpecialEffect("war3mapImported\\FireAura.mdx",OOE[PXE],ORE[PXE])
set OGE[PXE]=5.+GetUnitAbilityLevel(X0E[PXE],'A042')
set RVV=X0E[PXE]
call GroupEnumUnitsInRange(O9V,X1E[PXE],X2E[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X3E[PXE],X4E[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X5E[PXE],X6E[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X7E[PXE],X8E[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,X9E[PXE],OVE[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,OEE[PXE],OXE[PXE],150.,Filter(function XPO))
call GroupEnumUnitsInRange(O9V,OOE[PXE],ORE[PXE],150.,Filter(function XPO))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X1E[PXE],X2E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X3E[PXE],X4E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X5E[PXE],X6E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X7E[PXE],X8E[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",X9E[PXE],OVE[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",OEE[PXE],OXE[PXE]))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl",OOE[PXE],ORE[PXE]))
call SetTimerData(t,PXE)
call TimerStart(t,.5,false,function XQO)
set t=null
endfunction
/*function XTO takes nothing returns boolean
if GetSpellAbilityId()=='A042' then
call XSO()
endif
return false
endfunction*/
function XUO takes nothing returns nothing
set VT[1]='nspb'
set VT[2]='nanc'
set VT[3]='njga'
set VT[4]='nfrg'
set VT[5]='nfre'
set VT[6]='nhar'
set VT[7]='nhrh'
set VT[8]='nltl'
set VT[9]='nlds'
set VT[10]='nlsn'
set VT[11]='nomg'
set VT[12]='nogm'
set VT[13]='nrzb'
set VT[14]='ntrs'
set VT[15]='nssp'
set ET[1]='nsqa'
set ET[2]='nowk'
set ET[3]='nsbm'
set ET[4]='nmdr'
set ET[5]='nwld'
set ET[6]='ntrd'
set ET[7]='njgb'
set ET[8]='nfra'
set ET[9]='nhrq'
set ET[10]='nmgr'
set ET[11]='nmgw'
set ET[12]='nlkl'
set ET[13]='nogl'
set ET[14]='nano'
set ET[15]='nsll'
set ET[16]='nsc3'
endfunction
function XYO takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=GetRandomInt(1,15)
local real x=GetUnitX(u)+150.*Cos(GetUnitFacing(u)*bj_DEGTORAD)
local real y=GetUnitY(u)+150.*Sin(GetUnitFacing(u)*bj_DEGTORAD)
local unit s1=null
local unit s2=null
local unit s3=null
local unit s4=null
local integer li=0
local integer hp=(PC*PC)/3
local integer SVE=PC
local integer XZO=GetUnitAbilityLevel(u,'A05B')*5
local integer X_O=GetUnitAbilityLevel(u,'A054')*2
local integer X0O
local integer X1O=0
local integer hpleft
local integer dmgleft
local integer hp2
local integer SVE2
local integer XZO2
local integer X_O2
local real X2O=15.+(30.*GetUnitAbilityLevel(u,'A04Y'))+(I2R(PC)/2.)
set s1=CreateUnit(GetOwningPlayer(u),VT[i],x,y,GetUnitFacing(u))
if PC>30 then
set SVE=PC*(PC/5)
set hp=R2I((PC*PC)/1.5)
endif
if LWMON and not GAMEM then
set SVE=(GetHeroLevel(u)*3/2)
set hp=(GetHeroLevel(u)*GetHeroLevel(u)/9)
endif
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s1, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s1, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s1, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s1, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s1, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s1, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s1, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s1, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s1, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s1, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s1, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s1, 'I022')
set li=li + 1
endloop
endif
set li=0
if i==1 or i==15 then
if GetRandomInt(1,2)==1 then
set s2=CreateUnit(GetOwningPlayer(u),VT[1],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
else
set s2=CreateUnit(GetOwningPlayer(u),VT[15],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
endif
if i==6 or i==7 then
if GetRandomInt(1,2)==1 then
set s2=CreateUnit(GetOwningPlayer(u),VT[6],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
else
set s2=CreateUnit(GetOwningPlayer(u),VT[7],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
endif
if i==2 then
set s2=CreateUnit(GetOwningPlayer(u),VT[2],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
if i==13 then
set s2=CreateUnit(GetOwningPlayer(u),VT[13],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
if GetUnitAbilityLevel(u,'B01D')==1 then
if i==1 or i==2 or i==6 or i==7 or i==13 or i==15 then
set s3=CreateUnit(GetOwningPlayer(u),VT[i],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s3, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s3, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s3, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s3, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s3, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s3, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s3, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s3, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s3, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s3, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s3, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s3, 'I022')
set li=li + 1
endloop
endif
set li=0
if i==2 or i==13 then
set s4=CreateUnit(GetOwningPlayer(u),VT[i],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
if i==1 or i==15 then
if GetRandomInt(1,2)==1 then
set X0O=1
else
set X0O=15
endif
set s4=CreateUnit(GetOwningPlayer(u),VT[X0O],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
if i==6 or i==7 then
if GetRandomInt(1,2)==1 then
set X0O=6
else
set X0O=7
endif
set s4=CreateUnit(GetOwningPlayer(u),VT[X1O],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s4, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s4, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s4, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s4, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s4, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s4, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
else
set s3=CreateUnit(GetOwningPlayer(u),VT[i],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s3, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s3, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s3, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s3, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s3, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s3, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s3, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s3, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s3, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s3, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s3, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s3, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
endif
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",s1,"origin"))
call UnitApplyTimedLife(s1,'BTLF',X2O)
if s2!=null then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",s2,"origin"))
call UnitApplyTimedLife(s2,'BTLF',X2O)
endif
if s3!=null then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",s3,"origin"))
call UnitApplyTimedLife(s3,'BTLF',X2O)
endif
if s4!=null then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Earthshock.mdx",s4,"origin"))
call UnitApplyTimedLife(s4,'BTLF',X2O)
endif
if GetUnitAbilityLevel(u,'B01D')==1 then
call UnitRemoveAbility(u,'B01D')
endif
set u=null
set s1=null
set s2=null
set s3=null
set s4=null
endfunction
/*function X3O takes nothing returns boolean
if GetSpellAbilityId()=='A04W' then
call XYO()
endif
return false
endfunction*/
function X4O takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=GetRandomInt(1,16)
local real x=GetUnitX(u)+150.*Cos(GetUnitFacing(u)*bj_DEGTORAD)
local real y=GetUnitY(u)+150.*Sin(GetUnitFacing(u)*bj_DEGTORAD)
local unit s1=null
local unit s2=null
local unit s3=null
local unit s4=null
local integer li=0
local integer hp=R2I((PC*PC)/1.5)
local integer SVE=PC*2
local integer XZO=GetUnitAbilityLevel(u,'A05B')*10
local integer X_O=GetUnitAbilityLevel(u,'A054')*3
local integer X0O
local integer X1O
local integer hpleft
local integer dmgleft
local integer hp2
local integer SVE2
local integer XZO2
local integer X_O2
local real X2O=15.+(40.*GetUnitAbilityLevel(u,'A04Y'))+I2R(PC)
if PC>=30 then
set SVE=PC*(PC/3)
set hp=(PC*PC)
endif
if LWMON and not GAMEM then
set SVE=(GetHeroLevel(u))
set hp=(GetHeroLevel(u)*GetHeroLevel(u)/5)
endif
set s1=CreateUnit(GetOwningPlayer(u),ET[i],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s1, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s1, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s1, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s1, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s1, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s1, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s1, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s1, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s1, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s1, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s1, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s1, 'I022')
set li=li + 1
endloop
endif
set li=0
if GetUnitAbilityLevel(u,'B01D')==1 then
set s2=CreateUnit(GetOwningPlayer(u),ET[i],x,y,GetUnitFacing(u))
if hp >= 200 then
set hpleft=ModuloInteger(hp,100)
set hp2 = hp/100
loop
exitwhen li > hp2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > hp
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if SVE >= 30 then
set dmgleft= ModuloInteger(SVE,10)
set SVE2 = SVE/10
loop
exitwhen li > SVE2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > SVE
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li = 0
if XZO >= 200 then
set hpleft=ModuloInteger(XZO,100)
set XZO2 = XZO/100
loop
exitwhen li > XZO2
call UnitAddItemById(s2, 'I02Q')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> hpleft
call UnitAddItemById(s2, 'I021')
set li=li+1
endloop
else
loop
exitwhen li > XZO
call UnitAddItemById(s2, 'I021')
set li=li + 1
endloop
endif
set li=0
if X_O >= 30 then
set dmgleft= ModuloInteger(X_O,10)
set X_O2 = X_O/10
loop
exitwhen li > X_O2
call UnitAddItemById(s2, 'I02P')
set li=li + 1
endloop
set li = 0
loop
exitwhen li> dmgleft
call UnitAddItemById(s2, 'I022')
set li=li+1
endloop
else
loop
exitwhen li > X_O
call UnitAddItemById(s2, 'I022')
set li=li + 1
endloop
endif
set li=0
endif
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\s_Nature'sBloom Effect.mdx",s1,"origin"))
call UnitApplyTimedLife(s1,'BTLF',X2O)
if s2!=null then
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\s_Nature'sBloom Effect.mdx",s2,"origin"))
call UnitApplyTimedLife(s2,'BTLF',X2O)
endif
if GetUnitAbilityLevel(u,'B01D')==1 then
call UnitRemoveAbility(u,'B01D')
endif
set u=null
set s1=null
set s2=null
endfunction
/*function X5O takes nothing returns boolean
if GetSpellAbilityId()=='A04X' then
call X4O()
endif
return false
endfunction*/
function X6O takes nothing returns boolean
return(GetSpellAbilityId()=='A05N')
endfunction
function X7O takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A05M')
call SetUnitAbilityLevelSwapped('A05M',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A05N',GetTriggerUnit()))
call UnitAddAbility(bj_lastCreatedUnit,'A05O')
call SetUnitAbilityLevelSwapped('A05O',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A05N',GetTriggerUnit()))
call UnitApplyTimedLifeBJ(30.,'BTLF',bj_lastCreatedUnit)
endfunction
function X9O takes nothing returns boolean
return(GetSpellAbilityId()=='A09M')
endfunction
function OVO takes nothing returns nothing
call ModifyHeroStat(1,GetTriggerUnit(),0,(3*GetUnitAbilityLevelSwapped('A09M',GetTriggerUnit())))
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"war3mapImported\\DarkForce.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function OXO takes nothing returns boolean
return(GetSpellAbilityId()=='A09K')
endfunction
function OOO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A09N',GetTriggerUnit())==1)
endfunction
function ORO takes nothing returns nothing
if(OOO())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Shadow Blend is already active.")
endif
endfunction
function OAO takes nothing returns boolean
local real x1=GetUnitX(RXV)
local real y1=GetUnitY(RXV)
local real x2=GetUnitX(GetFilterUnit())
local real y2=GetUnitY(GetFilterUnit())
local real SVE=I2R(GetHeroStr(RXV,true))*I2R((GetUnitAbilityLevel(RXV,'A0FD')))*3+(.3*O4X(RXV)*I2R((GetUnitAbilityLevel(RXV,'A0FD'))))
local unit s=CreateUnit(GetOwningPlayer(RXV),'h007',x1,y1,.0)
local real a=bj_RADTODEG*(Atan2(y2-y1,x2-x1))
local real d=300.+(10.*I2R(GetUnitAbilityLevel(RXV,'A0FD')))
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RXV))then
call M6E(GetFilterUnit(),d,1.,a,"war3mapImported\\Dust.mdx",.0,true,false)
call Y0E(s,GetFilterUnit(),SVE,ATTACK_TYPE_SIEGE,false,false)
call SEE(GetFilterUnit(),R2I(SVE))
call IssueTargetOrderById(GetFilterUnit(),851983,RXV)
endif
call UnitApplyTimedLife(s,'BTLF',1.)
set s=null
return false
endfunction
function ONO takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
set RXV=u
call GroupEnumUnitsInRange(REV,x,y,225.+(20.*I2R(GetUnitAbilityLevel(u,'A0FD'))),Filter(function OAO))
call DestroyEffect(AddSpecialEffect("war3mapImported\\Explosion.mdx",x,y))
set u=null
endfunction
/*function OBO takes nothing returns boolean
if GetSpellAbilityId()=='A0FD' then
call ONO()
endif
return false
endfunction*/
function OCO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real h
if OWE[PXE]<=0 then
call ReleaseTimer(GetExpiredTimer())
call FYE(PXE)
else
set h=((3.*OZE[PXE])*(1.+(.1*OZE[PXE]))+(GetWidgetLife(OYE[PXE])*.0007*OZE[PXE]))
if GetWidgetLife(OYE[PXE])+h>=GetUnitState(OYE[PXE],UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(OYE[PXE],GetUnitState(OYE[PXE],UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(OYE[PXE],GetWidgetLife(OYE[PXE])+h)
endif
if GetRandomInt(0,100)<=33 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl",OYE[PXE],"origin"))
endif
set OWE[PXE]=OWE[PXE]-.1
call SetTimerData(t,PXE)
call TimerStart(t,.1,false,function OCO)
endif
set t=null
endfunction
function ODO takes nothing returns nothing
local unit u=GetTriggerUnit()
local timer t=NewTimer()
local integer PXE=FWE()
set OYE[PXE]=GetSpellTargetUnit()
set OZE[PXE]=GetUnitAbilityLevel(u,'A0DF')
set OWE[PXE]=3.5+(.25*OZE[PXE])
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function OCO)
set u=null
set t=null
endfunction
/*function OFO takes nothing returns boolean
if GetSpellAbilityId()=='A0DF' then
call ODO()
endif
return false
endfunction*/
function OGO takes nothing returns nothing
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
local unit OIX=GetTriggerUnit()
local unit u=CreateUnit(GetOwningPlayer(OIX),'o016',x,y,.0)
call SetUnitAbilityLevel(u,'A049',GetUnitAbilityLevel(OIX,'A0HK'))
call SetUnitAbilityLevel(u,'S000',GetUnitAbilityLevel(OIX,'A0HK'))
call UnitApplyTimedLife(u,'BTLF',20.)
call IssueImmediateOrderById(u,852177)
set OIX=null
set u=null
endfunction
/*function OHO takes nothing returns boolean
if GetSpellAbilityId()=='A0HK' then
call OGO()
endif
return false
endfunction*/
function OJO takes nothing returns boolean
local unit u
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RRV))then
set u=CreateUnit(GetOwningPlayer(RRV),'h007',GetUnitX(RRV),GetUnitY(RRV),.0)
call UnitAddAbility(u,'A01N')
call SetUnitAbilityLevel(u,'A01N',GetUnitAbilityLevel(RRV,'A0BX'))
call IssueTargetOrderById(u,852189,GetFilterUnit())
call UnitApplyTimedLife(u,'BTLF',1.)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",GetFilterUnit(),"origin"))
endif
set u=null
return false
endfunction
function OKO takes nothing returns nothing
local real U1E=145+(55*GetUnitAbilityLevel(GetTriggerUnit(),'A0BX'))
local real x=GetSpellTargetX()
local real y=GetSpellTargetY()
set RRV=GetTriggerUnit()
call GroupEnumUnitsInRange(ROV,x,y,U1E,Filter(function OJO))
endfunction
/*function OLO takes nothing returns boolean
if GetSpellAbilityId()=='A0BX' then
call OKO()
endif
return false
endfunction*/
function OMO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real maxhp = GetUnitState(O2E[PXE],UNIT_STATE_MAX_LIFE)
local location IHX=GetUnitLoc(O2E[PXE])
local location IJX=GetUnitLoc(O3E[PXE])
if O4E[PXE]==0 or UnitAlive(O3E[PXE])==false then
call FUE(PXE)
call ReleaseTimer(GetExpiredTimer())
else
call Y0E(O2E[PXE],O3E[PXE],O5E[PXE],ATTACK_TYPE_HERO,false,false)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Bleeding.mdx",O3E[PXE],"chest"))
if DistanceBetweenPoints(IJX,IHX)<=180. then
if GetWidgetLife(O2E[PXE]) + O5E[PXE] >= maxhp then
call SetWidgetLife(O2E[PXE], maxhp)
else
call SetWidgetLife(O2E[PXE],GetWidgetLife(O2E[PXE])+(O5E[PXE]))
endif
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\VampiricAuraTarget.mdx",O2E[PXE],"origin"))
endif
set O4E[PXE]=O4E[PXE]-.5
call SetTimerData(t,PXE)
call TimerStart(t,.5,false,function OMO)
endif
call RemoveLocation(IHX)
call RemoveLocation(IJX)
set IHX=null
set IJX=null
set t=null
endfunction
function OPO takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit EXX=GetEventDamageSource()
local location IHX=GetUnitLoc(EXX)
local location CJE=CNE(IHX,140.,GetUnitFacing(EXX))
local real CIE=I2R(GetUnitAbilityLevel(u,'A00Y'))
local real OQO=(GetEventDamage()*CIE*.2*.1)+(GetHeroAgi(u,true)*CIE*.25)
local timer t
local integer PXE=FTE()
set O2E[PXE]=u
set O3E[PXE]=EXX
set O5E[PXE]=OQO
set O4E[PXE]=5.
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\MirrorImage\\MirrorImageCaster.mdl",u,"origin"))
call SAE('h00O',GetLocationX(CJE),GetLocationY(CJE),(GetUnitFacing(EXX)-180.),1.134,"attack two",1.)
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,1.,false,function OMO)
call RemoveLocation(IHX)
call RemoveLocation(CJE)
set u=null
set EXX=null
set t=null
set CJE=null
set IHX=null
endfunction
function OTO takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'A00Y')!=0 and GetRandomInt(1,100)<=(GetUnitAbilityLevel(GetTriggerUnit(),'A00Y')*3)and GetTriggerUnit()!=GetEventDamageSource()and IsUnitEnemy(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit()))and(CI[NI])and IsUnitType(GetEventDamageSource(),UNIT_TYPE_MELEE_ATTACKER)then
call OPO()
endif
return false
endfunction
function OUO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='u002')
endfunction
function OWO takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A03G',GetTriggerUnit(),GetUnitAbilityLevelSwapped('A03E',LC[(1+GetPlayerId(GetTriggerPlayer()))]))
endfunction
function OZO takes nothing returns boolean
return(GetSpellAbilityId()=='A03L')
endfunction
function O_O takes nothing returns nothing
set AQ=GetUnitLoc(GetTriggerUnit())
set NQ=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetSpellAbilityUnit()),AQ,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0DL')
call SetUnitAbilityLevelSwapped('A0DL',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call UnitApplyTimedLifeBJ(22.,'BTLF',bj_lastCreatedUnit)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852473,NQ)
call RemoveLocation(AQ)
call RemoveLocation(NQ)
endfunction
function O1O takes nothing returns boolean
local unit u
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RAV))then
set u=CreateUnit(GetOwningPlayer(RAV),'h007',GetUnitX(RAV),GetUnitY(RAV),.0)
call UnitAddAbility(u,'A00S')
call SetUnitAbilityLevel(u,'A00S',GetUnitAbilityLevel(RAV,'A03B'))
call IssueTargetOrderById(u,852095,GetFilterUnit())
call UnitApplyTimedLife(u,'BTLF',1.)
endif
set u=null
return false
endfunction
function O2O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real ux=GetUnitX(RVE[PXE])
local real uy=GetUnitY(RVE[PXE])
local unit u
local real D_X=GetRandomReal(.5,5.-(I2R(GetUnitAbilityLevel(O9E[PXE],'A03B'))*.3))
if REE[PXE]==0 or UnitAlive(O9E[PXE])==false then
call DestroyEffect(RXE[PXE])
call FSE(PXE)
call ReleaseTimer(GetExpiredTimer())
else
set RAV=O9E[PXE]
call GroupEnumUnitsInRange(RIV,ux,uy,250.,Filter(function O1O))
call DestroyEffect(AddSpecialEffect("war3mapImported\\EarthDetonation.mdx",ux,uy))
set REE[PXE]=REE[PXE]-1
call SetTimerData(t,PXE)
call TimerStart(t,D_X,false,function O2O)
endif
set t=null
set u=null
endfunction
function O3O takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit EXX=GetSpellTargetUnit()
local integer ELO=GetUnitAbilityLevel(u,'A03B')
local real O4O=GetRandomReal(.5,5.-(I2R(ELO)*.3))
local timer t
local integer PXE=FQE()
set O9E[PXE]=u
set RVE[PXE]=EXX
set REE[PXE]=2+ELO
set RXE[PXE]=AddSpecialEffectTarget("war3mapImported\\HolyBlessing.mdx",EXX,"origin")
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,O4O,false,function O2O)
set u=null
set EXX=null
set t=null
endfunction
/*function O5O takes nothing returns boolean
if GetSpellAbilityId()=='A03B' then
call O3O()
endif
return false
endfunction*/
function O6O takes nothing returns boolean
return(GetSpellAbilityId()=='A01I')
endfunction
function O7O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call UnitRemoveAbility(RAE[PXE],'A03A')
call UnitRemoveAbility(RNE[PXE],'A03A')
call DestroyEffect(RBE[PXE])
call DestroyEffect(RCE[PXE])
call ReleaseTimer(GetExpiredTimer())
call FPE(PXE)
set t=null
endfunction
function O8O takes nothing returns nothing
local unit EXX=GetSpellTargetUnit()
local unit U0E=GetTriggerUnit()
local real X2O=I2R(GetUnitAbilityLevel(U0E,'A01I'))+10.
local integer ELO=GetUnitAbilityLevel(U0E,'A01I')
local timer t
local integer PXE=FME()
set RAE[PXE]=U0E
set RNE[PXE]=EXX
set RBE[PXE]=AddSpecialEffectTarget("war3mapImported\\Duel.mdx",U0E,"overhead")
set RCE[PXE]=AddSpecialEffectTarget("war3mapImported\\Duel.mdx",EXX,"overhead")
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ANsa\\ANsaTarget.mdl",U0E,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\ANsa\\ANsaTarget.mdl",U0E,"origin"))
call UnitAddAbility(U0E,'A03A')
call UnitAddAbility(EXX,'A03A')
call SetUnitAbilityLevel(U0E,'A03A',ELO)
call SetUnitAbilityLevel(EXX,'A03A',ELO)
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,X2O,false,function O7O)
set EXX=null
set U0E=null
set t=null
endfunction
function RVO takes nothing returns boolean
return GetSpellAbilityId()=='A01N'
endfunction
function REO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call SetUnitVertexColor(RHE[PXE],255,255,255,255)
call UnitRemoveAbility(RHE[PXE],'A023')
call FLE(PXE)
call ReleaseTimer(GetExpiredTimer())
set t=null
endfunction
function RXO takes nothing returns nothing
local unit u=GetSpellTargetUnit()
local real X2O=GetUnitAbilityLevel(GetTriggerUnit(),'A01N')+20.
local timer t
local integer PXE=FKE()
set RHE[PXE]=u
call SetUnitVertexColor(u,65,130,65,160)
call UnitAddAbility(u,'A023')
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,X2O,false,function REO)
set u=null
set t=null
endfunction
function RRO takes nothing returns boolean
return(GetUnitTypeId(GetSummonedUnit())=='o00C')
endfunction
function RIO takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A045',GetSummonedUnit(),GetUnitAbilityLevelSwapped('A0CD',GetSummoningUnit()))
endfunction
function RNO takes nothing returns boolean
return GetSpellAbilityId()=='A036'
endfunction
function RBO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if RME[PXE]==0 then
call ReleaseTimer(GetExpiredTimer())
call FJE(PXE)
call DestroyEffect(RQE[PXE])
else
call SetWidgetLife(RPE[PXE],(GetWidgetLife(RPE[PXE])+((.04+(.01*I2R(GetUnitAbilityLevel(RPE[PXE],'A036'))))*GetHeroStr(RPE[PXE],true))))
set RME[PXE]=RME[PXE]-1
call SetTimerData(t,PXE)
call TimerStart(t,.1,false,function RBO)
endif
set t=null
endfunction
function RCO takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=(15+GetUnitAbilityLevel(u,'A036'))*10
local timer t
local integer PXE=FHE()
set RME[PXE]=i
set RPE[PXE]=u
set RQE[PXE]=AddSpecialEffectTarget("war3mapImported\\DevilAura.mdx",u,"origin")
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,.1,false,function RBO)
set u=null
set t=null
endfunction
function RFO takes nothing returns boolean
return(GetSpellAbilityId()=='A032')
endfunction
function RGO takes nothing returns boolean
return(JM[1]==0)
endfunction
function RHO takes nothing returns boolean
return(IsUnitInGroup(SM[JM[2]],TM)==false)and(IsUnitInGroup(QM[JM[2]],TM)==false)
endfunction
function RJO takes nothing returns nothing
if(RGO())then
call EnableTrigger(S3)
endif
set JM[1]=(JM[1]+1)
set JM[2]=(JM[2]+1)
set KM[JM[2]]=true
set LM[JM[2]]=1000.
set MM[JM[2]]=45.
set PM[JM[2]]=7.
set QM[JM[2]]=GetTriggerUnit()
set SM[JM[2]]=GetSpellTargetUnit()
if TM==null then
set TM=CreateGroup()
endif
if(RHO())then
call GroupAddUnit(TM,QM[JM[2]])
call GroupAddUnit(TM,SM[JM[2]])
call UnitAddAbility(QM[JM[2]],'A033')
call UnitAddAbility(SM[JM[2]],'A033')
endif
call AddSpecialEffectTargetUnitBJ("weapon",GetTriggerUnit(),"Abilities\\Weapons\\IllidanMissile\\IllidanMissile.mdl")
set UM[JM[2]]=bj_lastCreatedEffect
call AddSpecialEffectTargetUnitBJ("weapon",GetTriggerUnit(),"Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl")
set WM[JM[2]]=bj_lastCreatedEffect
call AddSpecialEffectTargetUnitBJ("weapon",GetSpellTargetUnit(),"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl")
set YM[JM[2]]=bj_lastCreatedEffect
call AddSpecialEffectTargetUnitBJ("weapon",GetSpellTargetUnit(),"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl")
set ZM[JM[2]]=bj_lastCreatedEffect
set VP[JM[2]]=GetUnitLoc(QM[JM[2]])
set EP[JM[2]]=GetUnitLoc(SM[JM[2]])
set XP[JM[2]]=GetLocationX(VP[JM[2]])
set OP[JM[2]]=GetLocationY(VP[JM[2]])
set RP[JM[2]]=GetLocationX(EP[JM[2]])
set IP[JM[2]]=GetLocationY(EP[JM[2]])
set HM[JM[2]]=Location(((XP[JM[2]]+RP[JM[2]])/2.),((OP[JM[2]]+IP[JM[2]])/2.))
call CreateNUnitsAtLoc(1,'h00G',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],150.)
set AP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00G',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],270.)
set NP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00G',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],30.)
set BP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00H',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],210.)
set CP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00H',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],330.)
set DP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00H',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],90.)
set FP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00I',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],210.)
set GP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00I',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],330.)
set HP[JM[2]]=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'h00I',GetOwningPlayer(GetTriggerUnit()),HM[JM[2]],90.)
set JP[JM[2]]=bj_lastCreatedUnit
call RemoveLocation(VP[JM[2]])
call RemoveLocation(EP[JM[2]])
call RemoveLocation(HM[JM[2]])
endfunction
function RLO takes nothing returns boolean
return(LP[JM[3]]>=360.)
endfunction
function RMO takes nothing returns boolean
return(MP[JM[3]]>4)
endfunction
function RPO takes nothing returns boolean
return(IsUnitInGroup(QM[JM[3]],TM)==false)and(IsUnitInGroup(SM[JM[3]],TM)==false)
endfunction
function RQO takes nothing returns boolean
return(PP[JM[3]]<=0)
endfunction
function RSO takes nothing returns boolean
return(KP[JM[3]]>=1.98)
endfunction
function RTO takes nothing returns boolean
return(JM[1]==0)
endfunction
function RUO takes nothing returns boolean
return(DistanceBetweenPoints(VP[JM[3]],EP[JM[3]])>LM[JM[3]])or(KP[JM[3]]>=MM[JM[3]])or(IsUnitDeadBJ(QM[JM[3]]))or(IsUnitDeadBJ(SM[JM[3]]))or(IsUnitPaused(QM[JM[3]]))or(IsUnitPaused(SM[JM[3]]))or(SM[JM[3]]==null)or(QM[JM[3]]==null)
endfunction
function RWO takes nothing returns boolean
return(RUO())
endfunction
function RYO takes nothing returns boolean
return(KM[JM[3]])
endfunction
function RZO takes nothing returns nothing
set JM[3]=1
loop
exitwhen JM[3]>JM[2]
if(RYO())then
set KP[JM[3]]=(KP[JM[3]]+.03)
set LP[JM[3]]=(LP[JM[3]]+PM[JM[3]])
if(RLO())then
set LP[JM[3]]=.0
endif
set VP[JM[3]]=GetUnitLoc(QM[JM[3]])
set EP[JM[3]]=GetUnitLoc(SM[JM[3]])
set MP[JM[3]]=(R2I(LM[JM[3]])/R2I(DistanceBetweenPoints(VP[JM[3]],EP[JM[3]])))
if(RMO())then
set MP[JM[3]]=4
endif
if(RPO())then
call GroupAddUnit(TM,QM[JM[3]])
call GroupAddUnit(TM,SM[JM[3]])
call UnitAddAbility(QM[JM[3]],'A033')
call UnitAddAbility(SM[JM[3]],'A033')
endif
set PP[JM[3]]=(MP[JM[3]]+((GetUnitAbilityLevelSwapped('A032',QM[JM[3]])-3)*4))
if(RQO())then
set PP[JM[3]]=1
endif
if GetUnitAbilityLevelSwapped('A032',QM[JM[3]]) == 2 then
call SetUnitAbilityLevelSwapped('A033',QM[JM[3]],41)
call SetUnitAbilityLevelSwapped('A033',SM[JM[3]],41)
else
call SetUnitAbilityLevelSwapped('A033',QM[JM[3]],PP[JM[3]])
call SetUnitAbilityLevelSwapped('A033',SM[JM[3]],PP[JM[3]])
endif
set XP[JM[3]]=GetLocationX(VP[JM[3]])
set RP[JM[3]]=GetLocationX(EP[JM[3]])
set OP[JM[3]]=GetLocationY(VP[JM[3]])
set IP[JM[3]]=GetLocationY(EP[JM[3]])
set HM[JM[3]]=Location(((XP[JM[3]]+RP[JM[3]])/2.),((OP[JM[3]]+IP[JM[3]])/2.))
if(RSO())then
set SP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+60.))
set TP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+120.))
set UP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+180.))
set WP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+240.))
set YP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+300.))
set ZP[JM[3]]=CNE(HM[JM[3]],(LM[JM[3]]/2.),(LP[JM[3]]+360.))
else
set QP[JM[3]]=(KP[JM[3]]/1.98)
set SP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+60.))
set TP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+120.))
set UP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+180.))
set WP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+240.))
set YP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+300.))
set ZP[JM[3]]=CNE(HM[JM[3]],((LM[JM[3]]/2.)*QP[JM[3]]),(LP[JM[3]]+360.))
endif
if(RWO())then
set KM[JM[3]]=false
call UnitRemoveAbility(QM[JM[3]],'A033')
call UnitRemoveAbility(SM[JM[3]],'A033')
call GroupRemoveUnit(TM,QM[JM[3]])
call GroupRemoveUnit(TM,SM[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',AP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',CP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',NP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',DP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',BP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',FP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',GP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',HP[JM[3]])
call UnitApplyTimedLifeBJ(.01,'BTLF',JP[JM[3]])
call DestroyEffect(UM[JM[3]])
call DestroyEffect(WM[JM[3]])
call DestroyEffect(YM[JM[3]])
call DestroyEffect(ZM[JM[3]])
set KP[JM[3]]=.0
set LP[JM[3]]=.0
set JM[1]=(JM[1]-1)
if(RTO())then
call DestroyGroup(TM)
set TM=null
set JM[2]=0
call DisableTrigger(GetTriggeringTrigger())
endif
else
call SetUnitPositionLocFacingBJ(AP[JM[3]],SP[JM[3]],(LP[JM[3]]+150.))
call SetUnitPositionLocFacingBJ(CP[JM[3]],TP[JM[3]],(LP[JM[3]]+210.))
call SetUnitPositionLocFacingBJ(NP[JM[3]],UP[JM[3]],(LP[JM[3]]+270.))
call SetUnitPositionLocFacingBJ(DP[JM[3]],WP[JM[3]],(LP[JM[3]]+330.))
call SetUnitPositionLocFacingBJ(BP[JM[3]],YP[JM[3]],(LP[JM[3]]+30.))
call SetUnitPositionLocFacingBJ(FP[JM[3]],ZP[JM[3]],(LP[JM[3]]+90.))
call SetUnitPositionLocFacingBJ(GP[JM[3]],TP[JM[3]],(LP[JM[3]]+210.))
call SetUnitPositionLocFacingBJ(HP[JM[3]],WP[JM[3]],(LP[JM[3]]+330.))
call SetUnitPositionLocFacingBJ(JP[JM[3]],ZP[JM[3]],(LP[JM[3]]+90.))
endif
call RemoveLocation(VP[JM[3]])
call RemoveLocation(EP[JM[3]])
call RemoveLocation(HM[JM[3]])
call RemoveLocation(SP[JM[3]])
call RemoveLocation(TP[JM[3]])
call RemoveLocation(UP[JM[3]])
call RemoveLocation(WP[JM[3]])
call RemoveLocation(YP[JM[3]])
call RemoveLocation(ZP[JM[3]])
endif
set JM[3]=JM[3]+1
endloop
endfunction
function R0O takes nothing returns boolean
return(GetSpellAbilityId()=='A02M')
endfunction
function R1O takes nothing returns boolean
return(FM[(1+GetPlayerId(GetTriggerPlayer()))]!=null)
endfunction
function R2O takes nothing returns nothing
if(R1O())then
call RemoveUnit(FM[(1+GetPlayerId(GetTriggerPlayer()))])
set FM[(1+GetPlayerId(GetTriggerPlayer()))]=null
endif
set ML=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(ML,"war3mapImported\\EagleSpirit.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'o000',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(((I2R(GetUnitAbilityLevelSwapped('A02M',GetTriggerUnit()))*5.)+10.),'BTLF',bj_lastCreatedUnit)
set FM[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call RemoveLocation(ML)
endfunction
function R4O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='o000')
endfunction
function R5O takes nothing returns nothing
set FM[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
endfunction
function R7O takes nothing returns boolean
return(FM[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]!=null)and(GetUnitTypeId(GetDyingUnit())!='o000')
endfunction
function R8O takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call SetHeroAgi(RWE[PXE],GetHeroAgi(RWE[PXE],false)-RYE[PXE],true)
call ReleaseTimer(GetExpiredTimer())
call FGE(PXE)
set t=null
endfunction
function R9O takes nothing returns nothing
local unit u=LC[(1+GetPlayerId(GetOwningPlayer(GetKillingUnit())))]
local integer i=GetUnitAbilityLevel(u,'A02M')*2
local real r=20.
local timer t
local integer PXE=FFE()
set RWE[PXE]=u
set RYE[PXE]=i
call SetWidgetLife(FM[(1+GetPlayerId(GetOwningPlayer(u)))],(GetUnitState(FM[(1+GetPlayerId(GetOwningPlayer(u)))],UNIT_STATE_LIFE)+(5.+(I2R(GetUnitAbilityLevel(u,'A02M'))/2.))))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\EvilMissileofShadowyDOOMV3.mdx",FM[(1+GetPlayerId(GetOwningPlayer(u)))],"origin"))
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\EvilMissileofShadowyDOOMV3.mdx",u,"origin"))
call SetHeroAgi(u,GetHeroAgi(u,false)+i,true)
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,r,false,function R8O)
set u=null
set t=null
endfunction
function IEO takes nothing returns boolean
return(GetSpellAbilityId()=='A02L')
endfunction
function IXO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local location l=Location(R2E[PXE],R3E[PXE])
local location l2=CNE(l,(275.+((I2R(GetUnitAbilityLevel(R1E[PXE],'A02L')))*5.)),R5E[PXE])
local unit u
local unit u2
if R4E[PXE]==0 then
call ReleaseTimer(t)
call FDE(PXE)
else
call CreateNUnitsAtLocFacingLocBJ(1,'h004',GetOwningPlayer(R1E[PXE]),l2,l)
set u=bj_lastCreatedUnit
call DestroyEffect(AddSpecialEffectLoc("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",l2))
call UnitAddAbility(u,'A02K')
call SetUnitAbilityLevel(u,'A02K',GetUnitAbilityLevel(R1E[PXE],'A02L'))
call IssueImmediateOrderById(u,852177)
call SetTerrainPathable(GetUnitX(u),GetUnitY(u),PATHING_TYPE_WALKABILITY,false)
call UnitApplyTimedLife(u,'BTLF',(6.+(2.*I2R(GetUnitAbilityLevel(R1E[PXE],'A02L')))))
set u2=CreateUnitAtLoc(GetOwningPlayer(R1E[PXE]),'h00N',l2,.0)
call UnitApplyTimedLife(u2,'BTLF',(6.+(2.*I2R(GetUnitAbilityLevel(R1E[PXE],'A02L')))))
set R4E[PXE]=(R4E[PXE]-1)
set R5E[PXE]=(R5E[PXE]+10.)
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function IXO)
endif
call RemoveLocation(l)
call RemoveLocation(l2)
set t=null
set l=null
set l2=null
set u=null
set u2=null
endfunction
function IOO takes nothing returns nothing
local unit u=GetSpellAbilityUnit()
local unit S8X=GetSpellTargetUnit()
local location l=GetSpellTargetLoc()
local integer PXE=FCE()
local timer t=NewTimer()
set R1E[PXE]=u
set R2E[PXE]=GetUnitX(S8X)
set R3E[PXE]=GetUnitY(S8X)
set R4E[PXE]=36
set R5E[PXE]=(GetUnitFacing(S8X)+140.)
call SetTimerData(t,PXE)
call TimerStart(t,.04,false,function IXO)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl",S8X,"origin"))
call RemoveLocation(l)
set u=null
set t=null
set l=null
set t=null
endfunction
function IIO takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='h004')
endfunction
function IAO takes nothing returns nothing
set DM=GetUnitLoc(GetDyingUnit())
call SetTerrainPathableBJ(DM,PATHING_TYPE_WALKABILITY,true)
call RemoveLocation(DM)
endfunction
function IBO takes nothing returns boolean
return(GetSpellAbilityId()=='A01G')
endfunction
function ICO takes nothing returns boolean
return(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==null)
endfunction
function IDO takes nothing returns boolean
return(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]!=null)
endfunction
function IFO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==1)
endfunction
function IGO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==2)
endfunction
function IHO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==3)
endfunction
function IJO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==4)
endfunction
function IKO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==5)
endfunction
function ILO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==6)
endfunction
function IMO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==7)
endfunction
function IPO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==8)
endfunction
function IQO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==9)
endfunction
function ISO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())==10)
endfunction
function ITO takes nothing returns nothing
if(ICO())then
return
call Q_E(GetOwningPlayer(GetTriggerUnit()),"No Spatial Rend to summon Terror from")
endif
if(IDO())then
call KillUnit(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
endif
set ML=GetUnitLoc(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call AddSpecialEffectLocBJ(ML,"war3mapImported\\DarkLightning.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(ML,"war3mapImported\\DarkLightningNova.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(ML,"war3mapImported\\Portal.mdx")
call DestroyEffect(bj_lastCreatedEffect)
if(IFO())then
call CreateNUnitsAtLoc(1,'n009',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IGO())then
call CreateNUnitsAtLoc(1,'n000',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IHO())then
call CreateNUnitsAtLoc(1,'n001',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IJO())then
call CreateNUnitsAtLoc(1,'n002',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IKO())then
call CreateNUnitsAtLoc(1,'n003',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(ILO())then
call CreateNUnitsAtLoc(1,'n004',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IMO())then
call CreateNUnitsAtLoc(1,'n005',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IPO())then
call CreateNUnitsAtLoc(1,'n006',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(IQO())then
call CreateNUnitsAtLoc(1,'n007',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
if(ISO())then
call CreateNUnitsAtLoc(1,'n00B',GetOwningPlayer(GetTriggerUnit()),ML,bj_UNIT_FACING)
endif
set PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
call RemoveLocation(ML)
call IssueTargetOrderById(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],852179,PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call PauseUnit(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
call SetUnitVertexColorBJ(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],20.,.0,20.,50.)
set TT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
endfunction
function IWO takes nothing returns boolean
return(GetSpellAbilityId()=='A00P')
endfunction
function IYO takes nothing returns boolean
return(IsUnitGroupEmptyBJ(NM))
endfunction
function IZO takes nothing returns nothing
set XM=GetTriggerUnit()
set OM=GetSpellTargetUnit()
set RM[1]=GetUnitLoc(XM)
set RM[2]=GetUnitLoc(GetSpellTargetUnit())
set IM[1]=(21+(3*GetUnitAbilityLevelSwapped('A00P',XM)))
set AM[1]=30.
set AM[2]=(100.+(300.*I2R(GetUnitAbilityLevelSwapped('A00P',XM))))
set AM[3]=GetLocationX(RM[1])
set AM[4]=GetLocationY(RM[1])
set AM[5]=GetLocationZ(RM[1])
call ShowUnitHide(XM)
call SetUnitInvulnerable(XM,true)
call SetUnitPathing(XM,false)
call AddSpecialEffectLocBJ(RM[1],"war3mapImported\\Lightning Slam.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'h002',GetOwningPlayer(XM),RM[1],AngleBetweenPoints(RM[1],RM[2]))
call SetUnitPathing(bj_lastCreatedUnit,false)
call SaveUnitHandleBJ(OM,0,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveUnitHandleBJ(XM,1,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveRealBJ(AM[1],2,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveRealBJ(AM[2],3,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveRealBJ(AM[3],4,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveRealBJ(AM[4],5,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveRealBJ(AM[5],6,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call AddLightningLoc("FORK",RM[1],RM[1])
call SaveLightningHandleBJ(bj_lastCreatedLightning,7,GetHandleIdBJ(bj_lastCreatedUnit),FF)
call SaveIntegerBJ(IM[1],8,GetHandleIdBJ(bj_lastCreatedUnit),FF)
if(IYO())then
call EnableTrigger(X4)
endif
call GroupAddUnit(NM,bj_lastCreatedUnit)
call RemoveLocation(RM[1])
call RemoveLocation(RM[2])
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003001001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!=true)!=null
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003001002 takes nothing returns boolean
return(GetFilterUnit()!=OM)
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003001 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!=true),(GetFilterUnit()!=OM)))!=null
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)!=true)!=null
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)!=true)!=null
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002001 takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())!=true)
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM)))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002001 takes nothing returns boolean
return(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM)))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='n00L')
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='n00M')
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='n00U')
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002002002002 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='n017')
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))))))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))))))))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))))))))))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002002 takes nothing returns boolean
return GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())!=true),(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017'))))))))))))
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)!=true),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())!=true),(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017')))))))))))))))!=null
endfunction
function Trig_Ball_Lightning_Slide_Func001Func019Func019Func023002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)!=true),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)!=true),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())!=true),(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017')))))))))))))))))!=null
endfunction
function I0O takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!=true),(GetFilterUnit()!=OM))),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)!=true),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)!=true),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())!=true),(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((IsUnitVisible(GetFilterUnit(),GetOwningPlayer(XM))),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00L'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00M'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='n00U'),(GetUnitTypeId(GetFilterUnit())!='n017')))))))))))))))))))!=null
endfunction
function I1O takes nothing returns nothing
set OM=GetEnumUnit()
endfunction
function I2O takes nothing returns boolean
return(IsUnitGroupEmptyBJ(CM)!=true)
endfunction
function I3O takes nothing returns boolean
return(IM[1]>0)
endfunction
function I4O takes nothing returns boolean
return(DistanceBetweenPoints(RM[1],RM[2])>=100.)
endfunction
function I5O takes nothing returns nothing
set OM=LoadUnitHandleBJ(0,GetHandleIdBJ(GetEnumUnit()),FF)
set XM=LoadUnitHandleBJ(1,GetHandleIdBJ(GetEnumUnit()),FF)
set RM[1]=GetUnitLoc(GetEnumUnit())
set RM[2]=GetUnitLoc(OM)
set RM[3]=CNE(RM[1],AM[1],AngleBetweenPoints(RM[1],RM[2]))
set AM[1]=LoadRealBJ(2,GetHandleIdBJ(GetEnumUnit()),FF)
set AM[2]=LoadRealBJ(3,GetHandleIdBJ(GetEnumUnit()),FF)
set AM[3]=LoadRealBJ(4,GetHandleIdBJ(GetEnumUnit()),FF)
set AM[4]=LoadRealBJ(5,GetHandleIdBJ(GetEnumUnit()),FF)
set AM[5]=LoadRealBJ(6,GetHandleIdBJ(GetEnumUnit()),FF)
set AM[6]=GetLocationZ(RM[1])+40.
set BM=LoadLightningHandleBJ(7,GetHandleIdBJ(GetEnumUnit()),FF)
if(I4O())then
call SetUnitPositionLocFacingBJ(GetEnumUnit(),RM[3],AngleBetweenPoints(RM[1],RM[2]))
call MoveLightningEx(BM,true,AM[3],AM[4],AM[5],GetLocationX(RM[1]),GetLocationY(RM[1]),AM[6])
else
call CreateTextTagLocBJ(I2S(R2I(AM[2])),RM[1],0,10,100,100,100,0)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,2.)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64.,90)
call UnitDamageTargetEx(XM,OM,AM[2],false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call AddSpecialEffectTargetUnitBJ("origin",OM,"war3mapImported\\Lightning Slam.mdx")
call DestroyEffect(bj_lastCreatedEffect)
set IM[1]=LoadIntegerBJ(8,GetHandleIdBJ(GetEnumUnit()),FF)
set IM[1]=(IM[1]-1)
if(I3O())then
set CM=CQE(1000.,RM[1],Condition(function I0O))
if(I2O())then
set AM[1]=(AM[1]+3.)
set AM[2]=(AM[2]+(AM[2]*.22))
set AM[3]=GetLocationX(RM[1])
set AM[4]=GetLocationY(RM[1])
set AM[5]=GetLocationZ(RM[1])
call DestroyLightning(BM)
call AddLightningLoc("FORK",RM[1],RM[1])
call ForGroupBJ(C5E(1,CM),function I1O)
call SaveUnitHandleBJ(OM,0,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveRealBJ(AM[1],2,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveRealBJ(AM[2],3,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveRealBJ(AM[3],4,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveRealBJ(AM[4],5,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveRealBJ(AM[5],6,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveLightningHandleBJ(bj_lastCreatedLightning,7,GetHandleIdBJ(GetEnumUnit()),FF)
call SaveIntegerBJ(IM[1],8,GetHandleIdBJ(GetEnumUnit()),FF)
else
call DestroyLightning(BM)
call SetUnitPositionLocFacingBJ(XM,RM[1],AngleBetweenPoints(RM[1],RM[2]))
call ShowUnitShow(XM)
call SetUnitInvulnerable(XM,false)
call SetUnitPathing(XM,true)
call SelectUnitAddForPlayer(XM,GetOwningPlayer(XM))
call UnitAddItemByIdSwapped('I00K',XM)
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),FF)
call GroupRemoveUnit(NM,GetEnumUnit())
call RemoveUnit(GetEnumUnit())
endif
call DestroyGroup(CM)
else
call DestroyLightning(BM)
call SetUnitPositionLocFacingBJ(XM,RM[1],AngleBetweenPoints(RM[1],RM[2]))
call ShowUnitShow(XM)
call SetUnitInvulnerable(XM,false)
call SetUnitPathing(XM,true)
call SelectUnitAddForPlayer(XM,GetOwningPlayer(XM))
call UnitAddItemByIdSwapped('I00K',XM)
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),FF)
call GroupRemoveUnit(NM,GetEnumUnit())
call RemoveUnit(GetEnumUnit())
endif
endif
call RemoveLocation(RM[1])
call RemoveLocation(RM[2])
call RemoveLocation(RM[3])
endfunction
function I6O takes nothing returns boolean
return(IsUnitGroupEmptyBJ(NM))
endfunction
function I7O takes nothing returns nothing
call ForGroupBJ(NM,function I5O)
if(I6O())then
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function I9O takes nothing returns boolean
return(GetSpellAbilityId()=='A01Q')
endfunction
function AVO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A01P')
call SetUnitAbilityLevelSwapped('A01P',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A01Q',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852565,GetTriggerUnit())
endfunction
function AXO takes nothing returns boolean
return(GetSpellAbilityId()=='A001')
endfunction
function AOO takes nothing returns boolean
return(IsUnitAliveBJ(LC[(1+GetPlayerId(GetEnumPlayer()))]))
endfunction
function ARO takes nothing returns nothing
if(AOO())then
call SetWidgetLife(LC[(1+GetPlayerId(GetEnumPlayer()))],GetUnitState(LC[(1+GetPlayerId(GetEnumPlayer()))],UNIT_STATE_MAX_LIFE))
call SetUnitState(LC[(1+GetPlayerId(GetEnumPlayer()))],UNIT_STATE_MANA,GetUnitState(LC[(1+GetPlayerId(GetEnumPlayer()))],UNIT_STATE_MAX_MANA))
call AddSpecialEffectTargetUnitBJ("origin",LC[(1+GetPlayerId(GetEnumPlayer()))],"war3mapImported\\HolyAwakening.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endif
endfunction
function AIO takes nothing returns nothing
set BQ=C3E(GetOwningPlayer(GetTriggerUnit()))
call ForForce(BQ,function ARO)
call DestroyForce(BQ)
endfunction
function ANO takes nothing returns boolean
if IsUnitAlly(GetEventDamageSource(),GetOwningPlayer(GetTriggerUnit())) then
return false
endif
return(UnitHasBuffBJ(GetEventDamageSource(),'B04N'))
endfunction
function ABO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call SetHeroInt(R9E[PXE],GetHeroInt(R9E[PXE],false)-IVE[PXE],true)
call ReleaseTimer(GetExpiredTimer())
call FBE(PXE)
set t=null
endfunction
function ACO takes nothing returns nothing
local unit u=GetEventDamageSource()
local timer t
local real r=(I2R(GetUnitAbilityLevel(u,'A01Q'))*.5)+10.
local integer PXE=FNE()
set R9E[PXE]=u
set IVE[PXE]=GetUnitAbilityLevel(u,'A01Q')
call SetHeroInt(u,GetHeroInt(u,false)+(GetUnitAbilityLevel(u,'A01Q')),true)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\FrozenOrb.mdl",u,"chest"))
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,r,false,function ABO)
set u=null
set t=null
endfunction
function AFO takes nothing returns boolean
return(GetSpellAbilityId()=='A00E')
endfunction
function AGO takes nothing returns nothing
set BL=GetSpellTargetUnit()
set CL=GetUnitLoc(GetTriggerUnit())
set DL=40.
set FL=.0
call SYE(BL,CL,DL,FL)
endfunction
function AJO takes nothing returns boolean
return(GetLearnedSkill()=='A01G')
endfunction
function AKO takes nothing returns nothing
if GetUnitAbilityLevel(GetTriggerUnit(),'A00W') != 1 then
call UnitAddAbility(GetTriggerUnit(),'A00W')
endif
endfunction
function AMO takes nothing returns boolean
return(GetSpellAbilityId()=='A01G')
endfunction
function APO takes nothing returns boolean
return(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==null)
endfunction
function AQO takes nothing returns nothing
if(APO())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"No Spatial Rend to summon Terror from")
endif
endfunction
function AZO takes nothing returns boolean
return((GetUnitAbilityLevelSwapped('A00A',LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))])!=0)and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false)and(UnitHasBuffBJ(GetTriggerUnit(),'B02K')))!=null
endfunction
function A_O takes nothing returns nothing
call IssueTargetOrderById(VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],852149,GetTriggerUnit())
endfunction
function A1O takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B02K'))and(GetEventDamage()>=1.)and(not(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))]))
endfunction
function A2O takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(GetEventDamageSource(),GetTriggerUnit(),(GetEventDamage()*.5),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
set OK=GetUnitLoc(GetTriggerUnit())
call CreateTextTagLocBJ((I2S(R2I((GetEventDamage()*1.5)))+"!"),OK,0,10.,20.,.0,20.,0)
call RemoveLocation(OK)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
endfunction
function A4O takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B02K'))and(GetEventDamage()>=1.)and(BI[NI]==LN or BI[NI]==DAMAGE_TYPE_LIGHTNING)and(J5V[(ROX((GetUnitTypeId(GetEventDamageSource()))))])
endfunction
function A5O takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(GetEventDamageSource(),GetTriggerUnit(),(GetEventDamage()*.3),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_FORCE,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
set OK=GetUnitLoc(GetTriggerUnit())
call CreateTextTagLocBJ((I2S(R2I((GetEventDamage()*1.3)))+"!"),OK,0,10.,20.,.0,20.,0)
call RemoveLocation(OK)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
endfunction
function A7O takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B042'))and(GetUnitAbilityLevelSwapped('A00D',GetEventDamageSource())!=0)
endfunction
function Trig_Bouncy_Attack_Func003002003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function Trig_Bouncy_Attack_Func003002003002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Bouncy_Attack_Func003002003002002001 takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())==false)
endfunction
function Trig_Bouncy_Attack_Func003002003002002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function Trig_Bouncy_Attack_Func003002003002002002002 takes nothing returns boolean
return(GetFilterUnit()!=GetTriggerUnit())
endfunction
function Trig_Bouncy_Attack_Func003002003002002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))!=null
endfunction
function Trig_Bouncy_Attack_Func003002003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))!=null
endfunction
function Trig_Bouncy_Attack_Func003002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))))!=null
endfunction
function A8O takes nothing returns boolean
return(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEventDamageSource()))),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))))))!=null
endfunction
function A9O takes nothing returns nothing
call UnitRemoveAbility(GetTriggerUnit(),'B042')
set EL=GetUnitLoc(GetTriggerUnit())
set XL=CQE(600.,EL,Condition(function A8O))
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetEventDamageSource()),EL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A00C')
call SetUnitAbilityLevelSwapped('A00C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A00D',GetEventDamageSource()))
call IssueTargetOrderById(bj_lastCreatedUnit,852179,GroupPickRandomUnit(XL))
call RemoveLocation(EL)
call DestroyGroup(XL)
endfunction
function NEO takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B04M'))and(GetUnitAbilityLevelSwapped('A013',GetEventDamageSource())!=0)
endfunction
function Trig_Moonblade_Func004002003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function Trig_Moonblade_Func004002003002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Moonblade_Func004002003002002001 takes nothing returns boolean
return(UnitAlive(GetFilterUnit())==true)
endfunction
function Trig_Moonblade_Func004002003002002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function Trig_Moonblade_Func004002003002002002002 takes nothing returns boolean
return(GetFilterUnit()!=GetTriggerUnit())
endfunction
function Trig_Moonblade_Func004002003002002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))!=null
endfunction
function Trig_Moonblade_Func004002003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))!=null
endfunction
function Trig_Moonblade_Func004002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))))!=null
endfunction
function NXO takes nothing returns boolean
return(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEventDamageSource()))),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetFilterUnit()!=GetTriggerUnit())))))))))!=null
endfunction
function NOO takes nothing returns nothing
set VM=GetUnitLoc(GetEnumUnit())
call CreateTextTagLocBJ((I2S(R2I(ZL))+"!"),VM,0,10.,.0,.0,200.,0)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
call UnitDamageTargetBJ(GetEventDamageSource(),GetEnumUnit(),ZL,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC)
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit(),"Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function NRO takes nothing returns nothing
call UnitRemoveAbility(GetTriggerUnit(),'B04M')
set UL=GetUnitLoc(GetTriggerUnit())
set YL=CNE(UL,(150.+(10.*I2R(GetUnitAbilityLevelSwapped('A013',GetEventDamageSource())))),GetUnitFacing(GetEventDamageSource()))
set WL=CQE((180.+(10.*I2R(GetUnitAbilityLevelSwapped('A013',GetEventDamageSource())))),YL,Condition(function NXO))
set ZL=((GetEventDamage()*(.3+(.2*I2R(GetUnitAbilityLevelSwapped('A013',GetEventDamageSource())))))+(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())*(.1*I2R(GetUnitAbilityLevelSwapped('A013',GetEventDamageSource())))))
call ForGroupBJ(WL,function NOO)
call RemoveLocation(UL)
call RemoveLocation(YL)
call RemoveLocation(VM)
call DestroyGroup(WL)
endfunction
function NAO takes nothing returns boolean
return(GetSpellAbilityId()=='A00H')
endfunction
function Trig_Desolation_Cast_Func005001003001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Desolation_Cast_Func005001003002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function NNO takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function NBO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),HL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A03C')
call SetUnitAbilityLevelSwapped('A03C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852668,GetEnumUnit())
endfunction
function Trig_Desolation_Cast_Func008001003001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Desolation_Cast_Func008001003002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function NCO takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function NDO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),JL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A03C')
call SetUnitAbilityLevelSwapped('A03C',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852668,GetEnumUnit())
endfunction
function Trig_Desolation_Cast_Func011002003001 takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())==false)
endfunction
function Trig_Desolation_Cast_Func011002003002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Desolation_Cast_Func011002003002002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_Desolation_Cast_Func011002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))!=null
endfunction
function NFO takes nothing returns boolean
return(GetBooleanAnd((IsUnitDeadBJ(GetFilterUnit())==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))!=null
endfunction
function NGO takes nothing returns nothing
call IssuePointOrderByIdLoc(GetEnumUnit(),851986,JL)
endfunction
function NHO takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A00M',VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],GetUnitAbilityLevelSwapped('A00H',GetTriggerUnit()))
call IssueImmediateOrderById(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],852164)
set HL=GetUnitLoc(GetTriggerUnit())
//set bj_wantDestroyGroup=true
//call ForGroupBJ(CQE((425.+(I2R(GetUnitAbilityLevelSwapped('A00H',GetTriggerUnit()))*25.)),HL,Condition(function NNO)),function NBO)
set JL=GetUnitLoc(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE((425.+(I2R(GetUnitAbilityLevelSwapped('A00H',GetTriggerUnit()))*25.)),JL,Condition(function NCO)),function NDO)
call AddSpecialEffectLocBJ(JL,"war3mapImported\\DarkForce.mdx")
call DestroyEffect(bj_lastCreatedEffect)
set GL=CQE((400.+(25.*I2R(GetUnitAbilityLevelSwapped('A00H',GetTriggerUnit())))),HL,Condition(function NFO))
call ForGroupBJ(GL,function NGO)
call RemoveLocation(HL)
call RemoveLocation(JL)
call DestroyGroup(GL)
endfunction
function NKO takes nothing returns boolean
return(GetSpellAbilityId()=='A00B')and(GetEventDamage()!=.0)
endfunction
function NLO takes nothing returns nothing
//call DisplayTextToPlayer(Player(0),0.,0.,"KB Dummy Cast")
set RL=GetSpellTargetUnit()
set AL=GetUnitLoc(GetTriggerUnit())
set IL=GetUnitLoc(GetSpellTargetUnit())
set NL=(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit())*40)
call M6E(RL,NL,.3,AngleBetweenPoints(IL,AL),"war3mapImported\\ShadowyMissileofEvilDOOMV2.mdx",0,false,false)
call RemoveLocation(IL)
call RemoveLocation(AL)
endfunction
function NPO takes nothing returns boolean
return(GetUnitTypeId(GetSummonedUnit())=='o015')
endfunction
function NQO takes nothing returns boolean
return(GetUnitTypeId(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])=='o015')
endfunction
function NSO takes nothing returns boolean
return(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]!=null)
endfunction
function NTO takes nothing returns nothing
if(NQO())then
call KillUnit(VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
endif
if(NSO())then
call KillUnit(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
endif
set VL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetSummonedUnit()
endfunction
function NWO takes nothing returns boolean
return((GetUnitAbilityLevelSwapped('A00A',LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))])!=0)and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==false)and(UnitHasBuffBJ(GetTriggerUnit(),'B02K')==false))!=null
endfunction
function NYO takes nothing returns nothing
local real x1 = GetUnitX(GetTriggerUnit())
local real y1 = GetUnitY(GetTriggerUnit())
local real x2 = GetUnitX(VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))])
local real y2 = GetUnitY(VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))])
local integer i = GetUnitAbilityLevelSwapped('A00A',LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))])
local real a = bj_RADTODEG * Atan2(y2 - y1, x2 - x1)
if VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))] != null then
call M6E(GetTriggerUnit(),(i*25.)+50.,.3,a,"war3mapImported\\ShadowyMissileofEvilDOOMV2.mdx",0,false,false)
endif
//call SetUnitAbilityLevelSwapped('A00B',VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],GetUnitAbilityLevelSwapped('A00A',LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))]))
//call DisplayTextToPlayer(Player(0),0.,0.,"I'm castin")
//call IssueTargetOrderBJ( VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))], "slow", GetTriggerUnit() )
//call IssueTargetOrderById(VL[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],852075,GetTriggerUnit())
endfunction
function N_O takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B04I'))and(GetRandomInt(1,100)<=(20+(3*GetUnitAbilityLevelSwapped('A04F',GetTriggerUnit()))))
endfunction
function N0O takes nothing returns boolean
return((GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())+GetEventDamage())>=GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit()))
endfunction
function N1O takes nothing returns boolean
return(GetRandomInt(1,100)<=(2*GetUnitAbilityLevelSwapped('A04F',GetTriggerUnit())))
endfunction
function N2O takes nothing returns nothing
if GetTriggerUnit()!=GetEventDamageSource() then
if(N0O())then
call SetWidgetLife(GetTriggerUnit(),GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit()))
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())+GetEventDamage()))
endif
call AddSpecialEffectTargetUnitBJ("chest",GetTriggerUnit(),"war3mapImported\\BloodbathTarget.mdx")
call DestroyEffect(bj_lastCreatedEffect)
if(N1O())then
set YK=GetUnitLoc(GetEventDamageSource())
set ZK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),ZK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A04I')
call SetUnitAbilityLevelSwapped('A04I',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A04F',GetTriggerUnit()))
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852560,YK)
call RemoveLocation(YK)
call RemoveLocation(ZK)
endif
endif
endfunction
function N4O takes nothing returns boolean
return(GetSpellAbilityId()=='A03K')
endfunction
function N5O takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())<=1.)
endfunction
function N6O takes nothing returns nothing
if(N5O())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Not enough health to cast")
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())/40.)))
endif
endfunction
function N8O takes nothing returns boolean
return(GetLearnedSkill()=='A02E')
endfunction
function N9O takes nothing returns nothing
set CQ[(1+GetPlayerId(GetTriggerPlayer()))]=(500.+(100.*I2R(GetUnitAbilityLevelSwapped('A02E',GetTriggerUnit()))))
endfunction
function BEO takes nothing returns boolean
return(GetSpellAbilityId()=='A00W')
endfunction
function BOO takes nothing returns nothing
if PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]!=null then
call PauseUnit(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
set TT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitVertexColorBJ(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],100.,90.,100.,25.)
call AddSpecialEffectTargetUnitBJ("chest",PL[(1+GetPlayerId(GetTriggerPlayer()))],"war3mapImported\\COD Ball.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"war3mapImported\\ShadeAura.mdx")
set SL[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedEffect
else
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"No unit found")
endif
endfunction
function BIO takes nothing returns boolean
return(GetSpellAbilityId()=='A00W')
endfunction
function BNO takes nothing returns nothing
if PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]!=null then
call PauseUnit(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
set TT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=false
call SetUnitVertexColorBJ(PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],20.,.0,20.,50.)
call AddSpecialEffectTargetUnitBJ("chest",PL[(1+GetPlayerId(GetTriggerPlayer()))],"war3mapImported\\PeterifyVer.2.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call DestroyEffect(SL[(1+GetPlayerId(GetTriggerPlayer()))])
else
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"No unit found")
endif
endfunction
function BCO takes nothing returns boolean
return(GetSpellAbilityId()=='A0F2')
endfunction
function BDO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
call GroupRemoveUnit(WK,IRE[PXE])
call FAE(PXE)
call ReleaseTimer(GetExpiredTimer())
set t=null
endfunction
function BFO takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=FIE()
set IRE[PXE]=GetSpellTargetUnit()
call GroupAddUnit(WK,GetSpellTargetUnit())
call SetTimerData(t,PXE)
call TimerStart(t,10.,false,function BDO)
set t=null
endfunction
function BHO takes nothing returns boolean
return(GetSpellAbilityId()=='A002')
endfunction
function BJO takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())<=(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())/100.))
endfunction
function BKO takes nothing returns nothing
if(BJO())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Not enough health to cast")
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())/100.)))
endif
endfunction
function BMO takes nothing returns boolean
return(GetSpellAbilityId()=='A04F')
endfunction
function BPO takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())<=(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())*.15))
endfunction
function BQO takes nothing returns nothing
if(BPO())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Not enough health to cast")
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())*.15)))
endif
endfunction
function BTO takes nothing returns boolean
return(GetSpellAbilityId()=='A036')
endfunction
function BUO takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())<=1.)
endfunction
function BWO takes nothing returns nothing
if(BUO())then
call PauseUnit(GetTriggerUnit(),true)
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call PauseUnit(GetTriggerUnit(),false)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Not enough health to cast")
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())*.15)))
endif
endfunction
function BZO takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B04G'))and(GetUnitAbilityLevelSwapped('A002',GetEventDamageSource())>0)and(GetRandomInt(1,100)<=(5+(2*GetUnitAbilityLevelSwapped('A002',GetEventDamageSource()))))
endfunction
function B_O takes nothing returns boolean
return(GetEventDamage()>.5)
endfunction
function B0O takes nothing returns nothing
if(B_O())then
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetBJ(GetEventDamageSource(),GetTriggerUnit(),((1.5*I2R(GetHeroStr(GetEventDamageSource(),true)))*I2R(GetUnitAbilityLevelSwapped('A002',GetEventDamageSource()))),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
call EnableTrigger(GetTriggeringTrigger())
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"war3mapImported\\BloodEX-Special.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endif
endfunction
function B2O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0FM',GetEventDamageSource())==1)
endfunction
function B3O takes nothing returns boolean
return(GetEventDamage()>=.5)
endfunction
function B4O takes nothing returns nothing
if(B3O())then
if GetEventDamageSource() !=GetTriggerUnit() then
call SetWidgetLife(GetEventDamageSource(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetEventDamageSource())+(GetEventDamage()*.35)))
call AddSpecialEffectTargetUnitBJ("origin",GetEventDamageSource(),"war3mapImported\\VampiricAuraTarget.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endif
endif
endfunction
function B6O takes nothing returns boolean
return(GetSpellAbilityId()=='A03Q')
endfunction
function Trig_Trothfangs_Butchery_Short_Func003001003001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Trothfangs_Butchery_Short_Func003001003002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function B7O takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function B8O takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),QL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A03P')
call SetUnitAbilityLevelSwapped('A03P',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEnumUnit())
endfunction
function B9O takes nothing returns nothing
set QL=GetUnitLoc(GetTriggerUnit())
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(350.,QL,Condition(function B7O)),function B8O)
call RemoveLocation(QL)
endfunction
function CEO takes nothing returns boolean
return(GetSpellAbilityId()=='A03Q')
endfunction
function Trig_Trothfangs_Butchery_Medium_Func003001003001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Trothfangs_Butchery_Medium_Func003001003002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function CXO takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function COO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),RQ,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A03N')
call SetUnitAbilityLevelSwapped('A03N',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEnumUnit())
endfunction
function CRO takes nothing returns nothing
set RQ=GetUnitLoc(GetTriggerUnit())
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(600.,RQ,Condition(function CXO)),function COO)
call RemoveLocation(RQ)
endfunction
function CAO takes nothing returns boolean
return(GetSpellAbilityId()=='A03Q')
endfunction
function Trig_Trothfangs_Butchery_Long_Func003001003001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Trothfangs_Butchery_Long_Func003001003002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function CNO takes nothing returns boolean
return GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))))
endfunction
function CBO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),IQ,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A03O')
call SetUnitAbilityLevelSwapped('A03O',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEnumUnit())
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit(),"Abilities\\Weapons\\LavaSpawnMissile\\LavaSpawnBirthMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function CCO takes nothing returns nothing
set IQ=GetUnitLoc(GetTriggerUnit())
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(800.,IQ,Condition(function CNO)),function CBO)
call RemoveLocation(IQ)
endfunction
function CFO takes nothing returns boolean
return(GetSpellAbilityId()=='A0FE')
endfunction
function CGO takes nothing returns boolean
return(CountUnitsInGroup(AH)==0)
endfunction
function CHO takes nothing returns boolean
return(JH[NH]==3)
endfunction
function CJO takes nothing returns boolean
return(JH[NH]==2)
endfunction
function CKO takes nothing returns boolean
return(JH[NH]==1)
endfunction
function CLO takes nothing returns nothing
if(CGO())then
call EnableTrigger(ELV)
endif
call AddSpecialEffectTargetUnitBJ("chest",GetSpellTargetUnit(),"war3mapImported\\DoubleEdgeTarget.mdx")
call DestroyEffect(bj_lastCreatedEffect)
set NH=(NH+1)
set BH[NH]=GetTriggerUnit()
set CH[NH]=GetSpellTargetUnit()
call GroupAddUnit(AH,CH[NH])
set DH[NH]=GetUnitLoc(BH[NH])
set FH[1]=GetUnitLoc(CH[NH])
set GH[NH]=AngleBetweenPoints(DH[NH],FH[1])
set HH[NH]=25.
set JH[NH]=3
if(CKO())then
set KH[NH]=150.
set LH[NH]=(KH[NH]/HH[NH])
else
if(CJO())then
set KH[NH]=250.
set LH[NH]=(KH[NH]/HH[NH])
else
if(CHO())then
set KH[NH]=350.
set LH[NH]=(KH[NH]/HH[NH])
endif
endif
endif
set BH[NH]=null
call RemoveLocation(DH[1])
endfunction
function CPO takes nothing returns boolean
return(GetSpellAbilityId()=='A0A3')
endfunction
function CQO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A099')
call SetUnitAbilityLevelSwapped('A099',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0A3',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852160,GetTriggerUnit())
endfunction
function CTO takes nothing returns boolean
return((GetUnitAbilityLevelSwapped('A0DV',GetTriggerUnit())>0)and(GetRandomInt(1,100)<=(10+(2*GetUnitAbilityLevelSwapped('A0DV',GetTriggerUnit()))))and(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)!=true))!=null
endfunction
function CUO takes nothing returns nothing
local unit u=GetTriggerUnit()
local real SVE=((I2R(GetHeroStr(u,true))*I2R(GetUnitAbilityLevel(u,'A0DV')))+(O4X(u)*I2R(GetUnitAbilityLevel(u,'A0DV'))))/5.
if IsUnitEnemy(u,GetOwningPlayer(GetEventDamageSource())) and not IsUnitType(GetEventDamageSource(),UNIT_TYPE_HERO) then
set LK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),LK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(LK)
call UnitAddAbility(bj_lastCreatedUnit,'A0FE')
call SetUnitAbilityLevelSwapped('A0FE',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0DV',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEventDamageSource())
call Y0E(u,GetEventDamageSource(),SVE,ATTACK_TYPE_HERO,false,false)
call IssueTargetOrderById(GetEventDamageSource(),851983,u)
endif
set u=null
endfunction
function CYO takes nothing returns nothing
set DI[NI]=DI[NI]+GetEventDamage()
if GetWidgetLife(GetTriggerUnit())+(GetEventDamage())>=GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE)then
call SetWidgetLife(GetTriggerUnit(),GetUnitState(GetTriggerUnit(),UNIT_STATE_MAX_LIFE))
else
call SetWidgetLife(GetTriggerUnit(),GetWidgetLife(GetTriggerUnit())+GetEventDamage())
endif
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl",GetTriggerUnit(),"origin"))
endfunction
function CZO takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B044')!=0 and GetRandomInt(1,100)<=(10+(3*GetUnitAbilityLevel(GetTriggerUnit(),'A00N'))) and GetTriggerUnit() != GetEventDamageSource() then
call CYO()
endif
return false
endfunction
function C_O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0FK',GetTriggerUnit())==1) and GetEventDamage() >= 10.
endfunction
function C0O takes nothing returns boolean
return((GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())+(GetEventDamage()/10.))>=GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit()))
endfunction
function C1O takes nothing returns nothing
if(C0O())then
call SetWidgetLife(GetTriggerUnit(),GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit()))
else
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())+(GetEventDamage()/10.)))
endif
endfunction
function C3O takes nothing returns boolean
return(((not(GetUnitAbilityLevel(GetTriggerUnit(),'B01K')!=1))and(not(GetUnitAbilityLevel(GetEventDamageSource(),'B00K')==1))and(not(GetUnitAbilityLevel(GetEventDamageSource(),'B00J')==1))and(GetRandomInt(1,100)<=(10+(5*GetUnitAbilityLevelSwapped('A0FL',GetTriggerUnit()))))and(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)!=true))!=null) and GetUnitAbilityLevel(GetEventDamageSource(),'BEsh') != 1 and GetUnitTypeId(GetEventDamageSource()) != 'e00X'
endfunction
function C4O takes nothing returns nothing
set LK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),LK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(LK)
call UnitAddAbility(bj_lastCreatedUnit,'A088')
call SetUnitAbilityLevelSwapped('A088',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0FL',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEventDamageSource())
endfunction
function C6O takes nothing returns boolean
return((UnitHasBuffBJ(GetTriggerUnit(),'B01U'))and(GetRandomInt(1,200)<=(2+(1*GetUnitAbilityLevelSwapped('A09E',GetTriggerUnit()))))and(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)!=true))!=null
endfunction
function C7O takes nothing returns nothing
set LK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),LK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(LK)
call UnitAddAbility(bj_lastCreatedUnit,'A006')
call SetUnitAbilityLevelSwapped('A006',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A04D',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEventDamageSource())
endfunction
function C9O takes nothing returns boolean
return(GetSpellAbilityId()=='A0FC')
endfunction
function DVO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0FL',GetSpellTargetUnit())==0)
endfunction
function DEO takes nothing returns nothing
if(DVO())then
call UnitAddAbility(GetSpellTargetUnit(),'A0FL')
call SetUnitAbilityLevelSwapped('A0FL',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A088',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A0FL',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A088',GetTriggerUnit()))
endif
endfunction
function DOO takes nothing returns boolean
return(GetSpellAbilityId()=='A0F1')
endfunction
function DRO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A00N',GetSpellTargetUnit())==0)
endfunction
function DIO takes nothing returns nothing
if(DRO())then
call UnitAddAbility(GetSpellTargetUnit(),'A00N')
call SetUnitAbilityLevelSwapped('A00N',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0F1',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A00N',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0F1',GetTriggerUnit()))
endif
endfunction
function DNO takes nothing returns boolean
return(GetSpellAbilityId()=='A0CS')
endfunction
function DBO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A04D',GetSpellTargetUnit())==0)
endfunction
function DCO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A09E',GetSpellTargetUnit())==0)
endfunction
function DDO takes nothing returns nothing
if(DBO())then
call UnitAddAbility(GetSpellTargetUnit(),'A04D')
call SetUnitAbilityLevelSwapped('A04D',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A006',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A04D',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A006',GetTriggerUnit()))
endif
if(DCO())then
call UnitAddAbility(GetSpellTargetUnit(),'A09E')
call SetUnitAbilityLevelSwapped('A09E',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CS',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A09E',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CS',GetTriggerUnit()))
endif
endfunction
function DGO takes nothing returns boolean
return(GetSpellAbilityId()=='A0CM')
endfunction
function DHO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A03M',GetSpellTargetUnit())==0)
endfunction
function DJO takes nothing returns nothing
if(DHO())then
call UnitAddAbility(GetSpellTargetUnit(),'A03M')
call SetUnitAbilityLevelSwapped('A03M',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CM',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A03M',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CM',GetTriggerUnit()))
endif
endfunction
function DLO takes nothing returns boolean
return(GetSpellAbilityId()=='A0CN')
endfunction
function DMO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A024',GetSpellTargetUnit())==0)
endfunction
function DPO takes nothing returns nothing
if(DMO())then
call UnitAddAbility(GetSpellTargetUnit(),'A024')
call SetUnitAbilityLevelSwapped('A024',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CN',GetTriggerUnit()))
else
call SetUnitAbilityLevelSwapped('A024',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0CN',GetTriggerUnit()))
endif
endfunction
function DSO takes nothing returns boolean
return((UnitHasBuffBJ(GetTriggerUnit(),'B01T'))and(GetRandomInt(1,100)<=(5+(2*GetUnitAbilityLevelSwapped('A024',GetTriggerUnit()))))and(IsUnitType(GetEventDamageSource(),UNIT_TYPE_STRUCTURE)!=true))!=null
endfunction
function DTO takes nothing returns nothing
set LK=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),LK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(LK)
call UnitAddAbility(bj_lastCreatedUnit,'A0FH')
call IssueTargetOrderById(bj_lastCreatedUnit,852149,GetEventDamageSource())
endfunction
function DWO takes nothing returns boolean
return(GetSpellAbilityId()=='A030')and(UnitHasBuffBJ(GetSpellTargetUnit(),'B04D'))
endfunction
function DYO takes nothing returns nothing
set MK=GetUnitLoc(GetSpellTargetUnit())
call UnitRemoveAbility(GetSpellTargetUnit(),'B04D')
call CreateNUnitsAtLoc(1,'h00L',GetOwningPlayer(GetTriggerUnit()),MK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(MK)
call UnitAddAbility(bj_lastCreatedUnit,'A030')
call SetUnitAbilityLevelSwapped('A030',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A030',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852587,GetSpellTargetUnit())
endfunction
function D_O takes nothing returns boolean
return(GetSpellAbilityId()=='A031')and(UnitHasBuffBJ(GetSpellTargetUnit(),'B04D'))
endfunction
function D0O takes nothing returns nothing
set MK=GetUnitLoc(GetSpellTargetUnit())
call UnitRemoveAbility(GetSpellTargetUnit(),'B04D')
call CreateNUnitsAtLoc(1,'h00L',GetOwningPlayer(GetTriggerUnit()),MK,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(10.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(MK)
call UnitAddAbility(bj_lastCreatedUnit,'A031')
call SetUnitAbilityLevelSwapped('A031',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A031',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852119,GetSpellTargetUnit())
endfunction
function D2O takes nothing returns boolean
return(GetSpellAbilityId()=='A0F4')
endfunction
function D3O takes nothing returns boolean
return((IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_ANCIENT)==false)and(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_SUMMONED)==false))!=null
endfunction
function D4O takes nothing returns nothing
if(D3O())then
call UnitAddAbility(GetSpellTargetUnit(),'A0F5')
call SetUnitAbilityLevelSwapped('A0F5',GetSpellTargetUnit(),GetUnitAbilityLevelSwapped('A0F4',GetTriggerUnit()))
endif
call SetUnitPathing(GetSpellTargetUnit(),false)
call ZUE(GetSpellTargetUnit(),50*I2R(GetUnitAbilityLevel(GetTriggerUnit(),'A0F4')))
endfunction
function D6O takes nothing returns nothing
local unit u = GetTriggerUnit()
if GetUnitAbilityLevel(u,'A0EQ')==0 then
call UnitAddAbility(u,'A0EQ')
else
if GetUnitAbilityLevel(u,'A0EQ') < 100 then
call SetUnitAbilityLevel(u,'A0EQ',GetUnitAbilityLevel(u,'A0EQ')+1)
endif
endif
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\Shield Breaker.mdx",u,"origin"))
set u = null
endfunction
function D7O takes nothing returns boolean
if GetUnitAbilityLevel(GetEventDamageSource(),'A0F6')==1 and(BI[NI])==(LN)and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())) and not IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) then
call D6O()
endif
return false
endfunction
function D8O takes nothing returns boolean
local unit u
if UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RBV))then
set u=CreateUnit(GetOwningPlayer(RBV),'h007',GetUnitX(GetFilterUnit()),GetUnitY(GetFilterUnit()),.0)
call UnitAddAbility(u,'A044')
call UnitApplyTimedLife(u,'BTLF',1.)
call SetUnitAbilityLevel(u,'A044',GetUnitAbilityLevel(RBV,'A043'))
call IssueTargetOrderById(u,852075,GetFilterUnit())
call UnitDamageTargetEx(RBV,GetFilterUnit(),(GetHeroStr(RBV,true)*GetUnitAbilityLevel(RBV,'A043')),false,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
set u=null
return false
endfunction
function D9O takes nothing returns nothing
local unit u=GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real r=(GetUnitAbilityLevel(GetEventDamageSource(),'A043')*20)+200.
call UnitRemoveAbility(u,'B00M')
call DestroyEffect(AddSpecialEffect("war3mapImported\\Explosion.mdx",x,y))
set RBV=GetEventDamageSource()
call GroupEnumUnitsInRange(RNV,x,y,r,Filter(function D8O))
set u=null
endfunction
function FVO takes nothing returns boolean
if GetUnitAbilityLevel(GetTriggerUnit(),'B00M')!=0 then
call D9O()
endif
return false
endfunction
function FEO takes nothing returns boolean
return(GetSpellAbilityId()=='A0BJ')
endfunction
function Trig_Remove_Summon_Func002002003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_Remove_Summon_Func002002003002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n00L')
endfunction
function Trig_Remove_Summon_Func002002003002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n00M')
endfunction
function Trig_Remove_Summon_Func002002003002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n00U')
endfunction
function Trig_Remove_Summon_Func002002003002002002002 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='n017')
endfunction
function Trig_Remove_Summon_Func002002003002002002 takes nothing returns boolean
return GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00U'),(GetUnitTypeId(GetFilterUnit())=='n017'))
endfunction
function Trig_Remove_Summon_Func002002003002002 takes nothing returns boolean
return GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00M'),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00U'),(GetUnitTypeId(GetFilterUnit())=='n017'))))
endfunction
function Trig_Remove_Summon_Func002002003002 takes nothing returns boolean
return GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00L'),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00M'),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00U'),(GetUnitTypeId(GetFilterUnit())=='n017'))))))
endfunction
function FXO takes nothing returns boolean
return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00L'),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00M'),(GetBooleanOr((GetUnitTypeId(GetFilterUnit())=='n00U'),(GetUnitTypeId(GetFilterUnit())=='n017'))))))))
endfunction
function FOO takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function FRO takes nothing returns nothing
set DK=GetSpellTargetLoc()
set CK=CQE(224.,DK,Condition(function FXO))
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit(),"Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call ForGroupBJ(CK,function FOO)
call RemoveLocation(DK)
call DestroyGroup(CK)
endfunction
function FAO takes nothing returns boolean
return(GetSpellAbilityId()=='A02Y')and(UnitHasBuffBJ(GetSpellTargetUnit(),'B02P'))
endfunction
function FNO takes nothing returns nothing
call IssueImmediateOrderById(GetTriggerUnit(),851972)
call Q_E(GetOwningPlayer(GetTriggerUnit()),"This unit is Protected, it cannot be stunned.")
endfunction
function FCO takes nothing returns boolean
return(GetSpellAbilityId()=='A0BI')
endfunction
function FDO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A09T')
call SetUnitAbilityLevelSwapped('A09T',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0BI',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852160,GetTriggerUnit())
endfunction
function FGO takes nothing returns boolean
return(GetSpellAbilityId()=='A098')
endfunction
function FHO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02E',GetTriggerUnit())==0)
endfunction
function Trig_Targeted_Magic_Func003002003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer()))
endfunction
function Trig_Targeted_Magic_Func003002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Targeted_Magic_Func003002003002002001 takes nothing returns boolean
return true
endfunction
function Trig_Targeted_Magic_Func003002003002002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Targeted_Magic_Func003002003002002002002 takes nothing returns boolean
return(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_Targeted_Magic_Func003002003002002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))!=null
endfunction
function Trig_Targeted_Magic_Func003002003002002 takes nothing returns boolean
return(GetBooleanAnd(true,(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))!=null
endfunction
function Trig_Targeted_Magic_Func003002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd(true,(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))))!=null
endfunction
function FJO takes nothing returns boolean
return(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())),(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd(true,(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))))))!=null
endfunction
function FKO takes nothing returns nothing
set YT=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLocFacingLocBJ(1,'h007',GetOwningPlayer(GetTriggerUnit()),IK,IK)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A02E')
call SetUnitAbilityLevelSwapped('A02E',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A02E',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEnumUnit())
call GroupAddUnit(NK,GetEnumUnit())
call GroupRemoveUnit(AK,GetEnumUnit())
call RemoveLocation(YT)
endfunction
function FLO takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())>=8.)and(CountUnitsInGroup(AK)>0)
endfunction
function FMO takes nothing returns nothing
if(FHO())then
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Frost Scythe has not been learned")
return
endif
set IK=GetUnitLoc(GetTriggerUnit())
set AK=CQE(CQ[(1+GetPlayerId(GetTriggerPlayer()))],IK,Condition(function FJO))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FLO())then
call SetUnitManaBJ(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())-8.))
call ForGroupBJ(C5E(1,AK),function FKO)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(IK)
call DestroyGroup(AK)
call DestroyGroup(NK)
endfunction
function FQO takes nothing returns boolean
return(GetSpellAbilityId()=='A0FB')
endfunction
function FSO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A088',GetTriggerUnit())==0)
endfunction
function Trig_Nightblade_Innate_Func003002003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer()))
endfunction
function Trig_Nightblade_Innate_Func003002003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Nightblade_Innate_Func003002003002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)!=null
endfunction
function Trig_Nightblade_Innate_Func003002003002002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Nightblade_Innate_Func003002003002002002002 takes nothing returns boolean
return(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_Nightblade_Innate_Func003002003002002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))!=null
endfunction
function Trig_Nightblade_Innate_Func003002003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))!=null
endfunction
function Trig_Nightblade_Innate_Func003002003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))))!=null
endfunction
function FTO takes nothing returns boolean
return(GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer())),(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))))))))))!=null
endfunction
function FUO takes nothing returns nothing
set YT=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLocFacingLocBJ(1,'h007',GetOwningPlayer(GetTriggerUnit()),IK,IK)
call UnitApplyTimedLifeBJ(21.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A088')
call SetUnitAbilityLevelSwapped('A088',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A088',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,852189,GetEnumUnit())
call GroupAddUnit(NK,GetEnumUnit())
call GroupRemoveUnit(AK,GetEnumUnit())
call RemoveLocation(YT)
endfunction
function FWO takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())>=8.)and(CountUnitsInGroup(AK)>0)
endfunction
function FYO takes nothing returns nothing
if(FSO())then
call Q_E(GetOwningPlayer(GetTriggerUnit()),"Venom Thrust has not been learned")
return
endif
set IK=GetUnitLoc(GetTriggerUnit())
set AK=CQE(900.,IK,Condition(function FTO))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=15
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(FWO())then
call SetUnitManaBJ(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())-8.))
call ForGroupBJ(C5E(1,AK),function FUO)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(IK)
call DestroyGroup(AK)
call DestroyGroup(NK)
endfunction
function F_O takes nothing returns boolean
return(GetSpellAbilityId()=='A01Y')and(RectContainsUnit(bj_mapInitialPlayableArea,UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
endfunction
function F0O takes nothing returns nothing
set TempLocation = GetUnitLoc(UC[(1+GetPlayerId(GetTriggerPlayer()))])
call SetUnitPositionLoc(GetSpellTargetUnit(),TempLocation)
call RemoveLocation(TempLocation)
set TempLocation = GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function F2O takes nothing returns boolean
return(GetSpellAbilityId()=='A0C0')
endfunction
function F3O takes nothing returns nothing
call ModifyHeroSkillPoints(GetSpellTargetUnit(),0,1)
endfunction
function F5O takes nothing returns boolean
return(GetSpellAbilityId()=='A0CH')
endfunction
function F6O takes nothing returns nothing
call AdjustPlayerStateBJ((2+(GetHeroLevel(GetTriggerUnit())/4)),GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_LUMBER)
set TempLocation=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(TempLocation,"Objects\\Spawnmodels\\Other\\ToonBoom\\ToonBoom.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Weapons\\GryphonRiderMissile\\GryphonRiderMissileTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(TempLocation)
endfunction
function F8O takes nothing returns boolean
return(GetSpellAbilityId()=='A01V')
endfunction
function F9O takes nothing returns nothing
call AddSpecialEffect("war3mapImported\\Arcane Explosion.mdx",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function GEO takes nothing returns boolean
return(GetSpellAbilityId()=='A0AQ')
endfunction
function GXO takes nothing returns nothing
call PlaySoundOnUnitBJ(KY,100,GetSpellAbilityUnit())
set TempLocation=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(TempLocation,"war3mapImported\\RedCharkaExplosion.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call RemoveLocation(TempLocation)
endfunction
function GRO takes nothing returns boolean
return(GetSpellAbilityId()=='A08V')and(GetPlayerController(GetOwningPlayer(GetTriggerUnit()))!=MAP_CONTROL_CREEP)
endfunction
function GIO takes nothing returns nothing
local real x = GetUnitX(GetSpellTargetUnit()) - 100. * Cos(GetUnitFacing(GetSpellTargetUnit()) * bj_DEGTORAD)
local real y = GetUnitY(GetSpellTargetUnit()) - 100. * Sin(GetUnitFacing(GetSpellTargetUnit()) * bj_DEGTORAD)
call PlaySoundBJ(HY)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,4.,((BS[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+"|r"))+(" has stolen "+(I2S((GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()),PLAYER_STATE_RESOURCE_GOLD)/10))+((" gold from "+BS[(1+GetPlayerId(GetOwningPlayer(GetSpellTargetUnit())))])+(GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+"|r!"))))))
call SetPlayerStateBJ(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(GetOwningPlayer(GetTriggerUnit()),PLAYER_STATE_RESOURCE_GOLD)+(GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()),PLAYER_STATE_RESOURCE_GOLD)/10)))
call SetPlayerStateBJ(GetOwningPlayer(GetSpellTargetUnit()),PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()),PLAYER_STATE_RESOURCE_GOLD)-(GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()),PLAYER_STATE_RESOURCE_GOLD)/10)))
call SGE('h00Y',x,y,GetUnitFacing(GetSpellTargetUnit()),.900,"attack one",1.0)
endfunction
function GNO takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())!='o001')and(GetSpellAbilityId()=='A0BG')
endfunction
function GBO takes nothing returns nothing
set JK=GetRandomInt(0,(GetUnitAbilityLevelSwapped('A0BG',GetTriggerUnit())+5))
set KK=GetRandomInt(0,(GetUnitAbilityLevelSwapped('A0BG',GetTriggerUnit())+5))
set HK=GetRandomInt(0,(GetUnitAbilityLevelSwapped('A0BG',GetTriggerUnit())+5))
call ModifyHeroStat(0,GetSpellTargetUnit(),0,HK)
call ModifyHeroStat(1,GetSpellTargetUnit(),0,JK)
call ModifyHeroStat(2,GetSpellTargetUnit(),0,KK)
call DisplayTextToForce(C3E(GetOwningPlayer(GetTriggerUnit())),((BS[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]+(GetPlayerName(GetOwningPlayer(GetTriggerUnit()))+"|r"))+(" has increased "+(GetPlayerName(GetOwningPlayer(GetSpellTargetUnit()))+("'s "+("Strength by "+(I2S(HK)+(", "+("Agility by "+(I2S(JK)+(", "+("and Intelligence by "+(I2S(KK)+".")))))))))))))
set TempLocation=GetUnitLoc(GetSpellTargetUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function GDO takes nothing returns boolean
return(GetUnitTypeId(GetSpellAbilityUnit())=='E01O')and(GetSpellAbilityId()=='A08X')and not IsUnitIllusion(GetSpellTargetUnit())
endfunction
function GFO takes nothing returns boolean
return(IsItemOwned(UnitItemInSlotBJ(FD,bj_forLoopAIndex)))and(DD==false)
endfunction
function GGO takes nothing returns nothing
set FD=GetSpellTargetUnit()
set DD=false
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(GFO())then
call UnitRemoveItemFromSlotSwapped(bj_forLoopAIndex,FD)
set DD=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set TempLocation = GetUnitLoc(GetSpellTargetUnit())
call AddSpecialEffectLocBJ(TempLocation,"Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function GJO takes nothing returns boolean
return(GetSpellAbilityId()=='A0BE')
endfunction
function GKO takes nothing returns nothing
call PlaySoundOnUnitBJ(QY,100,GetTriggerUnit())
call PlaySoundOnUnitBJ(QY,100,GetSpellTargetUnit())
call UnitResetCooldown(GetSpellTargetUnit())
call AddSpecialEffectTargetUnitBJ("chest",GetSpellTargetUnit(),"war3mapImported\\BlinkTarget.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function GMO takes nothing returns boolean
return(GetSpellAbilityId()=='A0DA')
endfunction
function GPO takes nothing returns nothing
call ModifyHeroStat(0,GetTriggerUnit(),0,(2*GetUnitAbilityLevelSwapped('A0DA',GetTriggerUnit())))
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function GSO takes nothing returns boolean
return(GetSpellAbilityId()=='A08Y')
endfunction
function GTO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
if ICE[PXE]==5 then
call UnitRemoveAbility(IBE[PXE],'A08Y')
call UnitAddAbility(IBE[PXE],'A09Y')
call PlaySoundOnUnitBJ(SY,100,IBE[PXE])
call AddSpecialEffectTargetUnitBJ("weapon",IBE[PXE],"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call ReleaseTimer(GetExpiredTimer())
call FRE(PXE)
else
if(not(GetUnitCurrentOrder(IBE[PXE])==852184))then
call ReleaseTimer(GetExpiredTimer())
call FRE(PXE)
else
set ICE[PXE]=ICE[PXE]+1
call PlaySoundOnUnitBJ(SY,100,IBE[PXE])
call AddSpecialEffectTargetUnitBJ("weapon",IBE[PXE],"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetTimerData(t,PXE)
call TimerStart(t,.7,false,function GTO)
endif
endif
set t=null
endfunction
function GUO takes nothing returns nothing
local timer t
local integer PXE=FOE()
set IBE[PXE]=GetSpellAbilityUnit()
set ICE[PXE]=1
set t=NewTimer()
call PlaySoundOnUnitBJ(SY,100,GetSpellAbilityUnit())
call AddSpecialEffectTargetUnitBJ("weapon",GetSpellAbilityUnit(),"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetTimerData(t,PXE)
call TimerStart(t,.7,false,function GTO)
set t=null
endfunction
function GYO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A09Y',GetAttacker())==1)
endfunction
function GZO takes nothing returns nothing
call UnitRemoveAbility(GetAttacker(),'A09Y')
call UnitAddAbility(GetAttacker(),'A08Y')
set TempLocation = GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function G0O takes nothing returns boolean
return(GetSpellAbilityId()=='A03Y')
endfunction
function Trig_ThunderMaul_Func004001003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_ThunderMaul_Func004001003002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function G1O takes nothing returns boolean
return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function G2O takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),AQ,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A03S')
call SetUnitAbilityLevelSwapped('A03S',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEnumUnit())
endfunction
function Trig_ThunderMaul_Func005Func008001003001 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_ThunderMaul_Func005Func008001003002 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function G3O takes nothing returns boolean
return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),(IsUnitAliveBJ(GetFilterUnit())))
endfunction
function G4O takes nothing returns nothing
set NQ=GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ(NQ,"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'o005',GetOwningPlayer(GetTriggerUnit()),AQ,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852075,GetEnumUnit())
call RemoveLocation(NQ)
endfunction
function G5O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A09Y',GetTriggerUnit())==1)
endfunction
function G6O takes nothing returns nothing
set AQ=GetUnitLoc(GetTriggerUnit())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetTriggerUnit(),"origin"))
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(300.,GetUnitLoc(GetTriggerUnit()),Condition(function G1O)),function G2O)
if(G5O())then
call PlaySoundBJ(SY)
call PlaySoundBJ(MY)
call AddSpecialEffectTargetUnitBJ("weapon",GetTriggerUnit(),"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetTriggerUnit(),"origin"))
set OQ=(400.+(100.*I2R(GetUnitAbilityLevelSwapped('A03Y',GetTriggerUnit()))))
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(OQ,AQ,Condition(function G3O)),function G4O)
call UnitRemoveAbility(GetTriggerUnit(),'A09Y')
call UnitAddAbility(GetTriggerUnit(),'A08Y')
endif
call RemoveLocation(AQ)
endfunction
function G8O takes nothing returns boolean
return(GetSpellAbilityId()=='A04Q')
endfunction
function G9O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A09Y',GetTriggerUnit())==1)
endfunction
function HVO takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetUnitAbilityLevelSwapped('A04Q',GetTriggerUnit())
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped('I014',GetTriggerUnit())
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(G9O())then
call UnitRemoveAbility(GetTriggerUnit(),'A09Y')
call UnitAddAbility(GetTriggerUnit(),'A08Y')
call PlaySoundOnUnitBJ(SY,100,GetTriggerUnit())
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=GetUnitAbilityLevelSwapped('A04Q',GetTriggerUnit())
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call UnitAddItemByIdSwapped('I014',GetTriggerUnit())
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call AddSpecialEffectTargetUnitBJ("weapon",GetTriggerUnit(),"Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectTargetUnitBJ("weapon",GetTriggerUnit(),"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endif
endfunction
function HXO takes nothing returns boolean
return(GetSpellAbilityId()=='A0F3')
endfunction
function HOO takes nothing returns nothing
call UnitAddItemByIdSwapped('tret',GetSpellTargetUnit())
endfunction
function HIO takes nothing returns boolean
return(GetSpellAbilityId()=='A0BF')
endfunction
function HAO takes nothing returns boolean
local boolean b
set TempLocation = GetUnitLoc(GetEnumUnit())
set b =((IsUnitAliveBJ(GetEnumUnit()))and(RectContainsLoc(bj_mapInitialPlayableArea,CNE(TempLocation,80.,GetUnitFacing(GetTriggerUnit()))))and(IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetTriggerUnit())))and(IsUnitAliveBJ(GetEnumUnit()))and(GetUnitTypeId(GetEnumUnit())!='n017')and(GetUnitTypeId(GetEnumUnit())!='n00U')and(GetUnitTypeId(GetEnumUnit())!='n00L')and(GetUnitTypeId(GetEnumUnit())!='n00M')and(IsUnitType(GetEnumUnit(),UNIT_TYPE_MECHANICAL)==false))!=null
call RemoveLocation(TempLocation)
return b
endfunction
function HNO takes nothing returns nothing
if(HAO())then
call SetWidgetLife(GetEnumUnit(),(.94*GetUnitStateSwap(UNIT_STATE_LIFE,GetEnumUnit())))
set TempLocation = GetUnitLoc(GetEnumUnit())
call SetUnitPositionLoc(GetEnumUnit(),CNE(TempLocation,80.,GetUnitFacing(GetSpellAbilityUnit())))
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endif
endfunction
function HBO takes nothing returns nothing
call SetUnitFacingToFaceUnitTimed(GetTriggerUnit(),GetSpellTargetUnit(),0)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=(5+GetUnitAbilityLevelSwapped(GetSpellAbilityId(),GetTriggerUnit()))
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set TempLocation=GetUnitLoc(GetSpellTargetUnit())
set bj_wantDestroyGroup=true
call ForGroupBJ(CTE(400.,TempLocation),function HNO)
call RemoveLocation(TempLocation)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function HDO takes nothing returns boolean
return(GetSpellAbilityId()=='A0CR')
endfunction
function HFO takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_MAGIC_IMMUNE))!=null
endfunction
function HGO takes nothing returns boolean
return(IsUnitAliveBJ(GetEnumUnit()))and(IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function HHO takes nothing returns nothing
if(HGO())then
call SetWidgetLife(GetEnumUnit(),1.)
set TempLocation = GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
set TempLocation = GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLocFacingLocBJ(1,'o005',GetOwningPlayer(GetTriggerUnit()),TempLocation,TempLocation)
call RemoveLocation(TempLocation)
call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetEnumUnit())
endif
endfunction
function HJO takes nothing returns nothing
if(HFO())then
call SetWidgetLife(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())/100.))
else
call SetWidgetLife(GetTriggerUnit(),1.)
endif
set bj_wantDestroyGroup=true
call ForGroupBJ(CTE(750.,GetUnitLoc(GetTriggerUnit())),function HHO)
endfunction
function HLO takes nothing returns boolean
return(GetSpellAbilityId()=='A0CC')
endfunction
function HMO takes nothing returns nothing
set TempLocation=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,'o00M',GetEnumPlayer(),TempLocation,bj_UNIT_FACING)
call RemoveLocation(TempLocation)
call UnitApplyTimedLifeBJ(20.,'BTLF',bj_lastCreatedUnit)
endfunction
function HPO takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B005'))
endfunction
function HQO takes nothing returns boolean
return(UnitHasBuffBJ(GetTriggerUnit(),'B005'))
endfunction
function Trig_Burn_Func017001 takes nothing returns boolean
return(WC==0)
endfunction
function HSO takes nothing returns nothing
set TempLocation=GetUnitLoc(UC[(1+GetPlayerId(GetTriggerPlayer()))])
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
call ForForce(bj_FORCE_ALL_PLAYERS,function HMO)
set WC=(WC+1)
call SetTimeOfDay(24.)
call CreateNUnitsAtLoc(1,'o003',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(UC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(20.,'BTLF',bj_lastCreatedUnit)
call KillUnit(UC[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))])
set UC[(1+GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit())))]=bj_lastCreatedUnit
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(HPO())then
else
call CameraSetEQNoiseForPlayer(Player(-1+(bj_forLoopAIndex)),10.)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(HQO())then
else
call CameraClearNoiseForPlayer(Player(-1+(bj_forLoopAIndex)))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(19.)
set WC=(WC-1)
if((WC==0))then
call SetTimeOfDay(12)
endif
endfunction
function HUO takes nothing returns boolean
return(UnitHasBuffBJ(GetEventDamageSource(),'B03U'))and(GetRandomInt(1,100)<=20)
endfunction
function HWO takes nothing returns nothing
call CreateNUnitsAtLoc(1,GetUnitTypeId(GetTriggerUnit()),GetOwningPlayer(GetTriggerUnit()),RK,(GetUnitFacing(GetEventDamageSource())+180.))
call RemoveLocation(RK)
call SetUnitLifePercentBJ(bj_lastCreatedUnit,5.)
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,"war3mapImported\\CurseBolt.mdx")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
//function HZO takes nothing returns boolean
//return(UnitHasBuffBJ(GetEventDamageSource(),'B03V'))and(GetRandomInt(1,100)<=2)
//endfunction
//function H_O takes nothing returns nothing
//call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetEventDamageSource()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
//call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
//call UnitAddAbility(bj_lastCreatedUnit,'A0E0')
//call IssueTargetOrderById(bj_lastCreatedUnit,852581,GetTriggerUnit())
//endfunction
function H1O takes nothing returns boolean
return(UnitHasBuffBJ(GetEventDamageSource(),'B03T'))
endfunction
function H2O takes nothing returns nothing
call SetWidgetLife(GetEventDamageSource(),(GetUnitStateSwap(UNIT_STATE_LIFE,GetEventDamageSource())+GetEventDamage()))
call AddSpecialEffectTargetUnitBJ("origin",GetEventDamageSource(),"Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function H4O takes nothing returns boolean
return(AngleBetweenPoints(GetUnitLoc(GetEventDamageSource()),GetUnitLoc(GetTriggerUnit()))<=(GetUnitFacing(GetTriggerUnit())-340.))or(AngleBetweenPoints(GetUnitLoc(GetEventDamageSource()),GetUnitLoc(GetTriggerUnit()))>=(GetUnitFacing(GetTriggerUnit())-20.))or(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function H5O takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A07T',GetEventDamageSource())>0)and(H4O())
endfunction
function H6O takes nothing returns nothing
local real x1=GetUnitX(GetEventDamageSource())
local real y1=GetUnitY(GetEventDamageSource())
local real x2=GetUnitX(GetTriggerUnit())
local real y2=GetUnitY(GetTriggerUnit())
local real d=SquareRoot((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))
local unit u = CreateUnit(GetOwningPlayer(GetEventDamageSource()),'h007',0.,0.,0.)
call UnitApplyTimedLife(u,'BTLF',1.)
if bj_RADTODEG*Atan2(GetUnitY(GetTriggerUnit())-GetUnitY(GetEventDamageSource()),GetUnitX(GetTriggerUnit())-GetUnitX(GetEventDamageSource()))<=(GetUnitFacing(GetTriggerUnit())-340.)or bj_RADTODEG*Atan2(GetUnitY(GetTriggerUnit())-GetUnitY(GetEventDamageSource()),GetUnitX(GetTriggerUnit())-GetUnitX(GetEventDamageSource()))>=(GetUnitFacing(GetTriggerUnit())-20.)then
call AddSpecialEffectTargetUnitBJ("chest",GetTriggerUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetBJ(u,GetTriggerUnit(),((.5*I2R(GetUnitAbilityLevelSwapped('A07T',GetEventDamageSource())))*I2R(GetHeroStatBJ(1,GetEventDamageSource(),true))),ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call EnableTrigger(GetTriggeringTrigger())
endif
set u = null
endfunction
function H8O takes unit J2E,integer H9O returns integer
local integer JVO=FEE()
set IHE[JVO]=J2E
set IJE[JVO]=H9O
return JVO
endfunction
function JEO takes nothing returns boolean
return GetUnitAbilityLevel(GetEventDamageSource(),'A01K')!=0 and GetEventDamageSource()!=GetTriggerUnit() and IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))
endfunction
function JXO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer JVO=GetTimerData(t)
call SetHeroStr(IHE[JVO],(GetHeroStr(IHE[JVO],false)-IJE[JVO]),true)
call FXE(JVO)
call ReleaseTimer(GetExpiredTimer())
set t=null
endfunction
function JOO takes nothing returns nothing
local unit JRO=GetEventDamageSource()
local integer i=GetRandomInt(1,GetUnitAbilityLevel(JRO,'A01K'))
local integer JVO=H8O(JRO,i)
local timer t=NewTimer()
call SetHeroStr(JRO,(GetHeroStr(JRO,false)+i),true)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",JRO,"hand,right"))
call SetTimerData(((t)),(JVO))
call TimerStart(t,GetRandomReal(2.,10.+(2.*I2R(GetUnitAbilityLevel(JRO,'A01K')))),false,function JXO)
set t=null
set JRO=null
endfunction
function JAO takes nothing returns boolean
return((GetUnitAbilityLevelSwapped('A02X',GetEventDamageSource())>0)and(GetRandomInt(1,100)<=(GetUnitAbilityLevelSwapped('A02X',GetEventDamageSource())*2+10))and(not(GetTriggerUnit()==GetEventDamageSource() or IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource()))or GetEventDamage()<=10. or IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO))))!=null
endfunction
function JNO takes nothing returns boolean
return(AngleBetweenPoints(GetUnitLoc(GetEventDamageSource()),GetUnitLoc(GetTriggerUnit()))<=(GetUnitFacing(GetTriggerUnit())-340.))or(AngleBetweenPoints(GetUnitLoc(GetEventDamageSource()),GetUnitLoc(GetTriggerUnit()))>=(GetUnitFacing(GetTriggerUnit())-20.))
endfunction
function JBO takes nothing returns boolean
return(JNO())
endfunction
function JCO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local location JDO=GetUnitLoc(IZE[PXE])
local location JFO=CNE(JDO,128.,I0E[PXE])
local unit u = CreateUnit(GetOwningPlayer(IYE[PXE]),'h007',0.,0.,0.)
call UnitApplyTimedLife(u,'BTLF',1.)
if M5E(IZE[PXE])then
call SAE('h00J',GetLocationX(JFO),GetLocationY(JFO),(I0E[PXE]+180.),.5,"attack two",2.)
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(u,IZE[PXE],((GetUnitAbilityLevel(IYE[PXE],'A02X')*.02*I_E[PXE])+(GetHeroAgi(IYE[PXE],true)*GetUnitAbilityLevel(IYE[PXE],'A07T'))),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",IZE[PXE],"chest"))
call SetTimerData(t,PXE)
call TimerStart(t,.2,false,function JCO)
else
call ReleaseTimer(GetExpiredTimer())
call D8E(PXE)
endif
call RemoveLocation(JDO)
call RemoveLocation(JFO)
set JDO=null
set JFO=null
set t=null
set u=null
endfunction
function JGO takes unit JHO,unit JJO,real JKO returns nothing
local unit u=JHO
local unit t=JJO
local real d=JKO
local timer t2
local integer PXE=D7E()
set IYE[PXE]=u
set IZE[PXE]=t
set I_E[PXE]=d
set I0E[PXE]=(GetUnitFacing(u)-180.)
call M6E(t,450.,2.,GetUnitFacing(u),"none.mdl",.0,false,false)
set t2=NewTimer()
call SetTimerData(((t2)),(PXE))
call TimerStart(t2,.2,false,function JCO)
set t=null
set u=null
set t2=null
endfunction
function JLO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local unit u = CreateUnit(GetOwningPlayer(IPE[PXE]),'h007',0.,0.,0.)
call UnitApplyTimedLife(u,'BTLF',1.)
call ReleaseTimer(GetExpiredTimer())
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetEx(u,IQE[PXE],((GetUnitAbilityLevel(IPE[PXE],'A02X')*.6*ISE[PXE])+(GetHeroAgi(IPE[PXE],true)*GetUnitAbilityLevel(IPE[PXE],'A07T'))),false,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(GetTriggeringTrigger())
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",IQE[PXE],"chest"))
call FVE(PXE)
set t=null
set u = null
endfunction
function JMO takes unit JPO,unit JQO,real SVE returns nothing
local location IHX
local location IJX
local location ANX
local unit JSO=JPO
local unit JTO=JQO
local timer t
local integer PXE=D9E()
set IPE[PXE]=JSO
set IQE[PXE]=JTO
set ISE[PXE]=SVE
set IHX=CNE(GetUnitLoc(JTO),128.,(GetUnitFacing(JTO)+180.))
set IJX=CNE(GetUnitLoc(JTO),128.,(GetUnitFacing(JTO)+90.))
set ANX=CNE(GetUnitLoc(JTO),128.,(GetUnitFacing(JTO)-90.))
call SAE('h00J',GetLocationX(IHX),GetLocationY(IHX),GetUnitFacing(JTO),1.,"attack unarmed",1.)
call SAE('h00J',GetLocationX(IJX),GetLocationY(IHX),(GetUnitFacing(JTO)-90.),1.,"attack unarmed",1.)
call SAE('h00J',GetLocationX(IJX),GetLocationY(IHX),(GetUnitFacing(JTO)+90.),1.,"attack unarmed",1.)
call RemoveLocation(IHX)
call RemoveLocation(IJX)
call RemoveLocation(ANX)
set t=NewTimer()
call SetTimerData(t,PXE)
call TimerStart(t,.5,false,function JLO)
set t=null
set JSO=null
set JTO=null
set IHX=null
set IJX=null
set ANX=null
endfunction
function JUO takes nothing returns nothing
local unit u=GetEventDamageSource()
local unit t=GetTriggerUnit()
local real d=GetEventDamage()
if(JBO())then
call JGO(u,t,d)
else
call JMO(u,t,d)
endif
set u=null
set t=null
endfunction
function JYO takes nothing returns boolean
return(UnitHasBuffBJ(GetEventDamageSource(),'B03P'))
endfunction
function JZO takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetEventDamageSource()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0E8')
call IssueTargetOrderById(bj_lastCreatedUnit,852066,GetTriggerUnit())
endfunction
function J0O takes nothing returns boolean
return(UnitHasBuffBJ(GetEventDamageSource(),'B03S'))and(GetRandomInt(1,100)<=5)
endfunction
function J1O takes nothing returns nothing
set XK=GetUnitLoc(GetEventDamageSource())
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),XK,bj_UNIT_FACING)
call RemoveLocation(XK)
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0E6')
call IssueTargetOrderById(bj_lastCreatedUnit,852095,GetTriggerUnit())
endfunction
function J3O takes nothing returns boolean
return(UnitHasBuffBJ(GetEventDamageSource(),'B03R'))and(GetRandomInt(1,100)<=25)and(GetEventDamage()>.0)and(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function J4O takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
call UnitDamageTargetBJ(GetEventDamageSource(),GetTriggerUnit(),(GetEventDamage()*2.),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
call EnableTrigger(GetTriggeringTrigger())
set OK=GetUnitLoc(GetTriggerUnit())
call CreateTextTagLocBJ((I2S(R2I((GetEventDamage()*3.)))+"!"),OK,0,10.,100.,.0,.0,0)
call RemoveLocation(OK)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,64,90)
call SetTextTagPermanentBJ(bj_lastCreatedTextTag,false)
call SetTextTagLifespanBJ(bj_lastCreatedTextTag,5.)
call SetTextTagFadepointBJ(bj_lastCreatedTextTag,4)
endfunction
function J6O takes nothing returns nothing
local timer t=GetExpiredTimer()
local real x = 0
local real y = 0
local integer PXE=GetTimerData(t)
if I6E[PXE]==0 then
call UnitDamageTargetEx((I4E[PXE]),(I5E[PXE]),((9999999.)*1.),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect("war3mapImported\\Deadline.mdx",x,y))
call ReleaseTimer(GetExpiredTimer())
call D6E(PXE)
else
set I6E[PXE]=I6E[PXE]-1
call Q6E(I5E[PXE],I2S(I6E[PXE])+"!","|cFF800080")
call SetTimerData(t,PXE)
call TimerStart(t,1.,false,function J6O)
endif
set t=null
endfunction
function J7O takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit u3=CreateUnit((GetOwningPlayer(u)),'h007',.0,.0,.0)
local timer t=NewTimer()
local integer PXE=D5E()
set I4E[PXE]=GetEventDamageSource()
set I5E[PXE]=u
set I6E[PXE]=11
call UnitApplyTimedLife(u3,'BTLF',1.)
call UnitAddAbility(u3,'A01O')
call IssueTargetOrderById(u3,852066,u)
call Q6E(I5E[PXE],I2S(I6E[PXE])+"!","|cFF800080")
call SetTimerData(t,PXE)
call TimerStart(t,.01,false,function J6O)
set t=null
set u=null
set u3=null
endfunction
function J8O takes nothing returns boolean
//Cool death touch ability
return false
endfunction
function J9O takes nothing returns boolean
return(GetSpellAbilityId()=='A086')
endfunction
function KVO takes nothing returns nothing
set JJ=(JJ+1)
set YJ[JJ]=CreateGroup()
set KJ[JJ]=GetTriggerUnit()
set LJ[JJ]=(10.+(1.5*I2R(GetUnitAbilityLevelSwapped('A086',KJ[JJ]))))
set MJ[JJ]=(I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),KJ[JJ]))*(50.+I2R(GetUnitAbilityLevelSwapped('A086',KJ[JJ]))))
set MJ[JJ]=(MJ[JJ]+((I2R(GetHeroStatBJ(0,KJ[JJ],true))/25.)*3.*I2R(GetUnitAbilityLevelSwapped('A086',KJ[JJ]))))
set PJ=230.
set QJ=220.
set SJ=(PJ/1.53)
set TJ[1]=GetUnitLoc(KJ[JJ])
call CreateNUnitsAtLoc(1,'h00E',GetOwningPlayer(KJ[JJ]),TJ[1],bj_UNIT_FACING)
set UJ[JJ]=bj_lastCreatedUnit
call SetUnitScalePercent(UJ[JJ],(100.*(PJ/230.)),(100.*(PJ/230.)),(100.*(PJ/230.)))
call UnitApplyTimedLifeBJ(LJ[JJ],'BTLF',UJ[JJ])
call RemoveLocation(TJ[1])
call EnableTrigger(N7)
endfunction
function Trig_Hurricane_Loop_Func001Func004001003001001001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Hurricane_Loop_Func001Func004001003001001002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ])))
endfunction
function Trig_Hurricane_Loop_Func001Func004001003001001 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ])))))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func004001003001002 takes nothing returns boolean
return(0==0)
endfunction
function Trig_Hurricane_Loop_Func001Func004001003001 takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ]))))),(0==0)))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func004001003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Hurricane_Loop_Func001Func004001003002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function Trig_Hurricane_Loop_Func001Func004001003002002002 takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)
endfunction
function Trig_Hurricane_Loop_Func001Func004001003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func004001003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))))!=null
endfunction
function KXO takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ]))))),(0==0))),(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))))))!=null
endfunction
function KOO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02C',GetEnumUnit())==0)
endfunction
function KRO takes nothing returns nothing
if(KOO())then
call UnitAddAbility(GetEnumUnit(),'A02C')
endif
endfunction
function Trig_Hurricane_Loop_Func001Func006001003001001001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function Trig_Hurricane_Loop_Func001Func006001003001001002 takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ])))
endfunction
function Trig_Hurricane_Loop_Func001Func006001003001001 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ])))))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func006001003001002 takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02C',GetFilterUnit())==1)
endfunction
function Trig_Hurricane_Loop_Func001Func006001003001 takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ]))))),(GetUnitAbilityLevelSwapped('A02C',GetFilterUnit())==1)))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func006001003002001 takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_Hurricane_Loop_Func001Func006001003002002001 takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function Trig_Hurricane_Loop_Func001Func006001003002002002 takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)
endfunction
function Trig_Hurricane_Loop_Func001Func006001003002002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))!=null
endfunction
function Trig_Hurricane_Loop_Func001Func006001003002 takes nothing returns boolean
return(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))))!=null
endfunction
function KIO takes nothing returns boolean
return(GetBooleanAnd((GetBooleanAnd((GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KJ[WJ]))))),(GetUnitAbilityLevelSwapped('A02C',GetFilterUnit())==1))),(GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitInGroup(GetFilterUnit(),YJ[WJ])==false)))))))!=null
endfunction
function KAO takes nothing returns nothing
call SetUnitAbilityLevelSwapped('A02C',GetEnumUnit(),2)
call GroupAddUnit(YJ[WJ],GetEnumUnit())
call UnitAddAbility(GetEnumUnit(),'Aave')
call UnitRemoveAbility(GetEnumUnit(),'Aave')
call SetUnitPathing(GetEnumUnit(),false)
call SetUnitVertexColorBJ(GetEnumUnit(),100,50.,50.,30.)
endfunction
function KNO takes nothing returns boolean
return(GetUnitFlyHeight(GetEnumUnit())<=30.)
endfunction
function KBO takes nothing returns boolean
return(GetUnitFlyHeight(GetEnumUnit())>=QJ)
endfunction
function KCO takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02C',GetEnumUnit())==3)
endfunction
function KDO takes nothing returns boolean
return(UnitAlive(GetEnumUnit()))
endfunction
function KFO takes nothing returns nothing
call UnitDamageTargetBJ(KJ[WJ],GetEnumUnit(),MJ[WJ]+(GetUnitState(GetEnumUnit(),UNIT_STATE_MAX_LIFE)*.12*.04),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
if(KDO())then
set TJ[3]=GetUnitLoc(GetEnumUnit())
set TJ[2]=CNE(TJ[1],SJ,(AngleBetweenPoints(TJ[1],TJ[3])+11.))
call SetUnitPositionLoc(GetEnumUnit(),TJ[2])
call SetUnitFacingTimed(GetEnumUnit(),(AngleBetweenPoints(TJ[1],TJ[3])+11.),0)
if(KCO())then
call SetUnitFlyHeight(GetEnumUnit(),(GetUnitFlyHeight(GetEnumUnit())-GetRandomReal(10.,20.)),.0)
if(KNO())then
call SetUnitAbilityLevelSwapped('A02C',GetEnumUnit(),2)
endif
else
call SetUnitFlyHeight(GetEnumUnit(),(GetUnitFlyHeight(GetEnumUnit())+GetRandomReal(10.,20.)),.0)
if(KBO())then
call SetUnitAbilityLevelSwapped('A02C',GetEnumUnit(),3)
endif
endif
call RemoveLocation(TJ[2])
call RemoveLocation(TJ[3])
else
call SetUnitVertexColorBJ(GetEnumUnit(),100,100.,100.,0)
call SetUnitAbilityLevelSwapped('A02C',GetEnumUnit(),1)
call GroupRemoveUnit(YJ[WJ],GetEnumUnit())
call GroupAddUnit(ZJ,GetEnumUnit())
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit(),"BigBloodEX-NoSplat-NoGutz.mdx")
call DestroyEffect(bj_lastCreatedEffect)
if GetRandomInt(0,100)<=20+GetUnitAbilityLevel(KJ[WJ],'A086')then
call ModifyHeroStat(0,KJ[WJ],0,1)
call DestroyEffect(AddSpecialEffectTarget("BigBloodEX-NoSplat-NoGutz.mdx",KJ[WJ],"chest"))
endif
endif
endfunction
function KGO takes nothing returns nothing
call SetUnitVertexColorBJ(GetEnumUnit(),100,100.,100.,0)
call SetUnitAbilityLevelSwapped('A02C',GetEnumUnit(),1)
call SetUnitFlyHeight(GetEnumUnit(),GetUnitDefaultFlyHeight(GetEnumUnit()),.0)
call SetUnitPathing(GetEnumUnit(),true)
endfunction
function KHO takes nothing returns boolean
return(IsUnitDeadBJ(UJ[WJ]))
endfunction
function KJO takes nothing returns boolean
return(GetUnitFlyHeight(GetEnumUnit())>5.)
endfunction
function KKO takes nothing returns nothing
if(KJO())then
set TJ[2]=GetUnitLoc(GetEnumUnit())
set TJ[3]=CNE(TJ[2],20.,GetUnitFacing(GetEnumUnit()))
call SetUnitPositionLoc(GetEnumUnit(),TJ[3])
call SetUnitFlyHeight(GetEnumUnit(),(GetUnitFlyHeight(GetEnumUnit())-GetRandomReal(5.,10.)),.0)
call RemoveLocation(TJ[2])
call RemoveLocation(TJ[3])
else
call GroupRemoveUnit(ZJ,GetEnumUnit())
endif
endfunction
function Trig_Hurricane_Loop_Func003Func003001 takes nothing returns boolean
return(JJ==0)
endfunction
function Trig_Hurricane_Loop_Func003Func003002 takes nothing returns boolean
return(CountUnitsInGroup(ZJ)==0)
endfunction
function KLO takes nothing returns boolean
return(GetBooleanAnd((JJ==0),(CountUnitsInGroup(ZJ)==0)))
endfunction
function KMO takes nothing returns nothing
set WJ=1
loop
exitwhen WJ>JJ
set TJ[1]=GetUnitLoc(KJ[WJ])
call SetUnitPositionLoc(UJ[WJ],TJ[1])
set bj_wantDestroyGroup=false
if CountUnitsInGroup(YJ[WJ]) <= 6 then
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(PJ,TJ[1],Condition(function KXO)),function KRO)
set bj_wantDestroyGroup=true
call ForGroupBJ(CQE(PJ,TJ[1],Condition(function KIO)),function KAO)
endif
call ForGroupBJ(YJ[WJ],function KFO)
call RemoveLocation(TJ[1])
if(KHO())then
call ForGroupBJ(YJ[WJ],function KGO)
call GroupClear(YJ[WJ])
call GroupAddGroup(YJ[JJ],YJ[WJ])
call DestroyGroup(YJ[JJ])
call DestroyGroup(YJ[WJ])
set KJ[WJ]=KJ[JJ]
set UJ[WJ]=UJ[JJ]
set MJ[WJ]=MJ[JJ]
set LJ[WJ]=LJ[JJ]
set JJ=(JJ-1)
endif
set WJ=WJ+1
endloop
call ForGroupBJ(ZJ,function KKO)
if(KLO())then
call DestroyGroup(ZJ)
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function KQO takes nothing returns boolean
return(GetSpellAbilityId()=='A0DY')
endfunction
function KSO takes nothing returns boolean
return(EK<=18)
endfunction
function Trig_Imbue_Weapon_Func005Func002001 takes nothing returns boolean
return(EK>18)
endfunction
function Trig_Imbue_Weapon_Func005Func002002 takes nothing returns boolean
return(EK<=36)
endfunction
function KTO takes nothing returns boolean
return(GetBooleanAnd((EK>18),(EK<=36)))
endfunction
function Trig_Imbue_Weapon_Func006Func002001 takes nothing returns boolean
return(EK>36)
endfunction
function Trig_Imbue_Weapon_Func006Func002002 takes nothing returns boolean
return(EK<=54)
endfunction
function KUO takes nothing returns boolean
return(GetBooleanAnd((EK>36),(EK<=54)))
endfunction
function Trig_Imbue_Weapon_Func007Func002001 takes nothing returns boolean
return(EK>54)
endfunction
function Trig_Imbue_Weapon_Func007Func002002 takes nothing returns boolean
return(EK<=72)
endfunction
function KWO takes nothing returns boolean
return(GetBooleanAnd((EK>54),(EK<=72)))
endfunction
function Trig_Imbue_Weapon_Func008Func002001 takes nothing returns boolean
return(EK>72)
endfunction
function Trig_Imbue_Weapon_Func008Func002002 takes nothing returns boolean
return(EK<=90)
endfunction
function KYO takes nothing returns boolean
return(GetBooleanAnd((EK>72),(EK<=90)))
endfunction
function Trig_Imbue_Weapon_Func009Func002001 takes nothing returns boolean
return(EK>90)
endfunction
function Trig_Imbue_Weapon_Func009Func002002 takes nothing returns boolean
return(EK<=95)
endfunction
function KZO takes nothing returns boolean
return(GetBooleanAnd((EK>90),(EK<=95)))
endfunction
function K_O takes nothing returns boolean
return(EK>95)
endfunction
function K0O takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),GetRectCenter(bj_mapInitialPlayableArea),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(15.,'BTLF',bj_lastCreatedUnit)
set EK=GetRandomInt(1,101)
if(KSO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0E2')
endif
if(KTO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0DZ')
endif
if(KUO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0DZ')
endif
if(KWO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0E2')
endif
if(KYO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0E1')
endif
if(KZO())then
call UnitAddAbility(bj_lastCreatedUnit,'A0E2')
endif
if(K_O())then
call UnitAddAbility(bj_lastCreatedUnit,'A0E1')
endif
endfunction
function K2O takes nothing returns nothing
set DI[NI]=DI[NI]+GetEventDamage()
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Demon\\DarkConversion\\ZombifyTarget.mdl",GetEventDamageSource(),"origin"))
endfunction
function K3O takes nothing returns boolean
if GetUnitAbilityLevel(LC[(1+GetPlayerId(GetOwningPlayer(GetEventDamageSource())))],'B047')!=0 and GetTriggerUnit()!=GetEventDamageSource()then
call K2O()
endif
return false
endfunction
function K8O takes nothing returns boolean
return(GetSpellAbilityId()=='AIxs')
endfunction
function K9O takes nothing returns nothing
call CameraClearNoiseForPlayer(GetOwningPlayer(GetTriggerUnit()))
endfunction
function LEO takes nothing returns boolean
return(GetSpellAbilityId()=='A02F')
endfunction
function LXO takes nothing returns nothing
set TL=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h003',GetOwningPlayer(GetTriggerUnit()),TL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(.01,'BTLF',bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'h007',GetOwningPlayer(GetTriggerUnit()),TL,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A02D')
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,852057,TL)
call RemoveLocation(TL)
endfunction
function LRO takes nothing returns boolean
return(GetSpellAbilityId()=='A03V')and(GetPlayerController(GetOwningPlayer(GetSpellTargetUnit()))==MAP_CONTROL_COMPUTER)
endfunction
function Trig_Whole_Displacement_Func003001 takes nothing returns boolean
return((1+GetPlayerId(GetOwningPlayer(GetSpellTargetUnit())))==6)
endfunction
function LIO takes nothing returns nothing
set TempLocation=GetUnitLoc(GetSpellTargetUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
if IsUnitAlly(GetSpellTargetUnit(),Player(0)) then
call SetUnitPositionLoc(GetSpellTargetUnit(),MD[GetRandomInt(1,2)])
else
call SetUnitPositionLoc(GetSpellTargetUnit(),MD[GetRandomInt(3,4)])
endif
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function LNO takes nothing returns boolean
return(GetSpellAbilityId()=='A02A')
endfunction
function LBO takes nothing returns nothing
set TempLocation = GetSpellTargetLoc()
call AddSpecialEffectLocBJ(TempLocation,"war3mapImported\\TrinusTenebrae.mdx")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call CreateNUnitsAtLoc(1,MC[(PC+5)],GetOwningPlayer(GetTriggerUnit()),TempLocation,bj_UNIT_FACING)
call TriggerExecute(K7)
call RemoveLocation(TempLocation)
endfunction
function LDO takes nothing returns nothing
local unit LFO
set LFO=bj_lastCreatedUnit
call ShowUnitHide(LFO)
call TriggerSleepAction(1.)
call ShowUnitShow(LFO)
call UnitApplyTimedLifeBJ(60,'BTLF',LFO)
set TempLocation=GetUnitLoc(LFO)
call AddSpecialEffectLocBJ(TempLocation,"war3mapImported\\Doomsday.mdx")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function LHO takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='n00U')
endfunction
function LJO takes nothing returns nothing
set TempLocation=GetUnitLoc(GetDyingUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetDyingUnit())
endfunction
function LLO takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='n017')
endfunction
function LMO takes nothing returns nothing
set TempLocation=GetUnitLoc(GetDyingUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetDyingUnit())
endfunction
function LQO takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='n00M')
endfunction
function LSO takes nothing returns nothing
set TempLocation=GetUnitLoc(GetDyingUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportCaster.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetDyingUnit())
endfunction
function LUO takes nothing returns boolean
return(GetUnitTypeId(GetDyingUnit())=='n00L')
endfunction
function LWO takes nothing returns nothing
set TempLocation=GetUnitLoc(GetDyingUnit())
call AddSpecialEffectLocBJ(TempLocation,"Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")
call RemoveLocation(TempLocation)
call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetDyingUnit())
endfunction
function LZO takes nothing returns nothing
set FF=InitHashtable()
endfunction
function L0O takes nothing returns nothing
call SetCameraFieldForPlayer(GetEnumPlayer(),CAMERA_FIELD_TARGET_DISTANCE,2350.,.2)
endfunction
function L1O takes nothing returns nothing
call FogEnableOff()
call FogMaskEnableOff()
endfunction
function Trig_General_Map_Initialization_Func015Func001001 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_General_Map_Initialization_Func016Func001001 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function L2O takes nothing returns boolean
return(ST)
endfunction
function L3O takes nothing returns nothing
call DialogDisplayBJ(true,YC,GetEnumPlayer())
endfunction
function L4O takes nothing returns nothing
call DialogDisplayBJ(false,YC,GetEnumPlayer())
endfunction
function L5O takes nothing returns boolean
return(VD[1]>VD[2])and(VD[1]>=VD[3])and(VD[1]>=VD[4])and(VD[1]>=VD[5])
endfunction
function L6O takes nothing returns boolean
return(VD[2]>=VD[1])and(VD[2]>=VD[3])and(VD[2]>=VD[4])and(VD[2]>=VD[5])
endfunction
function L7O takes nothing returns boolean
return(VD[3]>VD[1])and(VD[3]>VD[2])and(VD[3]>=VD[4])and(VD[3]>=VD[5])
endfunction
function L8O takes nothing returns boolean
return(VD[4]>VD[1])and(VD[4]>VD[2])and(VD[4]>VD[3])and(VD[4]>=VD[5])
endfunction
function L9O takes nothing returns boolean
return(VD[5]>VD[1])and(VD[5]>VD[2])and(VD[5]>VD[3])and(VD[5]>VD[4])
endfunction
function MVO takes nothing returns boolean
return(XT==0)
endfunction
function MEO takes nothing returns boolean
return(XT==1)
endfunction
function MXO takes nothing returns boolean
return(XT==2)
endfunction
function MOO takes nothing returns boolean
return(XT==3)
endfunction
function MRO takes nothing returns boolean
return(XT==4)
endfunction
function MIO takes nothing returns boolean
return(XT==5)
endfunction
function MAO takes nothing returns nothing
call SetPlayerFlagBJ(PLAYER_STATE_GIVES_BOUNTY,true,GetEnumPlayer())
endfunction
function Trig_General_Map_Initialization_Func048Func001001 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function DisableEasyFunc takes nothing returns nothing
if XT==1 then
call SetPlayerAbilityAvailableBJ(false,'A02Y',GetEnumPlayer())
endif
call SetPlayerAbilityAvailableBJ(false,'A019',GetEnumPlayer())
call SetPlayerAbilityAvailableBJ(false,'A03X',GetEnumPlayer())
call SetPlayerAbilityAvailableBJ(false,'A00J',GetEnumPlayer())
endfunction
function MNO takes nothing returns nothing
call CRE(.01)
call CameraSetSmoothingFactor(3.)
set GF=18
set HF=15.
call SetUnitAnimationByIndex(E4V,1)
call SetUnitAnimationByIndex(E7V,1)
call ForForce(bj_FORCE_ALL_PLAYERS,function L0O)
//call C8E(Player(8),PLAYER_COLOR_LIGHT_BLUE,true)
//call C8E(Player(9),PLAYER_COLOR_LIGHT_BLUE,true)
call C8E(Player(10),PLAYER_COLOR_LIGHT_BLUE,true)
call C8E(Player(11),PLAYER_COLOR_LIGHT_BLUE,true)
call ForForce(bj_FORCE_ALL_PLAYERS,function L1O)
call CRE(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))then
set QD[1]=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))then
set QD[2]=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,"Red is now picking modes. Please wait.")
call TriggerExecute(EUV)
call StartTimerBJ(CreateTimerBJ(false,20.),false,20.)
call CreateTimerDialogBJ(bj_lastStartedTimer,"Game modes")
call CRE(20.)
call DestroyTimerDialog(bj_lastCreatedTimerDialog)
set GAMEM = false
if(L2O())then
call TriggerExecute(ETV)
endif
if(MVO())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,"Players are now voting on the difficulty setting. Please be patient.")
call ForForce(bj_FORCE_ALL_PLAYERS,function L3O)
call CRE(9.)
call ForForce(bj_FORCE_ALL_PLAYERS,function L4O)
if(L5O())then
set XT=3
endif
if(L6O())then
set XT=1
endif
if(L7O())then
set XT=2
endif
if(L8O())then
set XT=4
endif
if(L9O())then
set XT=5
endif
endif
if(MEO())then
set ED=90.
set RT="|cff00baffVery Easy|r"
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,(RT+" has been initiated; monsters are at 90% health and damage, Commanders are very easy, and almost all offense is disabled."))
endif
if(MXO())then
set ED=100.
set RT="|cff1ab700Easy|r"
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,(RT+" has been initiated; monsters are at 100% health and damage, Commanders are easy, and most offense is disabled."))
endif
if(MOO())then
set ED=100.
set RT="|cfff6ff00Normal|r"
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,(RT+" has been initiated; monsters are at 100% health and damage, Commanders are normal, and offense is enabled."))
endif
if(MRO())then
set ED=100.
set RT="|cffff6000Nightmare|r"
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,(RT+" has been initiated; monsters are at 100% health and damage, Commanders are nightmarish, and offense is enabled. Commanders also cost 15 lives."))
endif
if(MIO())then
set ED=105.
set RT="|cffaa0000Hell|r"
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,9.,(RT+" has been initiated; monsters are at 105% health and damage, Commanders are impossible, and offense is enabled. Commanders also cost 15 lives."))
endif
call FOX()
if XT <= 2 then
call ForForce(bj_FORCE_ALL_PLAYERS,function DisableEasyFunc)
endif
call TriggerExecute(I1)
call PlaySoundBJ(GY)
set DS=true
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00Welcome to Enfo's TS: FFB Edition, presented to you by Strikest and Swedish_Buddha(RIP).|r\n")
//call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00For |cFFE82618basic information|r|cffffcc00, including a list of |cFFE82618item recipes|r |cffffcc00and |cFFFF0000RECOMMENDED ITEMS|r, |cffffcc00please press |cFFE82618F9|r. |cffffcc00Be aware that there is also a |cFFE82618Recipe Shop|r |cffffcc00located on your Team Goal.|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00For |cFFE82618basic information|r|cffffcc00, including a list of |cFFFF0000RECOMMENDED ITEMS|r, |cffffcc00please press |cFFE82618F9|r. |cffffcc00Be aware that there is also a |cFFE82618Recipe Shop|r |cffffcc00located on your Team Goal.|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00Please stay even if you have lost, the game will |cFFFF0000automatically remake|r.|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00Visit the official wiki at enfosffb.wikia.com for map information and strategy tips.|r")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cFF1B9BE0Join the official discord at https://discord.gg/9fuCGD3 to find games, report bugs, or suggest things for the map!|r")
//call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"|cffffcc00Visit www.clan-ffb.com for news, bug report, tips or suggestions!|r")
call SetTimeOfDay(12)
call ForForce(C_E(MAP_CONTROL_COMPUTER),function MAO)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))then
call CreateNUnitsAtLoc(1,'ushd',Player(-1+(bj_forLoopAIndex)),GetPlayerStartLocationLoc(Player(-1+(bj_forLoopAIndex))),bj_UNIT_FACING)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateTextTagLocBJ("North: Advanced/Hybrid Heroes",CNE(CNE(GetRectCenter(PU),150.,180.),450.,90.),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("East: Support Heroes",CNE(CNE(GetRectCenter(PU),150.,180.),450.,.0),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("West: Tank Heroes",CNE(CNE(GetRectCenter(PU),150.,180.),450.,180.),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("South: Spellcaster Heroes",CNE(CNE(GetRectCenter(PU),150.,180.),450.,270.),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("Presented to you by: |cFF540081S|r|cFF670675t|r|cFF790C69r|r|cFF8C125Di|r|cFF9E1750k|r|cFFB11D44e|r|cFFC32338s|r|cFFD6292Ct|r,",CNE(GetRectCenter(PU),150.,180.),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("Swedish_Buddha(RIP).",CNE(CNE(GetRectCenter(PU),50.,270.),150.,180.),0,8.,80.,80.,80.,0)
call CreateTextTagLocBJ("|cFF2380DC Discord: discord.gg/9fuCGD3|r",CNE(CNE(GetRectCenter(PU),-50.,270.),150.,180.),0,8.,80.,80.,80.,0)
call CreateQuestBJ(0,"Enfo's Team Survival:FFB","Welcome to Enfo's Team Survival: FFB Edition, by Strikest and Swedish_Buddha(Retired).|n|nJoin our discord! discord.gg/9fuCGD3|n|nVisit the official wiki at www.enfosffb.wikia.com for map information, tips, and strategy.","ReplaceableTextures\\CommandButtons\\BTNCombat1.blp")
call CreateQuestBJ(0,"Recommended Items","|cFFB6488FAll Heroes|r: |cFFFF0000Winged Leather Boots|r, |cFFFF0000Elven Plate Mail|r, Health Potions.|n|n|cFF0EA8F1Caster Heroes|r|nHisan Salves, Staff of Peace(Tranquil Blade + Elder Staff + Sapphire-inset Ring)|nIndulgence(Lategame, after tank has items.), Tranquil Warfare Set(Again, lategame.)|nUthmor's Skullcleaver(Criticals work on spells, but only get this SUPER lategame, after tank has good items; it's very expensive and the tank needs the gold more.)|n|n|cFFE6691ATank Heroes|r|nThe Eternal Core(Ruby-inset Ring + Bloodstone-inset Ring + Recipe(Found in Ezara's Runewords, NOT Venus.)), Shard of Ragnaros(Mid-lategame)|nReinforced Crystal Armor/Shadowbark Leathers(Only if your hero does not have Evasion, it does not stack)/Victory Mail(Anti-Magic Shield, useful for preventing Armor Crush and Knockback)|nRagnarok/Immortal Escutcheon(Lategame)|n|n|cFFB3CC33Melee DPS|r|nThe Brutalizer(Bloodstone-inset Ring + Polished Elven Telo + Spineripper)|nRagnarok(Strength heroes, lategame), The Ravager(Lategame)","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
call CreateQuestBJ(0,"Commands","|cffffcc00-monsters|r - Shows how many monsters there are on each side.|n|cffffcc00-repick|r - Repicks your hero.|n|cffffcc00-tips|r - Toggles wave tips.|n|cffffcc00-autosend x|r - Autosends player x your resources every 10 seconds.|n|cffffcc00-autopool off|r - Turns off autosend.|n|cffffcc00-zoom xxxx|r - zooms from 0 to 3000.|n|cffffcc00-range xxxx|r - Sets Acquisition Range.|n|cffffcc00-clear|r - Clears all text on the display.|n|cffffcc00-tm xxxx|r - Sets Targeted Magic range (AM only).|n|cffffcc00-toggleautoselect|r - Toggles auto-selection of minions (Unliving Only).|n|cffffcc00-suicide|r - Kills your hero after 10 seconds(use if your hero is stuck).|n|cffffcc00-sr|r - Allows stats to be recorded for the current round(Red only).|n|cffffcc00-revivefix|r - Revives your hero after a certain period of time(WARNING!!! - Only use this if your hero did not revive due to a bug. This is untested and may bug your hero otherwise).","ReplaceableTextures\\CommandButtons\\BTNEngineeringUpgrade.blp")
call CreateQuestBJ(0,"Credits","TRIGSTR_1","ReplaceableTextures\\CommandButtons\\BTNTomeOfRetraining.blp")
call CreateQuestBJ(0,"Credits Part 2","Coding|nWaffle(est) - Improved autopool system.","ReplaceableTextures\\CommandButtons\\BTNTomeOfRetraining.blp")
call CreateQuestBJ(2,"Projectile System","Unlike any other Enfo map you've encountered, our version features a projectile system.|n This means all projectile spells and attacks can be modified in mid-air, and they can't collide with creeps, walls, etc. If you shoot a straight forward going spell on a target in the middle of a crowd, it won't go past the first units there to reach the target. It will collide with the first one in its path instead.|n This also means there are spells that remove a spell that you shot towards an enemy before it actually reached its target.\n","ReplaceableTextures\\CommandButtons\\BTNMarksmanship.blp")
call CreateQuestBJ(2,"Bosses and Commanders","Our version features bosses and commanders.|n A Commander comes with every wave, and usually have either some global affect or aura; or they do a lot of damage.|n An example can be the Fanrae commander. He keeps all fanraes permanent invisible while he's alive - so even when they're attacking, they can't be seen with normal means.|n|n Bosses are harder than commanders, and will show up at certain events in the map. You will know once you see one.","ReplaceableTextures\\CommandButtons\\BTNEtheral1.blp")
//call CreateQuestBJ(2,"Item Recipes Part 1"," Recipe 1: Elite Elven Boots\n Arbelog Paw Boots + Elven Hunting Boots + Winged Leather Boots\n\n Recipe 2: Thirsting Blade\n Bloodthirst + Gleaming Longsword + Spineripper\n\n Recipe 3: Obsidian Ring\n Grimstone-inset Ring * 4\n\n Recipe 4: Uthmor's Mirror Blade\n T'kashi Mirror Blade + Uthmor's Skullcleaver\n\n Recipe 5: Savage Blade\n Bloodthirst + Nimsha\n\n Recipe 6: Ring Of Victory\n Bloodstone-inset Ring + Diamond-etched Ring + Moonstone-inset Ring + Zircon-inset Ring\n\n Recipe 7: Ring Of Supremacy\n Obsidian Ring + Ring of Victory\n\n Recipe 8: Elven Stalking Boots\n Elven Hunting Boots *3\n\n Recipe 9: Supreme Elven Boots\n Elite Elven Boots + Elven Stalking Boots\n\n Recipe 10: Hermes' Treads\n Supreme Elven Boots + Hermes' Treads Recipe","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
//call CreateQuestBJ(2,"Item Recipes Part 2"," Recipe 11: Feather Ring\n Zircon-inset Ring * 2\n\n Recipe 12: Lightning Ring\n Feather Ring * 2\n\n Recipe 13: Uthmor's Sinister Blade\n Obsidian-inset Ring + Uthmor's Mirror Blade\n\n Recipe 14: Rampart Shield\n Kite Shield + Small Round Shield + Tower Shield\n\n Recipe 15: Zircon-inset Ring\n Emerald-inset Ring * 4\n\n Recipe 16: Moonstone-inset Ring\n Sapphire-inset Ring * 4\n\n Recipe 17: Bloodstone-inset Ring\n Ruby-inset Ring * 4\n\n Recipe 18: Diamond-etched Ring\n Crystal-etched Ring * 4\n\n Recipe 19: Wand of the West Wind\n Elder Staff + Tribal Staff\n\n Recipe 20: Fragarach\n Polished Elven Telo + Tribal Staff","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
//call CreateQuestBJ(2,"Item Recipes Part 3"," Recipe 21: Tranquil Blade\n Gleaming Longsword + Tranquil Blade Recipe\n\n Recipe 22: Force Edge\n Elder Staff + Sapphire-inset Ring + Polished Elven Telo\n\n Recipe 23: The Brutalizer\n Bloodstone-inset Ring + Polished Elven Telo + Spineripper\n\n Recipe 24: Brisker\n Polished Elven Telo + Polished Elven Telo + Zircon-inset Ring\n\n Recipe 25: Zirconium Crystal\n Zircon-inset Ring + Supreme Elven Boots\n\n Recipe 26: Phantom Dancer\n Zirconium Crystal + Brisker\n\n Recipe 27: Concentrated Zircon\n Zirconium Crystal + Zirconium Crystal \n\n Recipe 28: Phantom Shredder\n Phantom Dancer + T'kashi Mirror Blade\n\n Recipe 29: Tainted Leather\n Argelog Paw Boots + Shroud of Shadows + Elven Plate Mail\n\n Recipe 30: Shadowbark Leathers\n Tainted Leather + Ironbark Leathers","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
//call CreateQuestBJ(2,"Item Recipes Part 4"," Recipe 31: Reinforced Crystal Armor\n Crystal Armor + Crystal Armor + Ironbark Leathers\n\n Recipe 32: Victory Mail\n Ring of Victory + Ironbark Leathers\n\n Recipe 33: Lightning Bow\n Lightning Ring + Zircon-inset Ring + Lightning Bow Recipe\n\n Recipe 34: Bow of Tears\n Lightning Bow + Spineripper\n\n Recipe 35: Agony\n Bow of Tears + Bow of Tears + Zirconium Crystal\n\n Recipe 36: Bloodstone\n Bloodstone-inset Ring * 3 + Grimstone-inset Ring\n\n Recipe 37: Titan Shield\n Rampart Shield + Bloodstone-inset Ring\n\n Recipe 38: Aegis\n Titan Shield + Bloodstone * 2 + Dragon-scale Shield * 2\n\n Recipe 39: Ragnarok\n Thirsting Blade + Aegis + Shard of Ragnaros\n\n Recipe 40: Eternal Thirst\n T'kashi Mirror Blade * 2 + Thirsting Blade + Bloodstone","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
//call CreateQuestBJ(2,"Item Recipes Part 5"," Recipe 41: The Ravager\n The Brutalizer + Savage Blade * 2\n Recipe 42: Pride's Downfall\n Agani Tayeu'a * 2 + Elder Staff * 2\n Recipe 43: Immortal Escutcheon\n Aegis + Bloodstone + Obsidian-inset Ring\n Recipe 44: Shard of Ragnaros\n Bloodthirst*2 + Bloodstone\n Recipe 45: Tranquil Force\n Tranquil Blade + Force Edge + Crystal-etched Ring\n Recipe 46: The Witch's Fate\n T'kashi Mirror Blade + Ring of Victory + Titan Shield\n Recipe 47: Dementia's Door\n Diamond-etched Ring + Crystal-etched Ring + Elder Staff\n Recipe 48: Callous Mutilator\n The Brutalizer * 2 + Bloodstone-inset Ring\n Recipe 49: The Eternal Core\n Bloodstone-inset Ring + Ruby-inset Ring + Recipe\n Recipe 50: Eternity's End\n The Eternal Core * 2 + Obsidian-inset Ring","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
//call CreateQuestBJ(2,"Item Recipes Part 6"," Recipe 51: Angel Crucible\n Sinister Urn + Sinister Urn(Light) + Sinister Urn(Dark)\n Recipe 52: Daedalus\n Concentrated Zirconium + Force Edge + Ring of Victory\n Recipe 53: Night's Veil\n Zirconium Crystal + Emerald-inset Ring + Shroud of Shadows\n Recipe 54: Indulgence\n Agani Tayeu'a + Moonstone-inset Ring * 2\n Recipe 55: Tyranny\n Agani Tayeu'a + Bloodstone-inset Ring + Spineripper\n Recipe 56: Paradox Blade\n Fragarach + Tranquil Blade + Spineripper + Zircon-inset Ring + Moonstone-inset Ring\n Recipe 57: Soulrend\n Fragarach + Nimsha + T'kashi Mirror Blade\n Recipe 58: Staff of Peace\n Tranquil Blade + Elder Staff + Sapphire-inset Ring","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
call CreateQuestBJ(2,"Item Recipes","Recipe items are sold by Venus, the Recipe Shop located in your Team Goal. Each recipe item sold by Venus also lists its component items, at the bottom of the tooltip. You can additionally purchase the completed recipe item, but it will cost 10% more than if you had combined it yourself.","ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp")
set QC=8
if not LWMON then
call TriggerExecute(V4V)
else
call ExecuteFunc("IncomeTrigger")
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function MCO takes nothing returns nothing
set DT[1]="|cff00baffCrabs|r"
set MD[1]=GetRectCenter(LU)
set MD[2]=GetRectCenter(MU)
set MD[3]=GetRectCenter(JU)
set MD[4]=GetRectCenter(KU)
set PD[1]=GetRectCenter(GU)
set PD[2]=GetRectCenter(HU)
set LT[1]='Aspo'
set LT[2]='A04S'
set LT[3]='ANbh'
set LT[4]='Absk'
set LT[5]='A01X'
set LT[6]='Afzy'
set LT[7]='Acht'
set LT[8]='ACcs'
set LT[10]='A01Z'
set LT[11]='A01R'
set LT[12]='A04H'
set LT[13]='SCae'
set LT[14]='ACvp'
set LT[15]='ACua'
set LT[16]='AEar'
set LT[17]='A00O'
set LT[18]='A01W'
set LT[19]='ACav'
set LT[20]='ACac'
set LT[21]='A01T'
set LT[22]='A01M'
set LT[23]='ACbb'
set LT[24]='AIcb'
set LT[25]='Ambd'
set LT[26]='Apiv'
set LT[27]='Afbt'
set LT[28]='A037'
set KT[1]=100.
set KT[2]=250.
set KT[3]=420.
set KT[4]=690.
set KT[5]=1100.
set KT[6]=1600.
set KT[7]=2400.
set KT[8]=3600.
set KT[9]=5400.
set KT[10]=6900.
set ZS[1]=40.
set ZS[2]=78.6
set ZS[3]=143.83
set ZS[4]=254.08
set ZS[5]=440.39
set ZS[6]=755.27
set ZS[7]=1287.4
set ZS[8]=2186.71
set ZS[9]=3706.53
set ZS[10]=6275.04
set IT[1]=60.
set IT[2]=120.
set IT[3]=270.
set IT[4]=480.
set IT[5]=840.
set IT[6]=1500.
set IT[7]=2400.
set IT[8]=3600.
set IT[9]=6000.
set IT[10]=9000.
set AT[1]=729.
set AT[2]=1652.25
set AT[3]=2888.
set AT[4]=5050.
set AT[5]=9625.
set AT[6]=15625.
set AT[7]=25276.
set AT[8]=39402.
set AT[9]=49726.
set AT[10]=61256.
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set GD[bj_forLoopAIndex]=GU
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set GD[bj_forLoopAIndex]=HU
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set GD[12]=GU
set MC[1]='n020'
set MC[2]='n02G'
set MC[3]='n01Y'
set MC[4]='n02W'
set MC[5]='n024'
set MC[6]='n022'
set MC[7]='n03F'
set MC[8]='n02E'
set MC[9]='e00Z'
set MC[10]='n03O'
set MC[11]='n028'
set MC[12]='n02U'
set MC[13]='n039'
set MC[14]='n02A'
set MC[15]='n030'
set MC[16]='n02S'
set MC[17]='n02Q'
set MC[18]='n01W'
set MC[19]='n03L'
set MC[20]='n03Q'
set MC[21]='n02M'
set MC[22]='n03G'
set MC[23]='n02K'
set MC[24]='n03D'
set MC[25]='n02I'
set MC[26]='n02C'
set MC[27]='n02Y'
set MC[28]='n037'
set MC[29]='n026'
set MC[30]='n01U'
set MC[31]='n03B'
set MC[32]='e00G'
set MC[33]='n03R'
set MC[34]='n02O'
set MC[35]='u00R'
set MC[36]='u00V'
set MC[37]='u00W'
set MC[38]='u00P'
set MC[39]='u00U'
set MC[40]='n016'
set MC[41]='n016'
set MC[42]='n016'
set MC[43]='n016'
set MC[44]='n016'
set MC[45]='n016'
set MC[46]='n016'
set UD[1]="GlowRed.mdl"
set UD[2]="GlowBlue.mdl"
set UD[3]="GlowTeal.mdl"
set UD[4]="GlowPurple.mdl"
set UD[5]="GlowYellow.mdl"
set UD[6]="GlowOrange.mdl"
set UD[7]="GlowGreen.mdl"
set UD[8]="GlowPink.mdl"
set PK[1]='n021'
set PK[2]='n02H'
set PK[3]='n01Z'
set PK[4]='n02X'
set PK[5]='n025'
set PK[6]='n023'
set PK[7]='n03H'
set PK[8]='n02F'
set PK[9]='e01S'
set PK[10]='n03P'
set PK[11]='n029'
set PK[12]='n02V'
set PK[13]='n03A'
set PK[14]='n02B'
set PK[15]='n031'
set PK[16]='n02T'
set PK[17]='n02R'
set PK[18]='n01X'
set PK[19]='n03N'
set PK[20]='n03S'
set PK[21]='n02N'
set PK[22]='n03J'
set PK[23]='n02L'
set PK[24]='n03E'
set PK[25]='n02J'
set PK[26]='n02D'
set PK[27]='n02Z'
set PK[28]='n038'
set PK[29]='n027'
set PK[30]='n01V'
set PK[31]='n03C'
set PK[32]='e00X'
set PK[33]='n03T'
set PK[34]='n02P'
set PK[35]='u00S'
set PK[36]='u00X'
set PK[37]='u00Y'
set PK[38]='u00Q'
set PK[39]='u00T'
set PK[40]='n03K'
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function MFO takes nothing returns boolean
return(HD==false)
endfunction
function MGO takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
endfunction
function Trig_Initialize_Rematch_Func006001 takes nothing returns boolean
return(SC==0)
endfunction
function Trig_Initialize_Rematch_Func011Func002001002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h000')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h00P')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h004')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h00G')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h00H')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002002002001 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h00I')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002002002002 takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h007')
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007'))
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00H'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007'))))
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00G'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00H'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007'))))))
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h004'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00G'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00H'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007'))))))))
endfunction
function Trig_Initialize_Rematch_Func011Func002001002002 takes nothing returns boolean
return GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00P'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h004'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00G'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00H'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007'))))))))))
endfunction
function MHO takes nothing returns boolean
return (GetUnitTypeId(GetFilterUnit())!='h011')and GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h000'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00P'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h004'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00G'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00H'),(GetBooleanAnd((GetUnitTypeId(GetFilterUnit())!='h00I'),(GetUnitTypeId(GetFilterUnit())!='h007')))))))))))) and GetUnitTypeId(GetFilterUnit())!='H013' and GetUnitTypeId(GetFilterUnit())!='H014' and GetUnitTypeId(GetFilterUnit())!='H015' and GetUnitTypeId(GetFilterUnit())!='H016' and GetUnitTypeId(GetFilterUnit())!='o006' and GetUnitTypeId(GetFilterUnit())!='n01G' and GetUnitTypeId(GetFilterUnit())!='n01C'
endfunction
function MJO takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function Trig_Initialize_Rematch_Func011Func003001001 takes nothing returns boolean
return(GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER)
endfunction
function Trig_Initialize_Rematch_Func011Func003001002 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_Initialize_Rematch_Func011Func003001 takes nothing returns boolean
return GetBooleanAnd((GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER),(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))
endfunction
function MKO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='h000')
endfunction
function MLO takes nothing returns nothing
call SetUnitManaBJ(GetEnumUnit(),50.)
call UnitResetCooldown(GetEnumUnit())
endfunction
function MMO takes nothing returns nothing
call RemoveItem(GetEnumItem())
endfunction
function MPO takes nothing returns nothing
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD,0)
call SetPlayerStateBJ(GetEnumPlayer(),PLAYER_STATE_RESOURCE_LUMBER,0)
endfunction
function MQO takes nothing returns nothing
call SetPlayerAbilityAvailableBJ(true,'A02A',GetEnumPlayer())
endfunction
function Trig_Initialize_Rematch_Func039Func001001 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function Trig_Initialize_Rematch_Func040Func001001 takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function RemoveUnitSpawners takes nothing returns boolean
local integer i = GetUnitTypeId(GetFilterUnit())
if i == 'H013' or i == 'H014' or i == 'H015' or i == 'H016' then
call RemoveUnit(GetFilterUnit())
endif
return false
endfunction
globals
timerdialog GameModeDialog
endglobals
function MSO666 takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer i = 0
local integer i2 = 1
local integer loopi=0
local unit u
call ReleaseTimer(t)
set GAMEM=false
call DestroyTimerDialog(GameModeDialog)
if not LWMON then
call TriggerExecute(V4V)
else
call GroupEnumUnitsInRange(UNIT_SPAWNERS_GROUP,0.,0.,99999.,function RemoveUnitSpawners)
loop
exitwhen loopi==12
set Income[loopi] = StartingIncomeVar
if GetPlayerSlotState(Player(loopi)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(loopi)) != MAP_CONTROL_COMPUTER then
set u = CreateUnit(Player(loopi),'H014',0.,-5000.,0.)
call SetHeroLevel(u,300,false)
set u = null
set u = CreateUnit(Player(loopi),'H015',0.,-5000.,0.)
call SetHeroLevel(u,300,false)
set u = null
set u = CreateUnit(Player(loopi),'H016',0.,-5000.,0.)
call SetHeroLevel(u,300,false)
set u = null
set u = CreateUnit(Player(loopi),'H013',0.,-5000.,0.)
call SetHeroLevel(u,300,false)
set u = null
endif
set loopi=loopi+1
endloop
loop
exitwhen i==12
loop
exitwhen i2==41
set CommanderCount[i2*12+i] = 0
set i2 = i2 + 1
endloop
set i2=1
set i = i +1
endloop
call ExecuteFunc("IncomeTrigger")
endif
set u = null
set t= null
endfunction
function MSO takes nothing returns nothing
local timer t
local integer i = 0
local integer i2 = 1
//call BJDebugMsg("Does this run?")
set HD=true
call GroupClear(PATHING_GROUP)
//call BJDebugMsg("Pathing Group Cleared")
set bj_wantDestroyGroup=true
call ForGroupBJ(CPE(bj_mapInitialPlayableArea),function MGO)
call PauseAllUnitsBJ(true)
if((SC<=0))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"East Side has won! Congratulations! |cFFFF0000Please stay for the rematch.|r")
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"West Side has won! Congratulations! |cFFFF0000Please stay for the rematch.|r")
endif
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call KillUnit(PL[bj_forLoopAIndex])
set PL[bj_forLoopAIndex]=null
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CRE(15.)
set HD=false
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call RemoveUnit(LC[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=12
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set bj_wantDestroyGroup=true
call ForGroupBJ(CUE(Player(-1+(bj_forLoopAIndex)),Condition(function MHO)),function MJO)
if((GetBooleanAnd((GetPlayerController(Player(-1+(bj_forLoopAIndex)))==MAP_CONTROL_USER),(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))))then
call CreateNUnitsAtLoc(1,'ushd',Player(-1+(bj_forLoopAIndex)),GetPlayerStartLocationLoc(Player(-1+(bj_forLoopAIndex))),bj_UNIT_FACING)
endif
set OD[bj_forLoopAIndex]=false
set FM[bj_forLoopAIndex]=null
set VL[bj_forLoopAIndex]=null
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_wantDestroyGroup=true
call ForGroupBJ(CLE(bj_mapInitialPlayableArea,Condition(function MKO)),function MLO)
call EnumItemsInRectBJ(bj_mapInitialPlayableArea,function MMO)
call PauseAllUnitsBJ(false)
call ForForce(bj_FORCE_ALL_PLAYERS,function MPO)
set SC=100
set TC=100
set CS=0
set FS=0
//call MultiboardSetItemValueBJ(AS[1],2,(CountPlayersInForceBJ(ES)+6),"0%")
//call MultiboardSetItemValueBJ(AS[2],2,(CountPlayersInForceBJ(ES)+6),"0%")
call MultiboardSetItemValueBJ(AS[1],1,2,(YQ+(" - "+(I2S(SC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[2],1,2,(YQ+(" - "+(I2S(SC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[1],1,(CountPlayersInForceBJ(VS[1])+4),(ZQ+(" - "+(I2S(TC)+" Lives"))))
call MultiboardSetItemValueBJ(AS[2],1,(CountPlayersInForceBJ(VS[1])+4),(ZQ+(" - "+(I2S(TC)+" Lives"))))
set bj_forLoopBIndex=2
set bj_forLoopBIndexEnd=(2+CountPlayersInForceBJ(VS[1]))
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemValueBJ(AS[1],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],2,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],2,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],4,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],4,bj_forLoopBIndex,"0")
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopBIndex=(CountPlayersInForceBJ(VS[1])+4)
set bj_forLoopBIndexEnd=(CountPlayersInForceBJ(ES)+4)
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemValueBJ(AS[1],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],3,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],2,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],2,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[1],4,bj_forLoopBIndex,"0")
call MultiboardSetItemValueBJ(AS[2],4,bj_forLoopBIndex,"0")
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopBIndex=2
set bj_forLoopBIndexEnd=(2+CountPlayersInForceBJ(VS[1]))
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ(AS[1],1,bj_forLoopBIndex,true,false)
call MultiboardSetItemStyleBJ(AS[2],1,bj_forLoopBIndex,true,false)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopBIndex=(CountPlayersInForceBJ(VS[1])+4)
set bj_forLoopBIndexEnd=(CountPlayersInForceBJ(ES)+4)
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ(AS[1],1,bj_forLoopBIndex,true,false)
call MultiboardSetItemStyleBJ(AS[2],1,bj_forLoopBIndex,true,false)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set BT[bj_forLoopAIndex]=0
set FT[bj_forLoopAIndex]=0
set JT[bj_forLoopAIndex]=false
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set HT[bj_forLoopAIndex]=0
set GT[bj_forLoopAIndex]=0
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set QC=8
set MT[(1+GetPlayerId(GetTriggerPlayer()))]=0
set OT=0
set QD[1]=false
set QD[2]=false
call ForForce(bj_FORCE_ALL_PLAYERS,function MQO)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=5
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))then
set QD[1]=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=6
set bj_forLoopAIndexEnd=10
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if((GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING))then
set QD[2]=true
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set GAMEM = true
set t = NewTimer()
set GameModeDialog=CreateTimerDialog(t)
call TimerDialogSetTitle(GameModeDialog, "Game Modes:")
call TimerDialogDisplay(GameModeDialog, true)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"Red has 20 seconds to change the mode. (Difficulty can not be changed.)")
call TimerStart(t,20.,false,function MSO666)
set t = null
endfunction
function MUO takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(),true)
endfunction
function MZO takes nothing returns nothing
call DialogSetMessage(YC,"Difficulty Votage")
call DialogAddButtonBJ(YC,"|cfff6ff00Normal|n(100%, Normal Commanders, All Offense)|r")
set ZC[1]=bj_lastCreatedButton
call DialogAddButtonBJ(YC,"|cff00baffVery Easy|n(90%, Very Easy Commanders, Almost No Offense)|r")
set ZC[2]=bj_lastCreatedButton
call DialogAddButtonBJ(YC,"|cff1ab700Easy|n(100%,Easy Commanders, Some Offense)|r")
set ZC[3]=bj_lastCreatedButton
call DialogAddButtonBJ(YC,"|cffff6000Nightmare|n(100%,Nightmarish Commanders, All Offense)|r")
set ZC[4]=bj_lastCreatedButton
call DialogAddButtonBJ(YC,"|cffaa0000Hell|n(105%,Hellish Commanders, All Offense)|r")
set ZC[5]=bj_lastCreatedButton
call DialogSetMessage(RD,"Rematch Votage")
call DialogAddButtonBJ(RD,"Yes")
set ID[1]=bj_lastCreatedButton
call DialogAddButtonBJ(RD,"No")
set ID[2]=bj_lastCreatedButton
call DialogAddButtonBJ(RD,"Undecided")
set ID[3]=bj_lastCreatedButton
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function M0O takes nothing returns boolean
return(GetClickedButton()==ZC[1])
endfunction
function M1O takes nothing returns boolean
return(GetClickedButton()==ZC[2])
endfunction
function M2O takes nothing returns boolean
return(GetClickedButton()==ZC[3])
endfunction
function M3O takes nothing returns boolean
return(GetClickedButton()==ZC[4])
endfunction
function M4O takes nothing returns boolean
return(GetClickedButton()==ZC[5])
endfunction
function M5O takes nothing returns nothing
if(M0O())then
set VD[1]=(VD[1]+1)
call DialogDisplayBJ(false,YC,GetTriggerPlayer())
endif
if(M1O())then
set VD[2]=(VD[2]+1)
call DialogDisplayBJ(false,YC,GetTriggerPlayer())
endif
if(M2O())then
set VD[3]=(VD[3]+1)
call DialogDisplayBJ(false,YC,GetTriggerPlayer())
endif
if(M3O())then
set VD[4]=(VD[4]+1)
call DialogDisplayBJ(false,YC,GetTriggerPlayer())
endif
if(M4O())then
set VD[5]=(VD[5]+1)
call DialogDisplayBJ(false,YC,GetTriggerPlayer())
endif
endfunction
function M7O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function M8O takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function M9O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PVO takes nothing returns nothing
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'U00O',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
set LICHS[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
if(M9O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[31])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[31])
call RemoveLocation(HeroCreateLocation)
endfunction
function PXO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function POO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function PRO takes nothing returns nothing
set RandomCreateLocation = GetRectCenter(PU)
set OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
set bj_wantDestroyGroup = true
set RandomCreateLocation = GetUnitLoc(GroupPickRandomUnit(CLE(PU,Condition(function POO))))
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
endfunction
function PAO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function PNO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PBO takes nothing returns nothing
call EnableTrigger(Q5)
call EnableTrigger(I3)
call EnableTrigger(R3)
call EnableTrigger(S5)
call EnableTrigger(T5)
call EnableTrigger(E4)
call EnableTrigger(P5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01B',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(PNO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[13])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[13])
call RemoveLocation(HeroCreateLocation)
endfunction
function PDO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')and(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PFO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PGO takes nothing returns nothing
call EnableTrigger(X5)
call EnableTrigger(Z4)
call EnableTrigger(S4)
//call EnableTrigger(O3)
call EnableTrigger(O5)
call EnableTrigger(Q4)
call EnableTrigger(P3)
call EnableTrigger(E5)
call EnableTrigger(V5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'U00Z',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(PFO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[30])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[30])
call RemoveLocation(HeroCreateLocation)
endfunction
function PJO takes nothing returns boolean
return(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function PKO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function PLO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PMO takes nothing returns nothing
if(PLO())then
set RandomCreateLocation = GetRectCenter(PU)
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
set bj_wantDestroyGroup = true
set RandomCreateLocation = GetUnitLoc(GroupPickRandomUnit(CLE(PU,Condition(function PKO))))
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
else
call DisplayTextToForce(CZE(GetOwningPlayer(GetTriggerUnit())),"You are trying to pick an |cFFFF0000Advanced|r difficulty hero. If you still wish to pick this hero, enable promote mode by typing: -promote, followed by your player number.")
endif
endfunction
function PQO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function PSO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PTO takes nothing returns nothing
call EnableTrigger(P4)
call EnableTrigger(D4)
call EnableTrigger(A4)
call EnableTrigger(L4)
call EnableTrigger(M4)
call EnableTrigger(H4)
call EnableTrigger(K4)
call EnableTrigger(C4)
call EnableTrigger(F4)
call EnableTrigger(V4)
call EnableTrigger(B4)
call EnableTrigger(U4)
call EnableTrigger(W4)
call EnableTrigger(N4)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E000',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(PSO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
set PL[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[14])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[14])
call RemoveLocation(HeroCreateLocation)
endfunction
function PWO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function PYO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PZO takes nothing returns nothing
call EnableTrigger(G6)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E014',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(PYO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[6])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[6])
call RemoveLocation(HeroCreateLocation)
endfunction
function P0O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function P1O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function P2O takes nothing returns nothing
call EnableTrigger(N5)
call EnableTrigger(C5)
call EnableTrigger(H6)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'H00F',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(P1O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[29])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[29])
call RemoveLocation(HeroCreateLocation)
endfunction
function P4O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function P5O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function P6O takes nothing returns nothing
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E003',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(P5O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call UnitAddAbility(GetTriggerUnit(),'A055')
call UnitRemoveAbility(GetTriggerUnit(),'A055')
call UnitAddAbility(GetTriggerUnit(),'A052')
call UnitRemoveAbility(GetTriggerUnit(),'A052')
call UnitAddAbility(GetTriggerUnit(),'A058')
call UnitRemoveAbility(GetTriggerUnit(),'A058')
call UnitAddAbility(GetTriggerUnit(),'A053')
call UnitRemoveAbility(GetTriggerUnit(),'A053')
call UnitAddAbility(GetTriggerUnit(),'A059')
call UnitRemoveAbility(GetTriggerUnit(),'A059')
call UnitAddAbility(GetTriggerUnit(),'A056')
call UnitRemoveAbility(GetTriggerUnit(),'A056')
call UnitAddAbility(GetTriggerUnit(),'A057')
call UnitRemoveAbility(GetTriggerUnit(),'A057')
call UnitAddAbility(GetTriggerUnit(),'A04Z')
call UnitRemoveAbility(GetTriggerUnit(),'A04Z')
call UnitAddAbility(GetTriggerUnit(),'A050')
call UnitRemoveAbility(GetTriggerUnit(),'A050')
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[36])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[36])
call RemoveLocation(HeroCreateLocation)
endfunction
function P8O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')and(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function P9O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QVO takes nothing returns nothing
call EnableTrigger(I6)
call EnableTrigger(Q3)
call EnableTrigger(V6)
call EnableTrigger(K3)
call EnableTrigger(J3)
call EnableTrigger(A3)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E018',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(P9O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[10])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[10])
call RemoveLocation(HeroCreateLocation)
endfunction
function QXO takes nothing returns boolean
return(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function QOO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function QRO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QIO takes nothing returns nothing
if(QRO())then
set RandomCreateLocation = GetRectCenter(PU)
set OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
set bj_wantDestroyGroup = true
set RandomCreateLocation = GetUnitLoc(GroupPickRandomUnit(CLE(PU,Condition(function QOO))))
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
else
call DisplayTextToForce(CZE(GetOwningPlayer(GetTriggerUnit())),"You are trying to pick an |cFFFF0000Advanced|r difficulty hero. If you still wish to pick this hero, enable promote mode by typing: -promote, followed by your player number.")
endif
endfunction
function QNO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function QBO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QCO takes nothing returns nothing
call EnableTrigger(F6)
call EnableTrigger(Y3)
call EnableTrigger(Z3)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01O',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(QBO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[26])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[26])
call RemoveLocation(HeroCreateLocation)
endfunction
function QFO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function QGO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QHO takes nothing returns nothing
call EnableTrigger(T6)
call EnableTrigger(N6)
call EnableTrigger(R6)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01F',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(QGO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[18])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[18])
call RemoveLocation(HeroCreateLocation)
endfunction
function QKO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')and(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QLO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QMO takes nothing returns nothing
if XT>=3 then
call EnableTrigger(P6)
call EnableTrigger(C7)
call EnableTrigger(U5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01D',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(QLO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[16])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[16])
call RemoveLocation(HeroCreateLocation)
else
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0.,0.,"Hypnotist can only be picked on Normal difficulty and above.")
endif
endfunction
function QQO takes nothing returns boolean
return(WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]==false)and(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function QSO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function QTO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function QUO takes nothing returns nothing
if(QTO())then
set RandomCreateLocation = GetRectCenter(PU)
set OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
set bj_wantDestroyGroup = true
set RandomCreateLocation = GetUnitLoc(GroupPickRandomUnit(CLE(PU,Condition(function QSO))))
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
else
call DisplayTextToForce(CZE(GetOwningPlayer(GetTriggerUnit())),"You are trying to pick an |cFFFF0000Advanced|r difficulty hero. If you still wish to pick this hero, enable promote mode by typing: -promote, followed by your player number.")
endif
endfunction
function QYO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function QZO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function Q_O takes nothing returns nothing
call EnableTrigger(M5)
call EnableTrigger(Y5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01A',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(QZO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[12])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[12])
call RemoveLocation(HeroCreateLocation)
endfunction
function Q1O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function Q2O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function Q3O takes nothing returns nothing
call EnableTrigger(J4)
call EnableTrigger(I4)
call EnableTrigger(O4)
call EnableTrigger(B5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01E',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(Q2O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[17])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[17])
call RemoveLocation(HeroCreateLocation)
endfunction
function Q5O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function Q6O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function Q7O takes nothing returns nothing
call EnableTrigger(L3)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E013',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(Q6O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[5])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[5])
call RemoveLocation(HeroCreateLocation)
endfunction
function Q9O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SVO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SEO takes nothing returns nothing
call EnableTrigger(H5)
call EnableTrigger(L5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E016',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SVO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[8])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[8])
call RemoveLocation(HeroCreateLocation)
endfunction
function SOO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SRO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SIO takes nothing returns nothing
call EnableTrigger(E6)
call EnableTrigger(Z5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E019',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SRO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[11])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[11])
call RemoveLocation(HeroCreateLocation)
endfunction
function SNO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SBO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SCO takes nothing returns nothing
call EnableTrigger(X6)
call EnableTrigger(X3)
call EnableTrigger(T4)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E011',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SBO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[3])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[3])
call RemoveLocation(HeroCreateLocation)
endfunction
function SFO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SGO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SHO takes nothing returns nothing
call EnableTrigger(Q6)
call EnableTrigger(M3)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01K',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SGO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[22])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[22])
call RemoveLocation(HeroCreateLocation)
endfunction
function SKO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SLO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SMO takes nothing returns nothing
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E004',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SLO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[37])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[37])
call RemoveLocation(HeroCreateLocation)
endfunction
function SQO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SSO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function STO takes nothing returns nothing
call EnableTrigger(C6)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01L',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SSO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[23])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[23])
call RemoveLocation(HeroCreateLocation)
endfunction
function SWO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function SYO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function SZO takes nothing returns nothing
call EnableTrigger(O6)
call EnableTrigger(G3)
call EnableTrigger(G5)
call EnableTrigger(J5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01G',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(SYO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[19])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[19])
call RemoveLocation(HeroCreateLocation)
endfunction
function S0O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function S1O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function S2O takes nothing returns nothing
call EnableTrigger(A7)
call EnableTrigger(F3)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E015',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(S1O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[7])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[7])
call RemoveLocation(HeroCreateLocation)
endfunction
function S4O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function S5O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function S6O takes nothing returns nothing
call EnableTrigger(B6)
call EnableTrigger(I5)
call EnableTrigger(R5)
call EnableTrigger(A5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E012',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(S5O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[4])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[4])
call RemoveLocation(HeroCreateLocation)
endfunction
function S8O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function S9O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TVO takes nothing returns nothing
call EnableTrigger(J6)
call EnableTrigger(K6)
call EnableTrigger(L6)
call EnableTrigger(M6)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01P',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(S9O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[27])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[27])
call RemoveLocation(HeroCreateLocation)
endfunction
function TXO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function TOO takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='ncop')
endfunction
function TRO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TIO takes nothing returns nothing
if(TRO())then
set RandomCreateLocation = GetRectCenter(PU)
set OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
set bj_wantDestroyGroup = true
set RandomCreateLocation = GetUnitLoc(GroupPickRandomUnit(CLE(PU,Condition(function POO))))
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLocation(RandomCreateLocation)
else
call DisplayTextToForce(CZE(GetOwningPlayer(GetTriggerUnit())),"This hero is not available yet. Please choose another hero.")
endif
endfunction
function TNO takes integer p,unit J2E returns nothing
if J2E==(HZV[(p)])then
if OEX(HKV[p],J2E)then
call Y0E(GZV[p],J2E,G3V[p],ATTACK_TYPE_HERO,true,true)
call EHX(p)
else
call EKX(p,J2E)
endif
endif
endfunction
function TBO takes nothing returns boolean
return(UnitAlive(GetFilterUnit())and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(RCV))and IsUnitVisible(GetFilterUnit(),GetOwningPlayer(RCV))and not(GetUnitAbilityLevel((GetFilterUnit()),'Avul')>0))
endfunction
function TCO takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer PXE=GetTimerData(t)
local real x1=AVE[PXE]
local real y1=AEE[PXE]
local real x2=GetUnitX(AXE[PXE])
local real y2=GetUnitY(AXE[PXE])
local real d=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)
local timer t2
local integer p=0
local real OLX
local unit u
if GetUnitTypeId(LC[(1+GetPlayerId(GetOwningPlayer(AXE[PXE])))])!='N00D' then
call D4E(PXE)
call ReleaseTimer(t)
else
if d>=3600. then
set RCV=AXE[PXE]
set u=(ZEE(null,((x1)*1.),((y1)*1.),((700.)*1.),(Condition(function TBO))))
set AVE[PXE]=x2
set AEE[PXE]=y2
if u!=null then
set OLX=QUE(x1,y1,GetUnitX(u),GetUnitY(u))
if GetUnitAbilityLevel(AXE[PXE],'A09N')==1 then
if GetRandomInt(0,100)<=50 then
call SGE('h00V',AVE[PXE],AEE[PXE],OLX,1.0672,"attack one",1.2)
else
call SGE('h00V',AVE[PXE],AEE[PXE],OLX,1.0672,"attack two",1.2)
endif
else
if GetRandomInt(0,100)<=50 then
call SAE('h00U',AVE[PXE],AEE[PXE],OLX,1.0672,"attack one",1.2)
else
call SAE('h00U',AVE[PXE],AEE[PXE],OLX,1.0672,"attack two",1.2)
endif
endif
set p=XAX(AVE[PXE],AEE[PXE],65.,OLX)
set GZV[p]=AXE[PXE]
call EEX(p,u)
set G_V[p]=GetOwningPlayer(AXE[PXE])
call V9X(p,"Abilities\\Weapons\\Arrow\\ArrowMissile.mdl")
call V8X(p,1.4)
if IsUnitType(u,UNIT_TYPE_HERO) then
set G3V[p]=I2R(GetHeroAgi(AXE[PXE],true))*.2
else
set G3V[p]=I2R(GetHeroAgi(AXE[PXE],true))*.9
endif
set G2V[p]=60.
set G1V[p]=60.
set HEV[p]=true
set G8V[p]=true
set HOV[p]=true
set HCV[p]=(21)
set HBV[p]=(22)
call XIX(p,GetUnitX(u),GetUnitY(u),GetUnitFlyHeight(u)+65.,900.,.15)
else
if GetUnitAbilityLevel(AXE[PXE],'A09N')==1 then
call SHE('h00V',AVE[PXE],AEE[PXE],GetUnitFacing(AXE[PXE]),.834,8,1.)
else
call SDE('h00U',AVE[PXE],AEE[PXE],GetUnitFacing(AXE[PXE]),.834,8,1.)
endif
endif
endif
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function TCO)
endif
set t=null
set t2=null
set u=null
endfunction
function TDO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function TFO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TGO takes nothing returns nothing
local timer t=NewTimer()
local integer PXE=D3E()
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'N00D',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,180.)
if(TFO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetTriggerPlayer()))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[34])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[34])
set AXE[PXE]=LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]
set AVE[PXE]=GetUnitX(AXE[PXE])
set AEE[PXE]=GetUnitY(AXE[PXE])
call SetTimerData(t,PXE)
call TimerStart(t,.02,false,function TCO)
call RemoveLocation(HeroCreateLocation)
set t=null
endfunction
function THO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function TJO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TKO takes nothing returns nothing
call EnableTrigger(O7)
call EnableTrigger(U6)
call EnableTrigger(Z6)
call EnableTrigger(Y6)
//call EnableTrigger(W6)
call EnableTrigger(R7)
call EnableTrigger(I7)
call EnableTrigger(X7)
call EnableTrigger(B7)
call EnableTrigger(E7)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'U00N',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(TJO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[33])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[33])
call RemoveLocation(HeroCreateLocation)
endfunction
function TMO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function TPO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TQO takes nothing returns nothing
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E00Y',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,240.)
if(TPO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
call UnitAddAbility(bj_lastCreatedUnit,'Sch2')
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[1])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[1])
call RemoveLocation(HeroCreateLocation)
endfunction
function TTO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function TUO takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function TWO takes nothing returns nothing
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'U003',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,90.)
if(TUO())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[32])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[32])
call RemoveLocation(HeroCreateLocation)
call UnitAddAbility(bj_lastCreatedUnit,'Amrf')
call UnitRemoveAbility(bj_lastCreatedUnit,'Amrf')
endfunction
function TZO takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function T_O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function T0O takes nothing returns nothing
call EnableTrigger(H6)
call EnableTrigger(F5)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01J',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.0)
if(T_O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[21])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[21])
call RemoveLocation(HeroCreateLocation)
endfunction
function T2O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function T3O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function T4O takes nothing returns nothing
call EnableTrigger(V7)
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'E01H',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.0)
if(T3O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[20])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[20])
call RemoveLocation(HeroCreateLocation)
endfunction
function T6O takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='ushd')
endfunction
function T7O takes nothing returns boolean
return(OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
endfunction
function PeHPT takes nothing returns nothing
if WT[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))] then
set HeroCreateLocation=GetRectCenter(GD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
call CreateNUnitsAtLoc(1,'U004',GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,270.)
if(T7O())then
call UnitAddItemByIdSwapped('I01I',bj_lastCreatedUnit)
endif
set LC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=bj_lastCreatedUnit
set MQ[(1+GetPlayerId(GetTriggerPlayer()))]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,UD[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))])
call AddSpecialEffectLocBJ(HeroCreateLocation,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(GetTriggerUnit()),HeroCreateLocation,.3)
//call AddSpecialEffectLocBJ(GetUnitLoc(GetTriggerUnit()),"Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl")
//call DestroyEffect(bj_lastCreatedEffect)
call RemoveUnit(GetTriggerUnit())
call MultiboardSetItemStyleBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),true,true)
call MultiboardSetItemIconBJ(AS[1],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[39])
call MultiboardSetItemStyleBJ(AS[2],1,(YS+(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+3)),true,true)
call MultiboardSetItemIconBJ(AS[2],1,(WS[(1+GetPlayerId(GetOwningPlayer(bj_lastCreatedUnit)))]+2),SQ[39])
call RemoveLocation(HeroCreateLocation)
else
if OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))] then
set RandomCreateLocation = GetRectCenter(PU)
set OD[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=true
call SetUnitPositionLoc(GetTriggerUnit(),RandomCreateLocation)
call RemoveLoca