- Joined
- Apr 27, 2008
- Messages
- 2,455
JASS:
library AwesomeLibrary initializer init // v 1.1.2.3.4.7.4
globals
public player Local_player = GetLocalPlayer() // comment this line if you want to use your map, else it will crash on loading
endglobals
// credit to Captain Griffen for the 2 functions below
public function TimerAttach takes timer t, real time, real value, code func returns nothing
call TimerStart(t, value, false, null)
call PauseTimer(t)
call TimerStart(t, time, false, func)
endfunction
// ONLY call on an expired timer.
public function GetTimerInt takes timer t returns integer
return R2I(TimerGetRemaining(t) + 0.5)
endfunction
public function TimerStopPeriodic takes timer t returns nothing
call PauseTimer(t)
call ResumeTimer(t)
endfunction
public function TimerRestart takes timer t returns nothing // on not paused timers
call ResumeTimer(t)
endfunction
// when a game is loaded from a save
public function IsGameLoaded takes nothing returns boolean
return UnitId2String('hfoo') == null or OrderId2String(851971) == null
endfunction
// can be used to get and play with units' shadows, last time i check it even completly fuck up selection of units (at least visually)
public function GetFutureNextImage takes nothing returns image
local image im = CreateImage("ReplaceableTextures\\Splats\\AuraRune9b.blp",0,0,0,0,0,0,0,0,0,1 )
call DestroyImage(im)
return im
endfunction
// yes all these native GroupEnumUnits...Counted are just the same of the same native function without the extra integer argument
public function GroupEnumUnitsInRangeBJ takes group whichGroup, real x, real y, real radius, boolexpr filter returns nothing
call GroupEnumUnitsInRangeCounted(whichGroup,x,y,radius,filter,GetRandomInt(0,1337))
endfunction
public function GroupEnumUnitsInRangeOfLocCountedBJ takes group whichGroup, location whichLocation, real radius, boolexpr filter returns nothing
call GroupEnumUnitsInRangeOfLocCounted(whichGroup,whichLocation,radius,filter,GetRandomInt(0,1337))
endfunction
public function GroupEnumUnitsInRectCountedBJ takes group whichGroup, rect r, boolexpr filter returns nothing
call GroupEnumUnitsInRectCounted(whichGroup,r,filter,GetRandomInt(0,1337))
endfunction
public function GroupEnumUnitsOfTypeCountedBJ takes group whichGroup, string unitname, boolexpr filter returns nothing
call GroupEnumUnitsOfTypeCounted(whichGroup,unitname,filter,GetRandomInt(0,1337))
endfunction
public function IsBlizzardLazy takes nothing returns boolean
return AbilityId2String('AHds') == null
endfunction
public function init takes nothing returns nothing
call CommentString("plz give credits !!!!!")
endfunction
endlibrary
Last edited: