// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals // originframetype ORIGIN_FRAME_GAME_UI=null // originframetype ORIGIN_FRAME_WORLD_FRAME=null // integer bj_MAX_PLAYER_SLOTS=0 // rect bj_mapInitialPlayableArea=null real Angle_RADTODEG=0. real Basics_ANIMATION_PERIOD=0. string array Colors_hexs integer Colors_decs=0 integer Colors_COLOR_WHITE_red=0 integer Colors_COLOR_WHITE_green=0 integer Colors_COLOR_WHITE_blue=0 integer Colors_COLOR_WHITE_alpha=0 integer Colors_COLOR_BLACK_red=0 integer Colors_COLOR_BLACK_green=0 integer Colors_COLOR_BLACK_blue=0 integer Colors_COLOR_BLACK_alpha=0 integer Colors_COLOR_GOLD_red=0 integer Colors_COLOR_GOLD_green=0 integer Colors_COLOR_GOLD_blue=0 integer Colors_COLOR_GOLD_alpha=0 integer array Colors_PLAYER_COLORS_red integer array Colors_PLAYER_COLORS_green integer array Colors_PLAYER_COLORS_blue integer ErrorHandling_MUTE_ERROR_DURATION=0 integer ErrorHandling_PRIMARY_ERROR_KEY=0 hashtable ErrorHandling_HT=null boolean ErrorHandling_suppressErrorMessages=false framehandle Framehandle_GAME_UI=null real Framehandle_SCREEN_TOP_x=0. real Framehandle_SCREEN_TOP_y=0. real Framehandle_SCREEN_BOTTOM_x=0. real Framehandle_SCREEN_BOTTOM_y=0. integer Framehandle_BLZ_FRAMENAME_MAXLENGTH=0 real GameTimer_currentTime=0. boolean MagicFunctions_compiletime=false rect MapBounds_playableMapRect=null rect MapBounds_boundRect=null real MapBounds_playableMin_x=0. real MapBounds_playableMin_y=0. real MapBounds_playableMax_x=0. real MapBounds_playableMax_y=0. real MapBounds_boundMin_x=0. real MapBounds_boundMin_y=0. real MapBounds_boundMax_x=0. real MapBounds_boundMax_y=0. real Matrices_ZERO44_m00=0. real Matrices_ZERO44_m01=0. real Matrices_ZERO44_m02=0. real Matrices_ZERO44_m03=0. real Matrices_ZERO44_m10=0. real Matrices_ZERO44_m11=0. real Matrices_ZERO44_m12=0. real Matrices_ZERO44_m13=0. real Matrices_ZERO44_m20=0. real Matrices_ZERO44_m21=0. real Matrices_ZERO44_m22=0. real Matrices_ZERO44_m23=0. real Matrices_ZERO44_m30=0. real Matrices_ZERO44_m31=0. real Matrices_ZERO44_m32=0. real Matrices_ZERO44_m33=0. integer ObjectRecycler_objectLists=0 player Player_localPlayer=null integer Printing_DEBUG_LEVEL=0 real Printing_DEBUG_MSG_DURATION=0. string String_charset=null string String_numberset=null hashtable Table_ht=null integer TypeCasting_typecastdata=0 hashtable hashtable_compiletime=null hashtable hashtable_compiletime_86=null integer array Table_nextFree integer Table_firstFree=0 integer Table_maxIndex=0 integer array Table_typeId integer array SEntry_nextFree integer SEntry_firstFree=0 integer SEntry_maxIndex=0 integer array Stack_nextFree integer Stack_firstFree=0 integer Stack_maxIndex=0 integer array Stack_typeId integer array SEntry_elem integer array SEntry_prev integer array Stack_dummy integer array Stack_top integer array Stack_size real vec2_op_plus_return_x=0. real vec2_op_plus_return_y=0. real vec2_op_mult_return_x=0. real vec2_op_mult_return_y=0. code ref_function_init_AbilityIds=null code ref_function_init_Real=null code ref_function_init_Integer=null code ref_function_init_Angle=null code ref_function_init_String=null code ref_function_init_Vectors=null code ref_function_init_Destructable=null code ref_function_init_Player=null code ref_function_init_Basics=null code ref_function_init_MagicFunctions=null code ref_function_init_Table=null code ref_function_init_Playercolor=null code ref_function_init_Maths=null code ref_function_init_Colors=null code ref_function_init_Printing=null code ref_function_init_GameTimer=null code ref_function_init_ErrorHandling=null code ref_function_init_HashList=null code ref_function_init_Matrices=null code ref_function_init_Quaternion=null code ref_function_init_Framehandle=null code ref_function_init_Group=null code ref_function_init_Lightning=null code ref_function_init_WeatherEffects=null code ref_function_init_TypeCasting=null code ref_function_init_EventHelper=null code ref_function_init_MapBounds=null code ref_function_init_ObjectRecycler=null code ref_function_code__startPeriodic_GameTimer=null endglobals function Loglevel_getTag takes integer this returns string local integer temp = this if temp == 0 then return "|cffADADADtrace|r" elseif temp == 1 then return "|cff2685DCdebug|r" elseif temp == 2 then return "|cffFFCC00info|r" elseif temp == 3 then return "|cffF47E3Ewarning|r" else return "|cffFB2700error|r" endif endfunction function printLog takes player showTo, integer loglvl, string msg returns nothing local string compositeMsg if Printing_DEBUG_LEVEL <= loglvl then set compositeMsg = Loglevel_getTag(loglvl) + " - " + msg call DisplayTimedTextToPlayer(showTo, 0., 0., Printing_DEBUG_MSG_DURATION, compositeMsg) endif endfunction function Log_error takes string msg returns nothing call printLog(Player_localPlayer, 4, msg) endfunction function compileError takes string msg returns nothing endfunction function hashtable_hasBoolean takes hashtable this, integer parentKey, integer childKey returns boolean return HaveSavedBoolean(this, parentKey, childKey) endfunction function hashtable_hasInt takes hashtable this, integer parentKey, integer childKey returns boolean return HaveSavedInteger(this, parentKey, childKey) endfunction function hashtable_loadBoolean takes hashtable this, integer parentKey, integer childKey returns boolean return LoadBoolean(this, parentKey, childKey) endfunction function hashtable_loadInt takes hashtable this, integer parentKey, integer childKey returns integer return LoadInteger(this, parentKey, childKey) endfunction function hashtable_saveBoolean takes hashtable this, integer parentKey, integer childKey, boolean value returns nothing call SaveBoolean(this, parentKey, childKey, value) endfunction function hashtable_saveInt takes hashtable this, integer parentKey, integer childKey, integer value returns nothing call SaveInteger(this, parentKey, childKey, value) endfunction function real_toInt takes real this returns integer return R2I(this) endfunction function string_getHash takes string this returns integer return StringHash(this) endfunction function error takes string msg returns nothing local integer hash if MagicFunctions_compiletime then call compileError("ERROR: " + msg) else if not ErrorHandling_suppressErrorMessages then set hash = string_getHash(msg) if hashtable_hasInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then if hashtable_loadInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) + ErrorHandling_MUTE_ERROR_DURATION < GameTimer_currentTime then call Log_error(msg + "") call hashtable_saveInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, real_toInt(GameTimer_currentTime)) call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, false) elseif hashtable_hasBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then if not hashtable_loadBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash) then call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, true) endif else call Log_error("|cffFF3A29Excessive repeating errors are being omitted") call hashtable_saveBoolean(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, true) endif else call hashtable_saveInt(ErrorHandling_HT, ErrorHandling_PRIMARY_ERROR_KEY, hash, real_toInt(GameTimer_currentTime)) call Log_error("Message: " + msg + "") endif endif call I2S(1 / 0) endif endfunction function initCompiletimeState_0 takes nothing returns nothing call InitHashtable() call InitHashtable() set hashtable_compiletime_86 = InitHashtable() set hashtable_compiletime = InitHashtable() call SaveInteger(hashtable_compiletime_86, 1, -242600650, 0) call SaveInteger(hashtable_compiletime_86, 1, 1132341824, 1) call SaveInteger(hashtable_compiletime_86, 1, -647782241, 2) call SaveInteger(hashtable_compiletime_86, 1, -854572045, 3) call SaveInteger(hashtable_compiletime_86, 1, -680649701, 4) call SaveInteger(hashtable_compiletime_86, 1, -943650483, 5) call SaveInteger(hashtable_compiletime_86, 1, -671760605, 6) call SaveInteger(hashtable_compiletime_86, 1, 349230650, 7) call SaveInteger(hashtable_compiletime_86, 1, -1894922563, 8) call SaveInteger(hashtable_compiletime_86, 1, -1474492777, 9) call SaveInteger(hashtable_compiletime_86, 1, -1587459251, 10) call SaveInteger(hashtable_compiletime_86, 1, -1676716706, 11) call SaveInteger(hashtable_compiletime_86, 1, -1559655710, 12) call SaveInteger(hashtable_compiletime_86, 1, -1663695754, 13) call SaveInteger(hashtable_compiletime_86, 1, 597637742, 14) call SaveInteger(hashtable_compiletime_86, 1, 789744696, 15) call SaveStr(hashtable_compiletime_86, 2, 0, "") endfunction function initCompiletimeState takes nothing returns nothing call ExecuteFunc("initCompiletimeState_0") endfunction function code__startPeriodic_GameTimer takes nothing returns nothing set GameTimer_currentTime = GameTimer_currentTime + Basics_ANIMATION_PERIOD endfunction function init_AbilityIds takes nothing returns boolean return true endfunction function init_Angle takes nothing returns boolean set Angle_RADTODEG = 57.295779513 return true endfunction function init_Basics takes nothing returns boolean set Basics_ANIMATION_PERIOD = 0.030 return true endfunction function toHex takes integer number returns string local integer firstpart = number / 16 local integer secondpart = number - firstpart * 16 return Colors_hexs[firstpart] + Colors_hexs[secondpart] endfunction function colorA_toColorString takes integer this_red, integer this_green, integer this_blue, integer this_alpha returns string return "|c" + toHex(this_alpha) + toHex(this_red) + toHex(this_green) + toHex(this_blue) endfunction function Table_saveInt takes integer this, integer parentKey, integer value returns nothing call hashtable_saveInt(Table_ht, this, parentKey, value) endfunction function dispatch_Table_Table_Table_saveInt takes integer this, integer parentKey, integer value returns nothing if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveInt") else call error("Called Table.saveInt on invalid object.") endif endif call Table_saveInt(this, parentKey, value) endfunction function initializeTable takes nothing returns nothing local integer i = 0 loop exitwhen i > 15 call dispatch_Table_Table_Table_saveInt(Colors_decs, string_getHash(Colors_hexs[i]), i) set i = i + 1 endloop endfunction function alloc_Table takes nothing returns integer local integer this if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 15 else call error("Out of memory: Could not create Table.") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 15 endif return this endfunction function Table_init takes integer this returns nothing endfunction function construct_Table takes integer this returns nothing call Table_init(this) endfunction function new_Table takes nothing returns integer local integer this = alloc_Table() call construct_Table(this) return this endfunction function init_Colors takes nothing returns boolean local integer tuple_temp local integer tuple_temp_1 local integer tuple_temp_2 local integer tuple_temp_3 local integer tuple_temp_4 local integer tuple_temp_5 local integer tuple_temp_6 local integer tuple_temp_7 local integer tuple_temp_8 local integer tuple_temp_9 local integer tuple_temp_10 local integer tuple_temp_11 local integer tuple_temp_12 local integer tuple_temp_13 local integer tuple_temp_14 local integer tuple_temp_15 local integer tuple_temp_16 local integer tuple_temp_17 local integer tuple_temp_18 local integer tuple_temp_19 local integer tuple_temp_20 local integer tuple_temp_21 local integer tuple_temp_22 local integer tuple_temp_23 local integer tuple_temp_24 local integer tuple_temp_25 local integer tuple_temp_26 local integer tuple_temp_27 local integer tuple_temp_28 local integer tuple_temp_29 local integer tuple_temp_30 local integer tuple_temp_31 local integer tuple_temp_32 local integer tuple_temp_33 local integer tuple_temp_34 local integer tuple_temp_35 local integer tuple_temp_36 local integer tuple_temp_37 local integer tuple_temp_38 local integer tuple_temp_39 local integer tuple_temp_40 local integer tuple_temp_41 local integer tuple_temp_42 local integer tuple_temp_43 local integer tuple_temp_44 local integer tuple_temp_45 local integer tuple_temp_46 local integer tuple_temp_47 local integer tuple_temp_48 local integer tuple_temp_49 local integer tuple_temp_50 local integer tuple_temp_51 local integer tuple_temp_52 local integer tuple_temp_53 local integer tuple_temp_54 local integer tuple_temp_55 local integer tuple_temp_56 local integer tuple_temp_57 local integer tuple_temp_58 local integer tuple_temp_59 local integer tuple_temp_60 local integer tuple_temp_61 local integer tuple_temp_62 local integer tuple_temp_63 local integer tuple_temp_64 local integer tuple_temp_65 local integer tuple_temp_66 local integer tuple_temp_67 local integer tuple_temp_68 local integer tuple_temp_69 local integer tuple_temp_70 local integer tuple_temp_71 local integer tuple_temp_72 local integer tuple_temp_73 local integer tuple_temp_74 local integer tuple_temp_75 local integer tuple_temp_76 local integer tuple_temp_77 local integer tuple_temp_78 local integer tuple_temp_79 local integer tuple_temp_80 local integer tuple_temp_81 local integer tuple_temp_82 local integer tuple_temp_83 set Colors_hexs[0] = "0" set Colors_hexs[1] = "1" set Colors_hexs[2] = "2" set Colors_hexs[3] = "3" set Colors_hexs[4] = "4" set Colors_hexs[5] = "5" set Colors_hexs[6] = "6" set Colors_hexs[7] = "7" set Colors_hexs[8] = "8" set Colors_hexs[9] = "9" set Colors_hexs[10] = "A" set Colors_hexs[11] = "B" set Colors_hexs[12] = "C" set Colors_hexs[13] = "D" set Colors_hexs[14] = "E" set Colors_hexs[15] = "F" set Colors_decs = new_Table() set tuple_temp = 255 set tuple_temp_1 = 255 set tuple_temp_2 = 255 set tuple_temp_3 = 255 set Colors_COLOR_WHITE_red = tuple_temp set Colors_COLOR_WHITE_green = tuple_temp_1 set Colors_COLOR_WHITE_blue = tuple_temp_2 set Colors_COLOR_WHITE_alpha = tuple_temp_3 set tuple_temp_4 = 0 set tuple_temp_5 = 0 set tuple_temp_6 = 0 set tuple_temp_7 = 0 set Colors_COLOR_BLACK_red = tuple_temp_4 set Colors_COLOR_BLACK_green = tuple_temp_5 set Colors_COLOR_BLACK_blue = tuple_temp_6 set Colors_COLOR_BLACK_alpha = tuple_temp_7 set tuple_temp_8 = 255 set tuple_temp_9 = 204 set tuple_temp_10 = 0 set tuple_temp_11 = 255 set Colors_COLOR_GOLD_red = tuple_temp_8 set Colors_COLOR_GOLD_green = tuple_temp_9 set Colors_COLOR_GOLD_blue = tuple_temp_10 set Colors_COLOR_GOLD_alpha = tuple_temp_11 call colorA_toColorString(Colors_COLOR_WHITE_red, Colors_COLOR_WHITE_green, Colors_COLOR_WHITE_blue, Colors_COLOR_WHITE_alpha) call colorA_toColorString(Colors_COLOR_BLACK_red, Colors_COLOR_BLACK_green, Colors_COLOR_BLACK_blue, Colors_COLOR_BLACK_alpha) call colorA_toColorString(Colors_COLOR_GOLD_red, Colors_COLOR_GOLD_green, Colors_COLOR_GOLD_blue, Colors_COLOR_GOLD_alpha) set tuple_temp_12 = 255 set tuple_temp_13 = 2 set tuple_temp_14 = 2 set Colors_PLAYER_COLORS_red[0] = tuple_temp_12 set Colors_PLAYER_COLORS_green[0] = tuple_temp_13 set Colors_PLAYER_COLORS_blue[0] = tuple_temp_14 set tuple_temp_15 = 0 set tuple_temp_16 = 65 set tuple_temp_17 = 255 set Colors_PLAYER_COLORS_red[1] = tuple_temp_15 set Colors_PLAYER_COLORS_green[1] = tuple_temp_16 set Colors_PLAYER_COLORS_blue[1] = tuple_temp_17 set tuple_temp_18 = 27 set tuple_temp_19 = 229 set tuple_temp_20 = 184 set Colors_PLAYER_COLORS_red[2] = tuple_temp_18 set Colors_PLAYER_COLORS_green[2] = tuple_temp_19 set Colors_PLAYER_COLORS_blue[2] = tuple_temp_20 set tuple_temp_21 = 83 set tuple_temp_22 = 0 set tuple_temp_23 = 128 set Colors_PLAYER_COLORS_red[3] = tuple_temp_21 set Colors_PLAYER_COLORS_green[3] = tuple_temp_22 set Colors_PLAYER_COLORS_blue[3] = tuple_temp_23 set tuple_temp_24 = 255 set tuple_temp_25 = 252 set tuple_temp_26 = 0 set Colors_PLAYER_COLORS_red[4] = tuple_temp_24 set Colors_PLAYER_COLORS_green[4] = tuple_temp_25 set Colors_PLAYER_COLORS_blue[4] = tuple_temp_26 set tuple_temp_27 = 254 set tuple_temp_28 = 137 set tuple_temp_29 = 13 set Colors_PLAYER_COLORS_red[5] = tuple_temp_27 set Colors_PLAYER_COLORS_green[5] = tuple_temp_28 set Colors_PLAYER_COLORS_blue[5] = tuple_temp_29 set tuple_temp_30 = 31 set tuple_temp_31 = 191 set tuple_temp_32 = 0 set Colors_PLAYER_COLORS_red[6] = tuple_temp_30 set Colors_PLAYER_COLORS_green[6] = tuple_temp_31 set Colors_PLAYER_COLORS_blue[6] = tuple_temp_32 set tuple_temp_33 = 228 set tuple_temp_34 = 90 set tuple_temp_35 = 175 set Colors_PLAYER_COLORS_red[7] = tuple_temp_33 set Colors_PLAYER_COLORS_green[7] = tuple_temp_34 set Colors_PLAYER_COLORS_blue[7] = tuple_temp_35 set tuple_temp_36 = 148 set tuple_temp_37 = 149 set tuple_temp_38 = 150 set Colors_PLAYER_COLORS_red[8] = tuple_temp_36 set Colors_PLAYER_COLORS_green[8] = tuple_temp_37 set Colors_PLAYER_COLORS_blue[8] = tuple_temp_38 set tuple_temp_39 = 125 set tuple_temp_40 = 190 set tuple_temp_41 = 241 set Colors_PLAYER_COLORS_red[9] = tuple_temp_39 set Colors_PLAYER_COLORS_green[9] = tuple_temp_40 set Colors_PLAYER_COLORS_blue[9] = tuple_temp_41 set tuple_temp_42 = 15 set tuple_temp_43 = 97 set tuple_temp_44 = 69 set Colors_PLAYER_COLORS_red[10] = tuple_temp_42 set Colors_PLAYER_COLORS_green[10] = tuple_temp_43 set Colors_PLAYER_COLORS_blue[10] = tuple_temp_44 set tuple_temp_45 = 77 set tuple_temp_46 = 41 set tuple_temp_47 = 3 set Colors_PLAYER_COLORS_red[11] = tuple_temp_45 set Colors_PLAYER_COLORS_green[11] = tuple_temp_46 set Colors_PLAYER_COLORS_blue[11] = tuple_temp_47 set tuple_temp_48 = 155 set tuple_temp_49 = 0 set tuple_temp_50 = 0 set Colors_PLAYER_COLORS_red[12] = tuple_temp_48 set Colors_PLAYER_COLORS_green[12] = tuple_temp_49 set Colors_PLAYER_COLORS_blue[12] = tuple_temp_50 set tuple_temp_51 = 0 set tuple_temp_52 = 0 set tuple_temp_53 = 195 set Colors_PLAYER_COLORS_red[13] = tuple_temp_51 set Colors_PLAYER_COLORS_green[13] = tuple_temp_52 set Colors_PLAYER_COLORS_blue[13] = tuple_temp_53 set tuple_temp_54 = 0 set tuple_temp_55 = 234 set tuple_temp_56 = 255 set Colors_PLAYER_COLORS_red[14] = tuple_temp_54 set Colors_PLAYER_COLORS_green[14] = tuple_temp_55 set Colors_PLAYER_COLORS_blue[14] = tuple_temp_56 set tuple_temp_57 = 190 set tuple_temp_58 = 0 set tuple_temp_59 = 254 set Colors_PLAYER_COLORS_red[15] = tuple_temp_57 set Colors_PLAYER_COLORS_green[15] = tuple_temp_58 set Colors_PLAYER_COLORS_blue[15] = tuple_temp_59 set tuple_temp_60 = 235 set tuple_temp_61 = 205 set tuple_temp_62 = 135 set Colors_PLAYER_COLORS_red[16] = tuple_temp_60 set Colors_PLAYER_COLORS_green[16] = tuple_temp_61 set Colors_PLAYER_COLORS_blue[16] = tuple_temp_62 set tuple_temp_63 = 248 set tuple_temp_64 = 164 set tuple_temp_65 = 139 set Colors_PLAYER_COLORS_red[17] = tuple_temp_63 set Colors_PLAYER_COLORS_green[17] = tuple_temp_64 set Colors_PLAYER_COLORS_blue[17] = tuple_temp_65 set tuple_temp_66 = 191 set tuple_temp_67 = 255 set tuple_temp_68 = 128 set Colors_PLAYER_COLORS_red[18] = tuple_temp_66 set Colors_PLAYER_COLORS_green[18] = tuple_temp_67 set Colors_PLAYER_COLORS_blue[18] = tuple_temp_68 set tuple_temp_69 = 220 set tuple_temp_70 = 185 set tuple_temp_71 = 235 set Colors_PLAYER_COLORS_red[19] = tuple_temp_69 set Colors_PLAYER_COLORS_green[19] = tuple_temp_70 set Colors_PLAYER_COLORS_blue[19] = tuple_temp_71 set tuple_temp_72 = 40 set tuple_temp_73 = 40 set tuple_temp_74 = 40 set Colors_PLAYER_COLORS_red[20] = tuple_temp_72 set Colors_PLAYER_COLORS_green[20] = tuple_temp_73 set Colors_PLAYER_COLORS_blue[20] = tuple_temp_74 set tuple_temp_75 = 235 set tuple_temp_76 = 240 set tuple_temp_77 = 255 set Colors_PLAYER_COLORS_red[21] = tuple_temp_75 set Colors_PLAYER_COLORS_green[21] = tuple_temp_76 set Colors_PLAYER_COLORS_blue[21] = tuple_temp_77 set tuple_temp_78 = 0 set tuple_temp_79 = 120 set tuple_temp_80 = 30 set Colors_PLAYER_COLORS_red[22] = tuple_temp_78 set Colors_PLAYER_COLORS_green[22] = tuple_temp_79 set Colors_PLAYER_COLORS_blue[22] = tuple_temp_80 set tuple_temp_81 = 164 set tuple_temp_82 = 111 set tuple_temp_83 = 51 set Colors_PLAYER_COLORS_red[23] = tuple_temp_81 set Colors_PLAYER_COLORS_green[23] = tuple_temp_82 set Colors_PLAYER_COLORS_blue[23] = tuple_temp_83 call initializeTable() return true endfunction function init_Destructable takes nothing returns boolean return true endfunction function init_ErrorHandling takes nothing returns boolean set ErrorHandling_MUTE_ERROR_DURATION = 60 set ErrorHandling_PRIMARY_ERROR_KEY = -1 set ErrorHandling_HT = hashtable_compiletime set ErrorHandling_suppressErrorMessages = false return true endfunction function alloc_HashMap takes nothing returns integer local integer this if Table_firstFree == 0 then if Table_maxIndex < 32768 then set Table_maxIndex = Table_maxIndex + 1 set this = Table_maxIndex set Table_typeId[this] = 16 else call error("Out of memory: Could not create HashMap.") set this = 0 endif else set Table_firstFree = Table_firstFree - 1 set this = Table_nextFree[Table_firstFree] set Table_typeId[this] = 16 endif return this endfunction function HashMap_init takes integer this returns nothing endfunction function construct_HashMap takes integer this returns nothing call construct_Table(this) call HashMap_init(this) endfunction function new_HashMap takes nothing returns integer local integer this = alloc_HashMap() call construct_HashMap(this) return this endfunction function init_EventHelper takes nothing returns boolean call new_HashMap() call new_HashMap() call new_Table() return true endfunction function int_toString takes integer this returns string return I2S(this) endfunction function string_length takes string this returns integer return StringLength(this) endfunction function verifyFrameNameLength takes string name returns boolean if string_length(name) > Framehandle_BLZ_FRAMENAME_MAXLENGTH then call error("Trying to address frame with exceeding maximum frame name length (" + int_toString(Framehandle_BLZ_FRAMENAME_MAXLENGTH) + ") for: " + name) return false endif return true endfunction function createFrame takes string typeName, string name, framehandle owner, string inherits, integer createContext returns framehandle call verifyFrameNameLength(name) return BlzCreateFrameByType(typeName, name, owner, inherits, createContext) endfunction function framehandle_setSize takes framehandle this, real width, real height returns nothing call BlzFrameSetSize(this, width, height) endfunction function init_Framehandle takes nothing returns boolean local framehandle receiver local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 set Framehandle_GAME_UI = BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0) call BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0) set tuple_temp = 0.4 set tuple_temp_1 = 0.6 set Framehandle_SCREEN_TOP_x = tuple_temp set Framehandle_SCREEN_TOP_y = tuple_temp_1 set tuple_temp_2 = 0.4 set tuple_temp_3 = 0.0 set Framehandle_SCREEN_BOTTOM_x = tuple_temp_2 set Framehandle_SCREEN_BOTTOM_y = tuple_temp_3 set Framehandle_BLZ_FRAMENAME_MAXLENGTH = 560 set receiver = createFrame("FRAME", "SetMousePositionCage", Framehandle_GAME_UI, null, 0) call framehandle_setSize(receiver, 0.0001, 0.0001) return true endfunction function timer_start takes timer this, real time, code timerCallBack returns nothing call TimerStart(this, time, false, timerCallBack) endfunction function timer_startPeriodic takes timer this, real time, code timerCallBack returns nothing call TimerStart(this, time, true, timerCallBack) endfunction function init_GameTimer takes nothing returns boolean local timer receiver = CreateTimer() call timer_start(receiver, 100000., null) call timer_startPeriodic(CreateTimer(), Basics_ANIMATION_PERIOD, ref_function_code__startPeriodic_GameTimer) return true endfunction function init_Group takes nothing returns boolean call CreateGroup() return true endfunction function init_HashList takes nothing returns boolean return true endfunction function init_Integer takes nothing returns boolean return true endfunction function init_Lightning takes nothing returns boolean return true endfunction function init_MagicFunctions takes nothing returns boolean set MagicFunctions_compiletime = false return true endfunction function rect_getMaxX takes rect this returns real return GetRectMaxX(this) endfunction function rect_getMaxY takes rect this returns real return GetRectMaxY(this) endfunction function rect_getMinX takes rect this returns real return GetRectMinX(this) endfunction function rect_getMinY takes rect this returns real return GetRectMinY(this) endfunction function region_addRect takes region this, rect rct returns nothing call RegionAddRect(this, rct) endfunction function vec2_op_mult takes real this_x, real this_y, real factor returns real set vec2_op_mult_return_x = this_x * factor set vec2_op_mult_return_y = this_y * factor return vec2_op_mult_return_x endfunction function vec2_op_plus takes real this_x, real this_y, real v_x, real v_y returns real set vec2_op_plus_return_x = this_x + v_x set vec2_op_plus_return_y = this_y + v_y return vec2_op_plus_return_x endfunction function initMapBounds takes nothing returns nothing local rect cond_result local region receiver local rect cond_result_1 local region receiver_1 local real tuple_temp local real tuple_temp_1 local real tuple_temp_2 local real tuple_temp_3 local real tuple_temp_4 local real tuple_temp_5 local real tuple_temp_6 local real tuple_temp_7 if MagicFunctions_compiletime then set cond_result = Rect(-1024., -1024., 1024., 1024.) else set cond_result = GetPlayableMapRect() endif set MapBounds_playableMapRect = cond_result set receiver = CreateRegion() call region_addRect(receiver, MapBounds_playableMapRect) if MagicFunctions_compiletime then set cond_result_1 = Rect(-1536., -1536., 1536., 1536.) else set cond_result_1 = GetWorldBounds() endif set MapBounds_boundRect = cond_result_1 set receiver_1 = CreateRegion() call region_addRect(receiver_1, MapBounds_boundRect) set tuple_temp = rect_getMinX(MapBounds_playableMapRect) set tuple_temp_1 = rect_getMinY(MapBounds_playableMapRect) set MapBounds_playableMin_x = tuple_temp set MapBounds_playableMin_y = tuple_temp_1 set tuple_temp_2 = rect_getMaxX(MapBounds_playableMapRect) set tuple_temp_3 = rect_getMaxY(MapBounds_playableMapRect) set MapBounds_playableMax_x = tuple_temp_2 set MapBounds_playableMax_y = tuple_temp_3 set tuple_temp_4 = rect_getMinX(MapBounds_boundRect) set tuple_temp_5 = rect_getMinY(MapBounds_boundRect) set MapBounds_boundMin_x = tuple_temp_4 set MapBounds_boundMin_y = tuple_temp_5 set tuple_temp_6 = rect_getMaxX(MapBounds_boundRect) set tuple_temp_7 = rect_getMaxY(MapBounds_boundRect) set MapBounds_boundMax_x = tuple_temp_6 set MapBounds_boundMax_y = tuple_temp_7 call vec2_op_mult(vec2_op_plus(MapBounds_playableMin_x, MapBounds_playableMin_y, MapBounds_playableMax_x, MapBounds_playableMax_y), vec2_op_plus_return_y, .5) call vec2_op_mult(vec2_op_plus(MapBounds_boundMin_x, MapBounds_boundMin_y, MapBounds_boundMax_x, MapBounds_boundMax_y), vec2_op_plus_return_y, .5) endfunction function init_MapBounds takes nothing returns boolean call initMapBounds() return true endfunction function init_Maths takes nothing returns boolean return true endfunction function init_Matrices takes nothing returns boolean local real tuple_temp = 0. local real tuple_temp_1 = 0. local real tuple_temp_2 = 0. local real tuple_temp_3 = 0. local real tuple_temp_4 = 0. local real tuple_temp_5 = 0. local real tuple_temp_6 = 0. local real tuple_temp_7 = 0. local real tuple_temp_8 = 0. local real tuple_temp_9 = 0. local real tuple_temp_10 = 0. local real tuple_temp_11 = 0. local real tuple_temp_12 = 0. local real tuple_temp_13 = 0. local real tuple_temp_14 = 0. local real tuple_temp_15 = 0. set Matrices_ZERO44_m00 = tuple_temp set Matrices_ZERO44_m01 = tuple_temp_1 set Matrices_ZERO44_m02 = tuple_temp_2 set Matrices_ZERO44_m03 = tuple_temp_3 set Matrices_ZERO44_m10 = tuple_temp_4 set Matrices_ZERO44_m11 = tuple_temp_5 set Matrices_ZERO44_m12 = tuple_temp_6 set Matrices_ZERO44_m13 = tuple_temp_7 set Matrices_ZERO44_m20 = tuple_temp_8 set Matrices_ZERO44_m21 = tuple_temp_9 set Matrices_ZERO44_m22 = tuple_temp_10 set Matrices_ZERO44_m23 = tuple_temp_11 set Matrices_ZERO44_m30 = tuple_temp_12 set Matrices_ZERO44_m31 = tuple_temp_13 set Matrices_ZERO44_m32 = tuple_temp_14 set Matrices_ZERO44_m33 = tuple_temp_15 return true endfunction function angle_degrees takes real this_radians returns real return this_radians * Angle_RADTODEG endfunction function createUnit takes player p, integer unitId, real pos_x, real pos_y, real facing_radians returns unit return CreateUnit(p, unitId, pos_x, pos_y, angle_degrees(facing_radians)) endfunction function Stack_pop takes integer this returns integer local integer wval = Stack_top[this] set Stack_top[this] = SEntry_prev[Stack_top[this]] set Stack_size[this] = Stack_size[this] - 1 return SEntry_elem[wval] endfunction function dispatch_Stack_Stack_Stack_pop takes integer this returns integer local integer Stack_Stack_pop_result if Stack_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Stack.pop") else call error("Called Stack.pop on invalid object.") endif endif set Stack_Stack_pop_result = Stack_pop(this) return Stack_Stack_pop_result endfunction function Table_hasInt takes integer this, integer parentKey returns boolean return hashtable_hasInt(Table_ht, this, parentKey) endfunction function dispatch_Table_Table_Table_hasInt takes integer this, integer parentKey returns boolean local boolean Table_Table_hasInt_result if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.hasInt") else call error("Called Table.hasInt on invalid object.") endif endif set Table_Table_hasInt_result = Table_hasInt(this, parentKey) return Table_Table_hasInt_result endfunction function Table_loadInt takes integer this, integer parentKey returns integer return hashtable_loadInt(Table_ht, this, parentKey) endfunction function dispatch_Table_Table_Table_loadInt takes integer this, integer parentKey returns integer local integer Table_Table_loadInt_result if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.loadInt") else call error("Called Table.loadInt on invalid object.") endif endif set Table_Table_loadInt_result = Table_loadInt(this, parentKey) return Table_Table_loadInt_result endfunction function alloc_Stack takes nothing returns integer local integer this if Stack_firstFree == 0 then if Stack_maxIndex < 32768 then set Stack_maxIndex = Stack_maxIndex + 1 set this = Stack_maxIndex set Stack_typeId[this] = 12 else call error("Out of memory: Could not create Stack.") set this = 0 endif else set Stack_firstFree = Stack_firstFree - 1 set this = Stack_nextFree[Stack_firstFree] set Stack_typeId[this] = 12 endif return this endfunction function Stack_init takes integer this returns nothing set Stack_size[this] = 0 endfunction function alloc_SEntry takes nothing returns integer local integer this if SEntry_firstFree == 0 then if SEntry_maxIndex < 32768 then set SEntry_maxIndex = SEntry_maxIndex + 1 set this = SEntry_maxIndex else call error("Out of memory: Could not create SEntry.") set this = 0 endif else set SEntry_firstFree = SEntry_firstFree - 1 set this = SEntry_nextFree[SEntry_firstFree] endif return this endfunction function SEntry_init takes integer this returns nothing endfunction function construct_SEntry takes integer this, integer elem, integer prev returns nothing call SEntry_init(this) set SEntry_elem[this] = elem set SEntry_prev[this] = prev endfunction function new_SEntry takes integer elem, integer prev returns integer local integer this = alloc_SEntry() call construct_SEntry(this, elem, prev) return this endfunction function construct_Stack takes integer this returns nothing call Stack_init(this) set Stack_dummy[this] = new_SEntry(0, 0) set Stack_top[this] = Stack_dummy[this] endfunction function new_Stack takes nothing returns integer local integer this = alloc_Stack() call construct_Stack(this) return this endfunction function hashtable_loadUnitHandle takes hashtable this, integer parentKey, integer childKey returns unit return LoadUnitHandle(this, parentKey, childKey) endfunction function Table_loadUnit takes integer this, integer parentKey returns unit return hashtable_loadUnitHandle(Table_ht, this, parentKey) endfunction function dispatch_Table_Table_Table_loadUnit takes integer this, integer parentKey returns unit local unit Table_Table_loadUnit_result if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.loadUnit") else call error("Called Table.loadUnit on invalid object.") endif endif set Table_Table_loadUnit_result = Table_loadUnit(this, parentKey) return Table_Table_loadUnit_result endfunction function hashtable_saveFogStateHandle takes hashtable this, integer parentKey, integer childKey, fogstate value returns nothing call SaveFogStateHandle(this, parentKey, childKey, value) endfunction function Table_saveFogState takes integer this, integer parentKey, fogstate value returns nothing call hashtable_saveFogStateHandle(Table_ht, this, parentKey, value) endfunction function dispatch_Table_Table_Table_saveFogState takes integer this, integer parentKey, fogstate value returns nothing if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveFogState") else call error("Called Table.saveFogState on invalid object.") endif endif call Table_saveFogState(this, parentKey, value) endfunction function unitFromIndex takes integer index returns unit call dispatch_Table_Table_Table_saveFogState(TypeCasting_typecastdata, 0, ConvertFogState(index)) return dispatch_Table_Table_Table_loadUnit(TypeCasting_typecastdata, 0) endfunction function unit_setFacing takes unit this, real a_radians returns nothing call SetUnitFacing(this, angle_degrees(a_radians)) endfunction function unit_show takes unit this returns nothing call ShowUnit(this, true) endfunction function getUnit takes player p, integer id, real pos_x, real pos_y, real facing_radians returns unit local integer stack local unit receiver local unit receiver_1 if dispatch_Table_Table_Table_hasInt(ObjectRecycler_objectLists, id) then set stack = dispatch_Table_Table_Table_loadInt(ObjectRecycler_objectLists, id) set receiver = unitFromIndex(dispatch_Stack_Stack_Stack_pop(stack)) call unit_setFacing(receiver, facing_radians) set receiver_1 = receiver call unit_show(receiver_1) return receiver_1 else call dispatch_Table_Table_Table_saveInt(ObjectRecycler_objectLists, id, new_Stack()) return createUnit(p, id, pos_x, pos_y, facing_radians) endif endfunction function Stack_push takes integer this, integer elem returns nothing set Stack_top[this] = new_SEntry(elem, Stack_top[this]) set Stack_size[this] = Stack_size[this] + 1 endfunction function dispatch_Stack_Stack_Stack_push takes integer this, integer elem returns nothing if Stack_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Stack.push") else call error("Called Stack.push on invalid object.") endif endif call Stack_push(this, elem) endfunction function handle_getHandleId takes handle this returns integer return GetHandleId(this) endfunction function unitToIndex takes unit object returns integer return handle_getHandleId(object) endfunction function unit_hide takes unit this returns nothing call ShowUnit(this, false) endfunction function unit_setPos takes unit this, real x, real y returns nothing call SetUnitPosition(this, x, y) endfunction function unit_recycle takes unit this returns nothing local integer id = GetUnitTypeId(this) local integer stack if dispatch_Table_Table_Table_hasInt(ObjectRecycler_objectLists, id) then set stack = dispatch_Table_Table_Table_loadInt(ObjectRecycler_objectLists, id) call dispatch_Stack_Stack_Stack_push(stack, unitToIndex(this)) call unit_hide(this) call unit_setPos(this, 1., 2.) else call error("trying to recycle a unit not created by 'getUnit'!") endif endfunction function init_ObjectRecycler takes nothing returns boolean local unit u set ObjectRecycler_objectLists = new_Table() set u = getUnit(Player(0), 0, 0., 0., 0.) call unit_recycle(u) return true endfunction function initPlayerArray takes nothing returns nothing local integer i = 0 local integer temp = bj_MAX_PLAYER_SLOTS - 1 loop exitwhen i > temp call Player(i) set i = i + 1 endloop endfunction function init_Player takes nothing returns boolean set Player_localPlayer = GetLocalPlayer() call initPlayerArray() return true endfunction function init_Playercolor takes nothing returns boolean call ConvertPlayerColor(24) call ConvertPlayerColor(25) call ConvertPlayerColor(26) call ConvertPlayerColor(27) return true endfunction function init_Printing takes nothing returns boolean set Printing_DEBUG_LEVEL = 2 set Printing_DEBUG_MSG_DURATION = 45. return true endfunction function init_Quaternion takes nothing returns boolean return true endfunction function init_Real takes nothing returns boolean return true endfunction function init_String takes nothing returns boolean set String_charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" set String_numberset = "0123456789" call string_length(String_numberset) call string_length(String_charset) return true endfunction function init_Table takes nothing returns boolean set Table_ht = hashtable_compiletime_86 return true endfunction function hashtable_saveString takes hashtable this, integer parentKey, integer childKey, string value returns nothing call SaveStr(this, parentKey, childKey, value) endfunction function Table_saveString takes integer this, integer parentKey, string value returns nothing call hashtable_saveString(Table_ht, this, parentKey, value) endfunction function dispatch_Table_Table_Table_saveString takes integer this, integer parentKey, string value returns nothing if Table_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Table.saveString") else call error("Called Table.saveString on invalid object.") endif endif call Table_saveString(this, parentKey, value) endfunction function initTypecastData takes nothing returns nothing call dispatch_Table_Table_Table_saveString(TypeCasting_typecastdata, 0, "") endfunction function init_TypeCasting takes nothing returns boolean set TypeCasting_typecastdata = new_Table() call initTypecastData() return true endfunction function init_Vectors takes nothing returns boolean call Location(0., 0.) return true endfunction function init_WeatherEffects takes nothing returns boolean return true endfunction function initGlobals takes nothing returns nothing set Table_firstFree = 0 set Table_maxIndex = 0 set SEntry_firstFree = 0 set SEntry_maxIndex = 0 set Stack_firstFree = 0 set Stack_maxIndex = 0 set ref_function_init_AbilityIds = function init_AbilityIds set ref_function_init_Real = function init_Real set ref_function_init_Integer = function init_Integer set ref_function_init_Angle = function init_Angle set ref_function_init_String = function init_String set ref_function_init_Vectors = function init_Vectors set ref_function_init_Destructable = function init_Destructable set ref_function_init_Player = function init_Player set ref_function_init_Basics = function init_Basics set ref_function_init_MagicFunctions = function init_MagicFunctions set ref_function_init_Table = function init_Table set ref_function_init_Playercolor = function init_Playercolor set ref_function_init_Maths = function init_Maths set ref_function_init_Colors = function init_Colors set ref_function_init_Printing = function init_Printing set ref_function_init_GameTimer = function init_GameTimer set ref_function_init_ErrorHandling = function init_ErrorHandling set ref_function_init_HashList = function init_HashList set ref_function_init_Matrices = function init_Matrices set ref_function_init_Quaternion = function init_Quaternion set ref_function_init_Framehandle = function init_Framehandle set ref_function_init_Group = function init_Group set ref_function_init_Lightning = function init_Lightning set ref_function_init_WeatherEffects = function init_WeatherEffects set ref_function_init_TypeCasting = function init_TypeCasting set ref_function_init_EventHelper = function init_EventHelper set ref_function_init_MapBounds = function init_MapBounds set ref_function_init_ObjectRecycler = function init_ObjectRecycler set ref_function_code__startPeriodic_GameTimer = function code__startPeriodic_GameTimer endfunction function main takes nothing returns nothing local trigger initTrig call initGlobals() call initCompiletimeState() set initTrig = CreateTrigger() call TriggerAddCondition(initTrig, Condition(ref_function_init_AbilityIds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package AbilityIds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Real)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Real.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Integer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Integer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Angle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Angle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_String)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package String.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Vectors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Vectors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Destructable)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Destructable.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Player)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Player.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Basics)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Basics.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MagicFunctions)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MagicFunctions.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Table)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Table.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Playercolor)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Playercolor.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Maths)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Maths.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Colors)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Colors.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Printing)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Printing.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_GameTimer)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package GameTimer.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ErrorHandling)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ErrorHandling.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_HashList)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package HashList.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Matrices)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Matrices.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Quaternion)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Quaternion.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Framehandle)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Framehandle.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Group)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Group.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_Lightning)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package Lightning.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_WeatherEffects)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package WeatherEffects.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_TypeCasting)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package TypeCasting.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_EventHelper)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package EventHelper.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_MapBounds)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package MapBounds.") endif call TriggerClearConditions(initTrig) call TriggerAddCondition(initTrig, Condition(ref_function_init_ObjectRecycler)) if not TriggerEvaluate(initTrig) then call error("Could not initialize package ObjectRecycler.") endif call TriggerClearConditions(initTrig) call DestroyTrigger(initTrig) endfunction function config takes nothing returns nothing endfunction