1. //============================================================================
  2. // Native types. All native functions take extended handle types when
  3. // possible to help prevent passing bad values to native functions
  4. //
  5. type agent extends handle // all reference counted objects
  6. type event extends agent // a reference to an event registration
  7. type player extends agent // a single player reference
  8. type widget extends agent // an interactive game object with life
  9. type unit extends widget // a single unit reference
  10. type destructable extends widget
  11. type item extends widget
  12. type ability extends agent
  13. type buff extends ability
  14. type force extends agent
  15. type group extends agent
  16. type trigger extends agent
  17. type triggercondition extends agent
  18. type triggeraction extends handle
  19. type timer extends agent
  20. type location extends agent
  21. type region extends agent
  22. type rect extends agent
  23. type boolexpr extends agent
  24. type sound extends agent
  25. type conditionfunc extends boolexpr
  26. type filterfunc extends boolexpr
  27. type unitpool extends handle
  28. type itempool extends handle
  29. type race extends handle
  30. type alliancetype extends handle
  31. type racepreference extends handle
  32. type gamestate extends handle
  33. type igamestate extends gamestate
  34. type fgamestate extends gamestate
  35. type playerstate extends handle
  36. type playerscore extends handle
  37. type playergameresult extends handle
  38. type unitstate extends handle
  39. type aidifficulty extends handle
  40. type eventid extends handle
  41. type gameevent extends eventid
  42. type playerevent extends eventid
  43. type playerunitevent extends eventid
  44. type unitevent extends eventid
  45. type limitop extends eventid
  46. type widgetevent extends eventid
  47. type dialogevent extends eventid
  48. type unittype extends handle
  49. type gamespeed extends handle
  50. type gamedifficulty extends handle
  51. type gametype extends handle
  52. type mapflag extends handle
  53. type mapvisibility extends handle
  54. type mapsetting extends handle
  55. type mapdensity extends handle
  56. type mapcontrol extends handle
  57. type playerslotstate extends handle
  58. type volumegroup extends handle
  59. type camerafield extends handle
  60. type camerasetup extends handle
  61. type playercolor extends handle
  62. type placement extends handle
  63. type startlocprio extends handle
  64. type raritycontrol extends handle
  65. type blendmode extends handle
  66. type texmapflags extends handle
  67. type effect extends agent
  68. type effecttype extends handle
  69. type weathereffect extends handle
  70. type terraindeformation extends handle
  71. type fogstate extends handle
  72. type fogmodifier extends agent
  73. type dialog extends agent
  74. type button extends agent
  75. type quest extends agent
  76. type questitem extends agent
  77. type defeatcondition extends agent
  78. type timerdialog extends agent
  79. type leaderboard extends agent
  80. type multiboard extends agent
  81. type multiboarditem extends agent
  82. type trackable extends agent
  83. type gamecache extends agent
  84. type version extends handle
  85. type itemtype extends handle
  86. type texttag extends handle
  87. type attacktype extends handle
  88. type damagetype extends handle
  89. type weapontype extends handle
  90. type soundtype extends handle
  91. type lightning extends handle
  92. type pathingtype extends handle
  93. type image extends handle
  94. type ubersplat extends handle
  95. type hashtable extends agent
  96. constant native ConvertRace takes integer i returns race
  97. constant native ConvertAllianceType takes integer i returns alliancetype
  98. constant native ConvertRacePref takes integer i returns racepreference
  99. constant native ConvertIGameState takes integer i returns igamestate
  100. constant native ConvertFGameState takes integer i returns fgamestate
  101. constant native ConvertPlayerState takes integer i returns playerstate
  102. constant native ConvertPlayerScore takes integer i returns playerscore
  103. constant native ConvertPlayerGameResult takes integer i returns playergameresult
  104. constant native ConvertUnitState takes integer i returns unitstate
  105. constant native ConvertAIDifficulty takes integer i returns aidifficulty
  106. constant native ConvertGameEvent takes integer i returns gameevent
  107. constant native ConvertPlayerEvent takes integer i returns playerevent
  108. constant native ConvertPlayerUnitEvent takes integer i returns playerunitevent
  109. constant native ConvertWidgetEvent takes integer i returns widgetevent
  110. constant native ConvertDialogEvent takes integer i returns dialogevent
  111. constant native ConvertUnitEvent takes integer i returns unitevent
  112. constant native ConvertLimitOp takes integer i returns limitop
  113. constant native ConvertUnitType takes integer i returns unittype
  114. constant native ConvertGameSpeed takes integer i returns gamespeed
  115. constant native ConvertPlacement takes integer i returns placement
  116. constant native ConvertStartLocPrio takes integer i returns startlocprio
  117. constant native ConvertGameDifficulty takes integer i returns gamedifficulty
  118. constant native ConvertGameType takes integer i returns gametype
  119. constant native ConvertMapFlag takes integer i returns mapflag
  120. constant native ConvertMapVisibility takes integer i returns mapvisibility
  121. constant native ConvertMapSetting takes integer i returns mapsetting
  122. constant native ConvertMapDensity takes integer i returns mapdensity
  123. constant native ConvertMapControl takes integer i returns mapcontrol
  124. constant native ConvertPlayerColor takes integer i returns playercolor
  125. constant native ConvertPlayerSlotState takes integer i returns playerslotstate
  126. constant native ConvertVolumeGroup takes integer i returns volumegroup
  127. constant native ConvertCameraField takes integer i returns camerafield
  128. constant native ConvertBlendMode takes integer i returns blendmode
  129. constant native ConvertRarityControl takes integer i returns raritycontrol
  130. constant native ConvertTexMapFlags takes integer i returns texmapflags
  131. constant native ConvertFogState takes integer i returns fogstate
  132. constant native ConvertEffectType takes integer i returns effecttype
  133. constant native ConvertVersion takes integer i returns version
  134. constant native ConvertItemType takes integer i returns itemtype
  135. constant native ConvertAttackType takes integer i returns attacktype
  136. constant native ConvertDamageType takes integer i returns damagetype
  137. constant native ConvertWeaponType takes integer i returns weapontype
  138. constant native ConvertSoundType takes integer i returns soundtype
  139. constant native ConvertPathingType takes integer i returns pathingtype
  140. constant native OrderId takes string orderIdString returns integer
  141. constant native OrderId2String takes integer orderId returns string
  142. constant native UnitId takes string unitIdString returns integer
  143. constant native UnitId2String takes integer unitId returns string
  144. // Not currently working correctly...
  145. constant native AbilityId takes string abilityIdString returns integer
  146. constant native AbilityId2String takes integer abilityId returns string
  147. // Looks up the "name" field for any object (unit, item, ability)
  148. constant native GetObjectName takes integer objectId returns string
  149. globals
  150. //===================================================
  151. // Game Constants
  152. //===================================================
  153. // pfff
  154. constant boolean FALSE = false
  155. constant boolean TRUE = true
  156. constant integer JASS_MAX_ARRAY_SIZE = 8192
  157. constant integer PLAYER_NEUTRAL_PASSIVE = 15
  158. constant integer PLAYER_NEUTRAL_AGGRESSIVE = 12
  159. constant playercolor PLAYER_COLOR_RED = ConvertPlayerColor(0)
  160. constant playercolor PLAYER_COLOR_BLUE = ConvertPlayerColor(1)
  161. constant playercolor PLAYER_COLOR_CYAN = ConvertPlayerColor(2)
  162. constant playercolor PLAYER_COLOR_PURPLE = ConvertPlayerColor(3)
  163. constant playercolor PLAYER_COLOR_YELLOW = ConvertPlayerColor(4)
  164. constant playercolor PLAYER_COLOR_ORANGE = ConvertPlayerColor(5)
  165. constant playercolor PLAYER_COLOR_GREEN = ConvertPlayerColor(6)
  166. constant playercolor PLAYER_COLOR_PINK = ConvertPlayerColor(7)
  167. constant playercolor PLAYER_COLOR_LIGHT_GRAY = ConvertPlayerColor(8)
  168. constant playercolor PLAYER_COLOR_LIGHT_BLUE = ConvertPlayerColor(9)
  169. constant playercolor PLAYER_COLOR_AQUA = ConvertPlayerColor(10)
  170. constant playercolor PLAYER_COLOR_BROWN = ConvertPlayerColor(11)
  171. constant race RACE_HUMAN = ConvertRace(1)
  172. constant race RACE_ORC = ConvertRace(2)
  173. constant race RACE_UNDEAD = ConvertRace(3)
  174. constant race RACE_NIGHTELF = ConvertRace(4)
  175. constant race RACE_DEMON = ConvertRace(5)
  176. constant race RACE_OTHER = ConvertRace(7)
  177. constant playergameresult PLAYER_GAME_RESULT_VICTORY = ConvertPlayerGameResult(0)
  178. constant playergameresult PLAYER_GAME_RESULT_DEFEAT = ConvertPlayerGameResult(1)
  179. constant playergameresult PLAYER_GAME_RESULT_TIE = ConvertPlayerGameResult(2)
  180. constant playergameresult PLAYER_GAME_RESULT_NEUTRAL = ConvertPlayerGameResult(3)
  181. constant alliancetype ALLIANCE_PASSIVE = ConvertAllianceType(0)
  182. constant alliancetype ALLIANCE_HELP_REQUEST = ConvertAllianceType(1)
  183. constant alliancetype ALLIANCE_HELP_RESPONSE = ConvertAllianceType(2)
  184. constant alliancetype ALLIANCE_SHARED_XP = ConvertAllianceType(3)
  185. constant alliancetype ALLIANCE_SHARED_SPELLS = ConvertAllianceType(4)
  186. constant alliancetype ALLIANCE_SHARED_VISION = ConvertAllianceType(5)
  187. constant alliancetype ALLIANCE_SHARED_CONTROL = ConvertAllianceType(6)
  188. constant alliancetype ALLIANCE_SHARED_ADVANCED_CONTROL= ConvertAllianceType(7)
  189. constant alliancetype ALLIANCE_RESCUABLE = ConvertAllianceType(8)
  190. constant alliancetype ALLIANCE_SHARED_VISION_FORCED = ConvertAllianceType(9)
  191. constant version VERSION_REIGN_OF_CHAOS = ConvertVersion(0)
  192. constant version VERSION_FROZEN_THRONE = ConvertVersion(1)
  193. constant attacktype ATTACK_TYPE_NORMAL = ConvertAttackType(0)
  194. constant attacktype ATTACK_TYPE_MELEE = ConvertAttackType(1)
  195. constant attacktype ATTACK_TYPE_PIERCE = ConvertAttackType(2)
  196. constant attacktype ATTACK_TYPE_SIEGE = ConvertAttackType(3)
  197. constant attacktype ATTACK_TYPE_MAGIC = ConvertAttackType(4)
  198. constant attacktype ATTACK_TYPE_CHAOS = ConvertAttackType(5)
  199. constant attacktype ATTACK_TYPE_HERO = ConvertAttackType(6)
  200. constant damagetype DAMAGE_TYPE_UNKNOWN = ConvertDamageType(0)
  201. constant damagetype DAMAGE_TYPE_NORMAL = ConvertDamageType(4)
  202. constant damagetype DAMAGE_TYPE_ENHANCED = ConvertDamageType(5)
  203. constant damagetype DAMAGE_TYPE_FIRE = ConvertDamageType(8)
  204. constant damagetype DAMAGE_TYPE_COLD = ConvertDamageType(9)
  205. constant damagetype DAMAGE_TYPE_LIGHTNING = ConvertDamageType(10)
  206. constant damagetype DAMAGE_TYPE_POISON = ConvertDamageType(11)
  207. constant damagetype DAMAGE_TYPE_DISEASE = ConvertDamageType(12)
  208. constant damagetype DAMAGE_TYPE_DIVINE = ConvertDamageType(13)
  209. constant damagetype DAMAGE_TYPE_MAGIC = ConvertDamageType(14)
  210. constant damagetype DAMAGE_TYPE_SONIC = ConvertDamageType(15)
  211. constant damagetype DAMAGE_TYPE_ACID = ConvertDamageType(16)
  212. constant damagetype DAMAGE_TYPE_FORCE = ConvertDamageType(17)
  213. constant damagetype DAMAGE_TYPE_DEATH = ConvertDamageType(18)
  214. constant damagetype DAMAGE_TYPE_MIND = ConvertDamageType(19)
  215. constant damagetype DAMAGE_TYPE_PLANT = ConvertDamageType(20)
  216. constant damagetype DAMAGE_TYPE_DEFENSIVE = ConvertDamageType(21)
  217. constant damagetype DAMAGE_TYPE_DEMOLITION = ConvertDamageType(22)
  218. constant damagetype DAMAGE_TYPE_SLOW_POISON = ConvertDamageType(23)
  219. constant damagetype DAMAGE_TYPE_SPIRIT_LINK = ConvertDamageType(24)
  220. constant damagetype DAMAGE_TYPE_SHADOW_STRIKE = ConvertDamageType(25)
  221. constant damagetype DAMAGE_TYPE_UNIVERSAL = ConvertDamageType(26)
  222. constant weapontype WEAPON_TYPE_WHOKNOWS = ConvertWeaponType(0)
  223. constant weapontype WEAPON_TYPE_METAL_LIGHT_CHOP = ConvertWeaponType(1)
  224. constant weapontype WEAPON_TYPE_METAL_MEDIUM_CHOP = ConvertWeaponType(2)
  225. constant weapontype WEAPON_TYPE_METAL_HEAVY_CHOP = ConvertWeaponType(3)
  226. constant weapontype WEAPON_TYPE_METAL_LIGHT_SLICE = ConvertWeaponType(4)
  227. constant weapontype WEAPON_TYPE_METAL_MEDIUM_SLICE = ConvertWeaponType(5)
  228. constant weapontype WEAPON_TYPE_METAL_HEAVY_SLICE = ConvertWeaponType(6)
  229. constant weapontype WEAPON_TYPE_METAL_MEDIUM_BASH = ConvertWeaponType(7)
  230. constant weapontype WEAPON_TYPE_METAL_HEAVY_BASH = ConvertWeaponType(8)
  231. constant weapontype WEAPON_TYPE_METAL_MEDIUM_STAB = ConvertWeaponType(9)
  232. constant weapontype WEAPON_TYPE_METAL_HEAVY_STAB = ConvertWeaponType(10)
  233. constant weapontype WEAPON_TYPE_WOOD_LIGHT_SLICE = ConvertWeaponType(11)
  234. constant weapontype WEAPON_TYPE_WOOD_MEDIUM_SLICE = ConvertWeaponType(12)
  235. constant weapontype WEAPON_TYPE_WOOD_HEAVY_SLICE = ConvertWeaponType(13)
  236. constant weapontype WEAPON_TYPE_WOOD_LIGHT_BASH = ConvertWeaponType(14)
  237. constant weapontype WEAPON_TYPE_WOOD_MEDIUM_BASH = ConvertWeaponType(15)
  238. constant weapontype WEAPON_TYPE_WOOD_HEAVY_BASH = ConvertWeaponType(16)
  239. constant weapontype WEAPON_TYPE_WOOD_LIGHT_STAB = ConvertWeaponType(17)
  240. constant weapontype WEAPON_TYPE_WOOD_MEDIUM_STAB = ConvertWeaponType(18)
  241. constant weapontype WEAPON_TYPE_CLAW_LIGHT_SLICE = ConvertWeaponType(19)
  242. constant weapontype WEAPON_TYPE_CLAW_MEDIUM_SLICE = ConvertWeaponType(20)
  243. constant weapontype WEAPON_TYPE_CLAW_HEAVY_SLICE = ConvertWeaponType(21)
  244. constant weapontype WEAPON_TYPE_AXE_MEDIUM_CHOP = ConvertWeaponType(22)
  245. constant weapontype WEAPON_TYPE_ROCK_HEAVY_BASH = ConvertWeaponType(23)
  246. constant pathingtype PATHING_TYPE_ANY = ConvertPathingType(0)
  247. constant pathingtype PATHING_TYPE_WALKABILITY = ConvertPathingType(1)
  248. constant pathingtype PATHING_TYPE_FLYABILITY = ConvertPathingType(2)
  249. constant pathingtype PATHING_TYPE_BUILDABILITY = ConvertPathingType(3)
  250. constant pathingtype PATHING_TYPE_PEONHARVESTPATHING = ConvertPathingType(4)
  251. constant pathingtype PATHING_TYPE_BLIGHTPATHING = ConvertPathingType(5)
  252. constant pathingtype PATHING_TYPE_FLOATABILITY = ConvertPathingType(6)
  253. constant pathingtype PATHING_TYPE_AMPHIBIOUSPATHING = ConvertPathingType(7)
  254. //===================================================
  255. // Map Setup Constants
  256. //===================================================
  257. constant racepreference RACE_PREF_HUMAN = ConvertRacePref(1)
  258. constant racepreference RACE_PREF_ORC = ConvertRacePref(2)
  259. constant racepreference RACE_PREF_NIGHTELF = ConvertRacePref(4)
  260. constant racepreference RACE_PREF_UNDEAD = ConvertRacePref(8)
  261. constant racepreference RACE_PREF_DEMON = ConvertRacePref(16)
  262. constant racepreference RACE_PREF_RANDOM = ConvertRacePref(32)
  263. constant racepreference RACE_PREF_USER_SELECTABLE = ConvertRacePref(64)
  264. constant mapcontrol MAP_CONTROL_USER = ConvertMapControl(0)
  265. constant mapcontrol MAP_CONTROL_COMPUTER = ConvertMapControl(1)
  266. constant mapcontrol MAP_CONTROL_RESCUABLE = ConvertMapControl(2)
  267. constant mapcontrol MAP_CONTROL_NEUTRAL = ConvertMapControl(3)
  268. constant mapcontrol MAP_CONTROL_CREEP = ConvertMapControl(4)
  269. constant mapcontrol MAP_CONTROL_NONE = ConvertMapControl(5)
  270. constant gametype GAME_TYPE_MELEE = ConvertGameType(1)
  271. constant gametype GAME_TYPE_FFA = ConvertGameType(2)
  272. constant gametype GAME_TYPE_USE_MAP_SETTINGS = ConvertGameType(4)
  273. constant gametype GAME_TYPE_BLIZ = ConvertGameType(8)
  274. constant gametype GAME_TYPE_ONE_ON_ONE = ConvertGameType(16)
  275. constant gametype GAME_TYPE_TWO_TEAM_PLAY = ConvertGameType(32)
  276. constant gametype GAME_TYPE_THREE_TEAM_PLAY = ConvertGameType(64)
  277. constant gametype GAME_TYPE_FOUR_TEAM_PLAY = ConvertGameType(128)
  278. constant mapflag MAP_FOG_HIDE_TERRAIN = ConvertMapFlag(1)
  279. constant mapflag MAP_FOG_MAP_EXPLORED = ConvertMapFlag(2)
  280. constant mapflag MAP_FOG_ALWAYS_VISIBLE = ConvertMapFlag(4)
  281. constant mapflag MAP_USE_HANDICAPS = ConvertMapFlag(8)
  282. constant mapflag MAP_OBSERVERS = ConvertMapFlag(16)
  283. constant mapflag MAP_OBSERVERS_ON_DEATH = ConvertMapFlag(32)
  284. constant mapflag MAP_FIXED_COLORS = ConvertMapFlag(128)
  285. constant mapflag MAP_LOCK_RESOURCE_TRADING = ConvertMapFlag(256)
  286. constant mapflag MAP_RESOURCE_TRADING_ALLIES_ONLY = ConvertMapFlag(512)
  287. constant mapflag MAP_LOCK_ALLIANCE_CHANGES = ConvertMapFlag(1024)
  288. constant mapflag MAP_ALLIANCE_CHANGES_HIDDEN = ConvertMapFlag(2048)
  289. constant mapflag MAP_CHEATS = ConvertMapFlag(4096)
  290. constant mapflag MAP_CHEATS_HIDDEN = ConvertMapFlag(8192)
  291. constant mapflag MAP_LOCK_SPEED = ConvertMapFlag(8192*2)
  292. constant mapflag MAP_LOCK_RANDOM_SEED = ConvertMapFlag(8192*4)
  293. constant mapflag MAP_SHARED_ADVANCED_CONTROL = ConvertMapFlag(8192*8)
  294. constant mapflag MAP_RANDOM_HERO = ConvertMapFlag(8192*16)
  295. constant mapflag MAP_RANDOM_RACES = ConvertMapFlag(8192*32)
  296. constant mapflag MAP_RELOADED = ConvertMapFlag(8192*64)
  297. constant placement MAP_PLACEMENT_RANDOM = ConvertPlacement(0) // random among all slots
  298. constant placement MAP_PLACEMENT_FIXED = ConvertPlacement(1) // player 0 in start loc 0...
  299. constant placement MAP_PLACEMENT_USE_MAP_SETTINGS = ConvertPlacement(2) // whatever was specified by the script
  300. constant placement MAP_PLACEMENT_TEAMS_TOGETHER = ConvertPlacement(3) // random with allies next to each other
  301. constant startlocprio MAP_LOC_PRIO_LOW = ConvertStartLocPrio(0)
  302. constant startlocprio MAP_LOC_PRIO_HIGH = ConvertStartLocPrio(1)
  303. constant startlocprio MAP_LOC_PRIO_NOT = ConvertStartLocPrio(2)
  304. constant mapdensity MAP_DENSITY_NONE = ConvertMapDensity(0)
  305. constant mapdensity MAP_DENSITY_LIGHT = ConvertMapDensity(1)
  306. constant mapdensity MAP_DENSITY_MEDIUM = ConvertMapDensity(2)
  307. constant mapdensity MAP_DENSITY_HEAVY = ConvertMapDensity(3)
  308. constant gamedifficulty MAP_DIFFICULTY_EASY = ConvertGameDifficulty(0)
  309. constant gamedifficulty MAP_DIFFICULTY_NORMAL = ConvertGameDifficulty(1)
  310. constant gamedifficulty MAP_DIFFICULTY_HARD = ConvertGameDifficulty(2)
  311. constant gamedifficulty MAP_DIFFICULTY_INSANE = ConvertGameDifficulty(3)
  312. constant gamespeed MAP_SPEED_SLOWEST = ConvertGameSpeed(0)
  313. constant gamespeed MAP_SPEED_SLOW = ConvertGameSpeed(1)
  314. constant gamespeed MAP_SPEED_NORMAL = ConvertGameSpeed(2)
  315. constant gamespeed MAP_SPEED_FAST = ConvertGameSpeed(3)
  316. constant gamespeed MAP_SPEED_FASTEST = ConvertGameSpeed(4)
  317. constant playerslotstate PLAYER_SLOT_STATE_EMPTY = ConvertPlayerSlotState(0)
  318. constant playerslotstate PLAYER_SLOT_STATE_PLAYING = ConvertPlayerSlotState(1)
  319. constant playerslotstate PLAYER_SLOT_STATE_LEFT = ConvertPlayerSlotState(2)
  320. //===================================================
  321. // Sound Constants
  322. //===================================================
  323. constant volumegroup SOUND_VOLUMEGROUP_UNITMOVEMENT = ConvertVolumeGroup(0)
  324. constant volumegroup SOUND_VOLUMEGROUP_UNITSOUNDS = ConvertVolumeGroup(1)
  325. constant volumegroup SOUND_VOLUMEGROUP_COMBAT = ConvertVolumeGroup(2)
  326. constant volumegroup SOUND_VOLUMEGROUP_SPELLS = ConvertVolumeGroup(3)
  327. constant volumegroup SOUND_VOLUMEGROUP_UI = ConvertVolumeGroup(4)
  328. constant volumegroup SOUND_VOLUMEGROUP_MUSIC = ConvertVolumeGroup(5)
  329. constant volumegroup SOUND_VOLUMEGROUP_AMBIENTSOUNDS = ConvertVolumeGroup(6)
  330. constant volumegroup SOUND_VOLUMEGROUP_FIRE = ConvertVolumeGroup(7)
  331. //===================================================
  332. // Game, Player, and Unit States
  333. //
  334. // For use with TriggerRegister<X>StateEvent
  335. //
  336. //===================================================
  337. constant igamestate GAME_STATE_DIVINE_INTERVENTION = ConvertIGameState(0)
  338. constant igamestate GAME_STATE_DISCONNECTED = ConvertIGameState(1)
  339. constant fgamestate GAME_STATE_TIME_OF_DAY = ConvertFGameState(2)
  340. constant playerstate PLAYER_STATE_GAME_RESULT = ConvertPlayerState(0)
  341. // current resource levels
  342. //
  343. constant playerstate PLAYER_STATE_RESOURCE_GOLD = ConvertPlayerState(1)
  344. constant playerstate PLAYER_STATE_RESOURCE_LUMBER = ConvertPlayerState(2)
  345. constant playerstate PLAYER_STATE_RESOURCE_HERO_TOKENS = ConvertPlayerState(3)
  346. constant playerstate PLAYER_STATE_RESOURCE_FOOD_CAP = ConvertPlayerState(4)
  347. constant playerstate PLAYER_STATE_RESOURCE_FOOD_USED = ConvertPlayerState(5)
  348. constant playerstate PLAYER_STATE_FOOD_CAP_CEILING = ConvertPlayerState(6)
  349. constant playerstate PLAYER_STATE_GIVES_BOUNTY = ConvertPlayerState(7)
  350. constant playerstate PLAYER_STATE_ALLIED_VICTORY = ConvertPlayerState(8)
  351. constant playerstate PLAYER_STATE_PLACED = ConvertPlayerState(9)
  352. constant playerstate PLAYER_STATE_OBSERVER_ON_DEATH = ConvertPlayerState(10)
  353. constant playerstate PLAYER_STATE_OBSERVER = ConvertPlayerState(11)
  354. constant playerstate PLAYER_STATE_UNFOLLOWABLE = ConvertPlayerState(12)
  355. // taxation rate for each resource
  356. //
  357. constant playerstate PLAYER_STATE_GOLD_UPKEEP_RATE = ConvertPlayerState(13)
  358. constant playerstate PLAYER_STATE_LUMBER_UPKEEP_RATE = ConvertPlayerState(14)
  359. // cumulative resources collected by the player during the mission
  360. //
  361. constant playerstate PLAYER_STATE_GOLD_GATHERED = ConvertPlayerState(15)
  362. constant playerstate PLAYER_STATE_LUMBER_GATHERED = ConvertPlayerState(16)
  363. constant playerstate PLAYER_STATE_NO_CREEP_SLEEP = ConvertPlayerState(25)
  364. constant unitstate UNIT_STATE_LIFE = ConvertUnitState(0)
  365. constant unitstate UNIT_STATE_MAX_LIFE = ConvertUnitState(1)
  366. constant unitstate UNIT_STATE_MANA = ConvertUnitState(2)
  367. constant unitstate UNIT_STATE_MAX_MANA = ConvertUnitState(3)
  368. constant aidifficulty AI_DIFFICULTY_NEWBIE = ConvertAIDifficulty(0)
  369. constant aidifficulty AI_DIFFICULTY_NORMAL = ConvertAIDifficulty(1)
  370. constant aidifficulty AI_DIFFICULTY_INSANE = ConvertAIDifficulty(2)
  371. // player score values
  372. constant playerscore PLAYER_SCORE_UNITS_TRAINED = ConvertPlayerScore(0)
  373. constant playerscore PLAYER_SCORE_UNITS_KILLED = ConvertPlayerScore(1)
  374. constant playerscore PLAYER_SCORE_STRUCT_BUILT = ConvertPlayerScore(2)
  375. constant playerscore PLAYER_SCORE_STRUCT_RAZED = ConvertPlayerScore(3)
  376. constant playerscore PLAYER_SCORE_TECH_PERCENT = ConvertPlayerScore(4)
  377. constant playerscore PLAYER_SCORE_FOOD_MAXPROD = ConvertPlayerScore(5)
  378. constant playerscore PLAYER_SCORE_FOOD_MAXUSED = ConvertPlayerScore(6)
  379. constant playerscore PLAYER_SCORE_HEROES_KILLED = ConvertPlayerScore(7)
  380. constant playerscore PLAYER_SCORE_ITEMS_GAINED = ConvertPlayerScore(8)
  381. constant playerscore PLAYER_SCORE_MERCS_HIRED = ConvertPlayerScore(9)
  382. constant playerscore PLAYER_SCORE_GOLD_MINED_TOTAL = ConvertPlayerScore(10)
  383. constant playerscore PLAYER_SCORE_GOLD_MINED_UPKEEP = ConvertPlayerScore(11)
  384. constant playerscore PLAYER_SCORE_GOLD_LOST_UPKEEP = ConvertPlayerScore(12)
  385. constant playerscore PLAYER_SCORE_GOLD_LOST_TAX = ConvertPlayerScore(13)
  386. constant playerscore PLAYER_SCORE_GOLD_GIVEN = ConvertPlayerScore(14)
  387. constant playerscore PLAYER_SCORE_GOLD_RECEIVED = ConvertPlayerScore(15)
  388. constant playerscore PLAYER_SCORE_LUMBER_TOTAL = ConvertPlayerScore(16)
  389. constant playerscore PLAYER_SCORE_LUMBER_LOST_UPKEEP = ConvertPlayerScore(17)
  390. constant playerscore PLAYER_SCORE_LUMBER_LOST_TAX = ConvertPlayerScore(18)
  391. constant playerscore PLAYER_SCORE_LUMBER_GIVEN = ConvertPlayerScore(19)
  392. constant playerscore PLAYER_SCORE_LUMBER_RECEIVED = ConvertPlayerScore(20)
  393. constant playerscore PLAYER_SCORE_UNIT_TOTAL = ConvertPlayerScore(21)
  394. constant playerscore PLAYER_SCORE_HERO_TOTAL = ConvertPlayerScore(22)
  395. constant playerscore PLAYER_SCORE_RESOURCE_TOTAL = ConvertPlayerScore(23)
  396. constant playerscore PLAYER_SCORE_TOTAL = ConvertPlayerScore(24)
  397. //===================================================
  398. // Game, Player and Unit Events
  399. //
  400. // When an event causes a trigger to fire these
  401. // values allow the action code to determine which
  402. // event was dispatched and therefore which set of
  403. // native functions should be used to get information
  404. // about the event.
  405. //
  406. // Do NOT change the order or value of these constants
  407. // without insuring that the JASS_GAME_EVENTS_WAR3 enum
  408. // is changed to match.
  409. //
  410. //===================================================
  411. //===================================================
  412. // For use with TriggerRegisterGameEvent
  413. //===================================================
  414. constant gameevent EVENT_GAME_VICTORY = ConvertGameEvent(0)
  415. constant gameevent EVENT_GAME_END_LEVEL = ConvertGameEvent(1)
  416. constant gameevent EVENT_GAME_VARIABLE_LIMIT = ConvertGameEvent(2)
  417. constant gameevent EVENT_GAME_STATE_LIMIT = ConvertGameEvent(3)
  418. constant gameevent EVENT_GAME_TIMER_EXPIRED = ConvertGameEvent(4)
  419. constant gameevent EVENT_GAME_ENTER_REGION = ConvertGameEvent(5)
  420. constant gameevent EVENT_GAME_LEAVE_REGION = ConvertGameEvent(6)
  421. constant gameevent EVENT_GAME_TRACKABLE_HIT = ConvertGameEvent(7)
  422. constant gameevent EVENT_GAME_TRACKABLE_TRACK = ConvertGameEvent(8)
  423. constant gameevent EVENT_GAME_SHOW_SKILL = ConvertGameEvent(9)
  424. constant gameevent EVENT_GAME_BUILD_SUBMENU = ConvertGameEvent(10)
  425. //===================================================
  426. // For use with TriggerRegisterPlayerEvent
  427. //===================================================
  428. constant playerevent EVENT_PLAYER_STATE_LIMIT = ConvertPlayerEvent(11)
  429. constant playerevent EVENT_PLAYER_ALLIANCE_CHANGED = ConvertPlayerEvent(12)
  430. constant playerevent EVENT_PLAYER_DEFEAT = ConvertPlayerEvent(13)
  431. constant playerevent EVENT_PLAYER_VICTORY = ConvertPlayerEvent(14)
  432. constant playerevent EVENT_PLAYER_LEAVE = ConvertPlayerEvent(15)
  433. constant playerevent EVENT_PLAYER_CHAT = ConvertPlayerEvent(16)
  434. constant playerevent EVENT_PLAYER_END_CINEMATIC = ConvertPlayerEvent(17)
  435. //===================================================
  436. // For use with TriggerRegisterPlayerUnitEvent
  437. //===================================================
  438. constant playerunitevent EVENT_PLAYER_UNIT_ATTACKED = ConvertPlayerUnitEvent(18)
  439. constant playerunitevent EVENT_PLAYER_UNIT_RESCUED = ConvertPlayerUnitEvent(19)
  440. constant playerunitevent EVENT_PLAYER_UNIT_DEATH = ConvertPlayerUnitEvent(20)
  441. constant playerunitevent EVENT_PLAYER_UNIT_DECAY = ConvertPlayerUnitEvent(21)
  442. constant playerunitevent EVENT_PLAYER_UNIT_DETECTED = ConvertPlayerUnitEvent(22)
  443. constant playerunitevent EVENT_PLAYER_UNIT_HIDDEN = ConvertPlayerUnitEvent(23)
  444. constant playerunitevent EVENT_PLAYER_UNIT_SELECTED = ConvertPlayerUnitEvent(24)
  445. constant playerunitevent EVENT_PLAYER_UNIT_DESELECTED = ConvertPlayerUnitEvent(25)
  446. constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_START = ConvertPlayerUnitEvent(26)
  447. constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL = ConvertPlayerUnitEvent(27)
  448. constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_FINISH = ConvertPlayerUnitEvent(28)
  449. constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_START = ConvertPlayerUnitEvent(29)
  450. constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_CANCEL = ConvertPlayerUnitEvent(30)
  451. constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_FINISH = ConvertPlayerUnitEvent(31)
  452. constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_START = ConvertPlayerUnitEvent(32)
  453. constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_CANCEL = ConvertPlayerUnitEvent(33)
  454. constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_FINISH = ConvertPlayerUnitEvent(34)
  455. constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_START = ConvertPlayerUnitEvent(35)
  456. constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_CANCEL = ConvertPlayerUnitEvent(36)
  457. constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_FINISH = ConvertPlayerUnitEvent(37)
  458. constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER = ConvertPlayerUnitEvent(38)
  459. constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER = ConvertPlayerUnitEvent(39)
  460. constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER = ConvertPlayerUnitEvent(40)
  461. constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER = ConvertPlayerUnitEvent(40) // for compat
  462. constant playerunitevent EVENT_PLAYER_HERO_LEVEL = ConvertPlayerUnitEvent(41)
  463. constant playerunitevent EVENT_PLAYER_HERO_SKILL = ConvertPlayerUnitEvent(42)
  464. constant playerunitevent EVENT_PLAYER_HERO_REVIVABLE = ConvertPlayerUnitEvent(43)
  465. constant playerunitevent EVENT_PLAYER_HERO_REVIVE_START = ConvertPlayerUnitEvent(44)
  466. constant playerunitevent EVENT_PLAYER_HERO_REVIVE_CANCEL = ConvertPlayerUnitEvent(45)
  467. constant playerunitevent EVENT_PLAYER_HERO_REVIVE_FINISH = ConvertPlayerUnitEvent(46)
  468. constant playerunitevent EVENT_PLAYER_UNIT_SUMMON = ConvertPlayerUnitEvent(47)
  469. constant playerunitevent EVENT_PLAYER_UNIT_DROP_ITEM = ConvertPlayerUnitEvent(48)
  470. constant playerunitevent EVENT_PLAYER_UNIT_PICKUP_ITEM = ConvertPlayerUnitEvent(49)
  471. constant playerunitevent EVENT_PLAYER_UNIT_USE_ITEM = ConvertPlayerUnitEvent(50)
  472. constant playerunitevent EVENT_PLAYER_UNIT_LOADED = ConvertPlayerUnitEvent(51)
  473. //===================================================
  474. // For use with TriggerRegisterUnitEvent
  475. //===================================================
  476. constant unitevent EVENT_UNIT_DAMAGED = ConvertUnitEvent(52)
  477. constant unitevent EVENT_UNIT_DEATH = ConvertUnitEvent(53)
  478. constant unitevent EVENT_UNIT_DECAY = ConvertUnitEvent(54)
  479. constant unitevent EVENT_UNIT_DETECTED = ConvertUnitEvent(55)
  480. constant unitevent EVENT_UNIT_HIDDEN = ConvertUnitEvent(56)
  481. constant unitevent EVENT_UNIT_SELECTED = ConvertUnitEvent(57)
  482. constant unitevent EVENT_UNIT_DESELECTED = ConvertUnitEvent(58)
  483. constant unitevent EVENT_UNIT_STATE_LIMIT = ConvertUnitEvent(59)
  484. // Events which may have a filter for the "other unit"
  485. //
  486. constant unitevent EVENT_UNIT_ACQUIRED_TARGET = ConvertUnitEvent(60)
  487. constant unitevent EVENT_UNIT_TARGET_IN_RANGE = ConvertUnitEvent(61)
  488. constant unitevent EVENT_UNIT_ATTACKED = ConvertUnitEvent(62)
  489. constant unitevent EVENT_UNIT_RESCUED = ConvertUnitEvent(63)
  490. constant unitevent EVENT_UNIT_CONSTRUCT_CANCEL = ConvertUnitEvent(64)
  491. constant unitevent EVENT_UNIT_CONSTRUCT_FINISH = ConvertUnitEvent(65)
  492. constant unitevent EVENT_UNIT_UPGRADE_START = ConvertUnitEvent(66)
  493. constant unitevent EVENT_UNIT_UPGRADE_CANCEL = ConvertUnitEvent(67)
  494. constant unitevent EVENT_UNIT_UPGRADE_FINISH = ConvertUnitEvent(68)
  495. // Events which involve the specified unit performing
  496. // training of other units
  497. //
  498. constant unitevent EVENT_UNIT_TRAIN_START = ConvertUnitEvent(69)
  499. constant unitevent EVENT_UNIT_TRAIN_CANCEL = ConvertUnitEvent(70)
  500. constant unitevent EVENT_UNIT_TRAIN_FINISH = ConvertUnitEvent(71)
  501. constant unitevent EVENT_UNIT_RESEARCH_START = ConvertUnitEvent(72)
  502. constant unitevent EVENT_UNIT_RESEARCH_CANCEL = ConvertUnitEvent(73)
  503. constant unitevent EVENT_UNIT_RESEARCH_FINISH = ConvertUnitEvent(74)
  504. constant unitevent EVENT_UNIT_ISSUED_ORDER = ConvertUnitEvent(75)
  505. constant unitevent EVENT_UNIT_ISSUED_POINT_ORDER = ConvertUnitEvent(76)
  506. constant unitevent EVENT_UNIT_ISSUED_TARGET_ORDER = ConvertUnitEvent(77)
  507. constant unitevent EVENT_UNIT_HERO_LEVEL = ConvertUnitEvent(78)
  508. constant unitevent EVENT_UNIT_HERO_SKILL = ConvertUnitEvent(79)
  509. constant unitevent EVENT_UNIT_HERO_REVIVABLE = ConvertUnitEvent(80)
  510. constant unitevent EVENT_UNIT_HERO_REVIVE_START = ConvertUnitEvent(81)
  511. constant unitevent EVENT_UNIT_HERO_REVIVE_CANCEL = ConvertUnitEvent(82)
  512. constant unitevent EVENT_UNIT_HERO_REVIVE_FINISH = ConvertUnitEvent(83)
  513. constant unitevent EVENT_UNIT_SUMMON = ConvertUnitEvent(84)
  514. constant unitevent EVENT_UNIT_DROP_ITEM = ConvertUnitEvent(85)
  515. constant unitevent EVENT_UNIT_PICKUP_ITEM = ConvertUnitEvent(86)
  516. constant unitevent EVENT_UNIT_USE_ITEM = ConvertUnitEvent(87)
  517. constant unitevent EVENT_UNIT_LOADED = ConvertUnitEvent(88)
  518. constant widgetevent EVENT_WIDGET_DEATH = ConvertWidgetEvent(89)
  519. constant dialogevent EVENT_DIALOG_BUTTON_CLICK = ConvertDialogEvent(90)
  520. constant dialogevent EVENT_DIALOG_CLICK = ConvertDialogEvent(91)
  521. //===================================================
  522. // Frozen Throne Expansion Events
  523. // Need to be added here to preserve compat
  524. //===================================================
  525. //===================================================
  526. // For use with TriggerRegisterGameEvent
  527. //===================================================
  528. constant gameevent EVENT_GAME_LOADED = ConvertGameEvent(256)
  529. constant gameevent EVENT_GAME_TOURNAMENT_FINISH_SOON = ConvertGameEvent(257)
  530. constant gameevent EVENT_GAME_TOURNAMENT_FINISH_NOW = ConvertGameEvent(258)
  531. constant gameevent EVENT_GAME_SAVE = ConvertGameEvent(259)
  532. //===================================================
  533. // For use with TriggerRegisterPlayerEvent
  534. //===================================================
  535. constant playerevent EVENT_PLAYER_ARROW_LEFT_DOWN = ConvertPlayerEvent(261)
  536. constant playerevent EVENT_PLAYER_ARROW_LEFT_UP = ConvertPlayerEvent(262)
  537. constant playerevent EVENT_PLAYER_ARROW_RIGHT_DOWN = ConvertPlayerEvent(263)
  538. constant playerevent EVENT_PLAYER_ARROW_RIGHT_UP = ConvertPlayerEvent(264)
  539. constant playerevent EVENT_PLAYER_ARROW_DOWN_DOWN = ConvertPlayerEvent(265)
  540. constant playerevent EVENT_PLAYER_ARROW_DOWN_UP = ConvertPlayerEvent(266)
  541. constant playerevent EVENT_PLAYER_ARROW_UP_DOWN = ConvertPlayerEvent(267)
  542. constant playerevent EVENT_PLAYER_ARROW_UP_UP = ConvertPlayerEvent(268)
  543. //===================================================
  544. // For use with TriggerRegisterPlayerUnitEvent
  545. //===================================================
  546. constant playerunitevent EVENT_PLAYER_UNIT_SELL = ConvertPlayerUnitEvent(269)
  547. constant playerunitevent EVENT_PLAYER_UNIT_CHANGE_OWNER = ConvertPlayerUnitEvent(270)
  548. constant playerunitevent EVENT_PLAYER_UNIT_SELL_ITEM = ConvertPlayerUnitEvent(271)
  549. constant playerunitevent EVENT_PLAYER_UNIT_SPELL_CHANNEL = ConvertPlayerUnitEvent(272)
  550. constant playerunitevent EVENT_PLAYER_UNIT_SPELL_CAST = ConvertPlayerUnitEvent(273)
  551. constant playerunitevent EVENT_PLAYER_UNIT_SPELL_EFFECT = ConvertPlayerUnitEvent(274)
  552. constant playerunitevent EVENT_PLAYER_UNIT_SPELL_FINISH = ConvertPlayerUnitEvent(275)
  553. constant playerunitevent EVENT_PLAYER_UNIT_SPELL_ENDCAST = ConvertPlayerUnitEvent(276)
  554. constant playerunitevent EVENT_PLAYER_UNIT_PAWN_ITEM = ConvertPlayerUnitEvent(277)
  555. //===================================================
  556. // For use with TriggerRegisterUnitEvent
  557. //===================================================
  558. constant unitevent EVENT_UNIT_SELL = ConvertUnitEvent(286)
  559. constant unitevent EVENT_UNIT_CHANGE_OWNER = ConvertUnitEvent(287)
  560. constant unitevent EVENT_UNIT_SELL_ITEM = ConvertUnitEvent(288)
  561. constant unitevent EVENT_UNIT_SPELL_CHANNEL = ConvertUnitEvent(289)
  562. constant unitevent EVENT_UNIT_SPELL_CAST = ConvertUnitEvent(290)
  563. constant unitevent EVENT_UNIT_SPELL_EFFECT = ConvertUnitEvent(291)
  564. constant unitevent EVENT_UNIT_SPELL_FINISH = ConvertUnitEvent(292)
  565. constant unitevent EVENT_UNIT_SPELL_ENDCAST = ConvertUnitEvent(293)
  566. constant unitevent EVENT_UNIT_PAWN_ITEM = ConvertUnitEvent(294)
  567. //===================================================
  568. // Limit Event API constants
  569. // variable, player state, game state, and unit state events
  570. // ( do NOT change the order of these... )
  571. //===================================================
  572. constant limitop LESS_THAN = ConvertLimitOp(0)
  573. constant limitop LESS_THAN_OR_EQUAL = ConvertLimitOp(1)
  574. constant limitop EQUAL = ConvertLimitOp(2)
  575. constant limitop GREATER_THAN_OR_EQUAL = ConvertLimitOp(3)
  576. constant limitop GREATER_THAN = ConvertLimitOp(4)
  577. constant limitop NOT_EQUAL = ConvertLimitOp(5)
  578. //===================================================
  579. // Unit Type Constants for use with IsUnitType()
  580. //===================================================
  581. constant unittype UNIT_TYPE_HERO = ConvertUnitType(0)
  582. constant unittype UNIT_TYPE_DEAD = ConvertUnitType(1)
  583. constant unittype UNIT_TYPE_STRUCTURE = ConvertUnitType(2)
  584. constant unittype UNIT_TYPE_FLYING = ConvertUnitType(3)
  585. constant unittype UNIT_TYPE_GROUND = ConvertUnitType(4)
  586. constant unittype UNIT_TYPE_ATTACKS_FLYING = ConvertUnitType(5)
  587. constant unittype UNIT_TYPE_ATTACKS_GROUND = ConvertUnitType(6)
  588. constant unittype UNIT_TYPE_MELEE_ATTACKER = ConvertUnitType(7)
  589. constant unittype UNIT_TYPE_RANGED_ATTACKER = ConvertUnitType(8)
  590. constant unittype UNIT_TYPE_GIANT = ConvertUnitType(9)
  591. constant unittype UNIT_TYPE_SUMMONED = ConvertUnitType(10)
  592. constant unittype UNIT_TYPE_STUNNED = ConvertUnitType(11)
  593. constant unittype UNIT_TYPE_PLAGUED = ConvertUnitType(12)
  594. constant unittype UNIT_TYPE_SNARED = ConvertUnitType(13)
  595. constant unittype UNIT_TYPE_UNDEAD = ConvertUnitType(14)
  596. constant unittype UNIT_TYPE_MECHANICAL = ConvertUnitType(15)
  597. constant unittype UNIT_TYPE_PEON = ConvertUnitType(16)
  598. constant unittype UNIT_TYPE_SAPPER = ConvertUnitType(17)
  599. constant unittype UNIT_TYPE_TOWNHALL = ConvertUnitType(18)
  600. constant unittype UNIT_TYPE_ANCIENT = ConvertUnitType(19)
  601. constant unittype UNIT_TYPE_TAUREN = ConvertUnitType(20)
  602. constant unittype UNIT_TYPE_POISONED = ConvertUnitType(21)
  603. constant unittype UNIT_TYPE_POLYMORPHED = ConvertUnitType(22)
  604. constant unittype UNIT_TYPE_SLEEPING = ConvertUnitType(23)
  605. constant unittype UNIT_TYPE_RESISTANT = ConvertUnitType(24)
  606. constant unittype UNIT_TYPE_ETHEREAL = ConvertUnitType(25)
  607. constant unittype UNIT_TYPE_MAGIC_IMMUNE = ConvertUnitType(26)
  608. //===================================================
  609. // Unit Type Constants for use with ChooseRandomItemEx()
  610. //===================================================
  611. constant itemtype ITEM_TYPE_PERMANENT = ConvertItemType(0)
  612. constant itemtype ITEM_TYPE_CHARGED = ConvertItemType(1)
  613. constant itemtype ITEM_TYPE_POWERUP = ConvertItemType(2)
  614. constant itemtype ITEM_TYPE_ARTIFACT = ConvertItemType(3)
  615. constant itemtype ITEM_TYPE_PURCHASABLE = ConvertItemType(4)
  616. constant itemtype ITEM_TYPE_CAMPAIGN = ConvertItemType(5)
  617. constant itemtype ITEM_TYPE_MISCELLANEOUS = ConvertItemType(6)
  618. constant itemtype ITEM_TYPE_UNKNOWN = ConvertItemType(7)
  619. constant itemtype ITEM_TYPE_ANY = ConvertItemType(8)
  620. // Deprecated, should use ITEM_TYPE_POWERUP
  621. constant itemtype ITEM_TYPE_TOME = ConvertItemType(2)
  622. //===================================================
  623. // Animatable Camera Fields
  624. //===================================================
  625. constant camerafield CAMERA_FIELD_TARGET_DISTANCE = ConvertCameraField(0)
  626. constant camerafield CAMERA_FIELD_FARZ = ConvertCameraField(1)
  627. constant camerafield CAMERA_FIELD_ANGLE_OF_ATTACK = ConvertCameraField(2)
  628. constant camerafield CAMERA_FIELD_FIELD_OF_VIEW = ConvertCameraField(3)
  629. constant camerafield CAMERA_FIELD_ROLL = ConvertCameraField(4)
  630. constant camerafield CAMERA_FIELD_ROTATION = ConvertCameraField(5)
  631. constant camerafield CAMERA_FIELD_ZOFFSET = ConvertCameraField(6)
  632. constant blendmode BLEND_MODE_NONE = ConvertBlendMode(0)
  633. constant blendmode BLEND_MODE_DONT_CARE = ConvertBlendMode(0)
  634. constant blendmode BLEND_MODE_KEYALPHA = ConvertBlendMode(1)
  635. constant blendmode BLEND_MODE_BLEND = ConvertBlendMode(2)
  636. constant blendmode BLEND_MODE_ADDITIVE = ConvertBlendMode(3)
  637. constant blendmode BLEND_MODE_MODULATE = ConvertBlendMode(4)
  638. constant blendmode BLEND_MODE_MODULATE_2X = ConvertBlendMode(5)
  639. constant raritycontrol RARITY_FREQUENT = ConvertRarityControl(0)
  640. constant raritycontrol RARITY_RARE = ConvertRarityControl(1)
  641. constant texmapflags TEXMAP_FLAG_NONE = ConvertTexMapFlags(0)
  642. constant texmapflags TEXMAP_FLAG_WRAP_U = ConvertTexMapFlags(1)
  643. constant texmapflags TEXMAP_FLAG_WRAP_V = ConvertTexMapFlags(2)
  644. constant texmapflags TEXMAP_FLAG_WRAP_UV = ConvertTexMapFlags(3)
  645. constant fogstate FOG_OF_WAR_MASKED = ConvertFogState(1)
  646. constant fogstate FOG_OF_WAR_FOGGED = ConvertFogState(2)
  647. constant fogstate FOG_OF_WAR_VISIBLE = ConvertFogState(4)
  648. //===================================================
  649. // Camera Margin constants for use with GetCameraMargin
  650. //===================================================
  651. constant integer CAMERA_MARGIN_LEFT = 0
  652. constant integer CAMERA_MARGIN_RIGHT = 1
  653. constant integer CAMERA_MARGIN_TOP = 2
  654. constant integer CAMERA_MARGIN_BOTTOM = 3
  655. //===================================================
  656. // Effect API constants
  657. //===================================================
  658. constant effecttype EFFECT_TYPE_EFFECT = ConvertEffectType(0)
  659. constant effecttype EFFECT_TYPE_TARGET = ConvertEffectType(1)
  660. constant effecttype EFFECT_TYPE_CASTER = ConvertEffectType(2)
  661. constant effecttype EFFECT_TYPE_SPECIAL = ConvertEffectType(3)
  662. constant effecttype EFFECT_TYPE_AREA_EFFECT = ConvertEffectType(4)
  663. constant effecttype EFFECT_TYPE_MISSILE = ConvertEffectType(5)
  664. constant effecttype EFFECT_TYPE_LIGHTNING = ConvertEffectType(6)
  665. constant soundtype SOUND_TYPE_EFFECT = ConvertSoundType(0)
  666. constant soundtype SOUND_TYPE_EFFECT_LOOPED = ConvertSoundType(1)
  667. endglobals
  668. //============================================================================
  669. // MathAPI
  670. native Deg2Rad takes real degrees returns real
  671. native Rad2Deg takes real radians returns real
  672. native Sin takes real radians returns real
  673. native Cos takes real radians returns real
  674. native Tan takes real radians returns real
  675. // Expect values between -1 and 1...returns 0 for invalid input
  676. native Asin takes real y returns real
  677. native Acos takes real x returns real
  678. native Atan takes real x returns real
  679. // Returns 0 if x and y are both 0
  680. native Atan2 takes real y, real x returns real
  681. // Returns 0 if x <= 0
  682. native SquareRoot takes real x returns real
  683. // computes x to the y power
  684. // y == 0.0 => 1
  685. // x ==0.0 and y < 0 => 0
  686. //
  687. native Pow takes real x, real power returns real
  688. //============================================================================
  689. // String Utility API
  690. native I2R takes integer i returns real
  691. native R2I takes real r returns integer
  692. native I2S takes integer i returns string
  693. native R2S takes real r returns string
  694. native R2SW takes real r, integer width, integer precision returns string
  695. native S2I takes string s returns integer
  696. native S2R takes string s returns real
  697. native GetHandleId takes handle h returns integer
  698. native SubString takes string source, integer start, integer end returns string
  699. native StringLength takes string s returns integer
  700. native StringCase takes string source, boolean upper returns string
  701. native StringHash takes string s returns integer
  702. native GetLocalizedString takes string source returns string
  703. native GetLocalizedHotkey takes string source returns integer
  704. //============================================================================
  705. // Map Setup API
  706. //
  707. // These are native functions for describing the map configuration
  708. // these funcs should only be used in the "config" function of
  709. // a map script. The functions should also be called in this order
  710. // ( i.e. call SetPlayers before SetPlayerColor...
  711. //
  712. native SetMapName takes string name returns nothing
  713. native SetMapDescription takes string description returns nothing
  714. native SetTeams takes integer teamcount returns nothing
  715. native SetPlayers takes integer playercount returns nothing
  716. native DefineStartLocation takes integer whichStartLoc, real x, real y returns nothing
  717. native DefineStartLocationLoc takes integer whichStartLoc, location whichLocation returns nothing
  718. native SetStartLocPrioCount takes integer whichStartLoc, integer prioSlotCount returns nothing
  719. native SetStartLocPrio takes integer whichStartLoc, integer prioSlotIndex, integer otherStartLocIndex, startlocprio priority returns nothing
  720. native GetStartLocPrioSlot takes integer whichStartLoc, integer prioSlotIndex returns integer
  721. native GetStartLocPrio takes integer whichStartLoc, integer prioSlotIndex returns startlocprio
  722. native SetGameTypeSupported takes gametype whichGameType, boolean value returns nothing
  723. native SetMapFlag takes mapflag whichMapFlag, boolean value returns nothing
  724. native SetGamePlacement takes placement whichPlacementType returns nothing
  725. native SetGameSpeed takes gamespeed whichspeed returns nothing
  726. native SetGameDifficulty takes gamedifficulty whichdifficulty returns nothing
  727. native SetResourceDensity takes mapdensity whichdensity returns nothing
  728. native SetCreatureDensity takes mapdensity whichdensity returns nothing
  729. native GetTeams takes nothing returns integer
  730. native GetPlayers takes nothing returns integer
  731. native IsGameTypeSupported takes gametype whichGameType returns boolean
  732. native GetGameTypeSelected takes nothing returns gametype
  733. native IsMapFlagSet takes mapflag whichMapFlag returns boolean
  734. constant native GetGamePlacement takes nothing returns placement
  735. constant native GetGameSpeed takes nothing returns gamespeed
  736. constant native GetGameDifficulty takes nothing returns gamedifficulty
  737. constant native GetResourceDensity takes nothing returns mapdensity
  738. constant native GetCreatureDensity takes nothing returns mapdensity
  739. constant native GetStartLocationX takes integer whichStartLocation returns real
  740. constant native GetStartLocationY takes integer whichStartLocation returns real
  741. constant native GetStartLocationLoc takes integer whichStartLocation returns location
  742. native SetPlayerTeam takes player whichPlayer, integer whichTeam returns nothing
  743. native SetPlayerStartLocation takes player whichPlayer, integer startLocIndex returns nothing
  744. // forces player to have the specified start loc and marks the start loc as occupied
  745. // which removes it from consideration for subsequently placed players
  746. // ( i.e. you can use this to put people in a fixed loc and then
  747. // use random placement for any unplaced players etc )
  748. native ForcePlayerStartLocation takes player whichPlayer, integer startLocIndex returns nothing
  749. native SetPlayerColor takes player whichPlayer, playercolor color returns nothing
  750. native SetPlayerAlliance takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting, boolean value returns nothing
  751. native SetPlayerTaxRate takes player sourcePlayer, player otherPlayer, playerstate whichResource, integer rate returns nothing
  752. native SetPlayerRacePreference takes player whichPlayer, racepreference whichRacePreference returns nothing
  753. native SetPlayerRaceSelectable takes player whichPlayer, boolean value returns nothing
  754. native SetPlayerController takes player whichPlayer, mapcontrol controlType returns nothing
  755. native SetPlayerName takes player whichPlayer, string name returns nothing
  756. native SetPlayerOnScoreScreen takes player whichPlayer, boolean flag returns nothing
  757. native GetPlayerTeam takes player whichPlayer returns integer
  758. native GetPlayerStartLocation takes player whichPlayer returns integer
  759. native GetPlayerColor takes player whichPlayer returns playercolor
  760. native GetPlayerSelectable takes player whichPlayer returns boolean
  761. native GetPlayerController takes player whichPlayer returns mapcontrol
  762. native GetPlayerSlotState takes player whichPlayer returns playerslotstate
  763. native GetPlayerTaxRate takes player sourcePlayer, player otherPlayer, playerstate whichResource returns integer
  764. native IsPlayerRacePrefSet takes player whichPlayer, racepreference pref returns boolean
  765. native GetPlayerName takes player whichPlayer returns string
  766. //============================================================================
  767. // Timer API
  768. //
  769. native CreateTimer takes nothing returns timer
  770. native DestroyTimer takes timer whichTimer returns nothing
  771. native TimerStart takes timer whichTimer, real timeout, boolean periodic, code handlerFunc returns nothing
  772. native TimerGetElapsed takes timer whichTimer returns real
  773. native TimerGetRemaining takes timer whichTimer returns real
  774. native TimerGetTimeout takes timer whichTimer returns real
  775. native PauseTimer takes timer whichTimer returns nothing
  776. native ResumeTimer takes timer whichTimer returns nothing
  777. native GetExpiredTimer takes nothing returns timer
  778. //============================================================================
  779. // Group API
  780. //
  781. native CreateGroup takes nothing returns group
  782. native DestroyGroup takes group whichGroup returns nothing
  783. native GroupAddUnit takes group whichGroup, unit whichUnit returns nothing
  784. native GroupRemoveUnit takes group whichGroup, unit whichUnit returns nothing
  785. native GroupClear takes group whichGroup returns nothing
  786. native GroupEnumUnitsOfType takes group whichGroup, string unitname, boolexpr filter returns nothing
  787. native GroupEnumUnitsOfPlayer takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
  788. native GroupEnumUnitsOfTypeCounted takes group whichGroup, string unitname, boolexpr filter, integer countLimit returns nothing
  789. native GroupEnumUnitsInRect takes group whichGroup, rect r, boolexpr filter returns nothing
  790. native GroupEnumUnitsInRectCounted takes group whichGroup, rect r, boolexpr filter, integer countLimit returns nothing
  791. native GroupEnumUnitsInRange takes group whichGroup, real x, real y, real radius, boolexpr filter returns nothing
  792. native GroupEnumUnitsInRangeOfLoc takes group whichGroup, location whichLocation, real radius, boolexpr filter returns nothing
  793. native GroupEnumUnitsInRangeCounted takes group whichGroup, real x, real y, real radius, boolexpr filter, integer countLimit returns nothing
  794. native GroupEnumUnitsInRangeOfLocCounted takes group whichGroup, location whichLocation, real radius, boolexpr filter, integer countLimit returns nothing
  795. native GroupEnumUnitsSelected takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
  796. native GroupImmediateOrder takes group whichGroup, string order returns boolean
  797. native GroupImmediateOrderById takes group whichGroup, integer order returns boolean
  798. native GroupPointOrder takes group whichGroup, string order, real x, real y returns boolean
  799. native GroupPointOrderLoc takes group whichGroup, string order, location whichLocation returns boolean
  800. native GroupPointOrderById takes group whichGroup, integer order, real x, real y returns boolean
  801. native GroupPointOrderByIdLoc takes group whichGroup, integer order, location whichLocation returns boolean
  802. native GroupTargetOrder takes group whichGroup, string order, widget targetWidget returns boolean
  803. native GroupTargetOrderById takes group whichGroup, integer order, widget targetWidget returns boolean
  804. // This will be difficult to support with potentially disjoint, cell-based regions
  805. // as it would involve enumerating all the cells that are covered by a particularregion
  806. // a better implementation would be a trigger that adds relevant units as they enter
  807. // and removes them if they leave...
  808. native ForGroup takes group whichGroup, code callback returns nothing
  809. native FirstOfGroup takes group whichGroup returns unit
  810. //============================================================================
  811. // Force API
  812. //
  813. native CreateForce takes nothing returns force
  814. native DestroyForce takes force whichForce returns nothing
  815. native ForceAddPlayer takes force whichForce, player whichPlayer returns nothing
  816. native ForceRemovePlayer takes force whichForce, player whichPlayer returns nothing
  817. native ForceClear takes force whichForce returns nothing
  818. native ForceEnumPlayers takes force whichForce, boolexpr filter returns nothing
  819. native ForceEnumPlayersCounted takes force whichForce, boolexpr filter, integer countLimit returns nothing
  820. native ForceEnumAllies takes force whichForce, player whichPlayer, boolexpr filter returns nothing
  821. native ForceEnumEnemies takes force whichForce, player whichPlayer, boolexpr filter returns nothing
  822. native ForForce takes force whichForce, code callback returns nothing
  823. //============================================================================
  824. // Region and Location API
  825. //
  826. native Rect takes real minx, real miny, real maxx, real maxy returns rect
  827. native RectFromLoc takes location min, location max returns rect
  828. native RemoveRect takes rect whichRect returns nothing
  829. native SetRect takes rect whichRect, real minx, real miny, real maxx, real maxy returns nothing
  830. native SetRectFromLoc takes rect whichRect, location min, location max returns nothing
  831. native MoveRectTo takes rect whichRect, real newCenterX, real newCenterY returns nothing
  832. native MoveRectToLoc takes rect whichRect, location newCenterLoc returns nothing
  833. native GetRectCenterX takes rect whichRect returns real
  834. native GetRectCenterY takes rect whichRect returns real
  835. native GetRectMinX takes rect whichRect returns real
  836. native GetRectMinY takes rect whichRect returns real
  837. native GetRectMaxX takes rect whichRect returns real
  838. native GetRectMaxY takes rect whichRect returns real
  839. native CreateRegion takes nothing returns region
  840. native RemoveRegion takes region whichRegion returns nothing
  841. native RegionAddRect takes region whichRegion, rect r returns nothing
  842. native RegionClearRect takes region whichRegion, rect r returns nothing
  843. native RegionAddCell takes region whichRegion, real x, real y returns nothing
  844. native RegionAddCellAtLoc takes region whichRegion, location whichLocation returns nothing
  845. native RegionClearCell takes region whichRegion, real x, real y returns nothing
  846. native RegionClearCellAtLoc takes region whichRegion, location whichLocation returns nothing
  847. native Location takes real x, real y returns location
  848. native RemoveLocation takes location whichLocation returns nothing
  849. native MoveLocation takes location whichLocation, real newX, real newY returns nothing
  850. native GetLocationX takes location whichLocation returns real
  851. native GetLocationY takes location whichLocation returns real
  852. // This function is asynchronous. The values it returns are not guaranteed synchronous between each player.
  853. // If you attempt to use it in a synchronous manner, it may cause a desync.
  854. native GetLocationZ takes location whichLocation returns real
  855. native IsUnitInRegion takes region whichRegion, unit whichUnit returns boolean
  856. native IsPointInRegion takes region whichRegion, real x, real y returns boolean
  857. native IsLocationInRegion takes region whichRegion, location whichLocation returns boolean
  858. // Returns full map bounds, including unplayable borders, in world coordinates
  859. native GetWorldBounds takes nothing returns rect
  860. //============================================================================
  861. // Native trigger interface
  862. //
  863. native CreateTrigger takes nothing returns trigger
  864. native DestroyTrigger takes trigger whichTrigger returns nothing
  865. native ResetTrigger takes trigger whichTrigger returns nothing
  866. native EnableTrigger takes trigger whichTrigger returns nothing
  867. native DisableTrigger takes trigger whichTrigger returns nothing
  868. native IsTriggerEnabled takes trigger whichTrigger returns boolean
  869. native TriggerWaitOnSleeps takes trigger whichTrigger, boolean flag returns nothing
  870. native IsTriggerWaitOnSleeps takes trigger whichTrigger returns boolean
  871. constant native GetFilterUnit takes nothing returns unit
  872. constant native GetEnumUnit takes nothing returns unit
  873. constant native GetFilterDestructable takes nothing returns destructable
  874. constant native GetEnumDestructable takes nothing returns destructable
  875. constant native GetFilterItem takes nothing returns item
  876. constant native GetEnumItem takes nothing returns item
  877. constant native GetFilterPlayer takes nothing returns player
  878. constant native GetEnumPlayer takes nothing returns player
  879. constant native GetTriggeringTrigger takes nothing returns trigger
  880. constant native GetTriggerEventId takes nothing returns eventid
  881. constant native GetTriggerEvalCount takes trigger whichTrigger returns integer
  882. constant native GetTriggerExecCount takes trigger whichTrigger returns integer
  883. native ExecuteFunc takes string funcName returns nothing
  884. //============================================================================
  885. // Boolean Expr API ( for compositing trigger conditions and unit filter funcs...)
  886. //============================================================================
  887. native And takes boolexpr operandA, boolexpr operandB returns boolexpr
  888. native Or takes boolexpr operandA, boolexpr operandB returns boolexpr
  889. native Not takes boolexpr operand returns boolexpr
  890. native Condition takes code func returns conditionfunc
  891. native DestroyCondition takes conditionfunc c returns nothing
  892. native Filter takes code func returns filterfunc
  893. native DestroyFilter takes filterfunc f returns nothing
  894. native DestroyBoolExpr takes boolexpr e returns nothing
  895. //============================================================================
  896. // Trigger Game Event API
  897. //============================================================================
  898. native TriggerRegisterVariableEvent takes trigger whichTrigger, string varName, limitop opcode, real limitval returns event
  899. // EVENT_GAME_VARIABLE_LIMIT
  900. //constant native string GetTriggeringVariableName takes nothing returns string
  901. // Creates it's own timer and triggers when it expires
  902. native TriggerRegisterTimerEvent takes trigger whichTrigger, real timeout, boolean periodic returns event
  903. // Triggers when the timer you tell it about expires
  904. native TriggerRegisterTimerExpireEvent takes trigger whichTrigger, timer t returns event
  905. native TriggerRegisterGameStateEvent takes trigger whichTrigger, gamestate whichState, limitop opcode, real limitval returns event
  906. native TriggerRegisterDialogEvent takes trigger whichTrigger, dialog whichDialog returns event
  907. native TriggerRegisterDialogButtonEvent takes trigger whichTrigger, button whichButton returns event
  908. // EVENT_GAME_STATE_LIMIT
  909. constant native GetEventGameState takes nothing returns gamestate
  910. native TriggerRegisterGameEvent takes trigger whichTrigger, gameevent whichGameEvent returns event
  911. // EVENT_GAME_VICTORY
  912. constant native GetWinningPlayer takes nothing returns player
  913. native TriggerRegisterEnterRegion takes trigger whichTrigger, region whichRegion, boolexpr filter returns event
  914. // EVENT_GAME_ENTER_REGION
  915. constant native GetTriggeringRegion takes nothing returns region
  916. constant native GetEnteringUnit takes nothing returns unit
  917. // EVENT_GAME_LEAVE_REGION
  918. native TriggerRegisterLeaveRegion takes trigger whichTrigger, region whichRegion, boolexpr filter returns event
  919. constant native GetLeavingUnit takes nothing returns unit
  920. native TriggerRegisterTrackableHitEvent takes trigger whichTrigger, trackable t returns event
  921. native TriggerRegisterTrackableTrackEvent takes trigger whichTrigger, trackable t returns event
  922. // EVENT_GAME_TRACKABLE_HIT
  923. // EVENT_GAME_TRACKABLE_TRACK
  924. constant native GetTriggeringTrackable takes nothing returns trackable
  925. // EVENT_DIALOG_BUTTON_CLICK
  926. constant native GetClickedButton takes nothing returns button
  927. constant native GetClickedDialog takes nothing returns dialog
  928. // EVENT_GAME_TOURNAMENT_FINISH_SOON
  929. constant native GetTournamentFinishSoonTimeRemaining takes nothing returns real
  930. constant native GetTournamentFinishNowRule takes nothing returns integer
  931. constant native GetTournamentFinishNowPlayer takes nothing returns player
  932. constant native GetTournamentScore takes player whichPlayer returns integer
  933. // EVENT_GAME_SAVE
  934. constant native GetSaveBasicFilename takes nothing returns string
  935. //============================================================================
  936. // Trigger Player Based Event API
  937. //============================================================================
  938. native TriggerRegisterPlayerEvent takes trigger whichTrigger, player whichPlayer, playerevent whichPlayerEvent returns event
  939. // EVENT_PLAYER_DEFEAT
  940. // EVENT_PLAYER_VICTORY
  941. constant native GetTriggerPlayer takes nothing returns player
  942. native TriggerRegisterPlayerUnitEvent takes trigger whichTrigger, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event
  943. // EVENT_PLAYER_HERO_LEVEL
  944. // EVENT_UNIT_HERO_LEVEL
  945. constant native GetLevelingUnit takes nothing returns unit
  946. // EVENT_PLAYER_HERO_SKILL
  947. // EVENT_UNIT_HERO_SKILL
  948. constant native GetLearningUnit takes nothing returns unit
  949. constant native GetLearnedSkill takes nothing returns integer
  950. constant native GetLearnedSkillLevel takes nothing returns integer
  951. // EVENT_PLAYER_HERO_REVIVABLE
  952. constant native GetRevivableUnit takes nothing returns unit
  953. // EVENT_PLAYER_HERO_REVIVE_START
  954. // EVENT_PLAYER_HERO_REVIVE_CANCEL
  955. // EVENT_PLAYER_HERO_REVIVE_FINISH
  956. // EVENT_UNIT_HERO_REVIVE_START
  957. // EVENT_UNIT_HERO_REVIVE_CANCEL
  958. // EVENT_UNIT_HERO_REVIVE_FINISH
  959. constant native GetRevivingUnit takes nothing returns unit
  960. // EVENT_PLAYER_UNIT_ATTACKED
  961. constant native GetAttacker takes nothing returns unit
  962. // EVENT_PLAYER_UNIT_RESCUED
  963. constant native GetRescuer takes nothing returns unit
  964. // EVENT_PLAYER_UNIT_DEATH
  965. constant native GetDyingUnit takes nothing returns unit
  966. constant native GetKillingUnit takes nothing returns unit
  967. // EVENT_PLAYER_UNIT_DECAY
  968. constant native GetDecayingUnit takes nothing returns unit
  969. // EVENT_PLAYER_UNIT_SELECTED
  970. //constant native GetSelectedUnit takes nothing returns unit
  971. // EVENT_PLAYER_UNIT_CONSTRUCT_START
  972. constant native GetConstructingStructure takes nothing returns unit
  973. // EVENT_PLAYER_UNIT_CONSTRUCT_FINISH
  974. // EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL
  975. constant native GetCancelledStructure takes nothing returns unit
  976. constant native GetConstructedStructure takes nothing returns unit
  977. // EVENT_PLAYER_UNIT_RESEARCH_START
  978. // EVENT_PLAYER_UNIT_RESEARCH_CANCEL
  979. // EVENT_PLAYER_UNIT_RESEARCH_FINISH
  980. constant native GetResearchingUnit takes nothing returns unit
  981. constant native GetResearched takes nothing returns integer
  982. // EVENT_PLAYER_UNIT_TRAIN_START
  983. // EVENT_PLAYER_UNIT_TRAIN_CANCEL
  984. constant native GetTrainedUnitType takes nothing returns integer
  985. // EVENT_PLAYER_UNIT_TRAIN_FINISH
  986. constant native GetTrainedUnit takes nothing returns unit
  987. // EVENT_PLAYER_UNIT_DETECTED
  988. constant native GetDetectedUnit takes nothing returns unit
  989. // EVENT_PLAYER_UNIT_SUMMONED
  990. constant native GetSummoningUnit takes nothing returns unit
  991. constant native GetSummonedUnit takes nothing returns unit
  992. // EVENT_PLAYER_UNIT_LOADED
  993. constant native GetTransportUnit takes nothing returns unit
  994. constant native GetLoadedUnit takes nothing returns unit
  995. // EVENT_PLAYER_UNIT_SELL
  996. constant native GetSellingUnit takes nothing returns unit
  997. constant native GetSoldUnit takes nothing returns unit
  998. constant native GetBuyingUnit takes nothing returns unit
  999. // EVENT_PLAYER_UNIT_SELL_ITEM
  1000. constant native GetSoldItem takes nothing returns item
  1001. // EVENT_PLAYER_UNIT_CHANGE_OWNER
  1002. constant native GetChangingUnit takes nothing returns unit
  1003. constant native GetChangingUnitPrevOwner takes nothing returns player
  1004. // EVENT_PLAYER_UNIT_DROP_ITEM
  1005. // EVENT_PLAYER_UNIT_PICKUP_ITEM
  1006. // EVENT_PLAYER_UNIT_USE_ITEM
  1007. constant native GetManipulatingUnit takes nothing returns unit
  1008. constant native GetManipulatedItem takes nothing returns item
  1009. // EVENT_PLAYER_UNIT_ISSUED_ORDER
  1010. constant native GetOrderedUnit takes nothing returns unit
  1011. constant native GetIssuedOrderId takes nothing returns integer
  1012. // EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER
  1013. constant native GetOrderPointX takes nothing returns real
  1014. constant native GetOrderPointY takes nothing returns real
  1015. constant native GetOrderPointLoc takes nothing returns location
  1016. // EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER
  1017. constant native GetOrderTarget takes nothing returns widget
  1018. constant native GetOrderTargetDestructable takes nothing returns destructable
  1019. constant native GetOrderTargetItem takes nothing returns item
  1020. constant native GetOrderTargetUnit takes nothing returns unit
  1021. // EVENT_UNIT_SPELL_CHANNEL
  1022. // EVENT_UNIT_SPELL_CAST
  1023. // EVENT_UNIT_SPELL_EFFECT
  1024. // EVENT_UNIT_SPELL_FINISH
  1025. // EVENT_UNIT_SPELL_ENDCAST
  1026. // EVENT_PLAYER_UNIT_SPELL_CHANNEL
  1027. // EVENT_PLAYER_UNIT_SPELL_CAST
  1028. // EVENT_PLAYER_UNIT_SPELL_EFFECT
  1029. // EVENT_PLAYER_UNIT_SPELL_FINISH
  1030. // EVENT_PLAYER_UNIT_SPELL_ENDCAST
  1031. constant native GetSpellAbilityUnit takes nothing returns unit
  1032. constant native GetSpellAbilityId takes nothing returns integer
  1033. constant native GetSpellAbility takes nothing returns ability
  1034. constant native GetSpellTargetLoc takes nothing returns location
  1035. constant native GetSpellTargetX takes nothing returns real
  1036. constant native GetSpellTargetY takes nothing returns real
  1037. constant native GetSpellTargetDestructable takes nothing returns destructable
  1038. constant native GetSpellTargetItem takes nothing returns item
  1039. constant native GetSpellTargetUnit takes nothing returns unit
  1040. native TriggerRegisterPlayerAllianceChange takes trigger whichTrigger, player whichPlayer, alliancetype whichAlliance returns event
  1041. native TriggerRegisterPlayerStateEvent takes trigger whichTrigger, player whichPlayer, playerstate whichState, limitop opcode, real limitval returns event
  1042. // EVENT_PLAYER_STATE_LIMIT
  1043. constant native GetEventPlayerState takes nothing returns playerstate
  1044. native TriggerRegisterPlayerChatEvent takes trigger whichTrigger, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event
  1045. // EVENT_PLAYER_CHAT
  1046. // returns the actual string they typed in ( same as what you registered for
  1047. // if you required exact match )
  1048. constant native GetEventPlayerChatString takes nothing returns string
  1049. // returns the string that you registered for
  1050. constant native GetEventPlayerChatStringMatched takes nothing returns string
  1051. native TriggerRegisterDeathEvent takes trigger whichTrigger, widget whichWidget returns event
  1052. //============================================================================
  1053. // Trigger Unit Based Event API
  1054. //============================================================================
  1055. // returns handle to unit which triggered the most recent event when called from
  1056. // within a trigger action function...returns null handle when used incorrectly
  1057. constant native GetTriggerUnit takes nothing returns unit
  1058. native TriggerRegisterUnitStateEvent takes trigger whichTrigger, unit whichUnit, unitstate whichState, limitop opcode, real limitval returns event
  1059. // EVENT_UNIT_STATE_LIMIT
  1060. constant native GetEventUnitState takes nothing returns unitstate
  1061. native TriggerRegisterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent returns event
  1062. // EVENT_UNIT_DAMAGED
  1063. constant native GetEventDamage takes nothing returns real
  1064. constant native GetEventDamageSource takes nothing returns unit
  1065. // EVENT_UNIT_DEATH
  1066. // EVENT_UNIT_DECAY
  1067. // Use the GetDyingUnit and GetDecayingUnit funcs above
  1068. // EVENT_UNIT_DETECTED
  1069. constant native GetEventDetectingPlayer takes nothing returns player
  1070. native TriggerRegisterFilterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent, boolexpr filter returns event
  1071. // EVENT_UNIT_ACQUIRED_TARGET
  1072. // EVENT_UNIT_TARGET_IN_RANGE
  1073. constant native GetEventTargetUnit takes nothing returns unit
  1074. // EVENT_UNIT_ATTACKED
  1075. // Use GetAttacker from the Player Unit Event API Below...
  1076. // EVENT_UNIT_RESCUEDED
  1077. // Use GetRescuer from the Player Unit Event API Below...
  1078. // EVENT_UNIT_CONSTRUCT_CANCEL
  1079. // EVENT_UNIT_CONSTRUCT_FINISH
  1080. // See the Player Unit Construction Event API above for event info funcs
  1081. // EVENT_UNIT_TRAIN_START
  1082. // EVENT_UNIT_TRAIN_CANCELLED
  1083. // EVENT_UNIT_TRAIN_FINISH
  1084. // See the Player Unit Training Event API above for event info funcs
  1085. // EVENT_UNIT_SELL
  1086. // See the Player Unit Sell Event API above for event info funcs
  1087. // EVENT_UNIT_DROP_ITEM
  1088. // EVENT_UNIT_PICKUP_ITEM
  1089. // EVENT_UNIT_USE_ITEM
  1090. // See the Player Unit/Item manipulation Event API above for event info funcs
  1091. // EVENT_UNIT_ISSUED_ORDER
  1092. // EVENT_UNIT_ISSUED_POINT_ORDER
  1093. // EVENT_UNIT_ISSUED_TARGET_ORDER
  1094. // See the Player Unit Order Event API above for event info funcs
  1095. native TriggerRegisterUnitInRange takes trigger whichTrigger, unit whichUnit, real range, boolexpr filter returns event
  1096. native TriggerAddCondition takes trigger whichTrigger, boolexpr condition returns triggercondition
  1097. native TriggerRemoveCondition takes trigger whichTrigger, triggercondition whichCondition returns nothing
  1098. native TriggerClearConditions takes trigger whichTrigger returns nothing
  1099. native TriggerAddAction takes trigger whichTrigger, code actionFunc returns triggeraction
  1100. native TriggerRemoveAction takes trigger whichTrigger, triggeraction whichAction returns nothing
  1101. native TriggerClearActions takes trigger whichTrigger returns nothing
  1102. native TriggerSleepAction takes real timeout returns nothing
  1103. native TriggerWaitForSound takes sound s, real offset returns nothing
  1104. native TriggerEvaluate takes trigger whichTrigger returns boolean
  1105. native TriggerExecute takes trigger whichTrigger returns nothing
  1106. native TriggerExecuteWait takes trigger whichTrigger returns nothing
  1107. native TriggerSyncStart takes nothing returns nothing
  1108. native TriggerSyncReady takes nothing returns nothing
  1109. //============================================================================
  1110. // Widget API
  1111. native GetWidgetLife takes widget whichWidget returns real
  1112. native SetWidgetLife takes widget whichWidget, real newLife returns nothing
  1113. native GetWidgetX takes widget whichWidget returns real
  1114. native GetWidgetY takes widget whichWidget returns real
  1115. constant native GetTriggerWidget takes nothing returns widget
  1116. //============================================================================
  1117. // Destructable Object API
  1118. // Facing arguments are specified in degrees
  1119. native CreateDestructable takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable
  1120. native CreateDestructableZ takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable
  1121. native CreateDeadDestructable takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable
  1122. native CreateDeadDestructableZ takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable
  1123. native RemoveDestructable takes destructable d returns nothing
  1124. native KillDestructable takes destructable d returns nothing
  1125. native SetDestructableInvulnerable takes destructable d, boolean flag returns nothing
  1126. native IsDestructableInvulnerable takes destructable d returns boolean
  1127. native EnumDestructablesInRect takes rect r, boolexpr filter, code actionFunc returns nothing
  1128. native GetDestructableTypeId takes destructable d returns integer
  1129. native GetDestructableX takes destructable d returns real
  1130. native GetDestructableY takes destructable d returns real
  1131. native SetDestructableLife takes destructable d, real life returns nothing
  1132. native GetDestructableLife takes destructable d returns real
  1133. native SetDestructableMaxLife takes destructable d, real max returns nothing
  1134. native GetDestructableMaxLife takes destructable d returns real
  1135. native DestructableRestoreLife takes destructable d, real life, boolean birth returns nothing
  1136. native QueueDestructableAnimation takes destructable d, string whichAnimation returns nothing
  1137. native SetDestructableAnimation takes destructable d, string whichAnimation returns nothing
  1138. native SetDestructableAnimationSpeed takes destructable d, real speedFactor returns nothing
  1139. native ShowDestructable takes destructable d, boolean flag returns nothing
  1140. native GetDestructableOccluderHeight takes destructable d returns real
  1141. native SetDestructableOccluderHeight takes destructable d, real height returns nothing
  1142. native GetDestructableName takes destructable d returns string
  1143. constant native GetTriggerDestructable takes nothing returns destructable
  1144. //============================================================================
  1145. // Item API
  1146. native CreateItem takes integer itemid, real x, real y returns item
  1147. native RemoveItem takes item whichItem returns nothing
  1148. native GetItemPlayer takes item whichItem returns player
  1149. native GetItemTypeId takes item i returns integer
  1150. native GetItemX takes item i returns real
  1151. native GetItemY takes item i returns real
  1152. native SetItemPosition takes item i, real x, real y returns nothing
  1153. native SetItemDropOnDeath takes item whichItem, boolean flag returns nothing
  1154. native SetItemDroppable takes item i, boolean flag returns nothing
  1155. native SetItemPawnable takes item i, boolean flag returns nothing
  1156. native SetItemPlayer takes item whichItem, player whichPlayer, boolean changeColor returns nothing
  1157. native SetItemInvulnerable takes item whichItem, boolean flag returns nothing
  1158. native IsItemInvulnerable takes item whichItem returns boolean
  1159. native SetItemVisible takes item whichItem, boolean show returns nothing
  1160. native IsItemVisible takes item whichItem returns boolean
  1161. native IsItemOwned takes item whichItem returns boolean
  1162. native IsItemPowerup takes item whichItem returns boolean
  1163. native IsItemSellable takes item whichItem returns boolean
  1164. native IsItemPawnable takes item whichItem returns boolean
  1165. native IsItemIdPowerup takes integer itemId returns boolean
  1166. native IsItemIdSellable takes integer itemId returns boolean
  1167. native IsItemIdPawnable takes integer itemId returns boolean
  1168. native EnumItemsInRect takes rect r, boolexpr filter, code actionFunc returns nothing
  1169. native GetItemLevel takes item whichItem returns integer
  1170. native GetItemType takes item whichItem returns itemtype
  1171. native SetItemDropID takes item whichItem, integer unitId returns nothing
  1172. constant native GetItemName takes item whichItem returns string
  1173. native GetItemCharges takes item whichItem returns integer
  1174. native SetItemCharges takes item whichItem, integer charges returns nothing
  1175. native GetItemUserData takes item whichItem returns integer
  1176. native SetItemUserData takes item whichItem, integer data returns nothing
  1177. //============================================================================
  1178. // Unit API
  1179. // Facing arguments are specified in degrees
  1180. native CreateUnit takes player id, integer unitid, real x, real y, real face returns unit
  1181. native CreateUnitByName takes player whichPlayer, string unitname, real x, real y, real face returns unit
  1182. native CreateUnitAtLoc takes player id, integer unitid, location whichLocation, real face returns unit
  1183. native CreateUnitAtLocByName takes player id, string unitname, location whichLocation, real face returns unit
  1184. native CreateCorpse takes player whichPlayer, integer unitid, real x, real y, real face returns unit
  1185. native KillUnit takes unit whichUnit returns nothing
  1186. native RemoveUnit takes unit whichUnit returns nothing
  1187. native ShowUnit takes unit whichUnit, boolean show returns nothing
  1188. native SetUnitState takes unit whichUnit, unitstate whichUnitState, real newVal returns nothing
  1189. native SetUnitX takes unit whichUnit, real newX returns nothing
  1190. native SetUnitY takes unit whichUnit, real newY returns nothing
  1191. native SetUnitPosition takes unit whichUnit, real newX, real newY returns nothing
  1192. native SetUnitPositionLoc takes unit whichUnit, location whichLocation returns nothing
  1193. native SetUnitFacing takes unit whichUnit, real facingAngle returns nothing
  1194. native SetUnitFacingTimed takes unit whichUnit, real facingAngle, real duration returns nothing
  1195. native SetUnitMoveSpeed takes unit whichUnit, real newSpeed returns nothing
  1196. native SetUnitFlyHeight takes unit whichUnit, real newHeight, real rate returns nothing
  1197. native SetUnitTurnSpeed takes unit whichUnit, real newTurnSpeed returns nothing
  1198. native SetUnitPropWindow takes unit whichUnit, real newPropWindowAngle returns nothing
  1199. native SetUnitAcquireRange takes unit whichUnit, real newAcquireRange returns nothing
  1200. native SetUnitCreepGuard takes unit whichUnit, boolean creepGuard returns nothing
  1201. native GetUnitAcquireRange takes unit whichUnit returns real
  1202. native GetUnitTurnSpeed takes unit whichUnit returns real
  1203. native GetUnitPropWindow takes unit whichUnit returns real
  1204. native GetUnitFlyHeight takes unit whichUnit returns real
  1205. native GetUnitDefaultAcquireRange takes unit whichUnit returns real
  1206. native GetUnitDefaultTurnSpeed takes unit whichUnit returns real
  1207. native GetUnitDefaultPropWindow takes unit whichUnit returns real
  1208. native GetUnitDefaultFlyHeight takes unit whichUnit returns real
  1209. native SetUnitOwner takes unit whichUnit, player whichPlayer, boolean changeColor returns nothing
  1210. native SetUnitColor takes unit whichUnit, playercolor whichColor returns nothing
  1211. native SetUnitScale takes unit whichUnit, real scaleX, real scaleY, real scaleZ returns nothing
  1212. native SetUnitTimeScale takes unit whichUnit, real timeScale returns nothing
  1213. native SetUnitBlendTime takes unit whichUnit, real blendTime returns nothing
  1214. native SetUnitVertexColor takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing
  1215. native QueueUnitAnimation takes unit whichUnit, string whichAnimation returns nothing
  1216. native SetUnitAnimation takes unit whichUnit, string whichAnimation returns nothing
  1217. native SetUnitAnimationByIndex takes unit whichUnit, integer whichAnimation returns nothing
  1218. native SetUnitAnimationWithRarity takes unit whichUnit, string whichAnimation, raritycontrol rarity returns nothing
  1219. native AddUnitAnimationProperties takes unit whichUnit, string animProperties, boolean add returns nothing
  1220. native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
  1221. native ResetUnitLookAt takes unit whichUnit returns nothing
  1222. native SetUnitRescuable takes unit whichUnit, player byWhichPlayer, boolean flag returns nothing
  1223. native SetUnitRescueRange takes unit whichUnit, real range returns nothing
  1224. native SetHeroStr takes unit whichHero, integer newStr, boolean permanent returns nothing
  1225. native SetHeroAgi takes unit whichHero, integer newAgi, boolean permanent returns nothing
  1226. native SetHeroInt takes unit whichHero, integer newInt, boolean permanent returns nothing
  1227. native GetHeroStr takes unit whichHero, boolean includeBonuses returns integer
  1228. native GetHeroAgi takes unit whichHero, boolean includeBonuses returns integer
  1229. native GetHeroInt takes unit whichHero, boolean includeBonuses returns integer
  1230. native UnitStripHeroLevel takes unit whichHero, integer howManyLevels returns boolean
  1231. native GetHeroXP takes unit whichHero returns integer
  1232. native SetHeroXP takes unit whichHero, integer newXpVal, boolean showEyeCandy returns nothing
  1233. native GetHeroSkillPoints takes unit whichHero returns integer
  1234. native UnitModifySkillPoints takes unit whichHero, integer skillPointDelta returns boolean
  1235. native AddHeroXP takes unit whichHero, integer xpToAdd, boolean showEyeCandy returns nothing
  1236. native SetHeroLevel takes unit whichHero, integer level, boolean showEyeCandy returns nothing
  1237. constant native GetHeroLevel takes unit whichHero returns integer
  1238. constant native GetUnitLevel takes unit whichUnit returns integer
  1239. native GetHeroProperName takes unit whichHero returns string
  1240. native SuspendHeroXP takes unit whichHero, boolean flag returns nothing
  1241. native IsSuspendedXP takes unit whichHero returns boolean
  1242. native SelectHeroSkill takes unit whichHero, integer abilcode returns nothing
  1243. native GetUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  1244. native DecUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  1245. native IncUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  1246. native SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer
  1247. native ReviveHero takes unit whichHero, real x, real y, boolean doEyecandy returns boolean
  1248. native ReviveHeroLoc takes unit whichHero, location loc, boolean doEyecandy returns boolean
  1249. native SetUnitExploded takes unit whichUnit, boolean exploded returns nothing
  1250. native SetUnitInvulnerable takes unit whichUnit, boolean flag returns nothing
  1251. native PauseUnit takes unit whichUnit, boolean flag returns nothing
  1252. native IsUnitPaused takes unit whichHero returns boolean
  1253. native SetUnitPathing takes unit whichUnit, boolean flag returns nothing
  1254. native ClearSelection takes nothing returns nothing
  1255. native SelectUnit takes unit whichUnit, boolean flag returns nothing
  1256. native GetUnitPointValue takes unit whichUnit returns integer
  1257. native GetUnitPointValueByType takes integer unitType returns integer
  1258. //native SetUnitPointValueByType takes integer unitType, integer newPointValue returns nothing
  1259. native UnitAddItem takes unit whichUnit, item whichItem returns boolean
  1260. native UnitAddItemById takes unit whichUnit, integer itemId returns item
  1261. native UnitAddItemToSlotById takes unit whichUnit, integer itemId, integer itemSlot returns boolean
  1262. native UnitRemoveItem takes unit whichUnit, item whichItem returns nothing
  1263. native UnitRemoveItemFromSlot takes unit whichUnit, integer itemSlot returns item
  1264. native UnitHasItem takes unit whichUnit, item whichItem returns boolean
  1265. native UnitItemInSlot takes unit whichUnit, integer itemSlot returns item
  1266. native UnitInventorySize takes unit whichUnit returns integer
  1267. native UnitDropItemPoint takes unit whichUnit, item whichItem, real x, real y returns boolean
  1268. native UnitDropItemSlot takes unit whichUnit, item whichItem, integer slot returns boolean
  1269. native UnitDropItemTarget takes unit whichUnit, item whichItem, widget target returns boolean
  1270. native UnitUseItem takes unit whichUnit, item whichItem returns boolean
  1271. native UnitUseItemPoint takes unit whichUnit, item whichItem, real x, real y returns boolean
  1272. native UnitUseItemTarget takes unit whichUnit, item whichItem, widget target returns boolean
  1273. constant native GetUnitX takes unit whichUnit returns real
  1274. constant native GetUnitY takes unit whichUnit returns real
  1275. constant native GetUnitLoc takes unit whichUnit returns location
  1276. constant native GetUnitFacing takes unit whichUnit returns real
  1277. constant native GetUnitMoveSpeed takes unit whichUnit returns real
  1278. constant native GetUnitDefaultMoveSpeed takes unit whichUnit returns real
  1279. constant native GetUnitState takes unit whichUnit, unitstate whichUnitState returns real
  1280. constant native GetOwningPlayer takes unit whichUnit returns player
  1281. constant native GetUnitTypeId takes unit whichUnit returns integer
  1282. constant native GetUnitRace takes unit whichUnit returns race
  1283. constant native GetUnitName takes unit whichUnit returns string
  1284. constant native GetUnitFoodUsed takes unit whichUnit returns integer
  1285. constant native GetUnitFoodMade takes unit whichUnit returns integer
  1286. constant native GetFoodMade takes integer unitId returns integer
  1287. constant native GetFoodUsed takes integer unitId returns integer
  1288. native SetUnitUseFood takes unit whichUnit, boolean useFood returns nothing
  1289. constant native GetUnitRallyPoint takes unit whichUnit returns location
  1290. constant native GetUnitRallyUnit takes unit whichUnit returns unit
  1291. constant native GetUnitRallyDestructable takes unit whichUnit returns destructable
  1292. constant native IsUnitInGroup takes unit whichUnit, group whichGroup returns boolean
  1293. constant native IsUnitInForce takes unit whichUnit, force whichForce returns boolean
  1294. constant native IsUnitOwnedByPlayer takes unit whichUnit, player whichPlayer returns boolean
  1295. constant native IsUnitAlly takes unit whichUnit, player whichPlayer returns boolean
  1296. constant native IsUnitEnemy takes unit whichUnit, player whichPlayer returns boolean
  1297. constant native IsUnitVisible takes unit whichUnit, player whichPlayer returns boolean
  1298. constant native IsUnitDetected takes unit whichUnit, player whichPlayer returns boolean
  1299. constant native IsUnitInvisible takes unit whichUnit, player whichPlayer returns boolean
  1300. constant native IsUnitFogged takes unit whichUnit, player whichPlayer returns boolean
  1301. constant native IsUnitMasked takes unit whichUnit, player whichPlayer returns boolean
  1302. constant native IsUnitSelected takes unit whichUnit, player whichPlayer returns boolean
  1303. constant native IsUnitRace takes unit whichUnit, race whichRace returns boolean
  1304. constant native IsUnitType takes unit whichUnit, unittype whichUnitType returns boolean
  1305. constant native IsUnit takes unit whichUnit, unit whichSpecifiedUnit returns boolean
  1306. constant native IsUnitInRange takes unit whichUnit, unit otherUnit, real distance returns boolean
  1307. constant native IsUnitInRangeXY takes unit whichUnit, real x, real y, real distance returns boolean
  1308. constant native IsUnitInRangeLoc takes unit whichUnit, location whichLocation, real distance returns boolean
  1309. constant native IsUnitHidden takes unit whichUnit returns boolean
  1310. constant native IsUnitIllusion takes unit whichUnit returns boolean
  1311. constant native IsUnitInTransport takes unit whichUnit, unit whichTransport returns boolean
  1312. constant native IsUnitLoaded takes unit whichUnit returns boolean
  1313. constant native IsHeroUnitId takes integer unitId returns boolean
  1314. constant native IsUnitIdType takes integer unitId, unittype whichUnitType returns boolean
  1315. native UnitShareVision takes unit whichUnit, player whichPlayer, boolean share returns nothing
  1316. native UnitSuspendDecay takes unit whichUnit, boolean suspend returns nothing
  1317. native UnitAddType takes unit whichUnit, unittype whichUnitType returns boolean
  1318. native UnitRemoveType takes unit whichUnit, unittype whichUnitType returns boolean
  1319. native UnitAddAbility takes unit whichUnit, integer abilityId returns boolean
  1320. native UnitRemoveAbility takes unit whichUnit, integer abilityId returns boolean
  1321. native UnitMakeAbilityPermanent takes unit whichUnit, boolean permanent, integer abilityId returns boolean
  1322. native UnitRemoveBuffs takes unit whichUnit, boolean removePositive, boolean removeNegative returns nothing
  1323. native UnitRemoveBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing
  1324. native UnitHasBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns boolean
  1325. native UnitCountBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns integer
  1326. native UnitAddSleep takes unit whichUnit, boolean add returns nothing
  1327. native UnitCanSleep takes unit whichUnit returns boolean
  1328. native UnitAddSleepPerm takes unit whichUnit, boolean add returns nothing
  1329. native UnitCanSleepPerm takes unit whichUnit returns boolean
  1330. native UnitIsSleeping takes unit whichUnit returns boolean
  1331. native UnitWakeUp takes unit whichUnit returns nothing
  1332. native UnitApplyTimedLife takes unit whichUnit, integer buffId, real duration returns nothing
  1333. native UnitIgnoreAlarm takes unit whichUnit, boolean flag returns boolean
  1334. native UnitIgnoreAlarmToggled takes unit whichUnit returns boolean
  1335. native UnitResetCooldown takes unit whichUnit returns nothing
  1336. native UnitSetConstructionProgress takes unit whichUnit, integer constructionPercentage returns nothing
  1337. native UnitSetUpgradeProgress takes unit whichUnit, integer upgradePercentage returns nothing
  1338. native UnitPauseTimedLife takes unit whichUnit, boolean flag returns nothing
  1339. native UnitSetUsesAltIcon takes unit whichUnit, boolean flag returns nothing
  1340. native UnitDamagePoint takes unit whichUnit, real delay, real radius, real x, real y, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean
  1341. native UnitDamageTarget takes unit whichUnit, widget target, real amount, boolean attack, boolean ranged, attacktype attackType, damagetype damageType, weapontype weaponType returns boolean
  1342. native IssueImmediateOrder takes unit whichUnit, string order returns boolean
  1343. native IssueImmediateOrderById takes unit whichUnit, integer order returns boolean
  1344. native IssuePointOrder takes unit whichUnit, string order, real x, real y returns boolean
  1345. native IssuePointOrderLoc takes unit whichUnit, string order, location whichLocation returns boolean
  1346. native IssuePointOrderById takes unit whichUnit, integer order, real x, real y returns boolean
  1347. native IssuePointOrderByIdLoc takes unit whichUnit, integer order, location whichLocation returns boolean
  1348. native IssueTargetOrder takes unit whichUnit, string order, widget targetWidget returns boolean
  1349. native IssueTargetOrderById takes unit whichUnit, integer order, widget targetWidget returns boolean
  1350. native IssueInstantPointOrder takes unit whichUnit, string order, real x, real y, widget instantTargetWidget returns boolean
  1351. native IssueInstantPointOrderById takes unit whichUnit, integer order, real x, real y, widget instantTargetWidget returns boolean
  1352. native IssueInstantTargetOrder takes unit whichUnit, string order, widget targetWidget, widget instantTargetWidget returns boolean
  1353. native IssueInstantTargetOrderById takes unit whichUnit, integer order, widget targetWidget, widget instantTargetWidget returns boolean
  1354. native IssueBuildOrder takes unit whichPeon, string unitToBuild, real x, real y returns boolean
  1355. native IssueBuildOrderById takes unit whichPeon, integer unitId, real x, real y returns boolean
  1356. native IssueNeutralImmediateOrder takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean
  1357. native IssueNeutralImmediateOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId returns boolean
  1358. native IssueNeutralPointOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, real x, real y returns boolean
  1359. native IssueNeutralPointOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId, real x, real y returns boolean
  1360. native IssueNeutralTargetOrder takes player forWhichPlayer,unit neutralStructure, string unitToBuild, widget target returns boolean
  1361. native IssueNeutralTargetOrderById takes player forWhichPlayer,unit neutralStructure, integer unitId, widget target returns boolean
  1362. native GetUnitCurrentOrder takes unit whichUnit returns integer
  1363. native SetResourceAmount takes unit whichUnit, integer amount returns nothing
  1364. native AddResourceAmount takes unit whichUnit, integer amount returns nothing
  1365. native GetResourceAmount takes unit whichUnit returns integer
  1366. native WaygateGetDestinationX takes unit waygate returns real
  1367. native WaygateGetDestinationY takes unit waygate returns real
  1368. native WaygateSetDestination takes unit waygate, real x, real y returns nothing
  1369. native WaygateActivate takes unit waygate, boolean activate returns nothing
  1370. native WaygateIsActive takes unit waygate returns boolean
  1371. native AddItemToAllStock takes integer itemId, integer currentStock, integer stockMax returns nothing
  1372. native AddItemToStock takes unit whichUnit, integer itemId, integer currentStock, integer stockMax returns nothing
  1373. native AddUnitToAllStock takes integer unitId, integer currentStock, integer stockMax returns nothing
  1374. native AddUnitToStock takes unit whichUnit, integer unitId, integer currentStock, integer stockMax returns nothing
  1375. native RemoveItemFromAllStock takes integer itemId returns nothing
  1376. native RemoveItemFromStock takes unit whichUnit, integer itemId returns nothing
  1377. native RemoveUnitFromAllStock takes integer unitId returns nothing
  1378. native RemoveUnitFromStock takes unit whichUnit, integer unitId returns nothing
  1379. native SetAllItemTypeSlots takes integer slots returns nothing
  1380. native SetAllUnitTypeSlots takes integer slots returns nothing
  1381. native SetItemTypeSlots takes unit whichUnit, integer slots returns nothing
  1382. native SetUnitTypeSlots takes unit whichUnit, integer slots returns nothing
  1383. native GetUnitUserData takes unit whichUnit returns integer
  1384. native SetUnitUserData takes unit whichUnit, integer data returns nothing
  1385. //============================================================================
  1386. // Player API
  1387. constant native Player takes integer number returns player
  1388. constant native GetLocalPlayer takes nothing returns player
  1389. constant native IsPlayerAlly takes player whichPlayer, player otherPlayer returns boolean
  1390. constant native IsPlayerEnemy takes player whichPlayer, player otherPlayer returns boolean
  1391. constant native IsPlayerInForce takes player whichPlayer, force whichForce returns boolean
  1392. constant native IsPlayerObserver takes player whichPlayer returns boolean
  1393. constant native IsVisibleToPlayer takes real x, real y, player whichPlayer returns boolean
  1394. constant native IsLocationVisibleToPlayer takes location whichLocation, player whichPlayer returns boolean
  1395. constant native IsFoggedToPlayer takes real x, real y, player whichPlayer returns boolean
  1396. constant native IsLocationFoggedToPlayer takes location whichLocation, player whichPlayer returns boolean
  1397. constant native IsMaskedToPlayer takes real x, real y, player whichPlayer returns boolean
  1398. constant native IsLocationMaskedToPlayer takes location whichLocation, player whichPlayer returns boolean
  1399. constant native GetPlayerRace takes player whichPlayer returns race
  1400. constant native GetPlayerId takes player whichPlayer returns integer
  1401. constant native GetPlayerUnitCount takes player whichPlayer, boolean includeIncomplete returns integer
  1402. constant native GetPlayerTypedUnitCount takes player whichPlayer, string unitName, boolean includeIncomplete, boolean includeUpgrades returns integer
  1403. constant native GetPlayerStructureCount takes player whichPlayer, boolean includeIncomplete returns integer
  1404. constant native GetPlayerState takes player whichPlayer, playerstate whichPlayerState returns integer
  1405. constant native GetPlayerScore takes player whichPlayer, playerscore whichPlayerScore returns integer
  1406. constant native GetPlayerAlliance takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting returns boolean
  1407. constant native GetPlayerHandicap takes player whichPlayer returns real
  1408. constant native GetPlayerHandicapXP takes player whichPlayer returns real
  1409. constant native SetPlayerHandicap takes player whichPlayer, real handicap returns nothing
  1410. constant native SetPlayerHandicapXP takes player whichPlayer, real handicap returns nothing
  1411. constant native SetPlayerTechMaxAllowed takes player whichPlayer, integer techid, integer maximum returns nothing
  1412. constant native GetPlayerTechMaxAllowed takes player whichPlayer, integer techid returns integer
  1413. constant native AddPlayerTechResearched takes player whichPlayer, integer techid, integer levels returns nothing
  1414. constant native SetPlayerTechResearched takes player whichPlayer, integer techid, integer setToLevel returns nothing
  1415. constant native GetPlayerTechResearched takes player whichPlayer, integer techid, boolean specificonly returns boolean
  1416. constant native GetPlayerTechCount takes player whichPlayer, integer techid, boolean specificonly returns integer
  1417. native SetPlayerUnitsOwner takes player whichPlayer, integer newOwner returns nothing
  1418. native CripplePlayer takes player whichPlayer, force toWhichPlayers, boolean flag returns nothing
  1419. native SetPlayerAbilityAvailable takes player whichPlayer, integer abilid, boolean avail returns nothing
  1420. native SetPlayerState takes player whichPlayer, playerstate whichPlayerState, integer value returns nothing
  1421. native RemovePlayer takes player whichPlayer, playergameresult gameResult returns nothing
  1422. // Used to store hero level data for the scorescreen
  1423. // before units are moved to neutral passive in melee games
  1424. //
  1425. native CachePlayerHeroData takes player whichPlayer returns nothing
  1426. //============================================================================
  1427. // Fog of War API
  1428. native SetFogStateRect takes player forWhichPlayer, fogstate whichState, rect where, boolean useSharedVision returns nothing
  1429. native SetFogStateRadius takes player forWhichPlayer, fogstate whichState, real centerx, real centerY, real radius, boolean useSharedVision returns nothing
  1430. native SetFogStateRadiusLoc takes player forWhichPlayer, fogstate whichState, location center, real radius, boolean useSharedVision returns nothing
  1431. native FogMaskEnable takes boolean enable returns nothing
  1432. native IsFogMaskEnabled takes nothing returns boolean
  1433. native FogEnable takes boolean enable returns nothing
  1434. native IsFogEnabled takes nothing returns boolean
  1435. native CreateFogModifierRect takes player forWhichPlayer, fogstate whichState, rect where, boolean useSharedVision, boolean afterUnits returns fogmodifier
  1436. native CreateFogModifierRadius takes player forWhichPlayer, fogstate whichState, real centerx, real centerY, real radius, boolean useSharedVision, boolean afterUnits returns fogmodifier
  1437. native CreateFogModifierRadiusLoc takes player forWhichPlayer, fogstate whichState, location center, real radius, boolean useSharedVision, boolean afterUnits returns fogmodifier
  1438. native DestroyFogModifier takes fogmodifier whichFogModifier returns nothing
  1439. native FogModifierStart takes fogmodifier whichFogModifier returns nothing
  1440. native FogModifierStop takes fogmodifier whichFogModifier returns nothing
  1441. //============================================================================
  1442. // Game API
  1443. native VersionGet takes nothing returns version
  1444. native VersionCompatible takes version whichVersion returns boolean
  1445. native VersionSupported takes version whichVersion returns boolean
  1446. native EndGame takes boolean doScoreScreen returns nothing
  1447. // Async only!
  1448. native ChangeLevel takes string newLevel, boolean doScoreScreen returns nothing
  1449. native RestartGame takes boolean doScoreScreen returns nothing
  1450. native ReloadGame takes nothing returns nothing
  1451. // %%% SetCampaignMenuRace is deprecated. It must remain to support
  1452. // old maps which use it, but all new maps should use SetCampaignMenuRaceEx
  1453. native SetCampaignMenuRace takes race r returns nothing
  1454. native SetCampaignMenuRaceEx takes integer campaignIndex returns nothing
  1455. native ForceCampaignSelectScreen takes nothing returns nothing
  1456. native LoadGame takes string saveFileName, boolean doScoreScreen returns nothing
  1457. native SaveGame takes string saveFileName returns nothing
  1458. native RenameSaveDirectory takes string sourceDirName, string destDirName returns boolean
  1459. native RemoveSaveDirectory takes string sourceDirName returns boolean
  1460. native CopySaveGame takes string sourceSaveName, string destSaveName returns boolean
  1461. native SaveGameExists takes string saveName returns boolean
  1462. native SyncSelections takes nothing returns nothing
  1463. native SetFloatGameState takes fgamestate whichFloatGameState, real value returns nothing
  1464. constant native GetFloatGameState takes fgamestate whichFloatGameState returns real
  1465. native SetIntegerGameState takes igamestate whichIntegerGameState, integer value returns nothing
  1466. constant native GetIntegerGameState takes igamestate whichIntegerGameState returns integer
  1467. //============================================================================
  1468. // Campaign API
  1469. native SetTutorialCleared takes boolean cleared returns nothing
  1470. native SetMissionAvailable takes integer campaignNumber, integer missionNumber, boolean available returns nothing
  1471. native SetCampaignAvailable takes integer campaignNumber, boolean available returns nothing
  1472. native SetOpCinematicAvailable takes integer campaignNumber, boolean available returns nothing
  1473. native SetEdCinematicAvailable takes integer campaignNumber, boolean available returns nothing
  1474. native GetDefaultDifficulty takes nothing returns gamedifficulty
  1475. native SetDefaultDifficulty takes gamedifficulty g returns nothing
  1476. native SetCustomCampaignButtonVisible takes integer whichButton, boolean visible returns nothing
  1477. native GetCustomCampaignButtonVisible takes integer whichButton returns boolean
  1478. native DoNotSaveReplay takes nothing returns nothing
  1479. //============================================================================
  1480. // Dialog API
  1481. native DialogCreate takes nothing returns dialog
  1482. native DialogDestroy takes dialog whichDialog returns nothing
  1483. native DialogClear takes dialog whichDialog returns nothing
  1484. native DialogSetMessage takes dialog whichDialog, string messageText returns nothing
  1485. native DialogAddButton takes dialog whichDialog, string buttonText, integer hotkey returns button
  1486. native DialogAddQuitButton takes dialog whichDialog, boolean doScoreScreen, string buttonText, integer hotkey returns button
  1487. native DialogDisplay takes player whichPlayer, dialog whichDialog, boolean flag returns nothing
  1488. // Creates a new or reads in an existing game cache file stored
  1489. // in the current campaign profile dir
  1490. //
  1491. native ReloadGameCachesFromDisk takes nothing returns boolean
  1492. native InitGameCache takes string campaignFile returns gamecache
  1493. native SaveGameCache takes gamecache whichCache returns boolean
  1494. native StoreInteger takes gamecache cache, string missionKey, string key, integer value returns nothing
  1495. native StoreReal takes gamecache cache, string missionKey, string key, real value returns nothing
  1496. native StoreBoolean takes gamecache cache, string missionKey, string key, boolean value returns nothing
  1497. native StoreUnit takes gamecache cache, string missionKey, string key, unit whichUnit returns boolean
  1498. native StoreString takes gamecache cache, string missionKey, string key, string value returns boolean
  1499. native SyncStoredInteger takes gamecache cache, string missionKey, string key returns nothing
  1500. native SyncStoredReal takes gamecache cache, string missionKey, string key returns nothing
  1501. native SyncStoredBoolean takes gamecache cache, string missionKey, string key returns nothing
  1502. native SyncStoredUnit takes gamecache cache, string missionKey, string key returns nothing
  1503. native SyncStoredString takes gamecache cache, string missionKey, string key returns nothing
  1504. native HaveStoredInteger takes gamecache cache, string missionKey, string key returns boolean
  1505. native HaveStoredReal takes gamecache cache, string missionKey, string key returns boolean
  1506. native HaveStoredBoolean takes gamecache cache, string missionKey, string key returns boolean
  1507. native HaveStoredUnit takes gamecache cache, string missionKey, string key returns boolean
  1508. native HaveStoredString takes gamecache cache, string missionKey, string key returns boolean
  1509. native FlushGameCache takes gamecache cache returns nothing
  1510. native FlushStoredMission takes gamecache cache, string missionKey returns nothing
  1511. native FlushStoredInteger takes gamecache cache, string missionKey, string key returns nothing
  1512. native FlushStoredReal takes gamecache cache, string missionKey, string key returns nothing
  1513. native FlushStoredBoolean takes gamecache cache, string missionKey, string key returns nothing
  1514. native FlushStoredUnit takes gamecache cache, string missionKey, string key returns nothing
  1515. native FlushStoredString takes gamecache cache, string missionKey, string key returns nothing
  1516. // Will return 0 if the specified value's data is not found in the cache
  1517. native GetStoredInteger takes gamecache cache, string missionKey, string key returns integer
  1518. native GetStoredReal takes gamecache cache, string missionKey, string key returns real
  1519. native GetStoredBoolean takes gamecache cache, string missionKey, string key returns boolean
  1520. native GetStoredString takes gamecache cache, string missionKey, string key returns string
  1521. native RestoreUnit takes gamecache cache, string missionKey, string key, player forWhichPlayer, real x, real y, real facing returns unit
  1522. native InitHashtable takes nothing returns hashtable
  1523. native SaveInteger takes hashtable table, integer parentKey, integer childKey, integer value returns nothing
  1524. native SaveReal takes hashtable table, integer parentKey, integer childKey, real value returns nothing
  1525. native SaveBoolean takes hashtable table, integer parentKey, integer childKey, boolean value returns nothing
  1526. native SaveStr takes hashtable table, integer parentKey, integer childKey, string value returns boolean
  1527. native SavePlayerHandle takes hashtable table, integer parentKey, integer childKey, player whichPlayer returns boolean
  1528. native SaveWidgetHandle takes hashtable table, integer parentKey, integer childKey, widget whichWidget returns boolean
  1529. native SaveDestructableHandle takes hashtable table, integer parentKey, integer childKey, destructable whichDestructable returns boolean
  1530. native SaveItemHandle takes hashtable table, integer parentKey, integer childKey, item whichItem returns boolean
  1531. native SaveUnitHandle takes hashtable table, integer parentKey, integer childKey, unit whichUnit returns boolean
  1532. native SaveAbilityHandle takes hashtable table, integer parentKey, integer childKey, ability whichAbility returns boolean
  1533. native SaveTimerHandle takes hashtable table, integer parentKey, integer childKey, timer whichTimer returns boolean
  1534. native SaveTriggerHandle takes hashtable table, integer parentKey, integer childKey, trigger whichTrigger returns boolean
  1535. native SaveTriggerConditionHandle takes hashtable table, integer parentKey, integer childKey, triggercondition whichTriggercondition returns boolean
  1536. native SaveTriggerActionHandle takes hashtable table, integer parentKey, integer childKey, triggeraction whichTriggeraction returns boolean
  1537. native SaveTriggerEventHandle takes hashtable table, integer parentKey, integer childKey, event whichEvent returns boolean
  1538. native SaveForceHandle takes hashtable table, integer parentKey, integer childKey, force whichForce returns boolean
  1539. native SaveGroupHandle takes hashtable table, integer parentKey, integer childKey, group whichGroup returns boolean
  1540. native SaveLocationHandle takes hashtable table, integer parentKey, integer childKey, location whichLocation returns boolean
  1541. native SaveRectHandle takes hashtable table, integer parentKey, integer childKey, rect whichRect returns boolean
  1542. native SaveBooleanExprHandle takes hashtable table, integer parentKey, integer childKey, boolexpr whichBoolexpr returns boolean
  1543. native SaveSoundHandle takes hashtable table, integer parentKey, integer childKey, sound whichSound returns boolean
  1544. native SaveEffectHandle takes hashtable table, integer parentKey, integer childKey, effect whichEffect returns boolean
  1545. native SaveUnitPoolHandle takes hashtable table, integer parentKey, integer childKey, unitpool whichUnitpool returns boolean
  1546. native SaveItemPoolHandle takes hashtable table, integer parentKey, integer childKey, itempool whichItempool returns boolean
  1547. native SaveQuestHandle takes hashtable table, integer parentKey, integer childKey, quest whichQuest returns boolean
  1548. native SaveQuestItemHandle takes hashtable table, integer parentKey, integer childKey, questitem whichQuestitem returns boolean
  1549. native SaveDefeatConditionHandle takes hashtable table, integer parentKey, integer childKey, defeatcondition whichDefeatcondition returns boolean
  1550. native SaveTimerDialogHandle takes hashtable table, integer parentKey, integer childKey, timerdialog whichTimerdialog returns boolean
  1551. native SaveLeaderboardHandle takes hashtable table, integer parentKey, integer childKey, leaderboard whichLeaderboard returns boolean
  1552. native SaveMultiboardHandle takes hashtable table, integer parentKey, integer childKey, multiboard whichMultiboard returns boolean
  1553. native SaveMultiboardItemHandle takes hashtable table, integer parentKey, integer childKey, multiboarditem whichMultiboarditem returns boolean
  1554. native SaveTrackableHandle takes hashtable table, integer parentKey, integer childKey, trackable whichTrackable returns boolean
  1555. native SaveDialogHandle takes hashtable table, integer parentKey, integer childKey, dialog whichDialog returns boolean
  1556. native SaveButtonHandle takes hashtable table, integer parentKey, integer childKey, button whichButton returns boolean
  1557. native SaveTextTagHandle takes hashtable table, integer parentKey, integer childKey, texttag whichTexttag returns boolean
  1558. native SaveLightningHandle takes hashtable table, integer parentKey, integer childKey, lightning whichLightning returns boolean
  1559. native SaveImageHandle takes hashtable table, integer parentKey, integer childKey, image whichImage returns boolean
  1560. native SaveUbersplatHandle takes hashtable table, integer parentKey, integer childKey, ubersplat whichUbersplat returns boolean
  1561. native SaveRegionHandle takes hashtable table, integer parentKey, integer childKey, region whichRegion returns boolean
  1562. native SaveFogStateHandle takes hashtable table, integer parentKey, integer childKey, fogstate whichFogState returns boolean
  1563. native SaveFogModifierHandle takes hashtable table, integer parentKey, integer childKey, fogmodifier whichFogModifier returns boolean
  1564. native SaveAgentHandle takes hashtable table, integer parentKey, integer childKey, agent whichAgent returns boolean
  1565. native SaveHashtableHandle takes hashtable table, integer parentKey, integer childKey, hashtable whichHashtable returns boolean
  1566. native LoadInteger takes hashtable table, integer parentKey, integer childKey returns integer
  1567. native LoadReal takes hashtable table, integer parentKey, integer childKey returns real
  1568. native LoadBoolean takes hashtable table, integer parentKey, integer childKey returns boolean
  1569. native LoadStr takes hashtable table, integer parentKey, integer childKey returns string
  1570. native LoadPlayerHandle takes hashtable table, integer parentKey, integer childKey returns player
  1571. native LoadWidgetHandle takes hashtable table, integer parentKey, integer childKey returns widget
  1572. native LoadDestructableHandle takes hashtable table, integer parentKey, integer childKey returns destructable
  1573. native LoadItemHandle takes hashtable table, integer parentKey, integer childKey returns item
  1574. native LoadUnitHandle takes hashtable table, integer parentKey, integer childKey returns unit
  1575. native LoadAbilityHandle takes hashtable table, integer parentKey, integer childKey returns ability
  1576. native LoadTimerHandle takes hashtable table, integer parentKey, integer childKey returns timer
  1577. native LoadTriggerHandle takes hashtable table, integer parentKey, integer childKey returns trigger
  1578. native LoadTriggerConditionHandle takes hashtable table, integer parentKey, integer childKey returns triggercondition
  1579. native LoadTriggerActionHandle takes hashtable table, integer parentKey, integer childKey returns triggeraction
  1580. native LoadTriggerEventHandle takes hashtable table, integer parentKey, integer childKey returns event
  1581. native LoadForceHandle takes hashtable table, integer parentKey, integer childKey returns force
  1582. native LoadGroupHandle takes hashtable table, integer parentKey, integer childKey returns group
  1583. native LoadLocationHandle takes hashtable table, integer parentKey, integer childKey returns location
  1584. native LoadRectHandle takes hashtable table, integer parentKey, integer childKey returns rect
  1585. native LoadBooleanExprHandle takes hashtable table, integer parentKey, integer childKey returns boolexpr
  1586. native LoadSoundHandle takes hashtable table, integer parentKey, integer childKey returns sound
  1587. native LoadEffectHandle takes hashtable table, integer parentKey, integer childKey returns effect
  1588. native LoadUnitPoolHandle takes hashtable table, integer parentKey, integer childKey returns unitpool
  1589. native LoadItemPoolHandle takes hashtable table, integer parentKey, integer childKey returns itempool
  1590. native LoadQuestHandle takes hashtable table, integer parentKey, integer childKey returns quest
  1591. native LoadQuestItemHandle takes hashtable table, integer parentKey, integer childKey returns questitem
  1592. native LoadDefeatConditionHandle takes hashtable table, integer parentKey, integer childKey returns defeatcondition
  1593. native LoadTimerDialogHandle takes hashtable table, integer parentKey, integer childKey returns timerdialog
  1594. native LoadLeaderboardHandle takes hashtable table, integer parentKey, integer childKey returns leaderboard
  1595. native LoadMultiboardHandle takes hashtable table, integer parentKey, integer childKey returns multiboard
  1596. native LoadMultiboardItemHandle takes hashtable table, integer parentKey, integer childKey returns multiboarditem
  1597. native LoadTrackableHandle takes hashtable table, integer parentKey, integer childKey returns trackable
  1598. native LoadDialogHandle takes hashtable table, integer parentKey, integer childKey returns dialog
  1599. native LoadButtonHandle takes hashtable table, integer parentKey, integer childKey returns button
  1600. native LoadTextTagHandle takes hashtable table, integer parentKey, integer childKey returns texttag
  1601. native LoadLightningHandle takes hashtable table, integer parentKey, integer childKey returns lightning
  1602. native LoadImageHandle takes hashtable table, integer parentKey, integer childKey returns image
  1603. native LoadUbersplatHandle takes hashtable table, integer parentKey, integer childKey returns ubersplat
  1604. native LoadRegionHandle takes hashtable table, integer parentKey, integer childKey returns region
  1605. native LoadFogStateHandle takes hashtable table, integer parentKey, integer childKey returns fogstate
  1606. native LoadFogModifierHandle takes hashtable table, integer parentKey, integer childKey returns fogmodifier
  1607. native LoadHashtableHandle takes hashtable table, integer parentKey, integer childKey returns hashtable
  1608. native HaveSavedInteger takes hashtable table, integer parentKey, integer childKey returns boolean
  1609. native HaveSavedReal takes hashtable table, integer parentKey, integer childKey returns boolean
  1610. native HaveSavedBoolean takes hashtable table, integer parentKey, integer childKey returns boolean
  1611. native HaveSavedString takes hashtable table, integer parentKey, integer childKey returns boolean
  1612. native HaveSavedHandle takes hashtable table, integer parentKey, integer childKey returns boolean
  1613. native RemoveSavedInteger takes hashtable table, integer parentKey, integer childKey returns nothing
  1614. native RemoveSavedReal takes hashtable table, integer parentKey, integer childKey returns nothing
  1615. native RemoveSavedBoolean takes hashtable table, integer parentKey, integer childKey returns nothing
  1616. native RemoveSavedString takes hashtable table, integer parentKey, integer childKey returns nothing
  1617. native RemoveSavedHandle takes hashtable table, integer parentKey, integer childKey returns nothing
  1618. native FlushParentHashtable takes hashtable table returns nothing
  1619. native FlushChildHashtable takes hashtable table, integer parentKey returns nothing
  1620. //============================================================================
  1621. // Randomization API
  1622. native GetRandomInt takes integer lowBound, integer highBound returns integer
  1623. native GetRandomReal takes real lowBound, real highBound returns real
  1624. native CreateUnitPool takes nothing returns unitpool
  1625. native DestroyUnitPool takes unitpool whichPool returns nothing
  1626. native UnitPoolAddUnitType takes unitpool whichPool, integer unitId, real weight returns nothing
  1627. native UnitPoolRemoveUnitType takes unitpool whichPool, integer unitId returns nothing
  1628. native PlaceRandomUnit takes unitpool whichPool, player forWhichPlayer, real x, real y, real facing returns unit
  1629. native CreateItemPool takes nothing returns itempool
  1630. native DestroyItemPool takes itempool whichItemPool returns nothing
  1631. native ItemPoolAddItemType takes itempool whichItemPool, integer itemId, real weight returns nothing
  1632. native ItemPoolRemoveItemType takes itempool whichItemPool, integer itemId returns nothing
  1633. native PlaceRandomItem takes itempool whichItemPool, real x, real y returns item
  1634. // Choose any random unit/item. (NP means Neutral Passive)
  1635. native ChooseRandomCreep takes integer level returns integer
  1636. native ChooseRandomNPBuilding takes nothing returns integer
  1637. native ChooseRandomItem takes integer level returns integer
  1638. native ChooseRandomItemEx takes itemtype whichType, integer level returns integer
  1639. native SetRandomSeed takes integer seed returns nothing
  1640. //============================================================================
  1641. // Visual API
  1642. native SetTerrainFog takes real a, real b, real c, real d, real e returns nothing
  1643. native ResetTerrainFog takes nothing returns nothing
  1644. native SetUnitFog takes real a, real b, real c, real d, real e returns nothing
  1645. native SetTerrainFogEx takes integer style, real zstart, real zend, real density, real red, real green, real blue returns nothing
  1646. native DisplayTextToPlayer takes player toPlayer, real x, real y, string message returns nothing
  1647. native DisplayTimedTextToPlayer takes player toPlayer, real x, real y, real duration, string message returns nothing
  1648. native DisplayTimedTextFromPlayer takes player toPlayer, real x, real y, real duration, string message returns nothing
  1649. native ClearTextMessages takes nothing returns nothing
  1650. native SetDayNightModels takes string terrainDNCFile, string unitDNCFile returns nothing
  1651. native SetSkyModel takes string skyModelFile returns nothing
  1652. native EnableUserControl takes boolean b returns nothing
  1653. native EnableUserUI takes boolean b returns nothing
  1654. native SuspendTimeOfDay takes boolean b returns nothing
  1655. native SetTimeOfDayScale takes real r returns nothing
  1656. native GetTimeOfDayScale takes nothing returns real
  1657. native ShowInterface takes boolean flag, real fadeDuration returns nothing
  1658. native PauseGame takes boolean flag returns nothing
  1659. native UnitAddIndicator takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing
  1660. native AddIndicator takes widget whichWidget, integer red, integer green, integer blue, integer alpha returns nothing
  1661. native PingMinimap takes real x, real y, real duration returns nothing
  1662. native PingMinimapEx takes real x, real y, real duration, integer red, integer green, integer blue, boolean extraEffects returns nothing
  1663. native EnableOcclusion takes boolean flag returns nothing
  1664. native SetIntroShotText takes string introText returns nothing
  1665. native SetIntroShotModel takes string introModelPath returns nothing
  1666. native EnableWorldFogBoundary takes boolean b returns nothing
  1667. native PlayModelCinematic takes string modelName returns nothing
  1668. native PlayCinematic takes string movieName returns nothing
  1669. native ForceUIKey takes string key returns nothing
  1670. native ForceUICancel takes nothing returns nothing
  1671. native DisplayLoadDialog takes nothing returns nothing
  1672. native SetAltMinimapIcon takes string iconPath returns nothing
  1673. native DisableRestartMission takes boolean flag returns nothing
  1674. native CreateTextTag takes nothing returns texttag
  1675. native DestroyTextTag takes texttag t returns nothing
  1676. native SetTextTagText takes texttag t, string s, real height returns nothing
  1677. native SetTextTagPos takes texttag t, real x, real y, real heightOffset returns nothing
  1678. native SetTextTagPosUnit takes texttag t, unit whichUnit, real heightOffset returns nothing
  1679. native SetTextTagColor takes texttag t, integer red, integer green, integer blue, integer alpha returns nothing
  1680. native SetTextTagVelocity takes texttag t, real xvel, real yvel returns nothing
  1681. native SetTextTagVisibility takes texttag t, boolean flag returns nothing
  1682. native SetTextTagSuspended takes texttag t, boolean flag returns nothing
  1683. native SetTextTagPermanent takes texttag t, boolean flag returns nothing
  1684. native SetTextTagAge takes texttag t, real age returns nothing
  1685. native SetTextTagLifespan takes texttag t, real lifespan returns nothing
  1686. native SetTextTagFadepoint takes texttag t, real fadepoint returns nothing
  1687. native SetReservedLocalHeroButtons takes integer reserved returns nothing
  1688. native GetAllyColorFilterState takes nothing returns integer
  1689. native SetAllyColorFilterState takes integer state returns nothing
  1690. native GetCreepCampFilterState takes nothing returns boolean
  1691. native SetCreepCampFilterState takes boolean state returns nothing
  1692. native EnableMinimapFilterButtons takes boolean enableAlly, boolean enableCreep returns nothing
  1693. native EnableDragSelect takes boolean state, boolean ui returns nothing
  1694. native EnablePreSelect takes boolean state, boolean ui returns nothing
  1695. native EnableSelect takes boolean state, boolean ui returns nothing
  1696. //============================================================================
  1697. // Trackable API
  1698. native CreateTrackable takes string trackableModelPath, real x, real y, real facing returns trackable
  1699. //============================================================================
  1700. // Quest API
  1701. native CreateQuest takes nothing returns quest
  1702. native DestroyQuest takes quest whichQuest returns nothing
  1703. native QuestSetTitle takes quest whichQuest, string title returns nothing
  1704. native QuestSetDescription takes quest whichQuest, string description returns nothing
  1705. native QuestSetIconPath takes quest whichQuest, string iconPath returns nothing
  1706. native QuestSetRequired takes quest whichQuest, boolean required returns nothing
  1707. native QuestSetCompleted takes quest whichQuest, boolean completed returns nothing
  1708. native QuestSetDiscovered takes quest whichQuest, boolean discovered returns nothing
  1709. native QuestSetFailed takes quest whichQuest, boolean failed returns nothing
  1710. native QuestSetEnabled takes quest whichQuest, boolean enabled returns nothing
  1711. native IsQuestRequired takes quest whichQuest returns boolean
  1712. native IsQuestCompleted takes quest whichQuest returns boolean
  1713. native IsQuestDiscovered takes quest whichQuest returns boolean
  1714. native IsQuestFailed takes quest whichQuest returns boolean
  1715. native IsQuestEnabled takes quest whichQuest returns boolean
  1716. native QuestCreateItem takes quest whichQuest returns questitem
  1717. native QuestItemSetDescription takes questitem whichQuestItem, string description returns nothing
  1718. native QuestItemSetCompleted takes questitem whichQuestItem, boolean completed returns nothing
  1719. native IsQuestItemCompleted takes questitem whichQuestItem returns boolean
  1720. native CreateDefeatCondition takes nothing returns defeatcondition
  1721. native DestroyDefeatCondition takes defeatcondition whichCondition returns nothing
  1722. native DefeatConditionSetDescription takes defeatcondition whichCondition, string description returns nothing
  1723. native FlashQuestDialogButton takes nothing returns nothing
  1724. native ForceQuestDialogUpdate takes nothing returns nothing
  1725. //============================================================================
  1726. // Timer Dialog API
  1727. native CreateTimerDialog takes timer t returns timerdialog
  1728. native DestroyTimerDialog takes timerdialog whichDialog returns nothing
  1729. native TimerDialogSetTitle takes timerdialog whichDialog, string title returns nothing
  1730. native TimerDialogSetTitleColor takes timerdialog whichDialog, integer red, integer green, integer blue, integer alpha returns nothing
  1731. native TimerDialogSetTimeColor takes timerdialog whichDialog, integer red, integer green, integer blue, integer alpha returns nothing
  1732. native TimerDialogSetSpeed takes timerdialog whichDialog, real speedMultFactor returns nothing
  1733. native TimerDialogDisplay takes timerdialog whichDialog, boolean display returns nothing
  1734. native IsTimerDialogDisplayed takes timerdialog whichDialog returns boolean
  1735. native TimerDialogSetRealTimeRemaining takes timerdialog whichDialog, real timeRemaining returns nothing
  1736. //============================================================================
  1737. // Leaderboard API
  1738. // Create a leaderboard object
  1739. native CreateLeaderboard takes nothing returns leaderboard
  1740. native DestroyLeaderboard takes leaderboard lb returns nothing
  1741. native LeaderboardDisplay takes leaderboard lb, boolean show returns nothing
  1742. native IsLeaderboardDisplayed takes leaderboard lb returns boolean
  1743. native LeaderboardGetItemCount takes leaderboard lb returns integer
  1744. native LeaderboardSetSizeByItemCount takes leaderboard lb, integer count returns nothing
  1745. native LeaderboardAddItem takes leaderboard lb, string label, integer value, player p returns nothing
  1746. native LeaderboardRemoveItem takes leaderboard lb, integer index returns nothing
  1747. native LeaderboardRemovePlayerItem takes leaderboard lb, player p returns nothing
  1748. native LeaderboardClear takes leaderboard lb returns nothing
  1749. native LeaderboardSortItemsByValue takes leaderboard lb, boolean ascending returns nothing
  1750. native LeaderboardSortItemsByPlayer takes leaderboard lb, boolean ascending returns nothing
  1751. native LeaderboardSortItemsByLabel takes leaderboard lb, boolean ascending returns nothing
  1752. native LeaderboardHasPlayerItem takes leaderboard lb, player p returns boolean
  1753. native LeaderboardGetPlayerIndex takes leaderboard lb, player p returns integer
  1754. native LeaderboardSetLabel takes leaderboard lb, string label returns nothing
  1755. native LeaderboardGetLabelText takes leaderboard lb returns string
  1756. native PlayerSetLeaderboard takes player toPlayer, leaderboard lb returns nothing
  1757. native PlayerGetLeaderboard takes player toPlayer returns leaderboard
  1758. native LeaderboardSetLabelColor takes leaderboard lb, integer red, integer green, integer blue, integer alpha returns nothing
  1759. native LeaderboardSetValueColor takes leaderboard lb, integer red, integer green, integer blue, integer alpha returns nothing
  1760. native LeaderboardSetStyle takes leaderboard lb, boolean showLabel, boolean showNames, boolean showValues, boolean showIcons returns nothing
  1761. native LeaderboardSetItemValue takes leaderboard lb, integer whichItem, integer val returns nothing
  1762. native LeaderboardSetItemLabel takes leaderboard lb, integer whichItem, string val returns nothing
  1763. native LeaderboardSetItemStyle takes leaderboard lb, integer whichItem, boolean showLabel, boolean showValue, boolean showIcon returns nothing
  1764. native LeaderboardSetItemLabelColor takes leaderboard lb, integer whichItem, integer red, integer green, integer blue, integer alpha returns nothing
  1765. native LeaderboardSetItemValueColor takes leaderboard lb, integer whichItem, integer red, integer green, integer blue, integer alpha returns nothing
  1766. //============================================================================
  1767. // Multiboard API
  1768. //============================================================================
  1769. // Create a multiboard object
  1770. native CreateMultiboard takes nothing returns multiboard
  1771. native DestroyMultiboard takes multiboard lb returns nothing
  1772. native MultiboardDisplay takes multiboard lb, boolean show returns nothing
  1773. native IsMultiboardDisplayed takes multiboard lb returns boolean
  1774. native MultiboardMinimize takes multiboard lb, boolean minimize returns nothing
  1775. native IsMultiboardMinimized takes multiboard lb returns boolean
  1776. native MultiboardClear takes multiboard lb returns nothing
  1777. native MultiboardSetTitleText takes multiboard lb, string label returns nothing
  1778. native MultiboardGetTitleText takes multiboard lb returns string
  1779. native MultiboardSetTitleTextColor takes multiboard lb, integer red, integer green, integer blue, integer alpha returns nothing
  1780. native MultiboardGetRowCount takes multiboard lb returns integer
  1781. native MultiboardGetColumnCount takes multiboard lb returns integer
  1782. native MultiboardSetColumnCount takes multiboard lb, integer count returns nothing
  1783. native MultiboardSetRowCount takes multiboard lb, integer count returns nothing
  1784. // broadcast settings to all items
  1785. native MultiboardSetItemsStyle takes multiboard lb, boolean showValues, boolean showIcons returns nothing
  1786. native MultiboardSetItemsValue takes multiboard lb, string value returns nothing
  1787. native MultiboardSetItemsValueColor takes multiboard lb, integer red, integer green, integer blue, integer alpha returns nothing
  1788. native MultiboardSetItemsWidth takes multiboard lb, real width returns nothing
  1789. native MultiboardSetItemsIcon takes multiboard lb, string iconPath returns nothing
  1790. // funcs for modifying individual items
  1791. native MultiboardGetItem takes multiboard lb, integer row, integer column returns multiboarditem
  1792. native MultiboardReleaseItem takes multiboarditem mbi returns nothing
  1793. native MultiboardSetItemStyle takes multiboarditem mbi, boolean showValue, boolean showIcon returns nothing
  1794. native MultiboardSetItemValue takes multiboarditem mbi, string val returns nothing
  1795. native MultiboardSetItemValueColor takes multiboarditem mbi, integer red, integer green, integer blue, integer alpha returns nothing
  1796. native MultiboardSetItemWidth takes multiboarditem mbi, real width returns nothing
  1797. native MultiboardSetItemIcon takes multiboarditem mbi, string iconFileName returns nothing
  1798. // meant to unequivocally suspend display of existing and
  1799. // subsequently displayed multiboards
  1800. //
  1801. native MultiboardSuppressDisplay takes boolean flag returns nothing
  1802. //============================================================================
  1803. // Camera API
  1804. native SetCameraPosition takes real x, real y returns nothing
  1805. native SetCameraQuickPosition takes real x, real y returns nothing
  1806. native SetCameraBounds takes real x1, real y1, real x2, real y2, real x3, real y3, real x4, real y4 returns nothing
  1807. native StopCamera takes nothing returns nothing
  1808. native ResetToGameCamera takes real duration returns nothing
  1809. native PanCameraTo takes real x, real y returns nothing
  1810. native PanCameraToTimed takes real x, real y, real duration returns nothing
  1811. native PanCameraToWithZ takes real x, real y, real zOffsetDest returns nothing
  1812. native PanCameraToTimedWithZ takes real x, real y, real zOffsetDest, real duration returns nothing
  1813. native SetCinematicCamera takes string cameraModelFile returns nothing
  1814. native SetCameraRotateMode takes real x, real y, real radiansToSweep, real duration returns nothing
  1815. native SetCameraField takes camerafield whichField, real value, real duration returns nothing
  1816. native AdjustCameraField takes camerafield whichField, real offset, real duration returns nothing
  1817. native SetCameraTargetController takes unit whichUnit, real xoffset, real yoffset, boolean inheritOrientation returns nothing
  1818. native SetCameraOrientController takes unit whichUnit, real xoffset, real yoffset returns nothing
  1819. native CreateCameraSetup takes nothing returns camerasetup
  1820. native CameraSetupSetField takes camerasetup whichSetup, camerafield whichField, real value, real duration returns nothing
  1821. native CameraSetupGetField takes camerasetup whichSetup, camerafield whichField returns real
  1822. native CameraSetupSetDestPosition takes camerasetup whichSetup, real x, real y, real duration returns nothing
  1823. native CameraSetupGetDestPositionLoc takes camerasetup whichSetup returns location
  1824. native CameraSetupGetDestPositionX takes camerasetup whichSetup returns real
  1825. native CameraSetupGetDestPositionY takes camerasetup whichSetup returns real
  1826. native CameraSetupApply takes camerasetup whichSetup, boolean doPan, boolean panTimed returns nothing
  1827. native CameraSetupApplyWithZ takes camerasetup whichSetup, real zDestOffset returns nothing
  1828. native CameraSetupApplyForceDuration takes camerasetup whichSetup, boolean doPan, real forceDuration returns nothing
  1829. native CameraSetupApplyForceDurationWithZ takes camerasetup whichSetup, real zDestOffset, real forceDuration returns nothing
  1830. native CameraSetTargetNoise takes real mag, real velocity returns nothing
  1831. native CameraSetSourceNoise takes real mag, real velocity returns nothing
  1832. native CameraSetTargetNoiseEx takes real mag, real velocity, boolean vertOnly returns nothing
  1833. native CameraSetSourceNoiseEx takes real mag, real velocity, boolean vertOnly returns nothing
  1834. native CameraSetSmoothingFactor takes real factor returns nothing
  1835. native SetCineFilterTexture takes string filename returns nothing
  1836. native SetCineFilterBlendMode takes blendmode whichMode returns nothing
  1837. native SetCineFilterTexMapFlags takes texmapflags whichFlags returns nothing
  1838. native SetCineFilterStartUV takes real minu, real minv, real maxu, real maxv returns nothing
  1839. native SetCineFilterEndUV takes real minu, real minv, real maxu, real maxv returns nothing
  1840. native SetCineFilterStartColor takes integer red, integer green, integer blue, integer alpha returns nothing
  1841. native SetCineFilterEndColor takes integer red, integer green, integer blue, integer alpha returns nothing
  1842. native SetCineFilterDuration takes real duration returns nothing
  1843. native DisplayCineFilter takes boolean flag returns nothing
  1844. native IsCineFilterDisplayed takes nothing returns boolean
  1845. native SetCinematicScene takes integer portraitUnitId, playercolor color, string speakerTitle, string text, real sceneDuration, real voiceoverDuration returns nothing
  1846. native EndCinematicScene takes nothing returns nothing
  1847. native ForceCinematicSubtitles takes boolean flag returns nothing
  1848. native GetCameraMargin takes integer whichMargin returns real
  1849. // These return values for the local players camera only...
  1850. constant native GetCameraBoundMinX takes nothing returns real
  1851. constant native GetCameraBoundMinY takes nothing returns real
  1852. constant native GetCameraBoundMaxX takes nothing returns real
  1853. constant native GetCameraBoundMaxY takes nothing returns real
  1854. constant native GetCameraField takes camerafield whichField returns real
  1855. constant native GetCameraTargetPositionX takes nothing returns real
  1856. constant native GetCameraTargetPositionY takes nothing returns real
  1857. constant native GetCameraTargetPositionZ takes nothing returns real
  1858. constant native GetCameraTargetPositionLoc takes nothing returns location
  1859. constant native GetCameraEyePositionX takes nothing returns real
  1860. constant native GetCameraEyePositionY takes nothing returns real
  1861. constant native GetCameraEyePositionZ takes nothing returns real
  1862. constant native GetCameraEyePositionLoc takes nothing returns location
  1863. //============================================================================
  1864. // Sound API
  1865. //
  1866. native NewSoundEnvironment takes string environmentName returns nothing
  1867. native CreateSound takes string fileName, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate, string eaxSetting returns sound
  1868. native CreateSoundFilenameWithLabel takes string fileName, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate, string SLKEntryName returns sound
  1869. native CreateSoundFromLabel takes string soundLabel, boolean looping, boolean is3D, boolean stopwhenoutofrange, integer fadeInRate, integer fadeOutRate returns sound
  1870. native CreateMIDISound takes string soundLabel, integer fadeInRate, integer fadeOutRate returns sound
  1871. native SetSoundParamsFromLabel takes sound soundHandle, string soundLabel returns nothing
  1872. native SetSoundDistanceCutoff takes sound soundHandle, real cutoff returns nothing
  1873. native SetSoundChannel takes sound soundHandle, integer channel returns nothing
  1874. native SetSoundVolume takes sound soundHandle, integer volume returns nothing
  1875. native SetSoundPitch takes sound soundHandle, real pitch returns nothing
  1876. // the following method must be called immediately after calling "StartSound"
  1877. native SetSoundPlayPosition takes sound soundHandle, integer millisecs returns nothing
  1878. // these calls are only valid if the sound was created with 3d enabled
  1879. native SetSoundDistances takes sound soundHandle, real minDist, real maxDist returns nothing
  1880. native SetSoundConeAngles takes sound soundHandle, real inside, real outside, integer outsideVolume returns nothing
  1881. native SetSoundConeOrientation takes sound soundHandle, real x, real y, real z returns nothing
  1882. native SetSoundPosition takes sound soundHandle, real x, real y, real z returns nothing
  1883. native SetSoundVelocity takes sound soundHandle, real x, real y, real z returns nothing
  1884. native AttachSoundToUnit takes sound soundHandle, unit whichUnit returns nothing
  1885. native StartSound takes sound soundHandle returns nothing
  1886. native StopSound takes sound soundHandle, boolean killWhenDone, boolean fadeOut returns nothing
  1887. native KillSoundWhenDone takes sound soundHandle returns nothing
  1888. // Music Interface. Note that if music is disabled, these calls do nothing
  1889. native SetMapMusic takes string musicName, boolean random, integer index returns nothing
  1890. native ClearMapMusic takes nothing returns nothing
  1891. native PlayMusic takes string musicName returns nothing
  1892. native PlayMusicEx takes string musicName, integer frommsecs, integer fadeinmsecs returns nothing
  1893. native StopMusic takes boolean fadeOut returns nothing
  1894. native ResumeMusic takes nothing returns nothing
  1895. native PlayThematicMusic takes string musicFileName returns nothing
  1896. native PlayThematicMusicEx takes string musicFileName, integer frommsecs returns nothing
  1897. native EndThematicMusic takes nothing returns nothing
  1898. native SetMusicVolume takes integer volume returns nothing
  1899. native SetMusicPlayPosition takes integer millisecs returns nothing
  1900. native SetThematicMusicPlayPosition takes integer millisecs returns nothing
  1901. // other music and sound calls
  1902. native SetSoundDuration takes sound soundHandle, integer duration returns nothing
  1903. native GetSoundDuration takes sound soundHandle returns integer
  1904. native GetSoundFileDuration takes string musicFileName returns integer
  1905. native VolumeGroupSetVolume takes volumegroup vgroup, real scale returns nothing
  1906. native VolumeGroupReset takes nothing returns nothing
  1907. native GetSoundIsPlaying takes sound soundHandle returns boolean
  1908. native GetSoundIsLoading takes sound soundHandle returns boolean
  1909. native RegisterStackedSound takes sound soundHandle, boolean byPosition, real rectwidth, real rectheight returns nothing
  1910. native UnregisterStackedSound takes sound soundHandle, boolean byPosition, real rectwidth, real rectheight returns nothing
  1911. //============================================================================
  1912. // Effects API
  1913. //
  1914. native AddWeatherEffect takes rect where, integer effectID returns weathereffect
  1915. native RemoveWeatherEffect takes weathereffect whichEffect returns nothing
  1916. native EnableWeatherEffect takes weathereffect whichEffect, boolean enable returns nothing
  1917. native TerrainDeformCrater takes real x, real y, real radius, real depth, integer duration, boolean permanent returns terraindeformation
  1918. native TerrainDeformRipple takes real x, real y, real radius, real depth, integer duration, integer count, real spaceWaves, real timeWaves, real radiusStartPct, boolean limitNeg returns terraindeformation
  1919. native TerrainDeformWave takes real x, real y, real dirX, real dirY, real distance, real speed, real radius, real depth, integer trailTime, integer count returns terraindeformation
  1920. native TerrainDeformRandom takes real x, real y, real radius, real minDelta, real maxDelta, integer duration, integer updateInterval returns terraindeformation
  1921. native TerrainDeformStop takes terraindeformation deformation, integer duration returns nothing
  1922. native TerrainDeformStopAll takes nothing returns nothing
  1923. native AddSpecialEffect takes string modelName, real x, real y returns effect
  1924. native AddSpecialEffectLoc takes string modelName, location where returns effect
  1925. native AddSpecialEffectTarget takes string modelName, widget targetWidget, string attachPointName returns effect
  1926. native DestroyEffect takes effect whichEffect returns nothing
  1927. native AddSpellEffect takes string abilityString, effecttype t, real x, real y returns effect
  1928. native AddSpellEffectLoc takes string abilityString, effecttype t,location where returns effect
  1929. native AddSpellEffectById takes integer abilityId, effecttype t,real x, real y returns effect
  1930. native AddSpellEffectByIdLoc takes integer abilityId, effecttype t,location where returns effect
  1931. native AddSpellEffectTarget takes string modelName, effecttype t, widget targetWidget, string attachPoint returns effect
  1932. native AddSpellEffectTargetById takes integer abilityId, effecttype t, widget targetWidget, string attachPoint returns effect
  1933. native AddLightning takes string codeName, boolean checkVisibility, real x1, real y1, real x2, real y2 returns lightning
  1934. native AddLightningEx takes string codeName, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns lightning
  1935. native DestroyLightning takes lightning whichBolt returns boolean
  1936. native MoveLightning takes lightning whichBolt, boolean checkVisibility, real x1, real y1, real x2, real y2 returns boolean
  1937. native MoveLightningEx takes lightning whichBolt, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns boolean
  1938. native GetLightningColorA takes lightning whichBolt returns real
  1939. native GetLightningColorR takes lightning whichBolt returns real
  1940. native GetLightningColorG takes lightning whichBolt returns real
  1941. native GetLightningColorB takes lightning whichBolt returns real
  1942. native SetLightningColor takes lightning whichBolt, real r, real g, real b, real a returns boolean
  1943. native GetAbilityEffect takes string abilityString, effecttype t, integer index returns string
  1944. native GetAbilityEffectById takes integer abilityId, effecttype t, integer index returns string
  1945. native GetAbilitySound takes string abilityString, soundtype t returns string
  1946. native GetAbilitySoundById takes integer abilityId, soundtype t returns string
  1947. //============================================================================
  1948. // Terrain API
  1949. //
  1950. native GetTerrainCliffLevel takes real x, real y returns integer
  1951. native SetWaterBaseColor takes integer red, integer green, integer blue, integer alpha returns nothing
  1952. native SetWaterDeforms takes boolean val returns nothing
  1953. native GetTerrainType takes real x, real y returns integer
  1954. native GetTerrainVariance takes real x, real y returns integer
  1955. native SetTerrainType takes real x, real y, integer terrainType, integer variation, integer area, integer shape returns nothing
  1956. native IsTerrainPathable takes real x, real y, pathingtype t returns boolean
  1957. native SetTerrainPathable takes real x, real y, pathingtype t, boolean flag returns nothing
  1958. //============================================================================
  1959. // Image API
  1960. //
  1961. native CreateImage takes string file, real sizeX, real sizeY, real sizeZ, real posX, real posY, real posZ, real originX, real originY, real originZ, integer imageType returns image
  1962. native DestroyImage takes image whichImage returns nothing
  1963. native ShowImage takes image whichImage, boolean flag returns nothing
  1964. native SetImageConstantHeight takes image whichImage, boolean flag, real height returns nothing
  1965. native SetImagePosition takes image whichImage, real x, real y, real z returns nothing
  1966. native SetImageColor takes image whichImage, integer red, integer green, integer blue, integer alpha returns nothing
  1967. native SetImageRender takes image whichImage, boolean flag returns nothing
  1968. native SetImageRenderAlways takes image whichImage, boolean flag returns nothing
  1969. native SetImageAboveWater takes image whichImage, boolean flag, boolean useWaterAlpha returns nothing
  1970. native SetImageType takes image whichImage, integer imageType returns nothing
  1971. //============================================================================
  1972. // Ubersplat API
  1973. //
  1974. native CreateUbersplat takes real x, real y, string name, integer red, integer green, integer blue, integer alpha, boolean forcePaused, boolean noBirthTime returns ubersplat
  1975. native DestroyUbersplat takes ubersplat whichSplat returns nothing
  1976. native ResetUbersplat takes ubersplat whichSplat returns nothing
  1977. native FinishUbersplat takes ubersplat whichSplat returns nothing
  1978. native ShowUbersplat takes ubersplat whichSplat, boolean flag returns nothing
  1979. native SetUbersplatRender takes ubersplat whichSplat, boolean flag returns nothing
  1980. native SetUbersplatRenderAlways takes ubersplat whichSplat, boolean flag returns nothing
  1981. //============================================================================
  1982. // Blight API
  1983. //
  1984. native SetBlight takes player whichPlayer, real x, real y, real radius, boolean addBlight returns nothing
  1985. native SetBlightRect takes player whichPlayer, rect r, boolean addBlight returns nothing
  1986. native SetBlightPoint takes player whichPlayer, real x, real y, boolean addBlight returns nothing
  1987. native SetBlightLoc takes player whichPlayer, location whichLocation, real radius, boolean addBlight returns nothing
  1988. native CreateBlightedGoldmine takes player id, real x, real y, real face returns unit
  1989. native IsPointBlighted takes real x, real y returns boolean
  1990. //============================================================================
  1991. // Doodad API
  1992. //
  1993. native SetDoodadAnimation takes real x, real y, real radius, integer doodadID, boolean nearestOnly, string animName, boolean animRandom returns nothing
  1994. native SetDoodadAnimationRect takes rect r, integer doodadID, string animName, boolean animRandom returns nothing
  1995. //============================================================================
  1996. // Computer AI interface
  1997. //
  1998. native StartMeleeAI takes player num, string script returns nothing
  1999. native StartCampaignAI takes player num, string script returns nothing
  2000. native CommandAI takes player num, integer command, integer data returns nothing
  2001. native PauseCompAI takes player p, boolean pause returns nothing
  2002. native GetAIDifficulty takes player num returns aidifficulty
  2003. native RemoveGuardPosition takes unit hUnit returns nothing
  2004. native RecycleGuardPosition takes unit hUnit returns nothing
  2005. native RemoveAllGuardPositions takes player num returns nothing
  2006. //============================================================================
  2007. native Cheat takes string cheatStr returns nothing
  2008. native IsNoVictoryCheat takes nothing returns boolean
  2009. native IsNoDefeatCheat takes nothing returns boolean
  2010. native Preload takes string filename returns nothing
  2011. native PreloadEnd takes real timeout returns nothing
  2012. native PreloadStart takes nothing returns nothing
  2013. native PreloadRefresh takes nothing returns nothing
  2014. native PreloadEndEx takes nothing returns nothing
  2015. native PreloadGenClear takes nothing returns nothing
  2016. native PreloadGenStart takes nothing returns nothing
  2017. native PreloadGenEnd takes string filename returns nothing
  2018. native Preloader takes string filename returns nothing

Diesen Code in Standard-Formatierung anzeigen
goto line:
Compare with:
text copy window edit this code post new code