#pragma once

#include "JassApi.h"

typedef Pointer TCode;
typedef TJassHandle HAGENT;
typedef HAGENT HEVENT;
typedef HAGENT HPLAYER;
typedef HAGENT HWIDGET;
typedef HWIDGET HUNIT;
typedef HWIDGET HDESTRUCTABLE;
typedef HWIDGET HITEM;
typedef HAGENT HABILITY;
typedef HABILITY HBUFF;
typedef HAGENT HFORCE;
typedef HAGENT HGROUP;
typedef HAGENT HTRIGGER;
typedef HAGENT HTRIGGERCONDITION;
typedef TJassHandle HTRIGGERACTION;
typedef HAGENT HTIMER;
typedef HAGENT HLOCATION;
typedef HAGENT HREGION;
typedef HAGENT HRECT;
typedef HAGENT HBOOLEXPR;
typedef HAGENT HSOUND;
typedef HBOOLEXPR HCONDITIONFUNC;
typedef HBOOLEXPR HFILTERFUNC;
typedef TJassHandle HUNITPOOL;
typedef TJassHandle HITEMPOOL;
typedef TJassHandle HRACE;
typedef TJassHandle HALLIANCETYPE;
typedef TJassHandle HRACEPREFERENCE;
typedef TJassHandle HGAMESTATE;
typedef HGAMESTATE HIGAMESTATE;
typedef HGAMESTATE HFGAMESTATE;
typedef TJassHandle HPLAYERSTATE;
typedef TJassHandle HPLAYERSCORE;
typedef TJassHandle HPLAYERGAMERESULT;
typedef TJassHandle HUNITSTATE;
typedef TJassHandle HAIDIFFICULTY;
typedef TJassHandle HEVENTID;
typedef HEVENTID HGAMEEVENT;
typedef HEVENTID HPLAYEREVENT;
typedef HEVENTID HPLAYERUNITEVENT;
typedef HEVENTID HUNITEVENT;
typedef HEVENTID HLIMITOP;
typedef HEVENTID HWIDGETEVENT;
typedef HEVENTID HDIALOGEVENT;
typedef TJassHandle HUNITTYPE;
typedef TJassHandle HGAMESPEED;
typedef TJassHandle HGAMEDIFFICULTY;
typedef TJassHandle HGAMETYPE;
typedef TJassHandle HMAPFLAG;
typedef TJassHandle HMAPVISIBILITY;
typedef TJassHandle HMAPSETTING;
typedef TJassHandle HMAPDENSITY;
typedef TJassHandle HMAPCONTROL;
typedef TJassHandle HPLAYERSLOTSTATE;
typedef TJassHandle HVOLUMEGROUP;
typedef TJassHandle HCAMERAFIELD;
typedef TJassHandle HCAMERASETUP;
typedef TJassHandle HPLAYERCOLOR;
typedef TJassHandle HPLACEMENT;
typedef TJassHandle HSTARTLOCPRIO;
typedef TJassHandle HRARITYCONTROL;
typedef TJassHandle HBLENDMODE;
typedef TJassHandle HTEXMAPFLAGS;
typedef HAGENT HEFFECT;
typedef TJassHandle HEFFECTTYPE;
typedef TJassHandle HWEATHEREFFECT;
typedef TJassHandle HTERRAINDEFORMATION;
typedef TJassHandle HFOGSTATE;
typedef HAGENT HFOGMODIFIER;
typedef HAGENT HDIALOG;
typedef HAGENT HBUTTON;
typedef HAGENT HQUEST;
typedef HAGENT HQUESTITEM;
typedef HAGENT HDEFEATCONDITION;
typedef HAGENT HTIMERDIALOG;
typedef HAGENT HLEADERBOARD;
typedef HAGENT HMULTIBOARD;
typedef HAGENT HMULTIBOARDITEM;
typedef HAGENT HTRACKABLE;
typedef HAGENT HGAMECACHE;
typedef TJassHandle HVERSION;
typedef TJassHandle HITEMTYPE;
typedef TJassHandle HTEXTTAG;
typedef TJassHandle HATTACKTYPE;
typedef TJassHandle HDAMAGETYPE;
typedef TJassHandle HWEAPONTYPE;
typedef TJassHandle HSOUNDTYPE;
typedef TJassHandle HLIGHTNING;
typedef TJassHandle HPATHINGTYPE;
typedef TJassHandle HIMAGE;
typedef TJassHandle HUBERSPLAT;
typedef HAGENT HHASHTABLE;

