Azlier
Old World Ghost
- Reaction score
- 461
Indeed. Especially because it's 11:20 am here.
local integer i = 16
call RegionAddRect(r, re)
call TriggerRegisterEnterRegion(CreateTrigger(), r, Filter(function Actions))
call RemoveRect(re)
set re = null
loop
exitwhen i == 0
set i = i - 1
call GroupEnumUnitsOfPlayer(g, Player(i), Filter(function Actions))
endloop
local integer i = 15
call RegionAddRect(r, re)
call TriggerRegisterEnterRegion(CreateTrigger(), r, Filter(function Actions))
call RemoveRect(re)
set re = null
loop
call GroupEnumUnitsOfPlayer(g, Player(i), Filter(function Actions))
exitwhen i == 0
set i = i - 1
endloop
// Autofly - by Azlier
// Requires a vJass preprocessor
// How to import:
// 1. Create a new trigger called AutoFly.
// 2. Convert the trigger to custom script, and replace all the code inside with this.
library AutoFly requires optional GroupUtils, optional GlobalGroup
private function Actions takes nothing returns boolean
if UnitAddAbility(GetFilterUnit(), 039;Amrf039;) then
call UnitRemoveAbility(GetFilterUnit(), 039;Amrf039;)
endif
return false
endfunction
private struct Hack extends array
static method onInit takes nothing returns nothing
local region r = CreateRegion()
local rect re = GetWorldBounds()
local group g
local integer i = 15
call RegionAddRect(r, re)
call TriggerRegisterEnterRegion(CreateTrigger(), r, Filter(function Actions))
call RemoveRect(re)
set re = null
static if LIBRARY_GroupUtils then
set g = ENUM_GROUP
elseif LIBRARY_GlobalGroup then
set g = GROUP
else
set g = CreateGroup()
endif
loop
call GroupEnumUnitsOfPlayer(g, Player(i), Filter(function Actions))
exitwhen i == 0
set i = i - 1
endloop
static not (if LIBRARY_GroupUtils or LIBRARY_GlobalGroup) then
call DestroyGroup(g)
endif
set g = null
endmethod
endstruct
endlibrary
library AutoFly
private struct AutoFly extends array
//! runtextmacro AIDS()
private method AIDS_onCreate takes nothing returns nothing
if UnitAddAbility(this.unit,039;Amrf039;) then
call UnitRemoveAbility(this.unit,039;Amrf039;)
endif
endmethod
endstruct
endlibrary