const Boolean FALSE_ = false;
const Boolean TRUE_ = true;
const Integer JASS_MAX_ARRAY_SIZE = 8192;
const Integer PLAYER_NEUTRAL_PASSIVE = 15;
const Integer PLAYER_NEUTRAL_AGGRESSIVE = 12;
const HPLAYERCOLOR PLAYER_COLOR_RED = 0;
const HPLAYERCOLOR PLAYER_COLOR_BLUE = 1;
const HPLAYERCOLOR PLAYER_COLOR_CYAN = 2;
const HPLAYERCOLOR PLAYER_COLOR_PURPLE = 3;
const HPLAYERCOLOR PLAYER_COLOR_YELLOW = 4;
const HPLAYERCOLOR PLAYER_COLOR_ORANGE = 5;
const HPLAYERCOLOR PLAYER_COLOR_GREEN = 6;
const HPLAYERCOLOR PLAYER_COLOR_PINK = 7;
const HPLAYERCOLOR PLAYER_COLOR_LIGHT_GRAY = 8;
const HPLAYERCOLOR PLAYER_COLOR_LIGHT_BLUE = 9;
const HPLAYERCOLOR PLAYER_COLOR_AQUA = 10;
const HPLAYERCOLOR PLAYER_COLOR_BROWN = 11;
const HRACE RACE_HUMAN = 1;
const HRACE RACE_ORC = 2;
const HRACE RACE_UNDEAD = 3;
const HRACE RACE_NIGHTELF = 4;
const HRACE RACE_DEMON = 5;
const HRACE RACE_OTHER = 7;
const HPLAYERGAMERESULT PLAYER_GAME_RESULT_VICTORY = 0;
const HPLAYERGAMERESULT PLAYER_GAME_RESULT_DEFEAT = 1;
const HPLAYERGAMERESULT PLAYER_GAME_RESULT_TIE = 2;
const HPLAYERGAMERESULT PLAYER_GAME_RESULT_NEUTRAL = 3;
const HALLIANCETYPE ALLIANCE_PASSIVE = 0;
const HALLIANCETYPE ALLIANCE_HELP_REQUEST = 1;
const HALLIANCETYPE ALLIANCE_HELP_RESPONSE = 2;
const HALLIANCETYPE ALLIANCE_SHARED_XP = 3;
const HALLIANCETYPE ALLIANCE_SHARED_SPELLS = 4;
const HALLIANCETYPE ALLIANCE_SHARED_VISION = 5;
const HALLIANCETYPE ALLIANCE_SHARED_CONTROL = 6;
const HALLIANCETYPE ALLIANCE_RESCUABLE = 8;
const HALLIANCETYPE ALLIANCE_SHARED_VISION_FORCED = 9;
const HVERSION VERSION_REIGN_OF_CHAOS = 0;
const HVERSION VERSION_FROZEN_THRONE = 1;
const HATTACKTYPE ATTACK_TYPE_NORMAL = 0;
const HATTACKTYPE ATTACK_TYPE_MELEE = 1;
const HATTACKTYPE ATTACK_TYPE_PIERCE = 2;
const HATTACKTYPE ATTACK_TYPE_SIEGE = 3;
const HATTACKTYPE ATTACK_TYPE_MAGIC = 4;
const HATTACKTYPE ATTACK_TYPE_CHAOS = 5;
const HATTACKTYPE ATTACK_TYPE_HERO = 6;
const HDAMAGETYPE DAMAGE_TYPE_UNKNOWN = 0;
const HDAMAGETYPE DAMAGE_TYPE_NORMAL = 4;
const HDAMAGETYPE DAMAGE_TYPE_ENHANCED = 5;
const HDAMAGETYPE DAMAGE_TYPE_FIRE = 8;
const HDAMAGETYPE DAMAGE_TYPE_COLD = 9;
const HDAMAGETYPE DAMAGE_TYPE_LIGHTNING = 10;
const HDAMAGETYPE DAMAGE_TYPE_POISON = 11;
const HDAMAGETYPE DAMAGE_TYPE_DISEASE = 12;
const HDAMAGETYPE DAMAGE_TYPE_DIVINE = 13;
const HDAMAGETYPE DAMAGE_TYPE_MAGIC = 14;
const HDAMAGETYPE DAMAGE_TYPE_SONIC = 15;
const HDAMAGETYPE DAMAGE_TYPE_ACID = 16;
const HDAMAGETYPE DAMAGE_TYPE_FORCE = 17;
const HDAMAGETYPE DAMAGE_TYPE_DEATH = 18;
const HDAMAGETYPE DAMAGE_TYPE_MIND = 19;
const HDAMAGETYPE DAMAGE_TYPE_PLANT = 20;
const HDAMAGETYPE DAMAGE_TYPE_DEFENSIVE = 21;
const HDAMAGETYPE DAMAGE_TYPE_DEMOLITION = 22;
const HDAMAGETYPE DAMAGE_TYPE_SLOW_POISON = 23;
const HDAMAGETYPE DAMAGE_TYPE_SPIRIT_LINK = 24;
const HDAMAGETYPE DAMAGE_TYPE_SHADOW_STRIKE = 25;
const HDAMAGETYPE DAMAGE_TYPE_UNIVERSAL = 26;
const HWEAPONTYPE WEAPON_TYPE_WHOKNOWS = 0;
const HWEAPONTYPE WEAPON_TYPE_METAL_LIGHT_CHOP = 1;
const HWEAPONTYPE WEAPON_TYPE_METAL_MEDIUM_CHOP = 2;
const HWEAPONTYPE WEAPON_TYPE_METAL_HEAVY_CHOP = 3;
const HWEAPONTYPE WEAPON_TYPE_METAL_LIGHT_SLICE = 4;
const HWEAPONTYPE WEAPON_TYPE_METAL_MEDIUM_SLICE = 5;
const HWEAPONTYPE WEAPON_TYPE_METAL_HEAVY_SLICE = 6;
const HWEAPONTYPE WEAPON_TYPE_METAL_MEDIUM_BASH = 7;
const HWEAPONTYPE WEAPON_TYPE_METAL_HEAVY_BASH = 8;
const HWEAPONTYPE WEAPON_TYPE_METAL_MEDIUM_STAB = 9;
const HWEAPONTYPE WEAPON_TYPE_METAL_HEAVY_STAB = 10;
const HWEAPONTYPE WEAPON_TYPE_WOOD_LIGHT_SLICE = 11;
const HWEAPONTYPE WEAPON_TYPE_WOOD_MEDIUM_SLICE = 12;
const HWEAPONTYPE WEAPON_TYPE_WOOD_HEAVY_SLICE = 13;
const HWEAPONTYPE WEAPON_TYPE_WOOD_LIGHT_BASH = 14;
const HWEAPONTYPE WEAPON_TYPE_WOOD_MEDIUM_BASH = 15;
const HWEAPONTYPE WEAPON_TYPE_WOOD_HEAVY_BASH = 16;
const HWEAPONTYPE WEAPON_TYPE_WOOD_LIGHT_STAB = 17;
const HWEAPONTYPE WEAPON_TYPE_WOOD_MEDIUM_STAB = 18;
const HWEAPONTYPE WEAPON_TYPE_CLAW_LIGHT_SLICE = 19;
const HWEAPONTYPE WEAPON_TYPE_CLAW_MEDIUM_SLICE = 20;
const HWEAPONTYPE WEAPON_TYPE_CLAW_HEAVY_SLICE = 21;
const HWEAPONTYPE WEAPON_TYPE_AXE_MEDIUM_CHOP = 22;
const HWEAPONTYPE WEAPON_TYPE_ROCK_HEAVY_BASH = 23;
const HPATHINGTYPE PATHING_TYPE_ANY = 0;
const HPATHINGTYPE PATHING_TYPE_WALKABILITY = 1;
const HPATHINGTYPE PATHING_TYPE_FLYABILITY = 2;
const HPATHINGTYPE PATHING_TYPE_BUILDABILITY = 3;
const HPATHINGTYPE PATHING_TYPE_PEONHARVESTPATHING = 4;
const HPATHINGTYPE PATHING_TYPE_BLIGHTPATHING = 5;
const HPATHINGTYPE PATHING_TYPE_FLOATABILITY = 6;
const HPATHINGTYPE PATHING_TYPE_AMPHIBIOUSPATHING = 7;
const HRACEPREFERENCE RACE_PREF_HUMAN = 1;
const HRACEPREFERENCE RACE_PREF_ORC = 2;
const HRACEPREFERENCE RACE_PREF_NIGHTELF = 4;
const HRACEPREFERENCE RACE_PREF_UNDEAD = 8;
const HRACEPREFERENCE RACE_PREF_DEMON = 16;
const HRACEPREFERENCE RACE_PREF_RANDOM = 32;
const HRACEPREFERENCE RACE_PREF_USER_SELECTABLE = 64;
const HMAPCONTROL MAP_CONTROL_USER = 0;
const HMAPCONTROL MAP_CONTROL_COMPUTER = 1;
const HMAPCONTROL MAP_CONTROL_RESCUABLE = 2;
const HMAPCONTROL MAP_CONTROL_NEUTRAL = 3;
const HMAPCONTROL MAP_CONTROL_CREEP = 4;
const HMAPCONTROL MAP_CONTROL_NONE = 5;
const HGAMETYPE GAME_TYPE_MELEE = 1;
const HGAMETYPE GAME_TYPE_FFA = 2;
const HGAMETYPE GAME_TYPE_USE_MAP_SETTINGS = 4;
const HGAMETYPE GAME_TYPE_BLIZ = 8;
const HGAMETYPE GAME_TYPE_ONE_ON_ONE = 16;
const HGAMETYPE GAME_TYPE_TWO_TEAM_PLAY = 32;
const HGAMETYPE GAME_TYPE_THREE_TEAM_PLAY = 64;
const HGAMETYPE GAME_TYPE_FOUR_TEAM_PLAY = 128;
const HMAPFLAG MAP_FOG_HIDE_TERRAIN = 1;
const HMAPFLAG MAP_FOG_MAP_EXPLORED = 2;
const HMAPFLAG MAP_FOG_ALWAYS_VISIBLE = 4;
const HMAPFLAG MAP_USE_HANDICAPS = 8;
const HMAPFLAG MAP_OBSERVERS = 16;
const HMAPFLAG MAP_OBSERVERS_ON_DEATH = 32;
const HMAPFLAG MAP_FIXED_COLORS = 128;
const HMAPFLAG MAP_LOCK_RESOURCE_TRADING = 256;
const HMAPFLAG MAP_RESOURCE_TRADING_ALLIES_ONLY = 512;
const HMAPFLAG MAP_LOCK_ALLIANCE_CHANGES = 1024;
const HMAPFLAG MAP_ALLIANCE_CHANGES_HIDDEN = 2048;
const HMAPFLAG MAP_CHEATS = 4096;
const HMAPFLAG MAP_CHEATS_HIDDEN = 8192;
const HMAPFLAG MAP_LOCK_SPEED = 8192 * 2;
const HMAPFLAG MAP_LOCK_RANDOM_SEED = 8192 * 4;
const HMAPFLAG MAP_SHARED_ADVANCED_CONTROL = 8192 * 8;
const HMAPFLAG MAP_RANDOM_HERO = 8192 * 16;
const HMAPFLAG MAP_RANDOM_RACES = 8192 * 32;
const HMAPFLAG MAP_RELOADED = 8192 * 64;
const HPLACEMENT MAP_PLACEMENT_RANDOM = 0;
const HPLACEMENT MAP_PLACEMENT_FIXED = 1;
const HPLACEMENT MAP_PLACEMENT_USE_MAP_SETTINGS = 2;
const HPLACEMENT MAP_PLACEMENT_TEAMS_TOGETHER = 3;
const HSTARTLOCPRIO MAP_LOC_PRIO_LOW = 0;
const HSTARTLOCPRIO MAP_LOC_PRIO_HIGH = 1;
const HSTARTLOCPRIO MAP_LOC_PRIO_NOT = 2;
const HMAPDENSITY MAP_DENSITY_NONE = 0;
const HMAPDENSITY MAP_DENSITY_LIGHT = 1;
const HMAPDENSITY MAP_DENSITY_MEDIUM = 2;
const HMAPDENSITY MAP_DENSITY_HEAVY = 3;
const HGAMEDIFFICULTY MAP_DIFFICULTY_EASY = 0;
const HGAMEDIFFICULTY MAP_DIFFICULTY_NORMAL = 1;
const HGAMEDIFFICULTY MAP_DIFFICULTY_HARD = 2;
const HGAMEDIFFICULTY MAP_DIFFICULTY_INSANE = 3;
const HGAMESPEED MAP_SPEED_SLOWEST = 0;
const HGAMESPEED MAP_SPEED_SLOW = 1;
const HGAMESPEED MAP_SPEED_NORMAL = 2;
const HGAMESPEED MAP_SPEED_FAST = 3;
const HGAMESPEED MAP_SPEED_FASTEST = 4;
const HPLAYERSLOTSTATE PLAYER_SLOT_STATE_EMPTY = 0;
const HPLAYERSLOTSTATE PLAYER_SLOT_STATE_PLAYING = 1;
const HPLAYERSLOTSTATE PLAYER_SLOT_STATE_LEFT = 2;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_UNITMOVEMENT = 0;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_UNITSOUNDS = 1;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_COMBAT = 2;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_SPELLS = 3;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_UI = 4;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_MUSIC = 5;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_AMBIENTSOUNDS = 6;
const HVOLUMEGROUP SOUND_VOLUMEGROUP_FIRE = 7;
const HIGAMESTATE GAME_STATE_DIVINE_INTERVENTION = 0;
const HIGAMESTATE GAME_STATE_DISCONNECTED = 1;
const HIGAMESTATE GAME_STATE_TIME_OF_DAY = 2;
const HPLAYERSTATE PLAYER_STATE_GAME_RESULT = 0;
const HPLAYERSTATE PLAYER_STATE_RESOURCE_GOLD = 1;
const HPLAYERSTATE PLAYER_STATE_RESOURCE_LUMBER = 2;
const HPLAYERSTATE PLAYER_STATE_RESOURCE_HERO_TOKENS = 3;
const HPLAYERSTATE PLAYER_STATE_RESOURCE_FOOD_CAP = 4;
const HPLAYERSTATE PLAYER_STATE_RESOURCE_FOOD_USED = 5;
const HPLAYERSTATE PLAYER_STATE_FOOD_CAP_CEILING = 6;
const HPLAYERSTATE PLAYER_STATE_GIVES_BOUNTY = 7;
const HPLAYERSTATE PLAYER_STATE_ALLIED_VICTORY = 8;
const HPLAYERSTATE PLAYER_STATE_PLACED = 9;
const HPLAYERSTATE PLAYER_STATE_OBSERVER_ON_DEATH = 10;
const HPLAYERSTATE PLAYER_STATE_OBSERVER = 11;
const HPLAYERSTATE PLAYER_STATE_UNFOLLOWABLE = 12;
const HPLAYERSTATE PLAYER_STATE_GOLD_UPKEEP_RATE = 13;
const HPLAYERSTATE PLAYER_STATE_LUMBER_UPKEEP_RATE = 14;
const HPLAYERSTATE PLAYER_STATE_GOLD_GATHERED = 15;
const HPLAYERSTATE PLAYER_STATE_LUMBER_GATHERED = 16;
const HPLAYERSTATE PLAYER_STATE_NO_CREEP_SLEEP = 25;
const HUNITSTATE UNIT_STATE_LIFE = 0;
const HUNITSTATE UNIT_STATE_MAX_LIFE = 1;
const HUNITSTATE UNIT_STATE_MANA = 2;
const HUNITSTATE UNIT_STATE_MAX_MANA = 3;
const HAIDIFFICULTY AI_DIFFICULTY_NEWBIE = 0;
const HAIDIFFICULTY AI_DIFFICULTY_NORMAL = 1;
const HAIDIFFICULTY AI_DIFFICULTY_INSANE = 2;
const HPLAYERSCORE PLAYER_SCORE_UNITS_TRAINED = 0;
const HPLAYERSCORE PLAYER_SCORE_UNITS_KILLED = 1;
const HPLAYERSCORE PLAYER_SCORE_STRUCT_BUILT = 2;
const HPLAYERSCORE PLAYER_SCORE_STRUCT_RAZED = 3;
const HPLAYERSCORE PLAYER_SCORE_TECH_PERCENT = 4;
const HPLAYERSCORE PLAYER_SCORE_FOOD_MAXPROD = 5;
const HPLAYERSCORE PLAYER_SCORE_FOOD_MAXUSED = 6;
const HPLAYERSCORE PLAYER_SCORE_HEROES_KILLED = 7;
const HPLAYERSCORE PLAYER_SCORE_ITEMS_GAINED = 8;
const HPLAYERSCORE PLAYER_SCORE_MERCS_HIRED = 9;
const HPLAYERSCORE PLAYER_SCORE_GOLD_MINED_TOTAL = 10;
const HPLAYERSCORE PLAYER_SCORE_GOLD_MINED_UPKEEP = 11;
const HPLAYERSCORE PLAYER_SCORE_GOLD_LOST_UPKEEP = 12;
const HPLAYERSCORE PLAYER_SCORE_GOLD_LOST_TAX = 13;
const HPLAYERSCORE PLAYER_SCORE_GOLD_GIVEN = 14;
const HPLAYERSCORE PLAYER_SCORE_GOLD_RECEIVED = 15;
const HPLAYERSCORE PLAYER_SCORE_LUMBER_TOTAL = 16;
const HPLAYERSCORE PLAYER_SCORE_LUMBER_LOST_UPKEEP = 17;
const HPLAYERSCORE PLAYER_SCORE_LUMBER_LOST_TAX = 18;
const HPLAYERSCORE PLAYER_SCORE_LUMBER_GIVEN = 19;
const HPLAYERSCORE PLAYER_SCORE_LUMBER_RECEIVED = 20;
const HPLAYERSCORE PLAYER_SCORE_UNIT_TOTAL = 21;
const HPLAYERSCORE PLAYER_SCORE_HERO_TOTAL = 22;
const HPLAYERSCORE PLAYER_SCORE_RESOURCE_TOTAL = 23;
const HPLAYERSCORE PLAYER_SCORE_TOTAL = 24;
const HGAMEEVENT EVENT_GAME_VICTORY = 0;
const HGAMEEVENT EVENT_GAME_END_LEVEL = 1;
const HGAMEEVENT EVENT_GAME_VARIABLE_LIMIT = 2;
const HGAMEEVENT EVENT_GAME_STATE_LIMIT = 3;
const HGAMEEVENT EVENT_GAME_TIMER_EXPIRED = 4;
const HGAMEEVENT EVENT_GAME_ENTER_REGION = 5;
const HGAMEEVENT EVENT_GAME_LEAVE_REGION = 6;
const HGAMEEVENT EVENT_GAME_TRACKABLE_HIT = 7;
const HGAMEEVENT EVENT_GAME_TRACKABLE_TRACK = 8;
const HGAMEEVENT EVENT_GAME_SHOW_SKILL = 9;
const HGAMEEVENT EVENT_GAME_BUILD_SUBMENU = 10;
const HPLAYEREVENT EVENT_PLAYER_STATE_LIMIT  = 11;
const HPLAYEREVENT EVENT_PLAYER_ALLIANCE_CHANGED = 12;
const HPLAYEREVENT EVENT_PLAYER_DEFEAT = 13;
const HPLAYEREVENT EVENT_PLAYER_VICTORY = 14;
const HPLAYEREVENT EVENT_PLAYER_LEAVE = 15;
const HPLAYEREVENT EVENT_PLAYER_CHAT = 16;
const HPLAYEREVENT EVENT_PLAYER_END_CINEMATIC = 17;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_ATTACKED = 18;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_RESCUED = 19;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_DEATH = 20;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_DECAY = 21;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_DETECTED = 22;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_HIDDEN = 23;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SELECTED = 24;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_DESELECTED = 25;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_CONSTRUCT_START = 26;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL = 27;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_CONSTRUCT_FINISH = 28;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_UPGRADE_START = 29;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_UPGRADE_CANCEL = 30;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_UPGRADE_FINISH = 31;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_TRAIN_START = 32;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_TRAIN_CANCEL = 33;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_TRAIN_FINISH = 34;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_RESEARCH_START = 35;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_RESEARCH_CANCEL = 36;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_RESEARCH_FINISH = 37;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_ISSUED_ORDER = 38;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER = 39;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER = 40;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER = 40;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_LEVEL = 41;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_SKILL = 42;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_REVIVABLE = 43;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_REVIVE_START = 44;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_REVIVE_CANCEL = 45;
const HPLAYERUNITEVENT EVENT_PLAYER_HERO_REVIVE_FINISH = 46;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SUMMON = 47;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_DROP_ITEM = 48;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_PICKUP_ITEM = 49;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_USE_ITEM = 50;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_LOADED = 51;
const HUNITEVENT EVENT_UNIT_DAMAGED = 52;
const HUNITEVENT EVENT_UNIT_DEATH = 53;
const HUNITEVENT EVENT_UNIT_DECAY = 54;
const HUNITEVENT EVENT_UNIT_DETECTED = 55;
const HUNITEVENT EVENT_UNIT_HIDDEN = 56;
const HUNITEVENT EVENT_UNIT_SELECTED = 57;
const HUNITEVENT EVENT_UNIT_DESELECTED = 58;
const HUNITEVENT EVENT_UNIT_STATE_LIMIT = 59;
const HUNITEVENT EVENT_UNIT_ACQUIRED_TARGET = 60;
const HUNITEVENT EVENT_UNIT_TARGET_IN_RANGE = 61;
const HUNITEVENT EVENT_UNIT_ATTACKED = 62;
const HUNITEVENT EVENT_UNIT_RESCUED = 63;
const HUNITEVENT EVENT_UNIT_CONSTRUCT_CANCEL = 64;
const HUNITEVENT EVENT_UNIT_CONSTRUCT_FINISH = 65;
const HUNITEVENT EVENT_UNIT_UPGRADE_START = 66;
const HUNITEVENT EVENT_UNIT_UPGRADE_CANCEL = 67;
const HUNITEVENT EVENT_UNIT_UPGRADE_FINISH = 68;
const HUNITEVENT EVENT_UNIT_TRAIN_START = 69;
const HUNITEVENT EVENT_UNIT_TRAIN_CANCEL = 70;
const HUNITEVENT EVENT_UNIT_TRAIN_FINISH = 71;
const HUNITEVENT EVENT_UNIT_RESEARCH_START = 72;
const HUNITEVENT EVENT_UNIT_RESEARCH_CANCEL = 73;
const HUNITEVENT EVENT_UNIT_RESEARCH_FINISH = 74;
const HUNITEVENT EVENT_UNIT_ISSUED_ORDER = 75;
const HUNITEVENT EVENT_UNIT_ISSUED_POINT_ORDER = 76;
const HUNITEVENT EVENT_UNIT_ISSUED_TARGET_ORDER = 77;
const HUNITEVENT EVENT_UNIT_HERO_LEVEL = 78;
const HUNITEVENT EVENT_UNIT_HERO_SKILL = 79;
const HUNITEVENT EVENT_UNIT_HERO_REVIVABLE = 80;
const HUNITEVENT EVENT_UNIT_HERO_REVIVE_START = 81;
const HUNITEVENT EVENT_UNIT_HERO_REVIVE_CANCEL = 82;
const HUNITEVENT EVENT_UNIT_HERO_REVIVE_FINISH = 83;
const HUNITEVENT EVENT_UNIT_SUMMON = 84;
const HUNITEVENT EVENT_UNIT_DROP_ITEM = 85;
const HUNITEVENT EVENT_UNIT_PICKUP_ITEM = 86;
const HUNITEVENT EVENT_UNIT_USE_ITEM = 87;
const HUNITEVENT EVENT_UNIT_LOADED = 88;
const HWIDGETEVENT EVENT_WIDGET_DEATH = 89;
const HDIALOGEVENT EVENT_DIALOG_BUTTON_CLICK = 90;
const HDIALOGEVENT EVENT_DIALOG_CLICK = 91;
const HGAMEEVENT EVENT_GAME_LOADED = 256;
const HGAMEEVENT EVENT_GAME_TOURNAMENT_FINISH_SOON = 257;
const HGAMEEVENT EVENT_GAME_TOURNAMENT_FINISH_NOW = 258;
const HGAMEEVENT EVENT_GAME_SAVE = 259;
const HPLAYEREVENT EVENT_PLAYER_ARROW_LEFT_DOWN = 261;
const HPLAYEREVENT EVENT_PLAYER_ARROW_LEFT_UP = 262;
const HPLAYEREVENT EVENT_PLAYER_ARROW_RIGHT_DOWN = 263;
const HPLAYEREVENT EVENT_PLAYER_ARROW_RIGHT_UP = 264;
const HPLAYEREVENT EVENT_PLAYER_ARROW_DOWN_DOWN = 265;
const HPLAYEREVENT EVENT_PLAYER_ARROW_DOWN_UP = 266;
const HPLAYEREVENT EVENT_PLAYER_ARROW_UP_DOWN = 267;
const HPLAYEREVENT EVENT_PLAYER_ARROW_UP_UP = 268;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SELL = 269;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_CHANGE_OWNER = 270;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SELL_ITEM = 271;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SPELL_CHANNEL = 272;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SPELL_CAST = 273;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SPELL_EFFECT = 274;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SPELL_FINISH = 275;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_SPELL_ENDCAST = 276;
const HPLAYERUNITEVENT EVENT_PLAYER_UNIT_PAWN_ITEM = 277;
const HUNITEVENT EVENT_UNIT_SELL = 286;
const HUNITEVENT EVENT_UNIT_CHANGE_OWNER = 287;
const HUNITEVENT EVENT_UNIT_SELL_ITEM = 288;
const HUNITEVENT EVENT_UNIT_SPELL_CHANNEL = 289;
const HUNITEVENT EVENT_UNIT_SPELL_CAST = 290;
const HUNITEVENT EVENT_UNIT_SPELL_EFFECT = 291;
const HUNITEVENT EVENT_UNIT_SPELL_FINISH = 292;
const HUNITEVENT EVENT_UNIT_SPELL_ENDCAST = 293;
const HUNITEVENT EVENT_UNIT_PAWN_ITEM = 294;
const HLIMITOP LESS_THAN = 0;
const HLIMITOP LESS_THAN_OR_EQUAL = 1;
const HLIMITOP EQUAL = 2;
const HLIMITOP GREATER_THAN_OR_EQUAL = 3;
const HLIMITOP GREATER_THAN = 4;
const HLIMITOP NOT_EQUAL = 5;
const HUNITTYPE UNIT_TYPE_HERO = 0;
const HUNITTYPE UNIT_TYPE_DEAD = 1;
const HUNITTYPE UNIT_TYPE_STRUCTURE = 2;
const HUNITTYPE UNIT_TYPE_FLYING = 3;
const HUNITTYPE UNIT_TYPE_GROUND = 4;
const HUNITTYPE UNIT_TYPE_ATTACKS_FLYING = 5;
const HUNITTYPE UNIT_TYPE_ATTACKS_GROUND = 6;
const HUNITTYPE UNIT_TYPE_MELEE_ATTACKER = 7;
const HUNITTYPE UNIT_TYPE_RANGED_ATTACKER = 8;
const HUNITTYPE UNIT_TYPE_GIANT = 9;
const HUNITTYPE UNIT_TYPE_SUMMONED = 10;
const HUNITTYPE UNIT_TYPE_STUNNED = 11;
const HUNITTYPE UNIT_TYPE_PLAGUED = 12;
const HUNITTYPE UNIT_TYPE_SNARED = 13;
const HUNITTYPE UNIT_TYPE_UNDEAD = 14;
const HUNITTYPE UNIT_TYPE_MECHANICAL = 15;
const HUNITTYPE UNIT_TYPE_PEON = 16;
const HUNITTYPE UNIT_TYPE_SAPPER = 17;
const HUNITTYPE UNIT_TYPE_TOWNHALL = 18;
const HUNITTYPE UNIT_TYPE_ANCIENT = 19;
const HUNITTYPE UNIT_TYPE_TAUREN = 20;
const HUNITTYPE UNIT_TYPE_POISONED = 21;
const HUNITTYPE UNIT_TYPE_POLYMORPHED = 22;
const HUNITTYPE UNIT_TYPE_SLEEPING = 23;
const HUNITTYPE UNIT_TYPE_RESISTANT = 24;
const HUNITTYPE UNIT_TYPE_ETHEREAL = 25;
const HUNITTYPE UNIT_TYPE_MAGIC_IMMUNE = 26;
const HITEMTYPE ITEM_TYPE_PERMANENT = 0;
const HITEMTYPE ITEM_TYPE_CHARGED = 1;
const HITEMTYPE ITEM_TYPE_POWERUP = 2;//2- Не странно
const HITEMTYPE ITEM_TYPE_ARTIFACT = 3;
const HITEMTYPE ITEM_TYPE_PURCHASABLE = 4;
const HITEMTYPE ITEM_TYPE_CAMPAIGN = 5;
const HITEMTYPE ITEM_TYPE_MISCELLANEOUS = 6;
const HITEMTYPE ITEM_TYPE_UNKNOWN = 7;
const HITEMTYPE ITEM_TYPE_ANY = 8;
const HITEMTYPE ITEM_TYPE_TOME = 2;//2 - Странно
const HCAMERAFIELD CAMERA_FIELD_TARGET_DISTANCE = 0;
const HCAMERAFIELD CAMERA_FIELD_FARZ = 1;
const HCAMERAFIELD CAMERA_FIELD_ANGLE_OF_ATTACK = 2;
const HCAMERAFIELD CAMERA_FIELD_FIELD_OF_VIEW = 3;
const HCAMERAFIELD CAMERA_FIELD_ROLL = 4;
const HCAMERAFIELD CAMERA_FIELD_ROTATION = 5;
const HCAMERAFIELD CAMERA_FIELD_ZOFFSET = 6;
const HBLENDMODE BLEND_MODE_NONE = 0;
const HBLENDMODE BLEND_MODE_DONT_CARE = 0;
const HBLENDMODE BLEND_MODE_KEYALPHA = 1;
const HBLENDMODE BLEND_MODE_BLEND = 2;
const HBLENDMODE BLEND_MODE_ADDITIVE = 3;
const HBLENDMODE BLEND_MODE_MODULATE = 4;
const HBLENDMODE BLEND_MODE_MODULATE_2X = 5;
const HRARITYCONTROL RARITY_FREQUENT = 0;
const HRARITYCONTROL RARITY_RARE = 1;
const HTEXMAPFLAGS TEXMAP_FLAG_NONE = 0;
const HTEXMAPFLAGS TEXMAP_FLAG_WRAP_U = 1;
const HTEXMAPFLAGS TEXMAP_FLAG_WRAP_V = 2;
const HTEXMAPFLAGS TEXMAP_FLAG_WRAP_UV = 3;
const HFOGSTATE FOG_OF_WAR_MASKED = 1;
const HFOGSTATE FOG_OF_WAR_FOGGED = 2;
const HFOGSTATE FOG_OF_WAR_VISIBLE = 4;
const Integer CAMERA_MARGIN_LEFT = 0;
const Integer CAMERA_MARGIN_RIGHT = 1;
const Integer CAMERA_MARGIN_TOP = 2;
const Integer CAMERA_MARGIN_BOTTOM = 3;
const HEFFECTTYPE EFFECT_TYPE_EFFECT = 0;
const HEFFECTTYPE EFFECT_TYPE_TARGET = 1;
const HEFFECTTYPE EFFECT_TYPE_CASTER = 2;
const HEFFECTTYPE EFFECT_TYPE_SPECIAL = 3;
const HEFFECTTYPE EFFECT_TYPE_AREA_EFFECT = 4;
const HEFFECTTYPE EFFECT_TYPE_MISSILE = 5;
const HEFFECTTYPE EFFECT_TYPE_LIGHTNING = 6;
const HSOUNDTYPE SOUND_TYPE_EFFECT = 0;
const HSOUNDTYPE SOUND_TYPE_EFFECT_LOOPED = 1;

HRACE ConvertRace(Integer i);
HALLIANCETYPE ConvertAllianceType(Integer i);
HRACEPREFERENCE ConvertRacePref(Integer i);
HIGAMESTATE ConvertIGameState(Integer i);
HFGAMESTATE ConvertFGameState(Integer i);
HPLAYERSTATE ConvertPlayerState(Integer i);
HPLAYERSCORE ConvertPlayerScore(Integer i);
HPLAYERGAMERESULT ConvertPlayerGameResult(Integer i);
HUNITSTATE ConvertUnitState(Integer i);
HAIDIFFICULTY ConvertAIDifficulty(Integer i);
HGAMEEVENT ConvertGameEvent(Integer i);
HPLAYEREVENT ConvertPlayerEvent(Integer i);
HPLAYERUNITEVENT ConvertPlayerUnitEvent(Integer i);
HWIDGETEVENT ConvertWidgetEvent(Integer i);
HDIALOGEVENT ConvertDialogEvent(Integer i);
HUNITEVENT ConvertUnitEvent(Integer i);
HLIMITOP ConvertLimitOp(Integer i);
HUNITTYPE ConvertUnitType(Integer i);
HGAMESPEED ConvertGameSpeed(Integer i);
HPLACEMENT ConvertPlacement(Integer i);
HSTARTLOCPRIO ConvertStartLocPrio(Integer i);
HGAMEDIFFICULTY ConvertGameDifficulty(Integer i);
HGAMETYPE ConvertGameType(Integer i);
HMAPFLAG ConvertMapFlag(Integer i);
HMAPVISIBILITY ConvertMapVisibility(Integer i);
HMAPSETTING ConvertMapSetting(Integer i);
HMAPDENSITY ConvertMapDensity(Integer i);
HMAPCONTROL ConvertMapControl(Integer i);
HPLAYERCOLOR ConvertPlayerColor(Integer i);
HPLAYERSLOTSTATE ConvertPlayerSlotState(Integer i);
HVOLUMEGROUP ConvertVolumeGroup(Integer i);
HCAMERAFIELD ConvertCameraField(Integer i);
HBLENDMODE ConvertBlendMode(Integer i);
HRARITYCONTROL ConvertRarityControl(Integer i);
HTEXMAPFLAGS ConvertTexMapFlags(Integer i);
HFOGSTATE ConvertFogState(Integer i);
HEFFECTTYPE ConvertEffectType(Integer i);
HVERSION ConvertVersion(Integer i);
HITEMTYPE ConvertItemType(Integer i);
HATTACKTYPE ConvertAttackType(Integer i);
HDAMAGETYPE ConvertDamageType(Integer i);
HWEAPONTYPE ConvertWeaponType(Integer i);
HSOUNDTYPE ConvertSoundType(Integer i);
HPATHINGTYPE ConvertPathingType(Integer i);
Integer OrderId(String orderIdString);
String OrderId2String(Integer orderId);
Integer UnitId(String unitIdString);
String UnitId2String(Integer unitId);
Integer AbilityId(String abilityIdString);
String AbilityId2String(Integer abilityId);
String GetObjectName(Integer objectId);
Single Deg2Rad(Single degrees);
Single Rad2Deg(Single radians);
Single Sin(Single radians);
Single Cos(Single radians);
Single Tan(Single radians);
Single Asin(Single y);
Single Acos(Single x);
Single Atan(Single x);
Single Atan2(Single y, Single x);
Single SquareRoot(Single x);
Single Pow(Single x, Single power);
Single I2R(Integer i);
Integer R2I(Single r);
String I2S(Integer i);
String R2S(Single r);
String R2SW(Single r, Integer width, Integer precision);
Integer S2I(String s);
Single S2R(String s);
Integer GetHandleId(TJassHandle h);
String SubString(String source, Integer start, Integer end_);
Integer StringLength(String s);
String StringCase(String source, Boolean upper);
Integer StringHash(String s);
String GetLocalizedString(String source);
Integer GetLocalizedHotkey(String source);
procedure SetMapName(String name);
procedure SetMapDescription(String description);
procedure SetTeams(Integer teamcount);
procedure SetPlayers(Integer playercount);
procedure DefineStartLocation(Integer whichStartLoc, Single x, Single y);
procedure DefineStartLocationLoc(Integer whichStartLoc, HLOCATION whichLocation);
procedure SetStartLocPrioCount(Integer whichStartLoc, Integer prioSlotCount);
procedure SetStartLocPrio(Integer whichStartLoc, Integer prioSlotIndex, Integer otherStartLocIndex, HSTARTLOCPRIO priority);
Integer GetStartLocPrioSlot(Integer whichStartLoc, Integer prioSlotIndex);
HSTARTLOCPRIO GetStartLocPrio(Integer whichStartLoc, Integer prioSlotIndex);
procedure SetGameTypeSupported(HGAMETYPE whichGameType, Boolean value);
procedure SetMapFlag(HMAPFLAG whichMapFlag, Boolean value);
procedure SetGamePlacement(HPLACEMENT whichPlacementType);
procedure SetGameSpeed(HGAMESPEED whichspeed);
procedure SetGameDifficulty(HGAMEDIFFICULTY whichdifficulty);
procedure SetResourceDensity(HMAPDENSITY whichdensity);
procedure SetCreatureDensity(HMAPDENSITY whichdensity);
Integer GetTeams();
Integer GetPlayers();
Boolean IsGameTypeSupported(HGAMETYPE whichGameType);
HGAMETYPE GetGameTypeSelected();
Boolean IsMapFlagSet(HMAPFLAG whichMapFlag);
HPLACEMENT GetGamePlacement();
HGAMESPEED GetGameSpeed();
HGAMEDIFFICULTY GetGameDifficulty();
HMAPDENSITY GetResourceDensity();
HMAPDENSITY GetCreatureDensity();
Single GetStartLocationX(Integer whichStartLocation);
Single GetStartLocationY(Integer whichStartLocation);
HLOCATION GetStartLocationLoc(Integer whichStartLocation);
procedure SetPlayerTeam(HPLAYER whichPlayer, Integer whichTeam);
procedure SetPlayerStartLocation(HPLAYER whichPlayer, Integer startLocIndex);
procedure ForcePlayerStartLocation(HPLAYER whichPlayer, Integer startLocIndex);
procedure SetPlayerColor(HPLAYER whichPlayer, HPLAYERCOLOR color);
procedure SetPlayerAlliance(HPLAYER sourcePlayer, HPLAYER otherPlayer, HALLIANCETYPE whichAllianceSetting, Boolean value);
procedure SetPlayerTaxRate(HPLAYER sourcePlayer, HPLAYER otherPlayer, HPLAYERSTATE whichResource, Integer rate);
procedure SetPlayerRacePreference(HPLAYER whichPlayer, HRACEPREFERENCE whichRacePreference);
procedure SetPlayerRaceSelectable(HPLAYER whichPlayer, Boolean value);
procedure SetPlayerController(HPLAYER whichPlayer, HMAPCONTROL controlType);
procedure SetPlayerName(HPLAYER whichPlayer, String name);
procedure SetPlayerOnScoreScreen(HPLAYER whichPlayer, Boolean flag);
Integer GetPlayerTeam(HPLAYER whichPlayer);
Integer GetPlayerStartLocation(HPLAYER whichPlayer);
HPLAYERCOLOR GetPlayerColor(HPLAYER whichPlayer);
Boolean GetPlayerSelectable(HPLAYER whichPlayer);
HMAPCONTROL GetPlayerController(HPLAYER whichPlayer);
HPLAYERSLOTSTATE GetPlayerSlotState(HPLAYER whichPlayer);
Integer GetPlayerTaxRate(HPLAYER sourcePlayer, HPLAYER otherPlayer, HPLAYERSTATE whichResource);
Boolean IsPlayerRacePrefSet(HPLAYER whichPlayer, HRACEPREFERENCE pref);
String GetPlayerName(HPLAYER whichPlayer);
HTIMER CreateTimer();
procedure DestroyTimer(HTIMER whichTimer);
procedure TimerStart(HTIMER whichTimer, Single timeout, Boolean periodic, TCode handlerFunc);
Single TimerGetElapsed(HTIMER whichTimer);
Single TimerGetRemaining(HTIMER whichTimer);
Single TimerGetTimeout(HTIMER whichTimer);
procedure PauseTimer(HTIMER whichTimer);
procedure ResumeTimer(HTIMER whichTimer);
HTIMER GetExpiredTimer();
HGROUP CreateGroup();
procedure DestroyGroup(HGROUP whichGroup);
procedure GroupAddUnit(HGROUP whichGroup, HUNIT whichUnit);
procedure GroupRemoveUnit(HGROUP whichGroup, HUNIT whichUnit);
procedure GroupClear(HGROUP whichGroup);
procedure GroupEnumUnitsOfType(HGROUP whichGroup, String unitname, HBOOLEXPR filter);
procedure GroupEnumUnitsOfPlayer(HGROUP whichGroup, HPLAYER whichPlayer, HBOOLEXPR filter);
procedure GroupEnumUnitsOfTypeCounted(HGROUP whichGroup, String unitname, HBOOLEXPR filter, Integer countLimit);
procedure GroupEnumUnitsInRect(HGROUP whichGroup, HRECT r, HBOOLEXPR filter);
procedure GroupEnumUnitsInRectCounted(HGROUP whichGroup, HRECT r, HBOOLEXPR filter, Integer countLimit);
procedure GroupEnumUnitsInRange(HGROUP whichGroup, Single x, Single y, Single radius, HBOOLEXPR filter);
procedure GroupEnumUnitsInRangeOfLoc(HGROUP whichGroup, HLOCATION whichLocation, Single radius, HBOOLEXPR filter);
procedure GroupEnumUnitsInRangeCounted(HGROUP whichGroup, Single x, Single y, Single radius, HBOOLEXPR filter, Integer countLimit);
procedure GroupEnumUnitsInRangeOfLocCounted(HGROUP whichGroup, HLOCATION whichLocation, Single radius, HBOOLEXPR filter, Integer countLimit);
procedure GroupEnumUnitsSelected(HGROUP whichGroup, HPLAYER whichPlayer, HBOOLEXPR filter);
Boolean GroupImmediateOrder(HGROUP whichGroup, String order);
Boolean GroupImmediateOrderById(HGROUP whichGroup, Integer order);
Boolean GroupPointOrder(HGROUP whichGroup, String order, Single x, Single y);
Boolean GroupPointOrderLoc(HGROUP whichGroup, String order, HLOCATION whichLocation);
Boolean GroupPointOrderById(HGROUP whichGroup, Integer order, Single x, Single y);
Boolean GroupPointOrderByIdLoc(HGROUP whichGroup, Integer order, HLOCATION whichLocation);
Boolean GroupTargetOrder(HGROUP whichGroup, String order, HWIDGET targetWidget);
Boolean GroupTargetOrderById(HGROUP whichGroup, Integer order, HWIDGET targetWidget);
procedure ForGroup(HGROUP whichGroup, TCode callback);
HUNIT FirstOfGroup(HGROUP whichGroup);
HFORCE CreateForce();
procedure DestroyForce(HFORCE whichForce);
procedure ForceAddPlayer(HFORCE whichForce, HPLAYER whichPlayer);
procedure ForceRemovePlayer(HFORCE whichForce, HPLAYER whichPlayer);
procedure ForceClear(HFORCE whichForce);
procedure ForceEnumPlayers(HFORCE whichForce, HBOOLEXPR filter);
procedure ForceEnumPlayersCounted(HFORCE whichForce, HBOOLEXPR filter, Integer countLimit);
procedure ForceEnumAllies(HFORCE whichForce, HPLAYER whichPlayer, HBOOLEXPR filter);
procedure ForceEnumEnemies(HFORCE whichForce, HPLAYER whichPlayer, HBOOLEXPR filter);
procedure ForForce(HFORCE whichForce, TCode callback);
HRECT Rect(Single minx, Single miny, Single maxx, Single maxy);
HRECT RectFromLoc(HLOCATION min, HLOCATION max);
procedure RemoveRect(HRECT whichRect);
procedure SetRect(HRECT whichRect, Single minx, Single miny, Single maxx, Single maxy);
procedure SetRectFromLoc(HRECT whichRect, HLOCATION min, HLOCATION max);
procedure MoveRectTo(HRECT whichRect, Single newCenterX, Single newCenterY);
procedure MoveRectToLoc(HRECT whichRect, HLOCATION newCenterLoc);
Single GetRectCenterX(HRECT whichRect);
Single GetRectCenterY(HRECT whichRect);
Single GetRectMinX(HRECT whichRect);
Single GetRectMinY(HRECT whichRect);
Single GetRectMaxX(HRECT whichRect);
Single GetRectMaxY(HRECT whichRect);
HREGION CreateRegion();
procedure RemoveRegion(HREGION whichRegion);
procedure RegionAddRect(HREGION whichRegion, HRECT r);
procedure RegionClearRect(HREGION whichRegion, HRECT r);
procedure RegionAddCell(HREGION whichRegion, Single x, Single y);
procedure RegionAddCellAtLoc(HREGION whichRegion, HLOCATION whichLocation);
procedure RegionClearCell(HREGION whichRegion, Single x, Single y);
procedure RegionClearCellAtLoc(HREGION whichRegion, HLOCATION whichLocation);
HLOCATION Location(Single x, Single y);
procedure RemoveLocation(HLOCATION whichLocation);
procedure MoveLocation(HLOCATION whichLocation, Single newX, Single newY);
Single GetLocationX(HLOCATION whichLocation);
Single GetLocationY(HLOCATION whichLocation);
Single GetLocationZ(HLOCATION whichLocation);
Boolean IsUnitInRegion(HREGION whichRegion, HUNIT whichUnit);
Boolean IsPointInRegion(HREGION whichRegion, Single x, Single y);
Boolean IsLocationInRegion(HREGION whichRegion, HLOCATION whichLocation);
HRECT GetWorldBounds();
HTRIGGER CreateTrigger();
procedure DestroyTrigger(HTRIGGER whichTrigger);
procedure ResetTrigger(HTRIGGER whichTrigger);
procedure EnableTrigger(HTRIGGER whichTrigger);
procedure DisableTrigger(HTRIGGER whichTrigger);
Boolean IsTriggerEnabled(HTRIGGER whichTrigger);
procedure TriggerWaitOnSleeps(HTRIGGER whichTrigger, Boolean flag);
Boolean IsTriggerWaitOnSleeps(HTRIGGER whichTrigger);
HUNIT GetFilterUnit();
HUNIT GetEnumUnit();
HDESTRUCTABLE GetFilterDestructable();
HDESTRUCTABLE GetEnumDestructable();
HITEM GetFilterItem();
HITEM GetEnumItem();
HPLAYER GetFilterPlayer();
HPLAYER GetEnumPlayer();
HTRIGGER GetTriggeringTrigger();
HEVENTID GetTriggerEventId();
Integer GetTriggerEvalCount(HTRIGGER whichTrigger);
Integer GetTriggerExecCount(HTRIGGER whichTrigger);
procedure ExecuteFunc(String funcName);
HBOOLEXPR And_(HBOOLEXPR operandA, HBOOLEXPR operandB);
HBOOLEXPR Or_(HBOOLEXPR operandA, HBOOLEXPR operandB);
HBOOLEXPR Not_(HBOOLEXPR operand);
HCONDITIONFUNC Condition(TCode func);
procedure DestroyCondition(HCONDITIONFUNC c);
HFILTERFUNC Filter(TCode func);
procedure DestroyFilter(HFILTERFUNC f);
procedure DestroyBoolExpr(HBOOLEXPR e);
HEVENT TriggerRegisterVariableEvent(HTRIGGER whichTrigger, String varName, HLIMITOP opcode, Single limitval);
HEVENT TriggerRegisterTimerEvent(HTRIGGER whichTrigger, Single timeout, Boolean periodic);
HEVENT TriggerRegisterTimerExpireEvent(HTRIGGER whichTrigger, HTIMER t);
HEVENT TriggerRegisterGameStateEvent(HTRIGGER whichTrigger, HGAMESTATE whichState, HLIMITOP opcode, Single limitval);
HEVENT TriggerRegisterDialogEvent(HTRIGGER whichTrigger, HDIALOG whichDialog);
HEVENT TriggerRegisterDialogButtonEvent(HTRIGGER whichTrigger, HBUTTON whichButton);
HGAMESTATE GetEventGameState();
HEVENT TriggerRegisterGameEvent(HTRIGGER whichTrigger, HGAMEEVENT whichGameEvent);
HPLAYER GetWinningPlayer();
HEVENT TriggerRegisterEnterRegion(HTRIGGER whichTrigger, HREGION whichRegion, HBOOLEXPR filter);
HREGION GetTriggeringRegion();
HUNIT GetEnteringUnit();
HEVENT TriggerRegisterLeaveRegion(HTRIGGER whichTrigger, HREGION whichRegion, HBOOLEXPR filter);
HUNIT GetLeavingUnit();
HEVENT TriggerRegisterTrackableHitEvent(HTRIGGER whichTrigger, HTRACKABLE t);
HEVENT TriggerRegisterTrackableTrackEvent(HTRIGGER whichTrigger, HTRACKABLE t);
HTRACKABLE GetTriggeringTrackable();
HBUTTON GetClickedButton();
HDIALOG GetClickedDialog();
Single GetTournamentFinishSoonTimeRemaining();
Integer GetTournamentFinishNowRule();
HPLAYER GetTournamentFinishNowPlayer();
Integer GetTournamentScore(HPLAYER whichPlayer);
String GetSaveBasicFilename();
HEVENT TriggerRegisterPlayerEvent(HTRIGGER whichTrigger, HPLAYER whichPlayer, HPLAYEREVENT whichPlayerEvent);
HPLAYER GetTriggerPlayer();
HEVENT TriggerRegisterPlayerUnitEvent(HTRIGGER whichTrigger, HPLAYER whichPlayer, HPLAYERUNITEVENT whichPlayerUnitEvent, HBOOLEXPR filter);
HUNIT GetLevelingUnit();
HUNIT GetLearningUnit();
Integer GetLearnedSkill();
Integer GetLearnedSkillLevel();
HUNIT GetRevivableUnit();
HUNIT GetRevivingUnit();
HUNIT GetAttacker();
HUNIT GetRescuer();
HUNIT GetDyingUnit();
HUNIT GetKillingUnit();
HUNIT GetDecayingUnit();
HUNIT GetSelectedUnit();
HUNIT GetConstructingStructure();
HUNIT GetCancelledStructure();
HUNIT GetConstructedStructure();
HUNIT GetResearchingUnit();
Integer GetResearched();
Integer GetTrainedUnitType();
HUNIT GetTrainedUnit();
HUNIT GetDetectedUnit();
HUNIT GetSummoningUnit();
HUNIT GetSummonedUnit();
HUNIT GetTransportUnit();
HUNIT GetLoadedUnit();
HUNIT GetSellingUnit();
HUNIT GetSoldUnit();
HUNIT GetBuyingUnit();
HITEM GetSoldItem();
HUNIT GetChangingUnit();
HPLAYER GetChangingUnitPrevOwner();
HUNIT GetManipulatingUnit();
HITEM GetManipulatedItem();
HUNIT GetOrderedUnit();
Integer GetIssuedOrderId();
Single GetOrderPointX();
Single GetOrderPointY();
HLOCATION GetOrderPointLoc();
HWIDGET GetOrderTarget();
HDESTRUCTABLE GetOrderTargetDestructable();
HITEM GetOrderTargetItem();
HUNIT GetOrderTargetUnit();
HUNIT GetSpellAbilityUnit();
Integer GetSpellAbilityId();
HABILITY GetSpellAbility();
HLOCATION GetSpellTargetLoc();
Single GetSpellTargetX();
Single GetSpellTargetY();
HDESTRUCTABLE GetSpellTargetDestructable();
HITEM GetSpellTargetItem();
HUNIT GetSpellTargetUnit();
HEVENT TriggerRegisterPlayerAllianceChange(HTRIGGER whichTrigger, HPLAYER whichPlayer, HALLIANCETYPE whichAlliance);
HEVENT TriggerRegisterPlayerStateEvent(HTRIGGER whichTrigger, HPLAYER whichPlayer, HPLAYERSTATE whichState, HLIMITOP opcode, Single limitval);
HPLAYERSTATE GetEventPlayerState();
HEVENT TriggerRegisterPlayerChatEvent(HTRIGGER whichTrigger, HPLAYER whichPlayer, String chatMessageToDetect, Boolean exactMatchOnly);
String GetEventPlayerChatString();
String GetEventPlayerChatStringMatched();
HEVENT TriggerRegisterDeathEvent(HTRIGGER whichTrigger, HWIDGET whichWidget);
HUNIT GetTriggerUnit();
HEVENT TriggerRegisterUnitStateEvent(HTRIGGER whichTrigger, HUNIT whichUnit, HUNITSTATE whichState, HLIMITOP opcode, Single limitval);
HUNITSTATE GetEventUnitState();
HEVENT TriggerRegisterUnitEvent(HTRIGGER whichTrigger, HUNIT whichUnit, HUNITEVENT whichEvent);
Single GetEventDamage();
HUNIT GetEventDamageSource();
HPLAYER GetEventDetectingPlayer();
HEVENT TriggerRegisterFilterUnitEvent(HTRIGGER whichTrigger, HUNIT whichUnit, HUNITEVENT whichEvent, HBOOLEXPR filter);
HUNIT GetEventTargetUnit();
HEVENT TriggerRegisterUnitInRange(HTRIGGER whichTrigger, HUNIT whichUnit, Single range, HBOOLEXPR filter);
HTRIGGERCONDITION TriggerAddCondition(HTRIGGER whichTrigger, HBOOLEXPR condition);
procedure TriggerRemoveCondition(HTRIGGER whichTrigger, HTRIGGERCONDITION whichCondition);
procedure TriggerClearConditions(HTRIGGER whichTrigger);
HTRIGGERACTION TriggerAddAction(HTRIGGER whichTrigger, TCode actionFunc);
procedure TriggerRemoveAction(HTRIGGER whichTrigger, HTRIGGERACTION whichAction);
procedure TriggerClearActions(HTRIGGER whichTrigger);
procedure TriggerSleepAction(Single timeout);
procedure TriggerWaitForSound(HSOUND s, Single offset);
Boolean TriggerEvaluate(HTRIGGER whichTrigger);
procedure TriggerExecute(HTRIGGER whichTrigger);
procedure TriggerExecuteWait(HTRIGGER whichTrigger);
procedure TriggerSyncStart();
procedure TriggerSyncReady();
Single GetWidgetLife(HWIDGET whichWidget);
procedure SetWidgetLife(HWIDGET whichWidget, Single newLife);
Single GetWidgetX(HWIDGET whichWidget);
Single GetWidgetY(HWIDGET whichWidget);
HWIDGET GetTriggerWidget();
HDESTRUCTABLE CreateDestructable(Integer objectid, Single x, Single y, Single face, Single scale, Integer variation);
HDESTRUCTABLE CreateDestructableZ(Integer objectid, Single x, Single y, Single z, Single face, Single scale, Integer variation);
HDESTRUCTABLE CreateDeadDestructable(Integer objectid, Single x, Single y, Single face, Single scale, Integer variation);
HDESTRUCTABLE CreateDeadDestructableZ(Integer objectid, Single x, Single y, Single z, Single face, Single scale, Integer variation);
procedure RemoveDestructable(HDESTRUCTABLE d);
procedure KillDestructable(HDESTRUCTABLE d);
procedure SetDestructableInvulnerable(HDESTRUCTABLE d, Boolean flag);
Boolean IsDestructableInvulnerable(HDESTRUCTABLE d);
procedure EnumDestructablesInRect(HRECT r, HBOOLEXPR filter, TCode actionFunc);
Integer GetDestructableTypeId(HDESTRUCTABLE d);
Single GetDestructableX(HDESTRUCTABLE d);
Single GetDestructableY(HDESTRUCTABLE d);
procedure SetDestructableLife(HDESTRUCTABLE d, Single life);
Single GetDestructableLife(HDESTRUCTABLE d);
procedure SetDestructableMaxLife(HDESTRUCTABLE d, Single max);
Single GetDestructableMaxLife(HDESTRUCTABLE d);
procedure DestructableRestoreLife(HDESTRUCTABLE d, Single life, Boolean birth);
procedure QueueDestructableAnimation(HDESTRUCTABLE d, String whichAnimation);
procedure SetDestructableAnimation(HDESTRUCTABLE d, String whichAnimation);
procedure SetDestructableAnimationSpeed(HDESTRUCTABLE d, Single speedFactor);
procedure ShowDestructable(HDESTRUCTABLE d, Boolean flag);
Single GetDestructableOccluderHeight(HDESTRUCTABLE d);
procedure SetDestructableOccluderHeight(HDESTRUCTABLE d, Single height);
String GetDestructableName(HDESTRUCTABLE d);
HDESTRUCTABLE GetTriggerDestructable();
HITEM CreateItem(Integer itemid, Single x, Single y);
procedure RemoveItem(HITEM whichItem);
HPLAYER GetItemPlayer(HITEM whichItem);
Integer GetItemTypeId(HITEM i);
Single GetItemX(HITEM i);
Single GetItemY(HITEM i);
procedure SetItemPosition(HITEM i, Single x, Single y);
procedure SetItemDropOnDeath(HITEM whichItem, Boolean flag);
procedure SetItemDroppable(HITEM i, Boolean flag);
procedure SetItemPawnable(HITEM i, Boolean flag);
procedure SetItemPlayer(HITEM whichItem, HPLAYER whichPlayer, Boolean changeColor);
procedure SetItemInvulnerable(HITEM whichItem, Boolean flag);
Boolean IsItemInvulnerable(HITEM whichItem);
procedure SetItemVisible(HITEM whichItem, Boolean show);
Boolean IsItemVisible(HITEM whichItem);
Boolean IsItemOwned(HITEM whichItem);
Boolean IsItemPowerup(HITEM whichItem);
Boolean IsItemSellable(HITEM whichItem);
Boolean IsItemPawnable(HITEM whichItem);
Boolean IsItemIdPowerup(Integer itemId);
Boolean IsItemIdSellable(Integer itemId);
Boolean IsItemIdPawnable(Integer itemId);
procedure EnumItemsInRect(HRECT r, HBOOLEXPR filter, TCode actionFunc);
Integer GetItemLevel(HITEM whichItem);
HITEMTYPE GetItemType(HITEM whichItem);
procedure SetItemDropID(HITEM whichItem, Integer unitId);
String GetItemName(HITEM whichItem);
Integer GetItemCharges(HITEM whichItem);
procedure SetItemCharges(HITEM whichItem, Integer charges);
Integer GetItemUserData(HITEM whichItem);
procedure SetItemUserData(HITEM whichItem, Integer data);
HUNIT CreateUnit(HPLAYER id, Integer unitid, Single x, Single y, Single face);
HUNIT CreateUnitByName(HPLAYER whichPlayer, String unitname, Single x, Single y, Single face);
HUNIT CreateUnitAtLoc(HPLAYER id, Integer unitid, HLOCATION whichLocation, Single face);
HUNIT CreateUnitAtLocByName(HPLAYER id, String unitname, HLOCATION whichLocation, Single face);
HUNIT CreateCorpse(HPLAYER whichPlayer, Integer unitid, Single x, Single y, Single face);
procedure KillUnit(HUNIT whichUnit);
procedure RemoveUnit(HUNIT whichUnit);
procedure ShowUnit(HUNIT whichUnit, Boolean show);
procedure SetUnitState(HUNIT whichUnit, HUNITSTATE whichUnitState, Single newVal);
procedure SetUnitX(HUNIT whichUnit, Single newX);
procedure SetUnitY(HUNIT whichUnit, Single newY);
procedure SetUnitPosition(HUNIT whichUnit, Single newX, Single newY);
procedure SetUnitPositionLoc(HUNIT whichUnit, HLOCATION whichLocation);
procedure SetUnitFacing(HUNIT whichUnit, Single facingAngle);
procedure SetUnitFacingTimed(HUNIT whichUnit, Single facingAngle, Single duration);
procedure SetUnitMoveSpeed(HUNIT whichUnit, Single newSpeed);
procedure SetUnitFlyHeight(HUNIT whichUnit, Single newHeight, Single rate);
procedure SetUnitTurnSpeed(HUNIT whichUnit, Single newTurnSpeed);
procedure SetUnitPropWindow(HUNIT whichUnit, Single newPropWindowAngle);
procedure SetUnitAcquireRange(HUNIT whichUnit, Single newAcquireRange);
procedure SetUnitCreepGuard(HUNIT whichUnit, Boolean creepGuard);
Single GetUnitAcquireRange(HUNIT whichUnit);
Single GetUnitTurnSpeed(HUNIT whichUnit);
Single GetUnitPropWindow(HUNIT whichUnit);
Single GetUnitFlyHeight(HUNIT whichUnit);
Single GetUnitDefaultAcquireRange(HUNIT whichUnit);
Single GetUnitDefaultTurnSpeed(HUNIT whichUnit);
Single GetUnitDefaultPropWindow(HUNIT whichUnit);
Single GetUnitDefaultFlyHeight(HUNIT whichUnit);
procedure SetUnitOwner(HUNIT whichUnit, HPLAYER whichPlayer, Boolean changeColor);
procedure SetUnitColor(HUNIT whichUnit, HPLAYERCOLOR whichColor);
procedure SetUnitScale(HUNIT whichUnit, Single scaleX, Single scaleY, Single scaleZ);
procedure SetUnitTimeScale(HUNIT whichUnit, Single timeScale);
procedure SetUnitBlendTime(HUNIT whichUnit, Single blendTime);
procedure SetUnitVertexColor(HUNIT whichUnit, Integer red, Integer green, Integer blue, Integer alpha);
procedure QueueUnitAnimation(HUNIT whichUnit, String whichAnimation);
procedure SetUnitAnimation(HUNIT whichUnit, String whichAnimation);
procedure SetUnitAnimationByIndex(HUNIT whichUnit, Integer whichAnimation);
procedure SetUnitAnimationWithRarity(HUNIT whichUnit, String whichAnimation, HRARITYCONTROL rarity);
procedure AddUnitAnimationProperties(HUNIT whichUnit, String animProperties, Boolean add);
procedure SetUnitLookAt(HUNIT whichUnit, String whichBone, HUNIT lookAtTarget, Single offsetX, Single offsetY, Single offsetZ);
procedure ResetUnitLookAt(HUNIT whichUnit);
procedure SetUnitRescuable(HUNIT whichUnit, HPLAYER byWhichPlayer, Boolean flag);
procedure SetUnitRescueRange(HUNIT whichUnit, Single range);
procedure SetHeroStr(HUNIT whichHero, Integer newStr, Boolean permanent);
procedure SetHeroAgi(HUNIT whichHero, Integer newAgi, Boolean permanent);
procedure SetHeroInt(HUNIT whichHero, Integer newInt, Boolean permanent);
Integer GetHeroStr(HUNIT whichHero, Boolean includeBonuses);
Integer GetHeroAgi(HUNIT whichHero, Boolean includeBonuses);
Integer GetHeroInt(HUNIT whichHero, Boolean includeBonuses);
Boolean UnitStripHeroLevel(HUNIT whichHero, Integer howManyLevels);
Integer GetHeroXP(HUNIT whichHero);
procedure SetHeroXP(HUNIT whichHero, Integer newXpVal, Boolean showEyeCandy);
Integer GetHeroSkillPoints(HUNIT whichHero);
Boolean UnitModifySkillPoints(HUNIT whichHero, Integer skillPointDelta);
procedure AddHeroXP(HUNIT whichHero, Integer xpToAdd, Boolean showEyeCandy);
procedure SetHeroLevel(HUNIT whichHero, Integer level, Boolean showEyeCandy);
Integer GetHeroLevel(HUNIT whichHero);
Integer GetUnitLevel(HUNIT whichUnit);
String GetHeroProperName(HUNIT whichHero);
procedure SuspendHeroXP(HUNIT whichHero, Boolean flag);
Boolean IsSuspendedXP(HUNIT whichHero);
procedure SelectHeroSkill(HUNIT whichHero, Integer abilcode);
Integer GetUnitAbilityLevel(HUNIT whichUnit, Integer abilcode);
Integer DecUnitAbilityLevel(HUNIT whichUnit, Integer abilcode);
Integer IncUnitAbilityLevel(HUNIT whichUnit, Integer abilcode);
Integer SetUnitAbilityLevel(HUNIT whichUnit, Integer abilcode, Integer level);
Boolean ReviveHero(HUNIT whichHero, Single x, Single y, Boolean doEyecandy);
Boolean ReviveHeroLoc(HUNIT whichHero, HLOCATION loc, Boolean doEyecandy);
procedure SetUnitExploded(HUNIT whichUnit, Boolean exploded);
procedure SetUnitInvulnerable(HUNIT whichUnit, Boolean flag);
procedure PauseUnit(HUNIT whichUnit, Boolean flag);
Boolean IsUnitPaused(HUNIT whichHero);
procedure SetUnitPathing(HUNIT whichUnit, Boolean flag);
procedure ClearSelection();
procedure SelectUnit(HUNIT whichUnit, Boolean flag);
Integer GetUnitPointValue(HUNIT whichUnit);
Integer GetUnitPointValueByType(Integer unitType);
procedure SetUnitPointValueByType(Integer unitType, Integer newPointValue);
Boolean UnitAddItem(HUNIT whichUnit, HITEM whichItem);
HITEM UnitAddItemById(HUNIT whichUnit, Integer itemId);
Boolean UnitAddItemToSlotById(HUNIT whichUnit, Integer itemId, Integer itemSlot);
procedure UnitRemoveItem(HUNIT whichUnit, HITEM whichItem);
HITEM UnitRemoveItemFromSlot(HUNIT whichUnit, Integer itemSlot);
Boolean UnitHasItem(HUNIT whichUnit, HITEM whichItem);
HITEM UnitItemInSlot(HUNIT whichUnit, Integer itemSlot);
Integer UnitInventorySize(HUNIT whichUnit);
Boolean UnitDropItemPoint(HUNIT whichUnit, HITEM whichItem, Single x, Single y);
Boolean UnitDropItemSlot(HUNIT whichUnit, HITEM whichItem, Integer slot);
Boolean UnitDropItemTarget(HUNIT whichUnit, HITEM whichItem, HWIDGET target);
Boolean UnitUseItem(HUNIT whichUnit, HITEM whichItem);
Boolean UnitUseItemPoint(HUNIT whichUnit, HITEM whichItem, Single x, Single y);
Boolean UnitUseItemTarget(HUNIT whichUnit, HITEM whichItem, HWIDGET target);
Single GetUnitX(HUNIT whichUnit);
Single GetUnitY(HUNIT whichUnit);
HLOCATION GetUnitLoc(HUNIT whichUnit);
Single GetUnitFacing(HUNIT whichUnit);
Single GetUnitMoveSpeed(HUNIT whichUnit);
Single GetUnitDefaultMoveSpeed(HUNIT whichUnit);
Single GetUnitState(HUNIT whichUnit, HUNITSTATE whichUnitState);
HPLAYER GetOwningPlayer(HUNIT whichUnit);
Integer GetUnitTypeId(HUNIT whichUnit);
HRACE GetUnitRace(HUNIT whichUnit);
String GetUnitName(HUNIT whichUnit);
Integer GetUnitFoodUsed(HUNIT whichUnit);
Integer GetUnitFoodMade(HUNIT whichUnit);
Integer GetFoodMade(Integer unitId);
Integer GetFoodUsed(Integer unitId);
procedure SetUnitUseFood(HUNIT whichUnit, Boolean useFood);
HLOCATION GetUnitRallyPoint(HUNIT whichUnit);
HUNIT GetUnitRallyUnit(HUNIT whichUnit);
HDESTRUCTABLE GetUnitRallyDestructable(HUNIT whichUnit);
Boolean IsUnitInGroup(HUNIT whichUnit, HGROUP whichGroup);
Boolean IsUnitInForce(HUNIT whichUnit, HFORCE whichForce);
Boolean IsUnitOwnedByPlayer(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitAlly(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitEnemy(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitVisible(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitDetected(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitInvisible(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitFogged(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitMasked(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitSelected(HUNIT whichUnit, HPLAYER whichPlayer);
Boolean IsUnitRace(HUNIT whichUnit, HRACE whichRace);
Boolean IsUnitType(HUNIT whichUnit, HUNITTYPE whichUnitType);
Boolean IsUnit(HUNIT whichUnit, HUNIT whichSpecifiedUnit);
Boolean IsUnitInRange(HUNIT whichUnit, HUNIT otherUnit, Single distance);
Boolean IsUnitInRangeXY(HUNIT whichUnit, Single x, Single y, Single distance);
Boolean IsUnitInRangeLoc(HUNIT whichUnit, HLOCATION whichLocation, Single distance);
Boolean IsUnitHidden(HUNIT whichUnit);
Boolean IsUnitIllusion(HUNIT whichUnit);
Boolean IsUnitInTransport(HUNIT whichUnit, HUNIT whichTransport);
Boolean IsUnitLoaded(HUNIT whichUnit);
Boolean IsHeroUnitId(Integer unitId);
Boolean IsUnitIdType(Integer unitId, HUNITTYPE whichUnitType);
procedure UnitShareVision(HUNIT whichUnit, HPLAYER whichPlayer, Boolean share);
procedure UnitSuspendDecay(HUNIT whichUnit, Boolean suspend);
Boolean UnitAddType(HUNIT whichUnit, HUNITTYPE whichUnitType);
Boolean UnitRemoveType(HUNIT whichUnit, HUNITTYPE whichUnitType);
Boolean UnitAddAbility(HUNIT whichUnit, Integer abilityId);
Boolean UnitRemoveAbility(HUNIT whichUnit, Integer abilityId);
Boolean UnitMakeAbilityPermanent(HUNIT whichUnit, Boolean permanent, Integer abilityId);
procedure UnitRemoveBuffs(HUNIT whichUnit, Boolean removePositive, Boolean removeNegative);
procedure UnitRemoveBuffsEx(HUNIT whichUnit, Boolean removePositive, Boolean removeNegative, Boolean magic, Boolean physical, Boolean timedLife, Boolean aura, Boolean autoDispel);
Boolean UnitHasBuffsEx(HUNIT whichUnit, Boolean removePositive, Boolean removeNegative, Boolean magic, Boolean physical, Boolean timedLife, Boolean aura, Boolean autoDispel);
Integer UnitCountBuffsEx(HUNIT whichUnit, Boolean removePositive, Boolean removeNegative, Boolean magic, Boolean physical, Boolean timedLife, Boolean aura, Boolean autoDispel);
procedure UnitAddSleep(HUNIT whichUnit, Boolean add);
Boolean UnitCanSleep(HUNIT whichUnit);
procedure UnitAddSleepPerm(HUNIT whichUnit, Boolean add);
Boolean UnitCanSleepPerm(HUNIT whichUnit);
Boolean UnitIsSleeping(HUNIT whichUnit);
procedure UnitWakeUp(HUNIT whichUnit);
procedure UnitApplyTimedLife(HUNIT whichUnit, Integer buffId, Single duration);
Boolean UnitIgnoreAlarm(HUNIT whichUnit, Boolean flag);
Boolean UnitIgnoreAlarmToggled(HUNIT whichUnit);
procedure UnitResetCooldown(HUNIT whichUnit);
procedure UnitSetConstructionProgress(HUNIT whichUnit, Integer constructionPercentage);
procedure UnitSetUpgradeProgress(HUNIT whichUnit, Integer upgradePercentage);
procedure UnitPauseTimedLife(HUNIT whichUnit, Boolean flag);
procedure UnitSetUsesAltIcon(HUNIT whichUnit, Boolean flag);
Boolean UnitDamagePoint(HUNIT whichUnit, Single delay, Single radius, Single x, Single y, Single amount, Boolean attack, Boolean ranged, HATTACKTYPE attackType, HDAMAGETYPE damageType, HWEAPONTYPE weaponType);
Boolean UnitDamageTarget(HUNIT whichUnit, HWIDGET target, Single amount, Boolean attack, Boolean ranged, HATTACKTYPE attackType, HDAMAGETYPE damageType, HWEAPONTYPE weaponType);
Boolean IssueImmediateOrder(HUNIT whichUnit, String order);
Boolean IssueImmediateOrderById(HUNIT whichUnit, Integer order);
Boolean IssuePointOrder(HUNIT whichUnit, String order, Single x, Single y);
Boolean IssuePointOrderLoc(HUNIT whichUnit, String order, HLOCATION whichLocation);
Boolean IssuePointOrderById(HUNIT whichUnit, Integer order, Single x, Single y);
Boolean IssuePointOrderByIdLoc(HUNIT whichUnit, Integer order, HLOCATION whichLocation);
Boolean IssueTargetOrder(HUNIT whichUnit, String order, HWIDGET targetWidget);
Boolean IssueTargetOrderById(HUNIT whichUnit, Integer order, HWIDGET targetWidget);
Boolean IssueInstantPointOrder(HUNIT whichUnit, String order, Single x, Single y, HWIDGET instantTargetWidget);
Boolean IssueInstantPointOrderById(HUNIT whichUnit, Integer order, Single x, Single y, HWIDGET instantTargetWidget);
Boolean IssueInstantTargetOrder(HUNIT whichUnit, String order, HWIDGET targetWidget, HWIDGET instantTargetWidget);
Boolean IssueInstantTargetOrderById(HUNIT whichUnit, Integer order, HWIDGET targetWidget, HWIDGET instantTargetWidget);
Boolean IssueBuildOrder(HUNIT whichPeon, String unitToBuild, Single x, Single y);
Boolean IssueBuildOrderById(HUNIT whichPeon, Integer unitId, Single x, Single y);
Boolean IssueNeutralImmediateOrder(HPLAYER forWhichPlayer, HUNIT neutralStructure, String unitToBuild);
Boolean IssueNeutralImmediateOrderById(HPLAYER forWhichPlayer, HUNIT neutralStructure, Integer unitId);
Boolean IssueNeutralPointOrder(HPLAYER forWhichPlayer, HUNIT neutralStructure, String unitToBuild, Single x, Single y);
Boolean IssueNeutralPointOrderById(HPLAYER forWhichPlayer, HUNIT neutralStructure, Integer unitId, Single x, Single y);
Boolean IssueNeutralTargetOrder(HPLAYER forWhichPlayer, HUNIT neutralStructure, String unitToBuild, HWIDGET target);
Boolean IssueNeutralTargetOrderById(HPLAYER forWhichPlayer, HUNIT neutralStructure, Integer unitId, HWIDGET target);
Integer GetUnitCurrentOrder(HUNIT whichUnit);
procedure SetResourceAmount(HUNIT whichUnit, Integer amount);
procedure AddResourceAmount(HUNIT whichUnit, Integer amount);
Integer GetResourceAmount(HUNIT whichUnit);
Single WaygateGetDestinationX(HUNIT waygate);
Single WaygateGetDestinationY(HUNIT waygate);
procedure WaygateSetDestination(HUNIT waygate, Single x, Single y);
procedure WaygateActivate(HUNIT waygate, Boolean activate);
Boolean WaygateIsActive(HUNIT waygate);
procedure AddItemToAllStock(Integer itemId, Integer currentStock, Integer stockMax);
procedure AddItemToStock(HUNIT whichUnit, Integer itemId, Integer currentStock, Integer stockMax);
procedure AddUnitToAllStock(Integer unitId, Integer currentStock, Integer stockMax);
procedure AddUnitToStock(HUNIT whichUnit, Integer unitId, Integer currentStock, Integer stockMax);
procedure RemoveItemFromAllStock(Integer itemId);
procedure RemoveItemFromStock(HUNIT whichUnit, Integer itemId);
procedure RemoveUnitFromAllStock(Integer unitId);
procedure RemoveUnitFromStock(HUNIT whichUnit, Integer unitId);
procedure SetAllItemTypeSlots(Integer slots);
procedure SetAllUnitTypeSlots(Integer slots);
procedure SetItemTypeSlots(HUNIT whichUnit, Integer slots);
procedure SetUnitTypeSlots(HUNIT whichUnit, Integer slots);
Integer GetUnitUserData(HUNIT whichUnit);
procedure SetUnitUserData(HUNIT whichUnit, Integer data);
HPLAYER Player(Integer number);
HPLAYER GetLocalPlayer();
Boolean IsPlayerAlly(HPLAYER whichPlayer, HPLAYER otherPlayer);
Boolean IsPlayerEnemy(HPLAYER whichPlayer, HPLAYER otherPlayer);
Boolean IsPlayerInForce(HPLAYER whichPlayer, HFORCE whichForce);
Boolean IsPlayerObserver(HPLAYER whichPlayer);
Boolean IsVisibleToPlayer(Single x, Single y, HPLAYER whichPlayer);
Boolean IsLocationVisibleToPlayer(HLOCATION whichLocation, HPLAYER whichPlayer);
Boolean IsFoggedToPlayer(Single x, Single y, HPLAYER whichPlayer);
Boolean IsLocationFoggedToPlayer(HLOCATION whichLocation, HPLAYER whichPlayer);
Boolean IsMaskedToPlayer(Single x, Single y, HPLAYER whichPlayer);
Boolean IsLocationMaskedToPlayer(HLOCATION whichLocation, HPLAYER whichPlayer);
HRACE GetPlayerRace(HPLAYER whichPlayer);
Integer GetPlayerId(HPLAYER whichPlayer);
Integer GetPlayerUnitCount(HPLAYER whichPlayer, Boolean includeIncomplete);
Integer GetPlayerTypedUnitCount(HPLAYER whichPlayer, String unitName, Boolean includeIncomplete, Boolean includeUpgrades);
Integer GetPlayerStructureCount(HPLAYER whichPlayer, Boolean includeIncomplete);
Integer GetPlayerState(HPLAYER whichPlayer, HPLAYERSTATE whichPlayerState);
Integer GetPlayerScore(HPLAYER whichPlayer, HPLAYERSCORE whichPlayerScore);
Boolean GetPlayerAlliance(HPLAYER sourcePlayer, HPLAYER otherPlayer, HALLIANCETYPE whichAllianceSetting);
Single GetPlayerHandicap(HPLAYER whichPlayer);
Single GetPlayerHandicapXP(HPLAYER whichPlayer);
procedure SetPlayerHandicap(HPLAYER whichPlayer, Single handicap);
procedure SetPlayerHandicapXP(HPLAYER whichPlayer, Single handicap);
procedure SetPlayerTechMaxAllowed(HPLAYER whichPlayer, Integer techid, Integer maximum);
Integer GetPlayerTechMaxAllowed(HPLAYER whichPlayer, Integer techid);
procedure AddPlayerTechResearched(HPLAYER whichPlayer, Integer techid, Integer levels);
procedure SetPlayerTechResearched(HPLAYER whichPlayer, Integer techid, Integer setToLevel);
Boolean GetPlayerTechResearched(HPLAYER whichPlayer, Integer techid, Boolean specificonly);
Integer GetPlayerTechCount(HPLAYER whichPlayer, Integer techid, Boolean specificonly);
procedure SetPlayerUnitsOwner(HPLAYER whichPlayer, Integer newOwner);
procedure CripplePlayer(HPLAYER whichPlayer, HFORCE toWhichPlayers, Boolean flag);
procedure SetPlayerAbilityAvailable(HPLAYER whichPlayer, Integer abilid, Boolean avail);
procedure SetPlayerState(HPLAYER whichPlayer, HPLAYERSTATE whichPlayerState, Integer value);
procedure RemovePlayer(HPLAYER whichPlayer, HPLAYERGAMERESULT gameResult);
procedure CachePlayerHeroData(HPLAYER whichPlayer);
procedure SetFogStateRect(HPLAYER forWhichPlayer, HFOGSTATE whichState, HRECT _where, Boolean useSharedVision);
procedure SetFogStateRadius(HPLAYER forWhichPlayer, HFOGSTATE whichState, Single centerx, Single centerY, Single radius, Boolean useSharedVision);
procedure SetFogStateRadiusLoc(HPLAYER forWhichPlayer, HFOGSTATE whichState, HLOCATION center, Single radius, Boolean useSharedVision);
procedure FogMaskEnable(Boolean enable);
Boolean IsFogMaskEnabled();
procedure FogEnable(Boolean enable);
Boolean IsFogEnabled();
HFOGMODIFIER CreateFogModifierRect(HPLAYER forWhichPlayer, HFOGSTATE whichState, HRECT _where, Boolean useSharedVision, Boolean afterUnits);
HFOGMODIFIER CreateFogModifierRadius(HPLAYER forWhichPlayer, HFOGSTATE whichState, Single centerx, Single centerY, Single radius, Boolean useSharedVision, Boolean afterUnits);
HFOGMODIFIER CreateFogModifierRadiusLoc(HPLAYER forWhichPlayer, HFOGSTATE whichState, HLOCATION center, Single radius, Boolean useSharedVision, Boolean afterUnits);
procedure DestroyFogModifier(HFOGMODIFIER whichFogModifier);
procedure FogModifierStart(HFOGMODIFIER whichFogModifier);
procedure FogModifierStop(HFOGMODIFIER whichFogModifier);
HVERSION VersionGet();
Boolean VersionCompatible(HVERSION whichVersion);
Boolean VersionSupported(HVERSION whichVersion);
procedure EndGame(Boolean doScoreScreen);
procedure ChangeLevel(String newLevel, Boolean doScoreScreen);
procedure RestartGame(Boolean doScoreScreen);
procedure ReloadGame();
procedure SetCampaignMenuRace(HRACE r);
procedure SetCampaignMenuRaceEx(Integer campaignIndex);
procedure ForceCampaignSelectScreen();
procedure LoadGame(String saveFileName, Boolean doScoreScreen);
procedure SaveGame(String saveFileName);
Boolean RenameSaveDirectory(String sourceDirName, String destDirName);
Boolean RemoveSaveDirectory(String sourceDirName);
Boolean CopySaveGame(String sourceSaveName, String destSaveName);
Boolean SaveGameExists(String saveName);
procedure SyncSelections();
procedure SetFloatGameState(HFGAMESTATE whichFloatGameState, Single value);
Single GetFloatGameState(HFGAMESTATE whichFloatGameState);
procedure SetIntegerGameState(HIGAMESTATE whichIntegerGameState, Integer value);
Integer GetIntegerGameState(HIGAMESTATE whichIntegerGameState);
procedure SetTutorialCleared(Boolean cleared);
procedure SetMissionAvailable(Integer campaignNumber, Integer missionNumber, Boolean available);
procedure SetCampaignAvailable(Integer campaignNumber, Boolean available);
procedure SetOpCinematicAvailable(Integer campaignNumber, Boolean available);
procedure SetEdCinematicAvailable(Integer campaignNumber, Boolean available);
HGAMEDIFFICULTY GetDefaultDifficulty();
procedure SetDefaultDifficulty(HGAMEDIFFICULTY g);
procedure SetCustomCampaignButtonVisible(Integer whichButton, Boolean visible);
Boolean GetCustomCampaignButtonVisible(Integer whichButton);
procedure DoNotSaveReplay();
HDIALOG DialogCreate();
procedure DialogDestroy(HDIALOG whichDialog);
procedure DialogClear(HDIALOG whichDialog);
procedure DialogSetMessage(HDIALOG whichDialog, String messageText);
HBUTTON DialogAddButton(HDIALOG whichDialog, String buttonText, Integer hotkey);
HBUTTON DialogAddQuitButton(HDIALOG whichDialog, Boolean doScoreScreen, String buttonText, Integer hotkey);
procedure DialogDisplay(HPLAYER whichPlayer, HDIALOG whichDialog, Boolean flag);
Boolean ReloadGameCachesFromDisk();
HGAMECACHE InitGameCache(String campaignFile);
Boolean SaveGameCache(HGAMECACHE whichCache);
procedure StoreInteger(HGAMECACHE cache, String missionKey, String key, Integer value);
procedure StoreReal(HGAMECACHE cache, String missionKey, String key, Single value);
procedure StoreBoolean(HGAMECACHE cache, String missionKey, String key, Boolean value);
Boolean StoreUnit(HGAMECACHE cache, String missionKey, String key, HUNIT whichUnit);
Boolean StoreString(HGAMECACHE cache, String missionKey, String key, String value);
procedure SyncStoredInteger(HGAMECACHE cache, String missionKey, String key);
procedure SyncStoredReal(HGAMECACHE cache, String missionKey, String key);
procedure SyncStoredBoolean(HGAMECACHE cache, String missionKey, String key);
procedure SyncStoredUnit(HGAMECACHE cache, String missionKey, String key);
procedure SyncStoredString(HGAMECACHE cache, String missionKey, String key);
Boolean HaveStoredInteger(HGAMECACHE cache, String missionKey, String key);
Boolean HaveStoredReal(HGAMECACHE cache, String missionKey, String key);
Boolean HaveStoredBoolean(HGAMECACHE cache, String missionKey, String key);
Boolean HaveStoredUnit(HGAMECACHE cache, String missionKey, String key);
Boolean HaveStoredString(HGAMECACHE cache, String missionKey, String key);
procedure FlushGameCache(HGAMECACHE cache);
procedure FlushStoredMission(HGAMECACHE cache, String missionKey);
procedure FlushStoredInteger(HGAMECACHE cache, String missionKey, String key);
procedure FlushStoredReal(HGAMECACHE cache, String missionKey, String key);
procedure FlushStoredBoolean(HGAMECACHE cache, String missionKey, String key);
procedure FlushStoredUnit(HGAMECACHE cache, String missionKey, String key);
procedure FlushStoredString(HGAMECACHE cache, String missionKey, String key);
Integer GetStoredInteger(HGAMECACHE cache, String missionKey, String key);
Single GetStoredReal(HGAMECACHE cache, String missionKey, String key);
Boolean GetStoredBoolean(HGAMECACHE cache, String missionKey, String key);
String GetStoredString(HGAMECACHE cache, String missionKey, String key);
HUNIT RestoreUnit(HGAMECACHE cache, String missionKey, String key, HPLAYER forWhichPlayer, Single x, Single y, Single facing);
HHASHTABLE InitHashtable();
procedure SaveInteger(HHASHTABLE table, Integer parentKey, Integer childKey, Integer value);
procedure SaveReal(HHASHTABLE table, Integer parentKey, Integer childKey, Single value);
procedure SaveBoolean(HHASHTABLE table, Integer parentKey, Integer childKey, Boolean value);
Boolean SaveStr(HHASHTABLE table, Integer parentKey, Integer childKey, String value);
Boolean SavePlayerHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HPLAYER whichPlayer);
Boolean SaveWidgetHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HWIDGET whichWidget);
Boolean SaveDestructableHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HDESTRUCTABLE whichDestructable);
Boolean SaveItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HITEM whichItem);
Boolean SaveUnitHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HUNIT whichUnit);
Boolean SaveAbilityHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HABILITY whichAbility);
Boolean SaveTimerHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTIMER whichTimer);
Boolean SaveTriggerHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTRIGGER whichTrigger);
Boolean SaveTriggerConditionHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTRIGGERCONDITION whichTriggercondition);
Boolean SaveTriggerActionHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTRIGGERACTION whichTriggeraction);
Boolean SaveTriggerEventHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HEVENT whichEvent);
Boolean SaveForceHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HFORCE whichForce);
Boolean SaveGroupHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HGROUP whichGroup);
Boolean SaveLocationHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HLOCATION whichLocation);
Boolean SaveRectHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HRECT whichRect);
Boolean SaveBooleanExprHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HBOOLEXPR whichBoolexpr);
Boolean SaveSoundHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HSOUND whichSound);
Boolean SaveEffectHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HEFFECT whichEffect);
Boolean SaveUnitPoolHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HUNITPOOL whichUnitpool);
Boolean SaveItemPoolHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HITEMPOOL whichItempool);
Boolean SaveQuestHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HQUEST whichQuest);
Boolean SaveQuestItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HQUESTITEM whichQuestitem);
Boolean SaveDefeatConditionHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HDEFEATCONDITION whichDefeatcondition);
Boolean SaveTimerDialogHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTIMERDIALOG whichTimerdialog);
Boolean SaveLeaderboardHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HLEADERBOARD whichLeaderboard);
Boolean SaveMultiboardHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HMULTIBOARD whichMultiboard);
Boolean SaveMultiboardItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HMULTIBOARDITEM whichMultiboarditem);
Boolean SaveTrackableHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTRACKABLE whichTrackable);
Boolean SaveDialogHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HDIALOG whichDialog);
Boolean SaveButtonHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HBUTTON whichButton);
Boolean SaveTextTagHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HTEXTTAG whichTexttag);
Boolean SaveLightningHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HLIGHTNING whichLightning);
Boolean SaveImageHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HIMAGE whichImage);
Boolean SaveUbersplatHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HUBERSPLAT whichUbersplat);
Boolean SaveRegionHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HREGION whichRegion);
Boolean SaveFogStateHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HFOGSTATE whichFogState);
Boolean SaveFogModifierHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HFOGMODIFIER whichFogModifier);
Boolean SaveAgentHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HAGENT whichAgent);
Boolean SaveHashtableHandle(HHASHTABLE table, Integer parentKey, Integer childKey, HHASHTABLE whichHashtable);
Integer LoadInteger(HHASHTABLE table, Integer parentKey, Integer childKey);
Single LoadReal(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean LoadBoolean(HHASHTABLE table, Integer parentKey, Integer childKey);
String LoadStr(HHASHTABLE table, Integer parentKey, Integer childKey);
HPLAYER LoadPlayerHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HWIDGET LoadWidgetHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HDESTRUCTABLE LoadDestructableHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HITEM LoadItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HUNIT LoadUnitHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HABILITY LoadAbilityHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTIMER LoadTimerHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTRIGGER LoadTriggerHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTRIGGERCONDITION LoadTriggerConditionHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTRIGGERACTION LoadTriggerActionHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HEVENT LoadTriggerEventHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HFORCE LoadForceHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HGROUP LoadGroupHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HLOCATION LoadLocationHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HRECT LoadRectHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HBOOLEXPR LoadBooleanExprHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HSOUND LoadSoundHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HEFFECT LoadEffectHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HUNITPOOL LoadUnitPoolHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HITEMPOOL LoadItemPoolHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HQUEST LoadQuestHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HQUESTITEM LoadQuestItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HDEFEATCONDITION LoadDefeatConditionHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTIMERDIALOG LoadTimerDialogHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HLEADERBOARD LoadLeaderboardHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HMULTIBOARD LoadMultiboardHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HMULTIBOARDITEM LoadMultiboardItemHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTRACKABLE LoadTrackableHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HDIALOG LoadDialogHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HBUTTON LoadButtonHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HTEXTTAG LoadTextTagHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HLIGHTNING LoadLightningHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HIMAGE LoadImageHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HUBERSPLAT LoadUbersplatHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HREGION LoadRegionHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HFOGSTATE LoadFogStateHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HFOGMODIFIER LoadFogModifierHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
HHASHTABLE LoadHashtableHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean HaveSavedInteger(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean HaveSavedReal(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean HaveSavedBoolean(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean HaveSavedString(HHASHTABLE table, Integer parentKey, Integer childKey);
Boolean HaveSavedHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure RemoveSavedInteger(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure RemoveSavedReal(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure RemoveSavedBoolean(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure RemoveSavedString(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure RemoveSavedHandle(HHASHTABLE table, Integer parentKey, Integer childKey);
procedure FlushParentHashtable(HHASHTABLE table);
procedure FlushChildHashtable(HHASHTABLE table, Integer parentKey);
Integer GetRandomInt(Integer lowBound, Integer highBound);
Single GetRandomReal(Single lowBound, Single highBound);
HUNITPOOL CreateUnitPool();
procedure DestroyUnitPool(HUNITPOOL whichPool);
procedure UnitPoolAddUnitType(HUNITPOOL whichPool, Integer unitId, Single weight);
procedure UnitPoolRemoveUnitType(HUNITPOOL whichPool, Integer unitId);
HUNIT PlaceRandomUnit(HUNITPOOL whichPool, HPLAYER forWhichPlayer, Single x, Single y, Single facing);
HITEMPOOL CreateItemPool();
procedure DestroyItemPool(HITEMPOOL whichItemPool);
procedure ItemPoolAddItemType(HITEMPOOL whichItemPool, Integer itemId, Single weight);
procedure ItemPoolRemoveItemType(HITEMPOOL whichItemPool, Integer itemId);
HITEM PlaceRandomItem(HITEMPOOL whichItemPool, Single x, Single y);
Integer ChooseRandomCreep(Integer level);
Integer ChooseRandomNPBuilding();
Integer ChooseRandomItem(Integer level);
Integer ChooseRandomItemEx(HITEMTYPE whichType, Integer level);
procedure SetRandomSeed(Integer seed);
procedure SetTerrainFog(Single a, Single b, Single c, Single d, Single e);
procedure ResetTerrainFog();
procedure SetUnitFog(Single a, Single b, Single c, Single d, Single e);
procedure SetTerrainFogEx(Integer style, Single zstart, Single zend, Single density, Single red, Single green, Single blue);
procedure DisplayTextToPlayer(HPLAYER toPlayer, Single x, Single y, String message);
procedure DisplayTimedTextToPlayer(HPLAYER toPlayer, Single x, Single y, Single duration, String message);
procedure DisplayTimedTextFromPlayer(HPLAYER toPlayer, Single x, Single y, Single duration, String message);
procedure ClearTextMessages();
procedure SetDayNightModels(String terrainDNCFile, String unitDNCFile);
procedure SetSkyModel(String skyModelFile);
procedure EnableUserControl(Boolean b);
procedure EnableUserUI(Boolean b);
procedure SuspendTimeOfDay(Boolean b);
procedure SetTimeOfDayScale(Single r);
Single GetTimeOfDayScale();
procedure ShowInterface(Boolean flag, Single fadeDuration);
procedure PauseGame(Boolean flag);
procedure UnitAddIndicator(HUNIT whichUnit, Integer red, Integer green, Integer blue, Integer alpha);
procedure AddIndicator(HWIDGET whichWidget, Integer red, Integer green, Integer blue, Integer alpha);
procedure PingMinimap(Single x, Single y, Single duration);
procedure PingMinimapEx(Single x, Single y, Single duration, Integer red, Integer green, Integer blue, Boolean extraEffects);
procedure EnableOcclusion(Boolean flag);
procedure SetIntroShotText(String introText);
procedure SetIntroShotModel(String introModelPath);
procedure EnableWorldFogBoundary(Boolean b);
procedure PlayModelCinematic(String modelName);
procedure PlayCinematic(String movieName);
procedure ForceUIKey(String key);
procedure ForceUICancel();
procedure DisplayLoadDialog();
procedure SetAltMinimapIcon(String iconPath);
procedure DisableRestartMission(Boolean flag);
HTEXTTAG CreateTextTag();
procedure DestroyTextTag(HTEXTTAG t);
procedure SetTextTagText(HTEXTTAG t, String s, Single height);
procedure SetTextTagPos(HTEXTTAG t, Single x, Single y, Single heightOffset);
procedure SetTextTagPosUnit(HTEXTTAG t, HUNIT whichUnit, Single heightOffset);
procedure SetTextTagColor(HTEXTTAG t, Integer red, Integer green, Integer blue, Integer alpha);
procedure SetTextTagVelocity(HTEXTTAG t, Single xvel, Single yvel);
procedure SetTextTagVisibility(HTEXTTAG t, Boolean flag);
procedure SetTextTagSuspended(HTEXTTAG t, Boolean flag);
procedure SetTextTagPermanent(HTEXTTAG t, Boolean flag);
procedure SetTextTagAge(HTEXTTAG t, Single age);
procedure SetTextTagLifespan(HTEXTTAG t, Single lifespan);
procedure SetTextTagFadepoint(HTEXTTAG t, Single fadepoint);
procedure SetReservedLocalHeroButtons(Integer reserved);
Integer GetAllyColorFilterState();
procedure SetAllyColorFilterState(Integer state);
Boolean GetCreepCampFilterState();
procedure SetCreepCampFilterState(Boolean state);
procedure EnableMinimapFilterButtons(Boolean enableAlly, Boolean enableCreep);
procedure EnableDragSelect(Boolean state, Boolean ui);
procedure EnablePreSelect(Boolean state, Boolean ui);
procedure EnableSelect(Boolean state, Boolean ui);
HTRACKABLE CreateTrackable(String trackableModelPath, Single x, Single y, Single facing);
HQUEST CreateQuest();
procedure DestroyQuest(HQUEST whichQuest);
procedure QuestSetTitle(HQUEST whichQuest, String title);
procedure QuestSetDescription(HQUEST whichQuest, String description);
procedure QuestSetIconPath(HQUEST whichQuest, String iconPath);
procedure QuestSetRequired(HQUEST whichQuest, Boolean required);
procedure QuestSetCompleted(HQUEST whichQuest, Boolean completed);
procedure QuestSetDiscovered(HQUEST whichQuest, Boolean discovered);
procedure QuestSetFailed(HQUEST whichQuest, Boolean failed);
procedure QuestSetEnabled(HQUEST whichQuest, Boolean enabled);
Boolean IsQuestRequired(HQUEST whichQuest);
Boolean IsQuestCompleted(HQUEST whichQuest);
Boolean IsQuestDiscovered(HQUEST whichQuest);
Boolean IsQuestFailed(HQUEST whichQuest);
Boolean IsQuestEnabled(HQUEST whichQuest);
HQUESTITEM QuestCreateItem(HQUEST whichQuest);
procedure QuestItemSetDescription(HQUESTITEM whichQuestItem, String description);
procedure QuestItemSetCompleted(HQUESTITEM whichQuestItem, Boolean completed);
Boolean IsQuestItemCompleted(HQUESTITEM whichQuestItem);
HDEFEATCONDITION CreateDefeatCondition();
procedure DestroyDefeatCondition(HDEFEATCONDITION whichCondition);
procedure DefeatConditionSetDescription(HDEFEATCONDITION whichCondition, String description);
procedure FlashQuestDialogButton();
procedure ForceQuestDialogUpdate();
HTIMERDIALOG CreateTimerDialog(HTIMER t);
procedure DestroyTimerDialog(HTIMERDIALOG whichDialog);
procedure TimerDialogSetTitle(HTIMERDIALOG whichDialog, String title);
procedure TimerDialogSetTitleColor(HTIMERDIALOG whichDialog, Integer red, Integer green, Integer blue, Integer alpha);
procedure TimerDialogSetTimeColor(HTIMERDIALOG whichDialog, Integer red, Integer green, Integer blue, Integer alpha);
procedure TimerDialogSetSpeed(HTIMERDIALOG whichDialog, Single speedMultFactor);
procedure TimerDialogDisplay(HTIMERDIALOG whichDialog, Boolean display);
Boolean IsTimerDialogDisplayed(HTIMERDIALOG whichDialog);
procedure TimerDialogSetRealTimeRemaining(HTIMERDIALOG whichDialog, Single timeRemaining);
HLEADERBOARD CreateLeaderboard();
procedure DestroyLeaderboard(HLEADERBOARD lb);
procedure LeaderboardDisplay(HLEADERBOARD lb, Boolean show);
Boolean IsLeaderboardDisplayed(HLEADERBOARD lb);
Integer LeaderboardGetItemCount(HLEADERBOARD lb);
procedure LeaderboardSetSizeByItemCount(HLEADERBOARD lb, Integer count);
procedure LeaderboardAddItem(HLEADERBOARD lb, String label_, Integer value, HPLAYER p);
procedure LeaderboardRemoveItem(HLEADERBOARD lb, Integer index);
procedure LeaderboardRemovePlayerItem(HLEADERBOARD lb, HPLAYER p);
procedure LeaderboardClear(HLEADERBOARD lb);
procedure LeaderboardSortItemsByValue(HLEADERBOARD lb, Boolean ascending);
procedure LeaderboardSortItemsByPlayer(HLEADERBOARD lb, Boolean ascending);
procedure LeaderboardSortItemsByLabel(HLEADERBOARD lb, Boolean ascending);
Boolean LeaderboardHasPlayerItem(HLEADERBOARD lb, HPLAYER p);
Integer LeaderboardGetPlayerIndex(HLEADERBOARD lb, HPLAYER p);
procedure LeaderboardSetLabel(HLEADERBOARD lb, String label_);
String LeaderboardGetLabelText(HLEADERBOARD lb);
procedure PlayerSetLeaderboard(HPLAYER toPlayer, HLEADERBOARD lb);
HLEADERBOARD PlayerGetLeaderboard(HPLAYER toPlayer);
procedure LeaderboardSetLabelColor(HLEADERBOARD lb, Integer red, Integer green, Integer blue, Integer alpha);
procedure LeaderboardSetValueColor(HLEADERBOARD lb, Integer red, Integer green, Integer blue, Integer alpha);
procedure LeaderboardSetStyle(HLEADERBOARD lb, Boolean showLabel, Boolean showNames, Boolean showValues, Boolean showIcons);
procedure LeaderboardSetItemValue(HLEADERBOARD lb, Integer whichItem, Integer val);
procedure LeaderboardSetItemLabel(HLEADERBOARD lb, Integer whichItem, String val);
procedure LeaderboardSetItemStyle(HLEADERBOARD lb, Integer whichItem, Boolean showLabel, Boolean showValue, Boolean showIcon);
procedure LeaderboardSetItemLabelColor(HLEADERBOARD lb, Integer whichItem, Integer red, Integer green, Integer blue, Integer alpha);
procedure LeaderboardSetItemValueColor(HLEADERBOARD lb, Integer whichItem, Integer red, Integer green, Integer blue, Integer alpha);
HMULTIBOARD CreateMultiboard();
procedure DestroyMultiboard(HMULTIBOARD lb);
procedure MultiboardDisplay(HMULTIBOARD lb, Boolean show);
Boolean IsMultiboardDisplayed(HMULTIBOARD lb);
procedure MultiboardMinimize(HMULTIBOARD lb, Boolean minimize);
Boolean IsMultiboardMinimized(HMULTIBOARD lb);
procedure MultiboardClear(HMULTIBOARD lb);
procedure MultiboardSetTitleText(HMULTIBOARD lb, String label_);
String MultiboardGetTitleText(HMULTIBOARD lb);
procedure MultiboardSetTitleTextColor(HMULTIBOARD lb, Integer red, Integer green, Integer blue, Integer alpha);
Integer MultiboardGetRowCount(HMULTIBOARD lb);
Integer MultiboardGetColumnCount(HMULTIBOARD lb);
procedure MultiboardSetColumnCount(HMULTIBOARD lb, Integer count);
procedure MultiboardSetRowCount(HMULTIBOARD lb, Integer count);
procedure MultiboardSetItemsStyle(HMULTIBOARD lb, Boolean showValues, Boolean showIcons);
procedure MultiboardSetItemsValue(HMULTIBOARD lb, String value);
procedure MultiboardSetItemsValueColor(HMULTIBOARD lb, Integer red, Integer green, Integer blue, Integer alpha);
procedure MultiboardSetItemsWidth(HMULTIBOARD lb, Single width);
procedure MultiboardSetItemsIcon(HMULTIBOARD lb, String iconPath);
HMULTIBOARDITEM MultiboardGetItem(HMULTIBOARD lb, Integer row, Integer column);
procedure MultiboardReleaseItem(HMULTIBOARDITEM mbi);
procedure MultiboardSetItemStyle(HMULTIBOARDITEM mbi, Boolean showValue, Boolean showIcon);
procedure MultiboardSetItemValue(HMULTIBOARDITEM mbi, String val);
procedure MultiboardSetItemValueColor(HMULTIBOARDITEM mbi, Integer red, Integer green, Integer blue, Integer alpha);
procedure MultiboardSetItemWidth(HMULTIBOARDITEM mbi, Single width);
procedure MultiboardSetItemIcon(HMULTIBOARDITEM mbi, String iconFileName);
procedure MultiboardSuppressDisplay(Boolean flag);
procedure SetCameraPosition(Single x, Single y);
procedure SetCameraQuickPosition(Single x, Single y);
procedure SetCameraBounds(Single x1, Single y1, Single x2, Single y2, Single x3, Single y3, Single x4, Single y4);
procedure StopCamera();
procedure ResetToGameCamera(Single duration);
procedure PanCameraTo(Single x, Single y);
procedure PanCameraToTimed(Single x, Single y, Single duration);
procedure PanCameraToWithZ(Single x, Single y, Single zOffsetDest);
procedure PanCameraToTimedWithZ(Single x, Single y, Single zOffsetDest, Single duration);
procedure SetCinematicCamera(String cameraModelFile);
procedure SetCameraRotateMode(Single x, Single y, Single radiansToSweep, Single duration);
procedure SetCameraField(HCAMERAFIELD whichField, Single value, Single duration);
procedure AdjustCameraField(HCAMERAFIELD whichField, Single offset, Single duration);
procedure SetCameraTargetController(HUNIT whichUnit, Single xoffset, Single yoffset, Boolean inheritOrientation);
procedure SetCameraOrientController(HUNIT whichUnit, Single xoffset, Single yoffset);
HCAMERASETUP CreateCameraSetup();
procedure CameraSetupSetField(HCAMERASETUP whichSetup, HCAMERAFIELD whichField, Single value, Single duration);
Single CameraSetupGetField(HCAMERASETUP whichSetup, HCAMERAFIELD whichField);
procedure CameraSetupSetDestPosition(HCAMERASETUP whichSetup, Single x, Single y, Single duration);
HLOCATION CameraSetupGetDestPositionLoc(HCAMERASETUP whichSetup);
Single CameraSetupGetDestPositionX(HCAMERASETUP whichSetup);
Single CameraSetupGetDestPositionY(HCAMERASETUP whichSetup);
procedure CameraSetupApply(HCAMERASETUP whichSetup, Boolean doPan, Boolean panTimed);
procedure CameraSetupApplyWithZ(HCAMERASETUP whichSetup, Single zDestOffset);
procedure CameraSetupApplyForceDuration(HCAMERASETUP whichSetup, Boolean doPan, Single forceDuration);
procedure CameraSetupApplyForceDurationWithZ(HCAMERASETUP whichSetup, Single zDestOffset, Single forceDuration);
procedure CameraSetTargetNoise(Single mag, Single velocity);
procedure CameraSetSourceNoise(Single mag, Single velocity);
procedure CameraSetTargetNoiseEx(Single mag, Single velocity, Boolean vertOnly);
procedure CameraSetSourceNoiseEx(Single mag, Single velocity, Boolean vertOnly);
procedure CameraSetSmoothingFactor(Single factor);
procedure SetCineFilterTexture(String filename);
procedure SetCineFilterBlendMode(HBLENDMODE whichMode);
procedure SetCineFilterTexMapFlags(HTEXMAPFLAGS whichFlags);
procedure SetCineFilterStartUV(Single minu, Single minv, Single maxu, Single maxv);
procedure SetCineFilterEndUV(Single minu, Single minv, Single maxu, Single maxv);
procedure SetCineFilterStartColor(Integer red, Integer green, Integer blue, Integer alpha);
procedure SetCineFilterEndColor(Integer red, Integer green, Integer blue, Integer alpha);
procedure SetCineFilterDuration(Single duration);
procedure DisplayCineFilter(Boolean flag);
Boolean IsCineFilterDisplayed();
procedure SetCinematicScene(Integer portraitUnitId, HPLAYERCOLOR color, String speakerTitle, String text, Single sceneDuration, Single voiceoverDuration);
procedure EndCinematicScene();
procedure ForceCinematicSubtitles(Boolean flag);
Single GetCameraMargin(Integer whichMargin);
Single GetCameraBoundMinX();
Single GetCameraBoundMinY();
Single GetCameraBoundMaxX();
Single GetCameraBoundMaxY();
Single GetCameraField(HCAMERAFIELD whichField);
Single GetCameraTargetPositionX();
Single GetCameraTargetPositionY();
Single GetCameraTargetPositionZ();
HLOCATION GetCameraTargetPositionLoc();
Single GetCameraEyePositionX();
Single GetCameraEyePositionY();
Single GetCameraEyePositionZ();
HLOCATION GetCameraEyePositionLoc();
procedure NewSoundEnvironment(String environmentName);
HSOUND CreateSound(String fileName, Boolean looping, Boolean is3D, Boolean stopwhenoutofrange, Integer fadeInRate, Integer fadeOutRate, String eaxSetting);
HSOUND CreateSoundFilenameWithLabel(String fileName, Boolean looping, Boolean is3D, Boolean stopwhenoutofrange, Integer fadeInRate, Integer fadeOutRate, String SLKEntryName);
HSOUND CreateSoundFromLabel(String soundLabel, Boolean looping, Boolean is3D, Boolean stopwhenoutofrange, Integer fadeInRate, Integer fadeOutRate);
HSOUND CreateMIDISound(String soundLabel, Integer fadeInRate, Integer fadeOutRate);
procedure SetSoundParamsFromLabel(HSOUND soundHandle, String soundLabel);
procedure SetSoundDistanceCutoff(HSOUND soundHandle, Single cutoff);
procedure SetSoundChannel(HSOUND soundHandle, Integer channel);
procedure SetSoundVolume(HSOUND soundHandle, Integer volume);
procedure SetSoundPitch(HSOUND soundHandle, Single pitch);
procedure SetSoundPlayPosition(HSOUND soundHandle, Integer millisecs);
procedure SetSoundDistances(HSOUND soundHandle, Single minDist, Single maxDist);
procedure SetSoundConeAngles(HSOUND soundHandle, Single inside, Single outside, Integer outsideVolume);
procedure SetSoundConeOrientation(HSOUND soundHandle, Single x, Single y, Single z);
procedure SetSoundPosition(HSOUND soundHandle, Single x, Single y, Single z);
procedure SetSoundVelocity(HSOUND soundHandle, Single x, Single y, Single z);
procedure AttachSoundToUnit(HSOUND soundHandle, HUNIT whichUnit);
procedure StartSound(HSOUND soundHandle);
procedure StopSound(HSOUND soundHandle, Boolean killWhenDone, Boolean fadeOut);
procedure KillSoundWhenDone(HSOUND soundHandle);
procedure SetMapMusic(String musicName, Boolean random, Integer index);
procedure ClearMapMusic();
procedure PlayMusic(String musicName);
procedure PlayMusicEx(String musicName, Integer frommsecs, Integer fadeinmsecs);
procedure StopMusic(Boolean fadeOut);
procedure ResumeMusic();
procedure PlayThematicMusic(String musicFileName);
procedure PlayThematicMusicEx(String musicFileName, Integer frommsecs);
procedure EndThematicMusic();
procedure SetMusicVolume(Integer volume);
procedure SetMusicPlayPosition(Integer millisecs);
procedure SetThematicMusicPlayPosition(Integer millisecs);
procedure SetSoundDuration(HSOUND soundHandle, Integer duration);
Integer GetSoundDuration(HSOUND soundHandle);
Integer GetSoundFileDuration(String musicFileName);
procedure VolumeGroupSetVolume(HVOLUMEGROUP vgroup, Single scale);
procedure VolumeGroupReset();
Boolean GetSoundIsPlaying(HSOUND soundHandle);
Boolean GetSoundIsLoading(HSOUND soundHandle);
procedure RegisterStackedSound(HSOUND soundHandle, Boolean byPosition, Single rectwidth, Single rectheight);
procedure UnregisterStackedSound(HSOUND soundHandle, Boolean byPosition, Single rectwidth, Single rectheight);
HWEATHEREFFECT AddWeatherEffect(HRECT _where, Integer effectID);
procedure RemoveWeatherEffect(HWEATHEREFFECT whichEffect);
procedure EnableWeatherEffect(HWEATHEREFFECT whichEffect, Boolean enable);
HTERRAINDEFORMATION TerrainDeformCrater(Single x, Single y, Single radius, Single depth, Integer duration, Boolean permanent);
HTERRAINDEFORMATION TerrainDeformRipple(Single x, Single y, Single radius, Single depth, Integer duration, Integer count, Single spaceWaves, Single timeWaves, Single radiusStartPct, Boolean limitNeg);
HTERRAINDEFORMATION TerrainDeformWave(Single x, Single y, Single dirX, Single dirY, Single distance, Single speed, Single radius, Single depth, Integer trailTime, Integer count);
HTERRAINDEFORMATION TerrainDeformRandom(Single x, Single y, Single radius, Single minDelta, Single maxDelta, Integer duration, Integer updateInterval);
procedure TerrainDeformStop(HTERRAINDEFORMATION deformation, Integer duration);
procedure TerrainDeformStopAll();
HEFFECT AddSpecialEffect(String modelName, Single x, Single y);
HEFFECT AddSpecialEffectLoc(String modelName, HLOCATION _where);
HEFFECT AddSpecialEffectTarget(String modelName, HWIDGET targetWidget, String attachPointName);
procedure DestroyEffect(HEFFECT whichEffect);
HEFFECT AddSpellEffect(String abilityString, HEFFECTTYPE t, Single x, Single y);
HEFFECT AddSpellEffectLoc(String abilityString, HEFFECTTYPE t, HLOCATION _where);
HEFFECT AddSpellEffectById(Integer abilityId, HEFFECTTYPE t, Single x, Single y);
HEFFECT AddSpellEffectByIdLoc(Integer abilityId, HEFFECTTYPE t, HLOCATION _where);
HEFFECT AddSpellEffectTarget(String modelName, HEFFECTTYPE t, HWIDGET targetWidget, String attachPoint);
HEFFECT AddSpellEffectTargetById(Integer abilityId, HEFFECTTYPE t, HWIDGET targetWidget, String attachPoint);
HLIGHTNING AddLightning(String codeName, Boolean checkVisibility, Single x1, Single y1, Single x2, Single y2);
HLIGHTNING AddLightningEx(String codeName, Boolean checkVisibility, Single x1, Single y1, Single z1, Single x2, Single y2, Single z2);
Boolean DestroyLightning(HLIGHTNING whichBolt);
Boolean MoveLightning(HLIGHTNING whichBolt, Boolean checkVisibility, Single x1, Single y1, Single x2, Single y2);
Boolean MoveLightningEx(HLIGHTNING whichBolt, Boolean checkVisibility, Single x1, Single y1, Single z1, Single x2, Single y2, Single z2);
Single GetLightningColorA(HLIGHTNING whichBolt);
Single GetLightningColorR(HLIGHTNING whichBolt);
Single GetLightningColorG(HLIGHTNING whichBolt);
Single GetLightningColorB(HLIGHTNING whichBolt);
Boolean SetLightningColor(HLIGHTNING whichBolt, Single r, Single g, Single b, Single a);
String GetAbilityEffect(String abilityString, HEFFECTTYPE t, Integer index);
String GetAbilityEffectById(Integer abilityId, HEFFECTTYPE t, Integer index);
String GetAbilitySound(String abilityString, HSOUNDTYPE t);
String GetAbilitySoundById(Integer abilityId, HSOUNDTYPE t);
Integer GetTerrainCliffLevel(Single x, Single y);
procedure SetWaterBaseColor(Integer red, Integer green, Integer blue, Integer alpha);
procedure SetWaterDeforms(Boolean val);
Integer GetTerrainType(Single x, Single y);
Integer GetTerrainVariance(Single x, Single y);
procedure SetTerrainType(Single x, Single y, Integer terrainType, Integer variation, Integer area, Integer shape);
Boolean IsTerrainPathable(Single x, Single y, HPATHINGTYPE t);
procedure SetTerrainPathable(Single x, Single y, HPATHINGTYPE t, Boolean flag);
HIMAGE CreateImage(String file_, Single sizeX, Single sizeY, Single sizeZ, Single posX, Single posY, Single posZ, Single originX, Single originY, Single originZ, Integer imageType);
procedure DestroyImage(HIMAGE whichImage);
procedure ShowImage(HIMAGE whichImage, Boolean flag);
procedure SetImageConstantHeight(HIMAGE whichImage, Boolean flag, Single height);
procedure SetImagePosition(HIMAGE whichImage, Single x, Single y, Single z);
procedure SetImageColor(HIMAGE whichImage, Integer red, Integer green, Integer blue, Integer alpha);
procedure SetImageRender(HIMAGE whichImage, Boolean flag);
procedure SetImageRenderAlways(HIMAGE whichImage, Boolean flag);
procedure SetImageAboveWater(HIMAGE whichImage, Boolean flag, Boolean useWaterAlpha);
procedure SetImageType(HIMAGE whichImage, Integer imageType);
HUBERSPLAT CreateUbersplat(Single x, Single y, String name, Integer red, Integer green, Integer blue, Integer alpha, Boolean forcePaused, Boolean noBirthTime);
procedure DestroyUbersplat(HUBERSPLAT whichSplat);
procedure ResetUbersplat(HUBERSPLAT whichSplat);
procedure FinishUbersplat(HUBERSPLAT whichSplat);
procedure ShowUbersplat(HUBERSPLAT whichSplat, Boolean flag);
procedure SetUbersplatRender(HUBERSPLAT whichSplat, Boolean flag);
procedure SetUbersplatRenderAlways(HUBERSPLAT whichSplat, Boolean flag);
procedure SetBlight(HPLAYER whichPlayer, Single x, Single y, Single radius, Boolean addBlight);
procedure SetBlightRect(HPLAYER whichPlayer, HRECT r, Boolean addBlight);
procedure SetBlightPoint(HPLAYER whichPlayer, Single x, Single y, Boolean addBlight);
procedure SetBlightLoc(HPLAYER whichPlayer, HLOCATION whichLocation, Single radius, Boolean addBlight);
HUNIT CreateBlightedGoldmine(HPLAYER id, Single x, Single y, Single face);
Boolean IsPointBlighted(Single x, Single y);
procedure SetDoodadAnimation(Single x, Single y, Single radius, Integer doodadID, Boolean nearestOnly, String animName, Boolean animRandom);
procedure SetDoodadAnimationRect(HRECT r, Integer doodadID, String animName, Boolean animRandom);
procedure StartMeleeAI(HPLAYER num, String script);
procedure StartCampaignAI(HPLAYER num, String script);
procedure CommandAI(HPLAYER num, Integer command, Integer data);
procedure PauseCompAI(HPLAYER p, Boolean pause);
HAIDIFFICULTY GetAIDifficulty(HPLAYER num);
procedure RemoveGuardPosition(HUNIT hUnit);
procedure RecycleGuardPosition(HUNIT hUnit);
procedure RemoveAllGuardPositions(HPLAYER num);
procedure Cheat(String cheatStr);
Boolean IsNoVictoryCheat();
Boolean IsNoDefeatCheat();
procedure Preload(String filename);
procedure PreloadEnd(Single timeout);
procedure PreloadStart();
procedure PreloadRefresh();
procedure PreloadEndEx();
procedure PreloadGenClear();
procedure PreloadGenStart();
procedure PreloadGenEnd(String filename);
procedure Preloader(String filename);
procedure SetAmbientDaySound(String filename);
procedure SetAmbientNightSound(String filename);

//native GetAiPlayer takes nothing returns integer
//Integer GetAiPlayer();

//native Sleep                takes real seconds                          returns nothing
procedure SleepJass(Single seconds);

Integer CountUnitsInGroup(HGROUP group);
HGROUP GetUnitsInRectAll(HREGION region);

Boolean IssueTargetItemOrder(HUNIT whichUnit, String order, HWIDGET targetWidget);