vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

[reference] common.j

moyack · 49706

0 Members and 1 Guest are viewing this topic.

[reference] common.j
on: December 15, 2012, 01:43:03 PM

Index
Natives - Constants 1 - Constants 2

Code: jass
  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.  
  41. type eventid            extends     handle
  42. type gameevent          extends     eventid
  43. type playerevent        extends     eventid
  44. type playerunitevent    extends     eventid
  45. type unitevent          extends     eventid
  46. type limitop            extends     eventid
  47. type widgetevent        extends     eventid
  48. type dialogevent        extends     eventid
  49. type unittype           extends     handle
  50.  
  51. type gamespeed          extends     handle
  52. type gamedifficulty     extends     handle
  53. type gametype           extends     handle
  54. type mapflag            extends     handle
  55. type mapvisibility      extends     handle
  56. type mapsetting         extends     handle
  57. type mapdensity         extends     handle
  58. type mapcontrol         extends     handle
  59. type playerslotstate    extends     handle
  60. type volumegroup        extends     handle
  61. type camerafield        extends     handle
  62. type camerasetup        extends     handle
  63. type playercolor        extends     handle
  64. type placement          extends     handle
  65. type startlocprio       extends     handle
  66. type raritycontrol      extends     handle
  67. type blendmode          extends     handle
  68. type texmapflags        extends     handle
  69. type effect             extends     agent
  70. type effecttype         extends     handle
  71. type weathereffect      extends     handle
  72. type terraindeformation extends     handle
  73. type fogstate           extends     handle
  74. type fogmodifier        extends     agent
  75. type dialog             extends     agent
  76. type button             extends     agent
  77. type quest              extends     agent
  78. type questitem          extends     agent
  79. type defeatcondition    extends     agent
  80. type timerdialog        extends     agent
  81. type leaderboard        extends     agent
  82. type multiboard         extends     agent
  83. type multiboarditem     extends     agent
  84. type trackable          extends     agent
  85. type gamecache          extends     agent
  86. type version            extends     handle
  87. type itemtype           extends     handle
  88. type texttag            extends     handle
  89. type attacktype         extends     handle
  90. type damagetype         extends     handle
  91. type weapontype         extends     handle
  92. type soundtype          extends     handle
  93. type lightning          extends     handle
  94. type pathingtype        extends     handle
  95. type image              extends     handle
  96. type ubersplat          extends     handle
  97. type hashtable          extends     agent
  98.  
  99. constant native ConvertRace                 takes integer i returns race
  100. constant native ConvertAllianceType         takes integer i returns alliancetype
  101. constant native ConvertRacePref             takes integer i returns racepreference
  102. constant native ConvertIGameState           takes integer i returns igamestate
  103. constant native ConvertFGameState           takes integer i returns fgamestate
  104. constant native ConvertPlayerState          takes integer i returns playerstate
  105. constant native ConvertPlayerScore          takes integer i returns playerscore
  106. constant native ConvertPlayerGameResult     takes integer i returns playergameresult
  107. constant native ConvertUnitState            takes integer i returns unitstate
  108. constant native ConvertAIDifficulty         takes integer i returns aidifficulty
  109. constant native ConvertGameEvent            takes integer i returns gameevent
  110. constant native ConvertPlayerEvent          takes integer i returns playerevent
  111. constant native ConvertPlayerUnitEvent      takes integer i returns playerunitevent
  112. constant native ConvertWidgetEvent          takes integer i returns widgetevent
  113. constant native ConvertDialogEvent          takes integer i returns dialogevent
  114. constant native ConvertUnitEvent            takes integer i returns unitevent
  115. constant native ConvertLimitOp              takes integer i returns limitop
  116. constant native ConvertUnitType             takes integer i returns unittype
  117. constant native ConvertGameSpeed            takes integer i returns gamespeed
  118. constant native ConvertPlacement            takes integer i returns placement
  119. constant native ConvertStartLocPrio         takes integer i returns startlocprio
  120. constant native ConvertGameDifficulty       takes integer i returns gamedifficulty
  121. constant native ConvertGameType             takes integer i returns gametype
  122. constant native ConvertMapFlag              takes integer i returns mapflag
  123. constant native ConvertMapVisibility        takes integer i returns mapvisibility
  124. constant native ConvertMapSetting           takes integer i returns mapsetting
  125. constant native ConvertMapDensity           takes integer i returns mapdensity
  126. constant native ConvertMapControl           takes integer i returns mapcontrol
  127. constant native ConvertPlayerColor          takes integer i returns playercolor
  128. constant native ConvertPlayerSlotState      takes integer i returns playerslotstate
  129. constant native ConvertVolumeGroup          takes integer i returns volumegroup
  130. constant native ConvertCameraField          takes integer i returns camerafield
  131. constant native ConvertBlendMode            takes integer i returns blendmode
  132. constant native ConvertRarityControl        takes integer i returns raritycontrol
  133. constant native ConvertTexMapFlags          takes integer i returns texmapflags
  134. constant native ConvertFogState             takes integer i returns fogstate
  135. constant native ConvertEffectType           takes integer i returns effecttype
  136. constant native ConvertVersion              takes integer i returns version
  137. constant native ConvertItemType             takes integer i returns itemtype
  138. constant native ConvertAttackType           takes integer i returns attacktype
  139. constant native ConvertDamageType           takes integer i returns damagetype
  140. constant native ConvertWeaponType           takes integer i returns weapontype
  141. constant native ConvertSoundType            takes integer i returns soundtype
  142. constant native ConvertPathingType          takes integer i returns pathingtype
  143.  
  144. constant native OrderId                     takes string  orderIdString     returns integer
  145. constant native OrderId2String              takes integer orderId           returns string
  146. constant native UnitId                      takes string  unitIdString      returns integer
  147. constant native UnitId2String               takes integer unitId            returns string
  148.  
  149. // Not currently working correctly...
  150. constant native AbilityId                   takes string  abilityIdString   returns integer
  151. constant native AbilityId2String            takes integer abilityId         returns string
  152.  
  153. // Looks up the "name" field for any object (unit, item, ability)
  154. constant native GetObjectName               takes integer objectId          returns string
« Last Edit: December 16, 2012, 09:06:11 AM by moyack »



Game constants 1
Reply #1 on: December 15, 2012, 03:22:15 PM

Code: jass
  1. globals
  2.  
  3. //===================================================
  4. // Game Constants    
  5. //===================================================
  6.  
  7.     // pfff
  8.     constant boolean            FALSE                           = false
  9.     constant boolean            TRUE                            = true
  10.     constant integer            JASS_MAX_ARRAY_SIZE             = 8192
  11.  
  12.     constant integer            PLAYER_NEUTRAL_PASSIVE          = 15
  13.     constant integer            PLAYER_NEUTRAL_AGGRESSIVE       = 12
  14.  
  15.     constant playercolor        PLAYER_COLOR_RED                = ConvertPlayerColor(0)
  16.     constant playercolor        PLAYER_COLOR_BLUE               = ConvertPlayerColor(1)
  17.     constant playercolor        PLAYER_COLOR_CYAN               = ConvertPlayerColor(2)
  18.     constant playercolor        PLAYER_COLOR_PURPLE             = ConvertPlayerColor(3)
  19.     constant playercolor        PLAYER_COLOR_YELLOW             = ConvertPlayerColor(4)
  20.     constant playercolor        PLAYER_COLOR_ORANGE             = ConvertPlayerColor(5)
  21.     constant playercolor        PLAYER_COLOR_GREEN              = ConvertPlayerColor(6)
  22.     constant playercolor        PLAYER_COLOR_PINK               = ConvertPlayerColor(7)
  23.     constant playercolor        PLAYER_COLOR_LIGHT_GRAY         = ConvertPlayerColor(8)
  24.     constant playercolor        PLAYER_COLOR_LIGHT_BLUE         = ConvertPlayerColor(9)
  25.     constant playercolor        PLAYER_COLOR_AQUA               = ConvertPlayerColor(10)
  26.     constant playercolor        PLAYER_COLOR_BROWN              = ConvertPlayerColor(11)
  27.  
  28.     constant race               RACE_HUMAN                      = ConvertRace(1)
  29.     constant race               RACE_ORC                        = ConvertRace(2)
  30.     constant race               RACE_UNDEAD                     = ConvertRace(3)
  31.     constant race               RACE_NIGHTELF                   = ConvertRace(4)
  32.     constant race               RACE_DEMON                      = ConvertRace(5)
  33.     constant race               RACE_OTHER                      = ConvertRace(7)
  34.  
  35.     constant playergameresult   PLAYER_GAME_RESULT_VICTORY      = ConvertPlayerGameResult(0)
  36.     constant playergameresult   PLAYER_GAME_RESULT_DEFEAT       = ConvertPlayerGameResult(1)
  37.     constant playergameresult   PLAYER_GAME_RESULT_TIE          = ConvertPlayerGameResult(2)
  38.     constant playergameresult   PLAYER_GAME_RESULT_NEUTRAL      = ConvertPlayerGameResult(3)
  39.  
  40.     constant alliancetype       ALLIANCE_PASSIVE                = ConvertAllianceType(0)
  41.     constant alliancetype       ALLIANCE_HELP_REQUEST           = ConvertAllianceType(1)
  42.     constant alliancetype       ALLIANCE_HELP_RESPONSE          = ConvertAllianceType(2)
  43.     constant alliancetype       ALLIANCE_SHARED_XP              = ConvertAllianceType(3)
  44.     constant alliancetype       ALLIANCE_SHARED_SPELLS          = ConvertAllianceType(4)
  45.     constant alliancetype       ALLIANCE_SHARED_VISION          = ConvertAllianceType(5)
  46.     constant alliancetype       ALLIANCE_SHARED_CONTROL         = ConvertAllianceType(6)
  47.     constant alliancetype       ALLIANCE_SHARED_ADVANCED_CONTROL= ConvertAllianceType(7)
  48.     constant alliancetype       ALLIANCE_RESCUABLE              = ConvertAllianceType(8)
  49.     constant alliancetype       ALLIANCE_SHARED_VISION_FORCED   = ConvertAllianceType(9)
  50.  
  51.     constant version            VERSION_REIGN_OF_CHAOS          = ConvertVersion(0)
  52.     constant version            VERSION_FROZEN_THRONE           = ConvertVersion(1)
  53.  
  54.     constant attacktype         ATTACK_TYPE_NORMAL              = ConvertAttackType(0)
  55.     constant attacktype         ATTACK_TYPE_MELEE               = ConvertAttackType(1)
  56.     constant attacktype         ATTACK_TYPE_PIERCE              = ConvertAttackType(2)
  57.     constant attacktype         ATTACK_TYPE_SIEGE               = ConvertAttackType(3)
  58.     constant attacktype         ATTACK_TYPE_MAGIC               = ConvertAttackType(4)
  59.     constant attacktype         ATTACK_TYPE_CHAOS               = ConvertAttackType(5)
  60.     constant attacktype         ATTACK_TYPE_HERO                = ConvertAttackType(6)
  61.  
  62.     constant damagetype         DAMAGE_TYPE_UNKNOWN             = ConvertDamageType(0)
  63.     constant damagetype         DAMAGE_TYPE_NORMAL              = ConvertDamageType(4)
  64.     constant damagetype         DAMAGE_TYPE_ENHANCED            = ConvertDamageType(5)
  65.     constant damagetype         DAMAGE_TYPE_FIRE                = ConvertDamageType(8)
  66.     constant damagetype         DAMAGE_TYPE_COLD                = ConvertDamageType(9)
  67.     constant damagetype         DAMAGE_TYPE_LIGHTNING           = ConvertDamageType(10)
  68.     constant damagetype         DAMAGE_TYPE_POISON              = ConvertDamageType(11)
  69.     constant damagetype         DAMAGE_TYPE_DISEASE             = ConvertDamageType(12)
  70.     constant damagetype         DAMAGE_TYPE_DIVINE              = ConvertDamageType(13)
  71.     constant damagetype         DAMAGE_TYPE_MAGIC               = ConvertDamageType(14)
  72.     constant damagetype         DAMAGE_TYPE_SONIC               = ConvertDamageType(15)
  73.     constant damagetype         DAMAGE_TYPE_ACID                = ConvertDamageType(16)
  74.     constant damagetype         DAMAGE_TYPE_FORCE               = ConvertDamageType(17)
  75.     constant damagetype         DAMAGE_TYPE_DEATH               = ConvertDamageType(18)
  76.     constant damagetype         DAMAGE_TYPE_MIND                = ConvertDamageType(19)
  77.     constant damagetype         DAMAGE_TYPE_PLANT               = ConvertDamageType(20)
  78.     constant damagetype         DAMAGE_TYPE_DEFENSIVE           = ConvertDamageType(21)
  79.     constant damagetype         DAMAGE_TYPE_DEMOLITION          = ConvertDamageType(22)
  80.     constant damagetype         DAMAGE_TYPE_SLOW_POISON         = ConvertDamageType(23)
  81.     constant damagetype         DAMAGE_TYPE_SPIRIT_LINK         = ConvertDamageType(24)
  82.     constant damagetype         DAMAGE_TYPE_SHADOW_STRIKE       = ConvertDamageType(25)
  83.     constant damagetype         DAMAGE_TYPE_UNIVERSAL           = ConvertDamageType(26)
  84.  
  85.     constant weapontype         WEAPON_TYPE_WHOKNOWS            = ConvertWeaponType(0)
  86.     constant weapontype         WEAPON_TYPE_METAL_LIGHT_CHOP    = ConvertWeaponType(1)
  87.     constant weapontype         WEAPON_TYPE_METAL_MEDIUM_CHOP   = ConvertWeaponType(2)
  88.     constant weapontype         WEAPON_TYPE_METAL_HEAVY_CHOP    = ConvertWeaponType(3)
  89.     constant weapontype         WEAPON_TYPE_METAL_LIGHT_SLICE   = ConvertWeaponType(4)
  90.     constant weapontype         WEAPON_TYPE_METAL_MEDIUM_SLICE  = ConvertWeaponType(5)
  91.     constant weapontype         WEAPON_TYPE_METAL_HEAVY_SLICE   = ConvertWeaponType(6)
  92.     constant weapontype         WEAPON_TYPE_METAL_MEDIUM_BASH   = ConvertWeaponType(7)
  93.     constant weapontype         WEAPON_TYPE_METAL_HEAVY_BASH    = ConvertWeaponType(8)
  94.     constant weapontype         WEAPON_TYPE_METAL_MEDIUM_STAB   = ConvertWeaponType(9)
  95.     constant weapontype         WEAPON_TYPE_METAL_HEAVY_STAB    = ConvertWeaponType(10)
  96.     constant weapontype         WEAPON_TYPE_WOOD_LIGHT_SLICE    = ConvertWeaponType(11)
  97.     constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_SLICE   = ConvertWeaponType(12)
  98.     constant weapontype         WEAPON_TYPE_WOOD_HEAVY_SLICE    = ConvertWeaponType(13)
  99.     constant weapontype         WEAPON_TYPE_WOOD_LIGHT_BASH     = ConvertWeaponType(14)
  100.     constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_BASH    = ConvertWeaponType(15)
  101.     constant weapontype         WEAPON_TYPE_WOOD_HEAVY_BASH     = ConvertWeaponType(16)
  102.     constant weapontype         WEAPON_TYPE_WOOD_LIGHT_STAB     = ConvertWeaponType(17)
  103.     constant weapontype         WEAPON_TYPE_WOOD_MEDIUM_STAB    = ConvertWeaponType(18)
  104.     constant weapontype         WEAPON_TYPE_CLAW_LIGHT_SLICE    = ConvertWeaponType(19)
  105.     constant weapontype         WEAPON_TYPE_CLAW_MEDIUM_SLICE   = ConvertWeaponType(20)
  106.     constant weapontype         WEAPON_TYPE_CLAW_HEAVY_SLICE    = ConvertWeaponType(21)
  107.     constant weapontype         WEAPON_TYPE_AXE_MEDIUM_CHOP     = ConvertWeaponType(22)
  108.     constant weapontype         WEAPON_TYPE_ROCK_HEAVY_BASH     = ConvertWeaponType(23)
  109.  
  110.     constant pathingtype        PATHING_TYPE_ANY                = ConvertPathingType(0)
  111.     constant pathingtype        PATHING_TYPE_WALKABILITY        = ConvertPathingType(1)
  112.     constant pathingtype        PATHING_TYPE_FLYABILITY         = ConvertPathingType(2)
  113.     constant pathingtype        PATHING_TYPE_BUILDABILITY       = ConvertPathingType(3)
  114.     constant pathingtype        PATHING_TYPE_PEONHARVESTPATHING = ConvertPathingType(4)
  115.     constant pathingtype        PATHING_TYPE_BLIGHTPATHING      = ConvertPathingType(5)
  116.     constant pathingtype        PATHING_TYPE_FLOATABILITY       = ConvertPathingType(6)
  117.     constant pathingtype        PATHING_TYPE_AMPHIBIOUSPATHING  = ConvertPathingType(7)
  118.  
  119. //===================================================
  120. // Map Setup Constants    
  121. //===================================================
  122.  
  123.     constant racepreference     RACE_PREF_HUMAN                     = ConvertRacePref(1)
  124.     constant racepreference     RACE_PREF_ORC                       = ConvertRacePref(2)
  125.     constant racepreference     RACE_PREF_NIGHTELF                  = ConvertRacePref(4)
  126.     constant racepreference     RACE_PREF_UNDEAD                    = ConvertRacePref(8)
  127.     constant racepreference     RACE_PREF_DEMON                     = ConvertRacePref(16)
  128.     constant racepreference     RACE_PREF_RANDOM                    = ConvertRacePref(32)
  129.     constant racepreference     RACE_PREF_USER_SELECTABLE           = ConvertRacePref(64)
  130.  
  131.     constant mapcontrol         MAP_CONTROL_USER                    = ConvertMapControl(0)
  132.     constant mapcontrol         MAP_CONTROL_COMPUTER                = ConvertMapControl(1)
  133.     constant mapcontrol         MAP_CONTROL_RESCUABLE               = ConvertMapControl(2)
  134.     constant mapcontrol         MAP_CONTROL_NEUTRAL                 = ConvertMapControl(3)
  135.     constant mapcontrol         MAP_CONTROL_CREEP                   = ConvertMapControl(4)
  136.     constant mapcontrol         MAP_CONTROL_NONE                    = ConvertMapControl(5)
  137.  
  138.     constant gametype           GAME_TYPE_MELEE                     = ConvertGameType(1)
  139.     constant gametype           GAME_TYPE_FFA                       = ConvertGameType(2)
  140.     constant gametype           GAME_TYPE_USE_MAP_SETTINGS          = ConvertGameType(4)
  141.     constant gametype           GAME_TYPE_BLIZ                      = ConvertGameType(8)
  142.     constant gametype           GAME_TYPE_ONE_ON_ONE                = ConvertGameType(16)
  143.     constant gametype           GAME_TYPE_TWO_TEAM_PLAY             = ConvertGameType(32)
  144.     constant gametype           GAME_TYPE_THREE_TEAM_PLAY           = ConvertGameType(64)
  145.     constant gametype           GAME_TYPE_FOUR_TEAM_PLAY            = ConvertGameType(128)
  146.  
  147.     constant mapflag            MAP_FOG_HIDE_TERRAIN                = ConvertMapFlag(1)
  148.     constant mapflag            MAP_FOG_MAP_EXPLORED                = ConvertMapFlag(2)
  149.     constant mapflag            MAP_FOG_ALWAYS_VISIBLE              = ConvertMapFlag(4)
  150.  
  151.     constant mapflag            MAP_USE_HANDICAPS                   = ConvertMapFlag(8)
  152.     constant mapflag            MAP_OBSERVERS                       = ConvertMapFlag(16)
  153.     constant mapflag            MAP_OBSERVERS_ON_DEATH              = ConvertMapFlag(32)
  154.  
  155.     constant mapflag            MAP_FIXED_COLORS                    = ConvertMapFlag(128)
  156.    
  157.     constant mapflag            MAP_LOCK_RESOURCE_TRADING           = ConvertMapFlag(256)
  158.     constant mapflag            MAP_RESOURCE_TRADING_ALLIES_ONLY    = ConvertMapFlag(512)
  159.  
  160.     constant mapflag            MAP_LOCK_ALLIANCE_CHANGES           = ConvertMapFlag(1024)
  161.     constant mapflag            MAP_ALLIANCE_CHANGES_HIDDEN         = ConvertMapFlag(2048)
  162.  
  163.     constant mapflag            MAP_CHEATS                          = ConvertMapFlag(4096)
  164.     constant mapflag            MAP_CHEATS_HIDDEN                   = ConvertMapFlag(8192)
  165.  
  166.     constant mapflag            MAP_LOCK_SPEED                      = ConvertMapFlag(8192*2)
  167.     constant mapflag            MAP_LOCK_RANDOM_SEED                = ConvertMapFlag(8192*4)
  168.     constant mapflag            MAP_SHARED_ADVANCED_CONTROL         = ConvertMapFlag(8192*8)
  169.     constant mapflag            MAP_RANDOM_HERO                     = ConvertMapFlag(8192*16)
  170.     constant mapflag            MAP_RANDOM_RACES                    = ConvertMapFlag(8192*32)
  171.     constant mapflag            MAP_RELOADED                        = ConvertMapFlag(8192*64)
  172.  
  173.     constant placement          MAP_PLACEMENT_RANDOM                = ConvertPlacement(0)   // random among all slots
  174.     constant placement          MAP_PLACEMENT_FIXED                 = ConvertPlacement(1)   // player 0 in start loc 0...
  175.     constant placement          MAP_PLACEMENT_USE_MAP_SETTINGS      = ConvertPlacement(2)   // whatever was specified by the script
  176.     constant placement          MAP_PLACEMENT_TEAMS_TOGETHER        = ConvertPlacement(3)   // random with allies next to each other    
  177.  
  178.     constant startlocprio       MAP_LOC_PRIO_LOW                    = ConvertStartLocPrio(0)
  179.     constant startlocprio       MAP_LOC_PRIO_HIGH                   = ConvertStartLocPrio(1)
  180.     constant startlocprio       MAP_LOC_PRIO_NOT                    = ConvertStartLocPrio(2)
  181.  
  182.     constant mapdensity         MAP_DENSITY_NONE                    = ConvertMapDensity(0)
  183.     constant mapdensity         MAP_DENSITY_LIGHT                   = ConvertMapDensity(1)
  184.     constant mapdensity         MAP_DENSITY_MEDIUM                  = ConvertMapDensity(2)
  185.     constant mapdensity         MAP_DENSITY_HEAVY                   = ConvertMapDensity(3)
  186.  
  187.     constant gamedifficulty     MAP_DIFFICULTY_EASY                 = ConvertGameDifficulty(0)
  188.     constant gamedifficulty     MAP_DIFFICULTY_NORMAL               = ConvertGameDifficulty(1)
  189.     constant gamedifficulty     MAP_DIFFICULTY_HARD                 = ConvertGameDifficulty(2)
  190.     constant gamedifficulty     MAP_DIFFICULTY_INSANE               = ConvertGameDifficulty(3)
  191.  
  192.     constant gamespeed          MAP_SPEED_SLOWEST                   = ConvertGameSpeed(0)
  193.     constant gamespeed          MAP_SPEED_SLOW                      = ConvertGameSpeed(1)
  194.     constant gamespeed          MAP_SPEED_NORMAL                    = ConvertGameSpeed(2)
  195.     constant gamespeed          MAP_SPEED_FAST                      = ConvertGameSpeed(3)
  196.     constant gamespeed          MAP_SPEED_FASTEST                   = ConvertGameSpeed(4)
  197.  
  198.     constant playerslotstate    PLAYER_SLOT_STATE_EMPTY             = ConvertPlayerSlotState(0)
  199.     constant playerslotstate    PLAYER_SLOT_STATE_PLAYING           = ConvertPlayerSlotState(1)
  200.     constant playerslotstate    PLAYER_SLOT_STATE_LEFT              = ConvertPlayerSlotState(2)
« Last Edit: December 16, 2012, 09:05:18 AM by moyack »



Game constants 2
Reply #2 on: December 15, 2012, 03:25:13 PM

Code: jass
  1. //===================================================
  2. // Sound Constants
  3. //===================================================
  4.     constant volumegroup        SOUND_VOLUMEGROUP_UNITMOVEMENT      = ConvertVolumeGroup(0)
  5.     constant volumegroup        SOUND_VOLUMEGROUP_UNITSOUNDS        = ConvertVolumeGroup(1)
  6.     constant volumegroup        SOUND_VOLUMEGROUP_COMBAT            = ConvertVolumeGroup(2)
  7.     constant volumegroup        SOUND_VOLUMEGROUP_SPELLS            = ConvertVolumeGroup(3)
  8.     constant volumegroup        SOUND_VOLUMEGROUP_UI                = ConvertVolumeGroup(4)
  9.     constant volumegroup        SOUND_VOLUMEGROUP_MUSIC             = ConvertVolumeGroup(5)
  10.     constant volumegroup        SOUND_VOLUMEGROUP_AMBIENTSOUNDS     = ConvertVolumeGroup(6)
  11.     constant volumegroup        SOUND_VOLUMEGROUP_FIRE              = ConvertVolumeGroup(7)
  12.  
  13.  
  14. //===================================================
  15. // Game, Player, and Unit States
  16. //
  17. // For use with TriggerRegister<X>StateEvent
  18. //
  19. //===================================================
  20.  
  21.     constant igamestate GAME_STATE_DIVINE_INTERVENTION          = ConvertIGameState(0)
  22.     constant igamestate GAME_STATE_DISCONNECTED                 = ConvertIGameState(1)
  23.     constant fgamestate GAME_STATE_TIME_OF_DAY                  = ConvertFGameState(2)
  24.  
  25.     constant playerstate PLAYER_STATE_GAME_RESULT               = ConvertPlayerState(0)
  26.  
  27.     // current resource levels
  28.     //
  29.     constant playerstate PLAYER_STATE_RESOURCE_GOLD             = ConvertPlayerState(1)
  30.     constant playerstate PLAYER_STATE_RESOURCE_LUMBER           = ConvertPlayerState(2)
  31.     constant playerstate PLAYER_STATE_RESOURCE_HERO_TOKENS      = ConvertPlayerState(3)
  32.     constant playerstate PLAYER_STATE_RESOURCE_FOOD_CAP         = ConvertPlayerState(4)
  33.     constant playerstate PLAYER_STATE_RESOURCE_FOOD_USED        = ConvertPlayerState(5)
  34.     constant playerstate PLAYER_STATE_FOOD_CAP_CEILING          = ConvertPlayerState(6)
  35.  
  36.     constant playerstate PLAYER_STATE_GIVES_BOUNTY              = ConvertPlayerState(7)
  37.     constant playerstate PLAYER_STATE_ALLIED_VICTORY            = ConvertPlayerState(8)
  38.     constant playerstate PLAYER_STATE_PLACED                    = ConvertPlayerState(9)
  39.     constant playerstate PLAYER_STATE_OBSERVER_ON_DEATH         = ConvertPlayerState(10)
  40.     constant playerstate PLAYER_STATE_OBSERVER                  = ConvertPlayerState(11)
  41.     constant playerstate PLAYER_STATE_UNFOLLOWABLE              = ConvertPlayerState(12)
  42.  
  43.     // taxation rate for each resource
  44.     //
  45.     constant playerstate PLAYER_STATE_GOLD_UPKEEP_RATE          = ConvertPlayerState(13)
  46.     constant playerstate PLAYER_STATE_LUMBER_UPKEEP_RATE        = ConvertPlayerState(14)
  47.  
  48.     // cumulative resources collected by the player during the mission
  49.     //
  50.     constant playerstate PLAYER_STATE_GOLD_GATHERED             = ConvertPlayerState(15)
  51.     constant playerstate PLAYER_STATE_LUMBER_GATHERED           = ConvertPlayerState(16)
  52.  
  53.     constant playerstate PLAYER_STATE_NO_CREEP_SLEEP            = ConvertPlayerState(25)
  54.  
  55.     constant unitstate UNIT_STATE_LIFE                          = ConvertUnitState(0)
  56.     constant unitstate UNIT_STATE_MAX_LIFE                      = ConvertUnitState(1)
  57.     constant unitstate UNIT_STATE_MANA                          = ConvertUnitState(2)
  58.     constant unitstate UNIT_STATE_MAX_MANA                      = ConvertUnitState(3)
  59.  
  60.     constant aidifficulty AI_DIFFICULTY_NEWBIE                  = ConvertAIDifficulty(0)
  61.     constant aidifficulty AI_DIFFICULTY_NORMAL                  = ConvertAIDifficulty(1)
  62.     constant aidifficulty AI_DIFFICULTY_INSANE                  = ConvertAIDifficulty(2)
  63.  
  64.     // player score values
  65.     constant playerscore PLAYER_SCORE_UNITS_TRAINED             = ConvertPlayerScore(0)
  66.     constant playerscore PLAYER_SCORE_UNITS_KILLED              = ConvertPlayerScore(1)
  67.     constant playerscore PLAYER_SCORE_STRUCT_BUILT              = ConvertPlayerScore(2)
  68.     constant playerscore PLAYER_SCORE_STRUCT_RAZED              = ConvertPlayerScore(3)
  69.     constant playerscore PLAYER_SCORE_TECH_PERCENT              = ConvertPlayerScore(4)
  70.     constant playerscore PLAYER_SCORE_FOOD_MAXPROD              = ConvertPlayerScore(5)
  71.     constant playerscore PLAYER_SCORE_FOOD_MAXUSED              = ConvertPlayerScore(6)
  72.     constant playerscore PLAYER_SCORE_HEROES_KILLED             = ConvertPlayerScore(7)
  73.     constant playerscore PLAYER_SCORE_ITEMS_GAINED              = ConvertPlayerScore(8)
  74.     constant playerscore PLAYER_SCORE_MERCS_HIRED               = ConvertPlayerScore(9)
  75.     constant playerscore PLAYER_SCORE_GOLD_MINED_TOTAL          = ConvertPlayerScore(10)
  76.     constant playerscore PLAYER_SCORE_GOLD_MINED_UPKEEP         = ConvertPlayerScore(11)
  77.     constant playerscore PLAYER_SCORE_GOLD_LOST_UPKEEP          = ConvertPlayerScore(12)
  78.     constant playerscore PLAYER_SCORE_GOLD_LOST_TAX             = ConvertPlayerScore(13)
  79.     constant playerscore PLAYER_SCORE_GOLD_GIVEN                = ConvertPlayerScore(14)
  80.     constant playerscore PLAYER_SCORE_GOLD_RECEIVED             = ConvertPlayerScore(15)
  81.     constant playerscore PLAYER_SCORE_LUMBER_TOTAL              = ConvertPlayerScore(16)
  82.     constant playerscore PLAYER_SCORE_LUMBER_LOST_UPKEEP        = ConvertPlayerScore(17)
  83.     constant playerscore PLAYER_SCORE_LUMBER_LOST_TAX           = ConvertPlayerScore(18)
  84.     constant playerscore PLAYER_SCORE_LUMBER_GIVEN              = ConvertPlayerScore(19)
  85.     constant playerscore PLAYER_SCORE_LUMBER_RECEIVED           = ConvertPlayerScore(20)
  86.     constant playerscore PLAYER_SCORE_UNIT_TOTAL                = ConvertPlayerScore(21)
  87.     constant playerscore PLAYER_SCORE_HERO_TOTAL                = ConvertPlayerScore(22)
  88.     constant playerscore PLAYER_SCORE_RESOURCE_TOTAL            = ConvertPlayerScore(23)
  89.     constant playerscore PLAYER_SCORE_TOTAL                     = ConvertPlayerScore(24)
  90.        
  91. //===================================================
  92. // Game, Player and Unit Events
  93. //
  94. //  When an event causes a trigger to fire these
  95. //  values allow the action code to determine which
  96. //  event was dispatched and therefore which set of
  97. //  native functions should be used to get information
  98. //  about the event.
  99. //
  100. // Do NOT change the order or value of these constants
  101. // without insuring that the JASS_GAME_EVENTS_WAR3 enum
  102. // is changed to match.
  103. //
  104. //===================================================
  105.  
  106.     //===================================================
  107.     // For use with TriggerRegisterGameEvent    
  108.     //===================================================    
  109.  
  110.     constant gameevent EVENT_GAME_VICTORY                       = ConvertGameEvent(0)
  111.     constant gameevent EVENT_GAME_END_LEVEL                     = ConvertGameEvent(1)
  112.  
  113.     constant gameevent EVENT_GAME_VARIABLE_LIMIT                = ConvertGameEvent(2)
  114.     constant gameevent EVENT_GAME_STATE_LIMIT                   = ConvertGameEvent(3)  
  115.  
  116.     constant gameevent EVENT_GAME_TIMER_EXPIRED                 = ConvertGameEvent(4)
  117.  
  118.     constant gameevent EVENT_GAME_ENTER_REGION                  = ConvertGameEvent(5)
  119.     constant gameevent EVENT_GAME_LEAVE_REGION                  = ConvertGameEvent(6)
  120.  
  121.     constant gameevent EVENT_GAME_TRACKABLE_HIT                 = ConvertGameEvent(7)
  122.     constant gameevent EVENT_GAME_TRACKABLE_TRACK               = ConvertGameEvent(8)
  123.  
  124.     constant gameevent EVENT_GAME_SHOW_SKILL                    = ConvertGameEvent(9)    
  125.     constant gameevent EVENT_GAME_BUILD_SUBMENU                 = ConvertGameEvent(10)
  126.  
  127.     //===================================================
  128.     // For use with TriggerRegisterPlayerEvent
  129.     //===================================================
  130.     constant playerevent EVENT_PLAYER_STATE_LIMIT               = ConvertPlayerEvent(11)
  131.     constant playerevent EVENT_PLAYER_ALLIANCE_CHANGED          = ConvertPlayerEvent(12)
  132.  
  133.     constant playerevent EVENT_PLAYER_DEFEAT                    = ConvertPlayerEvent(13)
  134.     constant playerevent EVENT_PLAYER_VICTORY                   = ConvertPlayerEvent(14)
  135.     constant playerevent EVENT_PLAYER_LEAVE                     = ConvertPlayerEvent(15)
  136.     constant playerevent EVENT_PLAYER_CHAT                      = ConvertPlayerEvent(16)
  137.     constant playerevent EVENT_PLAYER_END_CINEMATIC             = ConvertPlayerEvent(17)
  138.  
  139.     //===================================================
  140.     // For use with TriggerRegisterPlayerUnitEvent
  141.     //===================================================
  142.  
  143.     constant playerunitevent EVENT_PLAYER_UNIT_ATTACKED                 = ConvertPlayerUnitEvent(18)
  144.     constant playerunitevent EVENT_PLAYER_UNIT_RESCUED                  = ConvertPlayerUnitEvent(19)
  145.  
  146.     constant playerunitevent EVENT_PLAYER_UNIT_DEATH                    = ConvertPlayerUnitEvent(20)
  147.     constant playerunitevent EVENT_PLAYER_UNIT_DECAY                    = ConvertPlayerUnitEvent(21)
  148.  
  149.     constant playerunitevent EVENT_PLAYER_UNIT_DETECTED                 = ConvertPlayerUnitEvent(22)
  150.     constant playerunitevent EVENT_PLAYER_UNIT_HIDDEN                   = ConvertPlayerUnitEvent(23)
  151.  
  152.     constant playerunitevent EVENT_PLAYER_UNIT_SELECTED                 = ConvertPlayerUnitEvent(24)
  153.     constant playerunitevent EVENT_PLAYER_UNIT_DESELECTED               = ConvertPlayerUnitEvent(25)
  154.  
  155.     constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_START          = ConvertPlayerUnitEvent(26)
  156.     constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL         = ConvertPlayerUnitEvent(27)
  157.     constant playerunitevent EVENT_PLAYER_UNIT_CONSTRUCT_FINISH         = ConvertPlayerUnitEvent(28)
  158.  
  159.     constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_START            = ConvertPlayerUnitEvent(29)
  160.     constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_CANCEL           = ConvertPlayerUnitEvent(30)
  161.     constant playerunitevent EVENT_PLAYER_UNIT_UPGRADE_FINISH           = ConvertPlayerUnitEvent(31)
  162.  
  163.     constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_START              = ConvertPlayerUnitEvent(32)
  164.     constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_CANCEL             = ConvertPlayerUnitEvent(33)
  165.     constant playerunitevent EVENT_PLAYER_UNIT_TRAIN_FINISH             = ConvertPlayerUnitEvent(34)
  166.  
  167.     constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_START           = ConvertPlayerUnitEvent(35)
  168.     constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_CANCEL          = ConvertPlayerUnitEvent(36)
  169.     constant playerunitevent EVENT_PLAYER_UNIT_RESEARCH_FINISH          = ConvertPlayerUnitEvent(37)
  170.     constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_ORDER             = ConvertPlayerUnitEvent(38)
  171.     constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER       = ConvertPlayerUnitEvent(39)
  172.     constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER      = ConvertPlayerUnitEvent(40)
  173.     constant playerunitevent EVENT_PLAYER_UNIT_ISSUED_UNIT_ORDER        = ConvertPlayerUnitEvent(40)    // for compat
  174.  
  175.     constant playerunitevent EVENT_PLAYER_HERO_LEVEL                    = ConvertPlayerUnitEvent(41)
  176.     constant playerunitevent EVENT_PLAYER_HERO_SKILL                    = ConvertPlayerUnitEvent(42)
  177.  
  178.     constant playerunitevent EVENT_PLAYER_HERO_REVIVABLE                = ConvertPlayerUnitEvent(43)
  179.  
  180.     constant playerunitevent EVENT_PLAYER_HERO_REVIVE_START             = ConvertPlayerUnitEvent(44)
  181.     constant playerunitevent EVENT_PLAYER_HERO_REVIVE_CANCEL            = ConvertPlayerUnitEvent(45)
  182.     constant playerunitevent EVENT_PLAYER_HERO_REVIVE_FINISH            = ConvertPlayerUnitEvent(46)
  183.     constant playerunitevent EVENT_PLAYER_UNIT_SUMMON                   = ConvertPlayerUnitEvent(47)
  184.     constant playerunitevent EVENT_PLAYER_UNIT_DROP_ITEM                = ConvertPlayerUnitEvent(48)
  185.     constant playerunitevent EVENT_PLAYER_UNIT_PICKUP_ITEM              = ConvertPlayerUnitEvent(49)
  186.     constant playerunitevent EVENT_PLAYER_UNIT_USE_ITEM                 = ConvertPlayerUnitEvent(50)
  187.  
  188.     constant playerunitevent EVENT_PLAYER_UNIT_LOADED                   = ConvertPlayerUnitEvent(51)
  189.    
  190.     //===================================================
  191.     // For use with TriggerRegisterUnitEvent
  192.     //===================================================
  193.  
  194.     constant unitevent EVENT_UNIT_DAMAGED                               = ConvertUnitEvent(52)
  195.     constant unitevent EVENT_UNIT_DEATH                                 = ConvertUnitEvent(53)
  196.     constant unitevent EVENT_UNIT_DECAY                                 = ConvertUnitEvent(54)
  197.     constant unitevent EVENT_UNIT_DETECTED                              = ConvertUnitEvent(55)
  198.     constant unitevent EVENT_UNIT_HIDDEN                                = ConvertUnitEvent(56)
  199.     constant unitevent EVENT_UNIT_SELECTED                              = ConvertUnitEvent(57)
  200.     constant unitevent EVENT_UNIT_DESELECTED                            = ConvertUnitEvent(58)
  201.                                                                        
  202.     constant unitevent EVENT_UNIT_STATE_LIMIT                           = ConvertUnitEvent(59)                                                                        
  203.  
  204.     // Events which may have a filter for the "other unit"              
  205.     //                                                                  
  206.     constant unitevent EVENT_UNIT_ACQUIRED_TARGET                       = ConvertUnitEvent(60)
  207.     constant unitevent EVENT_UNIT_TARGET_IN_RANGE                       = ConvertUnitEvent(61)
  208.     constant unitevent EVENT_UNIT_ATTACKED                              = ConvertUnitEvent(62)
  209.     constant unitevent EVENT_UNIT_RESCUED                               = ConvertUnitEvent(63)
  210.                                                                        
  211.     constant unitevent EVENT_UNIT_CONSTRUCT_CANCEL                      = ConvertUnitEvent(64)
  212.     constant unitevent EVENT_UNIT_CONSTRUCT_FINISH                      = ConvertUnitEvent(65)
  213.                                                                        
  214.     constant unitevent EVENT_UNIT_UPGRADE_START                         = ConvertUnitEvent(66)
  215.     constant unitevent EVENT_UNIT_UPGRADE_CANCEL                        = ConvertUnitEvent(67)
  216.     constant unitevent EVENT_UNIT_UPGRADE_FINISH                        = ConvertUnitEvent(68)
  217.                                                                        
  218.     // Events which involve the specified unit performing              
  219.     // training of other units                                          
  220.     //                                                                  
  221.     constant unitevent EVENT_UNIT_TRAIN_START                           = ConvertUnitEvent(69)
  222.     constant unitevent EVENT_UNIT_TRAIN_CANCEL                          = ConvertUnitEvent(70)
  223.     constant unitevent EVENT_UNIT_TRAIN_FINISH                          = ConvertUnitEvent(71)
  224.                                                                        
  225.     constant unitevent EVENT_UNIT_RESEARCH_START                        = ConvertUnitEvent(72)
  226.     constant unitevent EVENT_UNIT_RESEARCH_CANCEL                       = ConvertUnitEvent(73)
  227.     constant unitevent EVENT_UNIT_RESEARCH_FINISH                       = ConvertUnitEvent(74)
  228.                                                                        
  229.     constant unitevent EVENT_UNIT_ISSUED_ORDER                          = ConvertUnitEvent(75)
  230.     constant unitevent EVENT_UNIT_ISSUED_POINT_ORDER                    = ConvertUnitEvent(76)
  231.     constant unitevent EVENT_UNIT_ISSUED_TARGET_ORDER                   = ConvertUnitEvent(77)
  232.                                                                        
  233.     constant unitevent EVENT_UNIT_HERO_LEVEL                            = ConvertUnitEvent(78)
  234.     constant unitevent EVENT_UNIT_HERO_SKILL                            = ConvertUnitEvent(79)
  235.                                                                        
  236.     constant unitevent EVENT_UNIT_HERO_REVIVABLE                        = ConvertUnitEvent(80)
  237.     constant unitevent EVENT_UNIT_HERO_REVIVE_START                     = ConvertUnitEvent(81)
  238.     constant unitevent EVENT_UNIT_HERO_REVIVE_CANCEL                    = ConvertUnitEvent(82)
  239.     constant unitevent EVENT_UNIT_HERO_REVIVE_FINISH                    = ConvertUnitEvent(83)
  240.                                                                        
  241.     constant unitevent EVENT_UNIT_SUMMON                                = ConvertUnitEvent(84)
  242.                                                                        
  243.     constant unitevent EVENT_UNIT_DROP_ITEM                             = ConvertUnitEvent(85)
  244.     constant unitevent EVENT_UNIT_PICKUP_ITEM                           = ConvertUnitEvent(86)
  245.     constant unitevent EVENT_UNIT_USE_ITEM                              = ConvertUnitEvent(87)
  246.  
  247.     constant unitevent EVENT_UNIT_LOADED                                = ConvertUnitEvent(88)
  248.  
  249.     constant widgetevent EVENT_WIDGET_DEATH                             = ConvertWidgetEvent(89)
  250.  
  251.     constant dialogevent EVENT_DIALOG_BUTTON_CLICK                      = ConvertDialogEvent(90)
  252.     constant dialogevent EVENT_DIALOG_CLICK                             = ConvertDialogEvent(91)
  253.  
  254.     //===================================================
  255.     // Frozen Throne Expansion Events
  256.     // Need to be added here to preserve compat
  257.     //===================================================
  258.  
  259.     //===================================================
  260.     // For use with TriggerRegisterGameEvent    
  261.     //===================================================    
  262.  
  263.     constant gameevent          EVENT_GAME_LOADED                       = ConvertGameEvent(256)
  264.     constant gameevent          EVENT_GAME_TOURNAMENT_FINISH_SOON       = ConvertGameEvent(257)
  265.     constant gameevent          EVENT_GAME_TOURNAMENT_FINISH_NOW        = ConvertGameEvent(258)
  266.     constant gameevent          EVENT_GAME_SAVE                         = ConvertGameEvent(259)
  267.  
  268.     //===================================================
  269.     // For use with TriggerRegisterPlayerEvent
  270.     //===================================================
  271.  
  272.     constant playerevent        EVENT_PLAYER_ARROW_LEFT_DOWN            = ConvertPlayerEvent(261)
  273.     constant playerevent        EVENT_PLAYER_ARROW_LEFT_UP              = ConvertPlayerEvent(262)
  274.     constant playerevent        EVENT_PLAYER_ARROW_RIGHT_DOWN           = ConvertPlayerEvent(263)
  275.     constant playerevent        EVENT_PLAYER_ARROW_RIGHT_UP             = ConvertPlayerEvent(264)
  276.     constant playerevent        EVENT_PLAYER_ARROW_DOWN_DOWN            = ConvertPlayerEvent(265)
  277.     constant playerevent        EVENT_PLAYER_ARROW_DOWN_UP              = ConvertPlayerEvent(266)
  278.     constant playerevent        EVENT_PLAYER_ARROW_UP_DOWN              = ConvertPlayerEvent(267)
  279.     constant playerevent        EVENT_PLAYER_ARROW_UP_UP                = ConvertPlayerEvent(268)
  280.  
  281.     //===================================================
  282.     // For use with TriggerRegisterPlayerUnitEvent
  283.     //===================================================
  284.  
  285.     constant playerunitevent    EVENT_PLAYER_UNIT_SELL                  = ConvertPlayerUnitEvent(269)
  286.     constant playerunitevent    EVENT_PLAYER_UNIT_CHANGE_OWNER          = ConvertPlayerUnitEvent(270)
  287.     constant playerunitevent    EVENT_PLAYER_UNIT_SELL_ITEM             = ConvertPlayerUnitEvent(271)
  288.     constant playerunitevent    EVENT_PLAYER_UNIT_SPELL_CHANNEL         = ConvertPlayerUnitEvent(272)
  289.     constant playerunitevent    EVENT_PLAYER_UNIT_SPELL_CAST            = ConvertPlayerUnitEvent(273)
  290.     constant playerunitevent    EVENT_PLAYER_UNIT_SPELL_EFFECT          = ConvertPlayerUnitEvent(274)
  291.     constant playerunitevent    EVENT_PLAYER_UNIT_SPELL_FINISH          = ConvertPlayerUnitEvent(275)
  292.     constant playerunitevent    EVENT_PLAYER_UNIT_SPELL_ENDCAST         = ConvertPlayerUnitEvent(276)
  293.     constant playerunitevent    EVENT_PLAYER_UNIT_PAWN_ITEM             = ConvertPlayerUnitEvent(277)
  294.  
  295.     //===================================================
  296.     // For use with TriggerRegisterUnitEvent
  297.     //===================================================
  298.  
  299.     constant unitevent          EVENT_UNIT_SELL                         = ConvertUnitEvent(286)
  300.     constant unitevent          EVENT_UNIT_CHANGE_OWNER                 = ConvertUnitEvent(287)
  301.     constant unitevent          EVENT_UNIT_SELL_ITEM                    = ConvertUnitEvent(288)
  302.     constant unitevent          EVENT_UNIT_SPELL_CHANNEL                = ConvertUnitEvent(289)
  303.     constant unitevent          EVENT_UNIT_SPELL_CAST                   = ConvertUnitEvent(290)
  304.     constant unitevent          EVENT_UNIT_SPELL_EFFECT                 = ConvertUnitEvent(291)
  305.     constant unitevent          EVENT_UNIT_SPELL_FINISH                 = ConvertUnitEvent(292)
  306.     constant unitevent          EVENT_UNIT_SPELL_ENDCAST                = ConvertUnitEvent(293)
  307.     constant unitevent          EVENT_UNIT_PAWN_ITEM                    = ConvertUnitEvent(294)
  308.  
  309.     //===================================================
  310.     // Limit Event API constants    
  311.     // variable, player state, game state, and unit state events
  312.     // ( do NOT change the order of these... )
  313.     //===================================================
  314.     constant limitop LESS_THAN                              = ConvertLimitOp(0)
  315.     constant limitop LESS_THAN_OR_EQUAL                     = ConvertLimitOp(1)
  316.     constant limitop EQUAL                                  = ConvertLimitOp(2)
  317.     constant limitop GREATER_THAN_OR_EQUAL                  = ConvertLimitOp(3)
  318.     constant limitop GREATER_THAN                           = ConvertLimitOp(4)
  319.     constant limitop NOT_EQUAL                              = ConvertLimitOp(5)
  320.  
  321. //===================================================
  322. // Unit Type Constants for use with IsUnitType()
  323. //===================================================
  324.  
  325.     constant unittype UNIT_TYPE_HERO                        = ConvertUnitType(0)
  326.     constant unittype UNIT_TYPE_DEAD                        = ConvertUnitType(1)
  327.     constant unittype UNIT_TYPE_STRUCTURE                   = ConvertUnitType(2)
  328.  
  329.     constant unittype UNIT_TYPE_FLYING                      = ConvertUnitType(3)
  330.     constant unittype UNIT_TYPE_GROUND                      = ConvertUnitType(4)
  331.  
  332.     constant unittype UNIT_TYPE_ATTACKS_FLYING              = ConvertUnitType(5)
  333.     constant unittype UNIT_TYPE_ATTACKS_GROUND              = ConvertUnitType(6)
  334.  
  335.     constant unittype UNIT_TYPE_MELEE_ATTACKER              = ConvertUnitType(7)
  336.     constant unittype UNIT_TYPE_RANGED_ATTACKER             = ConvertUnitType(8)
  337.  
  338.     constant unittype UNIT_TYPE_GIANT                       = ConvertUnitType(9)
  339.     constant unittype UNIT_TYPE_SUMMONED                    = ConvertUnitType(10)
  340.     constant unittype UNIT_TYPE_STUNNED                     = ConvertUnitType(11)
  341.     constant unittype UNIT_TYPE_PLAGUED                     = ConvertUnitType(12)
  342.     constant unittype UNIT_TYPE_SNARED                      = ConvertUnitType(13)
  343.  
  344.     constant unittype UNIT_TYPE_UNDEAD                      = ConvertUnitType(14)
  345.     constant unittype UNIT_TYPE_MECHANICAL                  = ConvertUnitType(15)
  346.     constant unittype UNIT_TYPE_PEON                        = ConvertUnitType(16)
  347.     constant unittype UNIT_TYPE_SAPPER                      = ConvertUnitType(17)
  348.     constant unittype UNIT_TYPE_TOWNHALL                    = ConvertUnitType(18)    
  349.     constant unittype UNIT_TYPE_ANCIENT                     = ConvertUnitType(19)
  350.    
  351.     constant unittype UNIT_TYPE_TAUREN                      = ConvertUnitType(20)
  352.     constant unittype UNIT_TYPE_POISONED                    = ConvertUnitType(21)
  353.     constant unittype UNIT_TYPE_POLYMORPHED                 = ConvertUnitType(22)
  354.     constant unittype UNIT_TYPE_SLEEPING                    = ConvertUnitType(23)
  355.     constant unittype UNIT_TYPE_RESISTANT                   = ConvertUnitType(24)
  356.     constant unittype UNIT_TYPE_ETHEREAL                    = ConvertUnitType(25)
  357.     constant unittype UNIT_TYPE_MAGIC_IMMUNE                = ConvertUnitType(26)
  358.  
  359. //===================================================
  360. // Unit Type Constants for use with ChooseRandomItemEx()
  361. //===================================================
  362.  
  363.     constant itemtype ITEM_TYPE_PERMANENT                   = ConvertItemType(0)
  364.     constant itemtype ITEM_TYPE_CHARGED                     = ConvertItemType(1)
  365.     constant itemtype ITEM_TYPE_POWERUP                     = ConvertItemType(2)
  366.     constant itemtype ITEM_TYPE_ARTIFACT                    = ConvertItemType(3)
  367.     constant itemtype ITEM_TYPE_PURCHASABLE                 = ConvertItemType(4)
  368.     constant itemtype ITEM_TYPE_CAMPAIGN                    = ConvertItemType(5)
  369.     constant itemtype ITEM_TYPE_MISCELLANEOUS               = ConvertItemType(6)
  370.     constant itemtype ITEM_TYPE_UNKNOWN                     = ConvertItemType(7)
  371.     constant itemtype ITEM_TYPE_ANY                         = ConvertItemType(8)
  372.  
  373.     // Deprecated, should use ITEM_TYPE_POWERUP
  374.     constant itemtype ITEM_TYPE_TOME                        = ConvertItemType(2)
  375.  
  376. //===================================================
  377. // Animatable Camera Fields
  378. //===================================================
  379.  
  380.     constant camerafield CAMERA_FIELD_TARGET_DISTANCE       = ConvertCameraField(0)
  381.     constant camerafield CAMERA_FIELD_FARZ                  = ConvertCameraField(1)
  382.     constant camerafield CAMERA_FIELD_ANGLE_OF_ATTACK       = ConvertCameraField(2)
  383.     constant camerafield CAMERA_FIELD_FIELD_OF_VIEW         = ConvertCameraField(3)
  384.     constant camerafield CAMERA_FIELD_ROLL                  = ConvertCameraField(4)
  385.     constant camerafield CAMERA_FIELD_ROTATION              = ConvertCameraField(5)
  386.     constant camerafield CAMERA_FIELD_ZOFFSET               = ConvertCameraField(6)
  387.  
  388.     constant blendmode   BLEND_MODE_NONE                    = ConvertBlendMode(0)
  389.     constant blendmode   BLEND_MODE_DONT_CARE               = ConvertBlendMode(0)
  390.     constant blendmode   BLEND_MODE_KEYALPHA                = ConvertBlendMode(1)
  391.     constant blendmode   BLEND_MODE_BLEND                   = ConvertBlendMode(2)
  392.     constant blendmode   BLEND_MODE_ADDITIVE                = ConvertBlendMode(3)
  393.     constant blendmode   BLEND_MODE_MODULATE                = ConvertBlendMode(4)
  394.     constant blendmode   BLEND_MODE_MODULATE_2X             = ConvertBlendMode(5)
  395.    
  396.     constant raritycontrol  RARITY_FREQUENT                 = ConvertRarityControl(0)
  397.     constant raritycontrol  RARITY_RARE                     = ConvertRarityControl(1)
  398.  
  399.     constant texmapflags    TEXMAP_FLAG_NONE                = ConvertTexMapFlags(0)
  400.     constant texmapflags    TEXMAP_FLAG_WRAP_U              = ConvertTexMapFlags(1)
  401.     constant texmapflags    TEXMAP_FLAG_WRAP_V              = ConvertTexMapFlags(2)
  402.     constant texmapflags    TEXMAP_FLAG_WRAP_UV             = ConvertTexMapFlags(3)
  403.  
  404.     constant fogstate       FOG_OF_WAR_MASKED               = ConvertFogState(1)
  405.     constant fogstate       FOG_OF_WAR_FOGGED               = ConvertFogState(2)
  406.     constant fogstate       FOG_OF_WAR_VISIBLE              = ConvertFogState(4)
  407.  
  408. //===================================================
  409. // Camera Margin constants for use with GetCameraMargin
  410. //===================================================
  411.  
  412.     constant integer        CAMERA_MARGIN_LEFT              = 0
  413.     constant integer        CAMERA_MARGIN_RIGHT             = 1
  414.     constant integer        CAMERA_MARGIN_TOP               = 2
  415.     constant integer        CAMERA_MARGIN_BOTTOM            = 3
  416.  
  417. //===================================================
  418. // Effect API constants
  419. //===================================================
  420.  
  421.     constant effecttype     EFFECT_TYPE_EFFECT              = ConvertEffectType(0)
  422.     constant effecttype     EFFECT_TYPE_TARGET              = ConvertEffectType(1)
  423.     constant effecttype     EFFECT_TYPE_CASTER              = ConvertEffectType(2)
  424.     constant effecttype     EFFECT_TYPE_SPECIAL             = ConvertEffectType(3)
  425.     constant effecttype     EFFECT_TYPE_AREA_EFFECT         = ConvertEffectType(4)
  426.     constant effecttype     EFFECT_TYPE_MISSILE             = ConvertEffectType(5)
  427.     constant effecttype     EFFECT_TYPE_LIGHTNING           = ConvertEffectType(6)
  428.  
  429.     constant soundtype      SOUND_TYPE_EFFECT               = ConvertSoundType(0)
  430.     constant soundtype      SOUND_TYPE_EFFECT_LOOPED        = ConvertSoundType(1)
  431.  
  432. endglobals
« Last Edit: December 16, 2012, 09:05:40 AM by moyack »



Math API
Reply #3 on: December 15, 2012, 03:28:29 PM

Code: jass
  1. //============================================================================
  2. // MathAPI
  3. native Deg2Rad  takes real degrees returns real
  4. native Rad2Deg  takes real radians returns real
  5.  
  6. native Sin      takes real radians returns real
  7. native Cos      takes real radians returns real
  8. native Tan      takes real radians returns real
  9.  
  10. // Expect values between -1 and 1...returns 0 for invalid input
  11. native Asin     takes real y returns real
  12. native Acos     takes real x returns real
  13.  
  14. native Atan     takes real x returns real
  15.  
  16. // Returns 0 if x and y are both 0
  17. native Atan2    takes real y, real x returns real
  18.  
  19. // Returns 0 if x <= 0
  20. native SquareRoot takes real x returns real
  21.  
  22. // computes x to the y power
  23. // y == 0.0             => 1
  24. // x ==0.0 and y < 0    => 0
  25. //
  26. native Pow      takes real x, real power returns real
« Last Edit: December 16, 2012, 09:06:37 AM by moyack »



String API
Reply #4 on: December 16, 2012, 09:04:16 AM

Code: jass
  1. //============================================================================
  2. // String Utility API
  3. native I2R  takes integer i returns real
  4. native R2I  takes real r returns integer
  5. native I2S  takes integer i returns string
  6. native R2S  takes real r returns string
  7. native R2SW takes real r, integer width, integer precision returns string
  8. native S2I  takes string s returns integer
  9. native S2R  takes string s returns real
  10. native GetHandleId takes handle h returns integer
  11. native SubString takes string source, integer start, integer end returns string
  12. native StringLength takes string s returns integer
  13. native StringCase takes string source, boolean upper returns string
  14. native StringHash takes string s returns integer
  15.  
  16. native GetLocalizedString takes string source returns string
  17. native GetLocalizedHotkey takes string source returns integer


Map API
Reply #5 on: December 16, 2012, 09:08:18 AM

Code: jass
  1. //============================================================================
  2. // Map Setup API
  3. //
  4. //  These are native functions for describing the map configuration
  5. //  these funcs should only be used in the "config" function of
  6. //  a map script. The functions should also be called in this order
  7. //  ( i.e. call SetPlayers before SetPlayerColor...
  8. //
  9.  
  10. native SetMapName           takes string name returns nothing
  11. native SetMapDescription    takes string description returns nothing
  12.  
  13. native SetTeams             takes integer teamcount returns nothing
  14. native SetPlayers           takes integer playercount returns nothing
  15.  
  16. native DefineStartLocation      takes integer whichStartLoc, real x, real y returns nothing
  17. native DefineStartLocationLoc   takes integer whichStartLoc, location whichLocation returns nothing
  18. native SetStartLocPrioCount     takes integer whichStartLoc, integer prioSlotCount returns nothing
  19. native SetStartLocPrio          takes integer whichStartLoc, integer prioSlotIndex, integer otherStartLocIndex, startlocprio priority returns nothing
  20. native GetStartLocPrioSlot      takes integer whichStartLoc, integer prioSlotIndex returns integer
  21. native GetStartLocPrio          takes integer whichStartLoc, integer prioSlotIndex returns startlocprio
  22.  
  23. native SetGameTypeSupported takes gametype whichGameType, boolean value returns nothing
  24. native SetMapFlag           takes mapflag whichMapFlag, boolean value returns nothing
  25. native SetGamePlacement     takes placement whichPlacementType returns nothing
  26. native SetGameSpeed         takes gamespeed whichspeed returns nothing
  27. native SetGameDifficulty    takes gamedifficulty whichdifficulty returns nothing
  28. native SetResourceDensity   takes mapdensity whichdensity returns nothing
  29. native SetCreatureDensity   takes mapdensity whichdensity returns nothing
  30.  
  31. native GetTeams             takes nothing returns integer
  32. native GetPlayers           takes nothing returns integer
  33.  
  34. native IsGameTypeSupported  takes gametype whichGameType returns boolean
  35. native GetGameTypeSelected  takes nothing returns gametype
  36. native IsMapFlagSet         takes mapflag whichMapFlag returns boolean
  37.  
  38. constant native GetGamePlacement     takes nothing returns placement
  39. constant native GetGameSpeed         takes nothing returns gamespeed
  40. constant native GetGameDifficulty    takes nothing returns gamedifficulty
  41. constant native GetResourceDensity   takes nothing returns mapdensity
  42. constant native GetCreatureDensity   takes nothing returns mapdensity
  43. constant native GetStartLocationX    takes integer whichStartLocation returns real
  44. constant native GetStartLocationY    takes integer whichStartLocation returns real
  45. constant native GetStartLocationLoc  takes integer whichStartLocation returns location
  46.  
  47.  
  48. native SetPlayerTeam            takes player whichPlayer, integer whichTeam returns nothing
  49. native SetPlayerStartLocation   takes player whichPlayer, integer startLocIndex returns nothing
  50. // forces player to have the specified start loc and marks the start loc as occupied
  51. // which removes it from consideration for subsequently placed players
  52. // ( i.e. you can use this to put people in a fixed loc and then
  53. //   use random placement for any unplaced players etc )
  54. native ForcePlayerStartLocation takes player whichPlayer, integer startLocIndex returns nothing
  55. native SetPlayerColor           takes player whichPlayer, playercolor color returns nothing
  56. native SetPlayerAlliance        takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting, boolean value returns nothing
  57. native SetPlayerTaxRate         takes player sourcePlayer, player otherPlayer, playerstate whichResource, integer rate returns nothing
  58. native SetPlayerRacePreference  takes player whichPlayer, racepreference whichRacePreference returns nothing
  59. native SetPlayerRaceSelectable  takes player whichPlayer, boolean value returns nothing
  60. native SetPlayerController      takes player whichPlayer, mapcontrol controlType returns nothing
  61. native SetPlayerName            takes player whichPlayer, string name returns nothing
  62.  
  63. native SetPlayerOnScoreScreen   takes player whichPlayer, boolean flag returns nothing
  64.  
  65. native GetPlayerTeam            takes player whichPlayer returns integer
  66. native GetPlayerStartLocation   takes player whichPlayer returns integer
  67. native GetPlayerColor           takes player whichPlayer returns playercolor
  68. native GetPlayerSelectable      takes player whichPlayer returns boolean
  69. native GetPlayerController      takes player whichPlayer returns mapcontrol
  70. native GetPlayerSlotState       takes player whichPlayer returns playerslotstate
  71. native GetPlayerTaxRate         takes player sourcePlayer, player otherPlayer, playerstate whichResource returns integer
  72. native IsPlayerRacePrefSet      takes player whichPlayer, racepreference pref returns boolean
  73. native GetPlayerName            takes player whichPlayer returns string


Timer API
Reply #6 on: December 16, 2012, 09:09:12 AM

Code: jass
  1. //============================================================================
  2. // Timer API
  3. //
  4. native CreateTimer          takes nothing returns timer
  5. native DestroyTimer         takes timer whichTimer returns nothing
  6. native TimerStart           takes timer whichTimer, real timeout, boolean periodic, code handlerFunc returns nothing
  7. native TimerGetElapsed      takes timer whichTimer returns real
  8. native TimerGetRemaining    takes timer whichTimer returns real
  9. native TimerGetTimeout      takes timer whichTimer returns real
  10. native PauseTimer           takes timer whichTimer returns nothing
  11. native ResumeTimer          takes timer whichTimer returns nothing
  12. native GetExpiredTimer      takes nothing returns timer


Group API
Reply #7 on: December 16, 2012, 09:10:09 AM

Code: jass
  1. //============================================================================
  2. // Group API
  3. //
  4. native CreateGroup                          takes nothing returns group
  5. native DestroyGroup                         takes group whichGroup returns nothing
  6. native GroupAddUnit                         takes group whichGroup, unit whichUnit returns nothing
  7. native GroupRemoveUnit                      takes group whichGroup, unit whichUnit returns nothing
  8. native GroupClear                           takes group whichGroup returns nothing
  9. native GroupEnumUnitsOfType                 takes group whichGroup, string unitname, boolexpr filter returns nothing
  10. native GroupEnumUnitsOfPlayer               takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
  11. native GroupEnumUnitsOfTypeCounted          takes group whichGroup, string unitname, boolexpr filter, integer countLimit returns nothing
  12. native GroupEnumUnitsInRect                 takes group whichGroup, rect r, boolexpr filter returns nothing
  13. native GroupEnumUnitsInRectCounted          takes group whichGroup, rect r, boolexpr filter, integer countLimit returns nothing
  14. native GroupEnumUnitsInRange                takes group whichGroup, real x, real y, real radius, boolexpr filter returns nothing
  15. native GroupEnumUnitsInRangeOfLoc           takes group whichGroup, location whichLocation, real radius, boolexpr filter returns nothing
  16. native GroupEnumUnitsInRangeCounted         takes group whichGroup, real x, real y, real radius, boolexpr filter, integer countLimit returns nothing
  17. native GroupEnumUnitsInRangeOfLocCounted    takes group whichGroup, location whichLocation, real radius, boolexpr filter, integer countLimit returns nothing
  18. native GroupEnumUnitsSelected               takes group whichGroup, player whichPlayer, boolexpr filter returns nothing
  19.  
  20. native GroupImmediateOrder                  takes group whichGroup, string order returns boolean
  21. native GroupImmediateOrderById              takes group whichGroup, integer order returns boolean
  22. native GroupPointOrder                      takes group whichGroup, string order, real x, real y returns boolean
  23. native GroupPointOrderLoc                   takes group whichGroup, string order, location whichLocation returns boolean
  24. native GroupPointOrderById                  takes group whichGroup, integer order, real x, real y returns boolean
  25. native GroupPointOrderByIdLoc               takes group whichGroup, integer order, location whichLocation returns boolean
  26. native GroupTargetOrder                     takes group whichGroup, string order, widget targetWidget returns boolean
  27. native GroupTargetOrderById                 takes group whichGroup, integer order, widget targetWidget returns boolean
  28.  
  29. // This will be difficult to support with potentially disjoint, cell-based regions
  30. // as it would involve enumerating all the cells that are covered by a particularregion
  31. // a better implementation would be a trigger that adds relevant units as they enter
  32. // and removes them if they leave...
  33. native ForGroup                 takes group whichGroup, code callback returns nothing
  34. native FirstOfGroup             takes group whichGroup returns unit


Force API
Reply #8 on: December 16, 2012, 11:00:39 AM

Code: jass
  1. //============================================================================
  2. // Force API
  3. //
  4. native CreateForce              takes nothing returns force
  5. native DestroyForce             takes force whichForce returns nothing
  6. native ForceAddPlayer           takes force whichForce, player whichPlayer returns nothing
  7. native ForceRemovePlayer        takes force whichForce, player whichPlayer returns nothing
  8. native ForceClear               takes force whichForce returns nothing
  9. native ForceEnumPlayers         takes force whichForce, boolexpr filter returns nothing
  10. native ForceEnumPlayersCounted  takes force whichForce, boolexpr filter, integer countLimit returns nothing
  11. native ForceEnumAllies          takes force whichForce, player whichPlayer, boolexpr filter returns nothing
  12. native ForceEnumEnemies         takes force whichForce, player whichPlayer, boolexpr filter returns nothing
  13. native ForForce                 takes force whichForce, code callback returns nothing


Region and Location API
Reply #9 on: February 24, 2013, 09:21:36 AM

Code: jass
  1. //============================================================================
  2. // Region and Location API
  3. //
  4. native Rect                     takes real minx, real miny, real maxx, real maxy returns rect
  5. native RectFromLoc              takes location min, location max returns rect
  6. native RemoveRect               takes rect whichRect returns nothing
  7. native SetRect                  takes rect whichRect, real minx, real miny, real maxx, real maxy returns nothing
  8. native SetRectFromLoc           takes rect whichRect, location min, location max returns nothing
  9. native MoveRectTo               takes rect whichRect, real newCenterX, real newCenterY returns nothing
  10. native MoveRectToLoc            takes rect whichRect, location newCenterLoc returns nothing
  11.  
  12. native GetRectCenterX           takes rect whichRect returns real
  13. native GetRectCenterY           takes rect whichRect returns real
  14. native GetRectMinX              takes rect whichRect returns real
  15. native GetRectMinY              takes rect whichRect returns real
  16. native GetRectMaxX              takes rect whichRect returns real
  17. native GetRectMaxY              takes rect whichRect returns real
  18.  
  19. native CreateRegion             takes nothing returns region
  20. native RemoveRegion             takes region whichRegion returns nothing
  21.  
  22. native RegionAddRect            takes region whichRegion, rect r returns nothing
  23. native RegionClearRect          takes region whichRegion, rect r returns nothing
  24.  
  25. native RegionAddCell           takes region whichRegion, real x, real y returns nothing
  26. native RegionAddCellAtLoc      takes region whichRegion, location whichLocation returns nothing
  27. native RegionClearCell         takes region whichRegion, real x, real y returns nothing
  28. native RegionClearCellAtLoc    takes region whichRegion, location whichLocation returns nothing
  29.  
  30. native Location                 takes real x, real y returns location
  31. native RemoveLocation           takes location whichLocation returns nothing
  32. native MoveLocation             takes location whichLocation, real newX, real newY returns nothing
  33. native GetLocationX             takes location whichLocation returns real
  34. native GetLocationY             takes location whichLocation returns real
  35.  
  36. // This function is asynchronous. The values it returns are not guaranteed synchronous between each player.
  37. //  If you attempt to use it in a synchronous manner, it may cause a desync.
  38. native GetLocationZ             takes location whichLocation returns real
  39.  
  40. native IsUnitInRegion               takes region whichRegion, unit whichUnit returns boolean
  41. native IsPointInRegion              takes region whichRegion, real x, real y returns boolean
  42. native IsLocationInRegion           takes region whichRegion, location whichLocation returns boolean
  43.  
  44. // Returns full map bounds, including unplayable borders, in world coordinates
  45. native GetWorldBounds           takes nothing returns rect
  46.  


Native Trigger Interface
Reply #10 on: February 24, 2013, 09:24:26 AM

Code: jass
  1. //============================================================================
  2. // Native trigger interface
  3. //
  4. native CreateTrigger    takes nothing returns trigger
  5. native DestroyTrigger   takes trigger whichTrigger returns nothing
  6. native ResetTrigger     takes trigger whichTrigger returns nothing
  7. native EnableTrigger    takes trigger whichTrigger returns nothing
  8. native DisableTrigger   takes trigger whichTrigger returns nothing
  9. native IsTriggerEnabled takes trigger whichTrigger returns boolean
  10.  
  11. native TriggerWaitOnSleeps   takes trigger whichTrigger, boolean flag returns nothing
  12. native IsTriggerWaitOnSleeps takes trigger whichTrigger returns boolean
  13.  
  14. constant native GetFilterUnit       takes nothing returns unit
  15. constant native GetEnumUnit         takes nothing returns unit
  16.  
  17. constant native GetFilterDestructable   takes nothing returns destructable
  18. constant native GetEnumDestructable     takes nothing returns destructable
  19.  
  20. constant native GetFilterItem           takes nothing returns item
  21. constant native GetEnumItem             takes nothing returns item
  22.  
  23. constant native GetFilterPlayer     takes nothing returns player
  24. constant native GetEnumPlayer       takes nothing returns player
  25.  
  26. constant native GetTriggeringTrigger    takes nothing returns trigger
  27. constant native GetTriggerEventId       takes nothing returns eventid
  28. constant native GetTriggerEvalCount     takes trigger whichTrigger returns integer
  29. constant native GetTriggerExecCount     takes trigger whichTrigger returns integer
  30.  
  31. native ExecuteFunc          takes string funcName returns nothing


Boolean Expr API
Reply #11 on: February 24, 2013, 09:41:28 AM

Code: jass
  1. //============================================================================
  2. // Boolean Expr API ( for compositing trigger conditions and unit filter funcs...)
  3. //============================================================================
  4. native And              takes boolexpr operandA, boolexpr operandB returns boolexpr
  5. native Or               takes boolexpr operandA, boolexpr operandB returns boolexpr
  6. native Not              takes boolexpr operand returns boolexpr
  7. native Condition        takes code func returns conditionfunc
  8. native DestroyCondition takes conditionfunc c returns nothing
  9. native Filter           takes code func returns filterfunc
  10. native DestroyFilter    takes filterfunc f returns nothing
  11. native DestroyBoolExpr  takes boolexpr e returns nothing


Trigger Game Event API
Reply #12 on: February 24, 2013, 09:42:59 AM

Code: jass
  1. //============================================================================
  2. // Trigger Game Event API
  3. //============================================================================
  4.  
  5. native TriggerRegisterVariableEvent takes trigger whichTrigger, string varName, limitop opcode, real limitval returns event
  6.  
  7.     // EVENT_GAME_VARIABLE_LIMIT
  8.     //constant native string GetTriggeringVariableName takes nothing returns string
  9.  
  10. // Creates it's own timer and triggers when it expires
  11. native TriggerRegisterTimerEvent takes trigger whichTrigger, real timeout, boolean periodic returns event
  12.  
  13. // Triggers when the timer you tell it about expires
  14. native TriggerRegisterTimerExpireEvent takes trigger whichTrigger, timer t returns event
  15.  
  16. native TriggerRegisterGameStateEvent takes trigger whichTrigger, gamestate whichState, limitop opcode, real limitval returns event
  17.  
  18. native TriggerRegisterDialogEvent       takes trigger whichTrigger, dialog whichDialog returns event
  19. native TriggerRegisterDialogButtonEvent takes trigger whichTrigger, button whichButton returns event
  20.  
  21. //  EVENT_GAME_STATE_LIMIT
  22. constant native GetEventGameState takes nothing returns gamestate
  23.  
  24. native TriggerRegisterGameEvent takes trigger whichTrigger, gameevent whichGameEvent returns event
  25.  
  26. // EVENT_GAME_VICTORY
  27. constant native GetWinningPlayer takes nothing returns player
  28.  
  29.  
  30. native TriggerRegisterEnterRegion takes trigger whichTrigger, region whichRegion, boolexpr filter returns event
  31.  
  32. // EVENT_GAME_ENTER_REGION
  33. constant native GetTriggeringRegion takes nothing returns region
  34. constant native GetEnteringUnit takes nothing returns unit
  35.  
  36. // EVENT_GAME_LEAVE_REGION
  37.  
  38. native TriggerRegisterLeaveRegion takes trigger whichTrigger, region whichRegion, boolexpr filter returns event
  39. constant native GetLeavingUnit takes nothing returns unit
  40.  
  41. native TriggerRegisterTrackableHitEvent takes trigger whichTrigger, trackable t returns event
  42. native TriggerRegisterTrackableTrackEvent takes trigger whichTrigger, trackable t returns event
  43.  
  44. // EVENT_GAME_TRACKABLE_HIT
  45. // EVENT_GAME_TRACKABLE_TRACK
  46. constant native GetTriggeringTrackable takes nothing returns trackable
  47.  
  48. // EVENT_DIALOG_BUTTON_CLICK
  49. constant native GetClickedButton takes nothing returns button
  50. constant native GetClickedDialog    takes nothing returns dialog
  51.  
  52. // EVENT_GAME_TOURNAMENT_FINISH_SOON
  53. constant native GetTournamentFinishSoonTimeRemaining takes nothing returns real
  54. constant native GetTournamentFinishNowRule takes nothing returns integer
  55. constant native GetTournamentFinishNowPlayer takes nothing returns player
  56. constant native GetTournamentScore takes player whichPlayer returns integer
  57.  
  58. // EVENT_GAME_SAVE
  59. constant native GetSaveBasicFilename takes nothing returns string


Trigger Player Based Event API
Reply #13 on: February 24, 2013, 09:44:26 AM

Code: jass
  1. //============================================================================
  2. // Trigger Player Based Event API
  3. //============================================================================
  4.  
  5. native TriggerRegisterPlayerEvent takes trigger whichTrigger, player  whichPlayer, playerevent whichPlayerEvent returns event
  6.  
  7. // EVENT_PLAYER_DEFEAT
  8. // EVENT_PLAYER_VICTORY
  9. constant native GetTriggerPlayer takes nothing returns player
  10.  
  11. native TriggerRegisterPlayerUnitEvent takes trigger whichTrigger, player whichPlayer, playerunitevent whichPlayerUnitEvent, boolexpr filter returns event
  12.  
  13. // EVENT_PLAYER_HERO_LEVEL
  14. // EVENT_UNIT_HERO_LEVEL
  15. constant native GetLevelingUnit takes nothing returns unit
  16.  
  17. // EVENT_PLAYER_HERO_SKILL
  18. // EVENT_UNIT_HERO_SKILL
  19. constant native GetLearningUnit      takes nothing returns unit
  20. constant native GetLearnedSkill      takes nothing returns integer
  21. constant native GetLearnedSkillLevel takes nothing returns integer
  22.  
  23. // EVENT_PLAYER_HERO_REVIVABLE
  24. constant native GetRevivableUnit takes nothing returns unit
  25.  
  26. // EVENT_PLAYER_HERO_REVIVE_START
  27. // EVENT_PLAYER_HERO_REVIVE_CANCEL
  28. // EVENT_PLAYER_HERO_REVIVE_FINISH
  29. // EVENT_UNIT_HERO_REVIVE_START
  30. // EVENT_UNIT_HERO_REVIVE_CANCEL
  31. // EVENT_UNIT_HERO_REVIVE_FINISH
  32. constant native GetRevivingUnit takes nothing returns unit
  33.  
  34. // EVENT_PLAYER_UNIT_ATTACKED
  35. constant native GetAttacker takes nothing returns unit
  36.  
  37. // EVENT_PLAYER_UNIT_RESCUED
  38. constant native GetRescuer  takes nothing returns unit
  39.  
  40. // EVENT_PLAYER_UNIT_DEATH
  41. constant native GetDyingUnit takes nothing returns unit
  42. constant native GetKillingUnit takes nothing returns unit
  43.  
  44. // EVENT_PLAYER_UNIT_DECAY
  45. constant native GetDecayingUnit takes nothing returns unit
  46.  
  47. // EVENT_PLAYER_UNIT_SELECTED
  48. //constant native GetSelectedUnit takes nothing returns unit
  49.  
  50. // EVENT_PLAYER_UNIT_CONSTRUCT_START
  51. constant native GetConstructingStructure takes nothing returns unit
  52.  
  53. // EVENT_PLAYER_UNIT_CONSTRUCT_FINISH
  54. // EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL
  55. constant native GetCancelledStructure takes nothing returns unit
  56. constant native GetConstructedStructure takes nothing returns unit
  57.  
  58. // EVENT_PLAYER_UNIT_RESEARCH_START
  59. // EVENT_PLAYER_UNIT_RESEARCH_CANCEL
  60. // EVENT_PLAYER_UNIT_RESEARCH_FINISH
  61. constant native GetResearchingUnit takes nothing returns unit
  62. constant native GetResearched takes nothing returns integer
  63.  
  64. // EVENT_PLAYER_UNIT_TRAIN_START
  65. // EVENT_PLAYER_UNIT_TRAIN_CANCEL
  66. constant native GetTrainedUnitType takes nothing returns integer
  67.  
  68. // EVENT_PLAYER_UNIT_TRAIN_FINISH
  69. constant native GetTrainedUnit takes nothing returns unit
  70.  
  71. // EVENT_PLAYER_UNIT_DETECTED
  72. constant native GetDetectedUnit takes nothing returns unit
  73.  
  74. // EVENT_PLAYER_UNIT_SUMMONED
  75. constant native GetSummoningUnit    takes nothing returns unit
  76. constant native GetSummonedUnit     takes nothing returns unit
  77.  
  78. // EVENT_PLAYER_UNIT_LOADED
  79. constant native GetTransportUnit    takes nothing returns unit
  80. constant native GetLoadedUnit       takes nothing returns unit
  81.  
  82. // EVENT_PLAYER_UNIT_SELL
  83. constant native GetSellingUnit      takes nothing returns unit
  84. constant native GetSoldUnit         takes nothing returns unit
  85. constant native GetBuyingUnit       takes nothing returns unit
  86.  
  87. // EVENT_PLAYER_UNIT_SELL_ITEM
  88. constant native GetSoldItem         takes nothing returns item
  89.  
  90. // EVENT_PLAYER_UNIT_CHANGE_OWNER
  91. constant native GetChangingUnit             takes nothing returns unit
  92. constant native GetChangingUnitPrevOwner    takes nothing returns player
  93.  
  94. // EVENT_PLAYER_UNIT_DROP_ITEM
  95. // EVENT_PLAYER_UNIT_PICKUP_ITEM
  96. // EVENT_PLAYER_UNIT_USE_ITEM
  97. constant native GetManipulatingUnit takes nothing returns unit
  98. constant native GetManipulatedItem  takes nothing returns item
  99.  
  100. // EVENT_PLAYER_UNIT_ISSUED_ORDER
  101. constant native GetOrderedUnit takes nothing returns unit
  102. constant native GetIssuedOrderId takes nothing returns integer
  103.  
  104. // EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER
  105. constant native GetOrderPointX takes nothing returns real
  106. constant native GetOrderPointY takes nothing returns real
  107. constant native GetOrderPointLoc takes nothing returns location
  108.  
  109. // EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER
  110. constant native GetOrderTarget              takes nothing returns widget
  111. constant native GetOrderTargetDestructable  takes nothing returns destructable
  112. constant native GetOrderTargetItem          takes nothing returns item
  113. constant native GetOrderTargetUnit          takes nothing returns unit
  114.  
  115. // EVENT_UNIT_SPELL_CHANNEL
  116. // EVENT_UNIT_SPELL_CAST
  117. // EVENT_UNIT_SPELL_EFFECT
  118. // EVENT_UNIT_SPELL_FINISH
  119. // EVENT_UNIT_SPELL_ENDCAST
  120. // EVENT_PLAYER_UNIT_SPELL_CHANNEL
  121. // EVENT_PLAYER_UNIT_SPELL_CAST
  122. // EVENT_PLAYER_UNIT_SPELL_EFFECT
  123. // EVENT_PLAYER_UNIT_SPELL_FINISH
  124. // EVENT_PLAYER_UNIT_SPELL_ENDCAST
  125. constant native GetSpellAbilityUnit         takes nothing returns unit
  126. constant native GetSpellAbilityId           takes nothing returns integer
  127. constant native GetSpellAbility             takes nothing returns ability
  128. constant native GetSpellTargetLoc           takes nothing returns location
  129. constant native GetSpellTargetX                         takes nothing returns real
  130. constant native GetSpellTargetY                         takes nothing returns real
  131. constant native GetSpellTargetDestructable  takes nothing returns destructable
  132. constant native GetSpellTargetItem          takes nothing returns item
  133. constant native GetSpellTargetUnit          takes nothing returns unit
  134.  
  135. native TriggerRegisterPlayerAllianceChange takes trigger whichTrigger, player whichPlayer, alliancetype whichAlliance returns event
  136. native TriggerRegisterPlayerStateEvent takes trigger whichTrigger, player whichPlayer, playerstate whichState, limitop opcode, real limitval returns event
  137.  
  138. // EVENT_PLAYER_STATE_LIMIT
  139. constant native GetEventPlayerState takes nothing returns playerstate
  140.  
  141. native TriggerRegisterPlayerChatEvent takes trigger whichTrigger, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event
  142.  
  143. // EVENT_PLAYER_CHAT
  144.  
  145. // returns the actual string they typed in ( same as what you registered for
  146. // if you required exact match )
  147. constant native GetEventPlayerChatString takes nothing returns string
  148.  
  149. // returns the string that you registered for
  150. constant native GetEventPlayerChatStringMatched takes nothing returns string
  151.  
  152. native TriggerRegisterDeathEvent takes trigger whichTrigger, widget whichWidget returns event


Trigger Unit Based Event API
Reply #14 on: February 24, 2013, 09:45:19 AM

Code: jass
  1. //============================================================================
  2. // Trigger Unit Based Event API
  3. //============================================================================
  4.  
  5. // returns handle to unit which triggered the most recent event when called from
  6. // within a trigger action function...returns null handle when used incorrectly
  7.  
  8. constant native GetTriggerUnit takes nothing returns unit
  9.  
  10. native TriggerRegisterUnitStateEvent takes trigger whichTrigger, unit whichUnit, unitstate whichState, limitop opcode, real limitval returns event
  11.  
  12. // EVENT_UNIT_STATE_LIMIT
  13. constant native GetEventUnitState takes nothing returns unitstate
  14.  
  15. native TriggerRegisterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent returns event
  16.  
  17. // EVENT_UNIT_DAMAGED
  18. constant native GetEventDamage takes nothing returns real
  19. constant native GetEventDamageSource takes nothing returns unit
  20.  
  21. // EVENT_UNIT_DEATH
  22. // EVENT_UNIT_DECAY
  23. // Use the GetDyingUnit and GetDecayingUnit funcs above
  24.  
  25. // EVENT_UNIT_DETECTED
  26. constant native GetEventDetectingPlayer takes nothing returns player
  27.  
  28. native TriggerRegisterFilterUnitEvent takes trigger whichTrigger, unit whichUnit, unitevent whichEvent, boolexpr filter returns event
  29.  
  30. // EVENT_UNIT_ACQUIRED_TARGET
  31. // EVENT_UNIT_TARGET_IN_RANGE
  32. constant native GetEventTargetUnit takes nothing returns unit
  33.  
  34. // EVENT_UNIT_ATTACKED
  35. // Use GetAttacker from the Player Unit Event API Below...
  36.  
  37. // EVENT_UNIT_RESCUEDED
  38. // Use GetRescuer from the Player Unit Event API Below...
  39.  
  40. // EVENT_UNIT_CONSTRUCT_CANCEL
  41. // EVENT_UNIT_CONSTRUCT_FINISH
  42.  
  43. // See the Player Unit Construction Event API above for event info funcs
  44.  
  45. // EVENT_UNIT_TRAIN_START
  46. // EVENT_UNIT_TRAIN_CANCELLED
  47. // EVENT_UNIT_TRAIN_FINISH
  48.  
  49. // See the Player Unit Training Event API above for event info funcs
  50.  
  51. // EVENT_UNIT_SELL
  52.  
  53. // See the Player Unit Sell Event API above for event info funcs
  54.  
  55. // EVENT_UNIT_DROP_ITEM
  56. // EVENT_UNIT_PICKUP_ITEM
  57. // EVENT_UNIT_USE_ITEM
  58. // See the Player Unit/Item manipulation Event API above for event info funcs
  59.  
  60. // EVENT_UNIT_ISSUED_ORDER
  61. // EVENT_UNIT_ISSUED_POINT_ORDER
  62. // EVENT_UNIT_ISSUED_TARGET_ORDER
  63.  
  64. // See the Player Unit Order Event API above for event info funcs
  65.  
  66. native TriggerRegisterUnitInRange takes trigger whichTrigger, unit whichUnit, real range, boolexpr filter returns event
  67.  
  68. native TriggerAddCondition    takes trigger whichTrigger, boolexpr condition returns triggercondition
  69. native TriggerRemoveCondition takes trigger whichTrigger, triggercondition whichCondition returns nothing
  70. native TriggerClearConditions takes trigger whichTrigger returns nothing
  71.  
  72. native TriggerAddAction     takes trigger whichTrigger, code actionFunc returns triggeraction
  73. native TriggerRemoveAction  takes trigger whichTrigger, triggeraction whichAction returns nothing
  74. native TriggerClearActions  takes trigger whichTrigger returns nothing
  75. native TriggerSleepAction   takes real timeout returns nothing
  76. native TriggerWaitForSound  takes sound s, real offset returns nothing
  77. native TriggerEvaluate      takes trigger whichTrigger returns boolean
  78. native TriggerExecute       takes trigger whichTrigger returns nothing
  79. native TriggerExecuteWait   takes trigger whichTrigger returns nothing
  80. native TriggerSyncStart     takes nothing returns nothing
  81. native TriggerSyncReady     takes nothing returns nothing


Widget API
Reply #15 on: February 24, 2013, 09:54:02 AM

Code: jass
  1. //============================================================================
  2. // Widget API
  3. native  GetWidgetLife   takes widget whichWidget returns real
  4. native  SetWidgetLife   takes widget whichWidget, real newLife returns nothing
  5. native  GetWidgetX      takes widget whichWidget returns real
  6. native  GetWidgetY      takes widget whichWidget returns real
  7. constant native GetTriggerWidget takes nothing returns widget


Destructable Object API
Reply #16 on: February 24, 2013, 09:55:14 AM

Code: jass
  1. //============================================================================
  2. // Destructable Object API
  3. // Facing arguments are specified in degrees
  4. native          CreateDestructable          takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable
  5. native          CreateDestructableZ         takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable
  6. native          CreateDeadDestructable      takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable
  7. native          CreateDeadDestructableZ     takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable
  8. native          RemoveDestructable          takes destructable d returns nothing
  9. native          KillDestructable            takes destructable d returns nothing
  10. native          SetDestructableInvulnerable takes destructable d, boolean flag returns nothing
  11. native          IsDestructableInvulnerable  takes destructable d returns boolean
  12. native          EnumDestructablesInRect     takes rect r, boolexpr filter, code actionFunc returns nothing
  13. native          GetDestructableTypeId       takes destructable d returns integer
  14. native          GetDestructableX            takes destructable d returns real
  15. native          GetDestructableY            takes destructable d returns real
  16. native          SetDestructableLife         takes destructable d, real life returns nothing
  17. native          GetDestructableLife         takes destructable d returns real
  18. native          SetDestructableMaxLife      takes destructable d, real max returns nothing
  19. native          GetDestructableMaxLife      takes destructable d returns real
  20. native          DestructableRestoreLife     takes destructable d, real life, boolean birth returns nothing
  21. native          QueueDestructableAnimation  takes destructable d, string whichAnimation returns nothing
  22. native          SetDestructableAnimation    takes destructable d, string whichAnimation returns nothing
  23. native          SetDestructableAnimationSpeed takes destructable d, real speedFactor returns nothing
  24. native          ShowDestructable            takes destructable d, boolean flag returns nothing
  25. native          GetDestructableOccluderHeight takes destructable d returns real
  26. native          SetDestructableOccluderHeight takes destructable d, real height returns nothing
  27. native          GetDestructableName         takes destructable d returns string
  28. constant native GetTriggerDestructable takes nothing returns destructable


Item API
Reply #17 on: February 24, 2013, 09:56:54 AM

Code: jass
  1. //============================================================================
  2. // Item API
  3. native          CreateItem      takes integer itemid, real x, real y returns item
  4. native          RemoveItem      takes item whichItem returns nothing
  5. native          GetItemPlayer   takes item whichItem returns player
  6. native          GetItemTypeId   takes item i returns integer
  7. native          GetItemX        takes item i returns real
  8. native          GetItemY        takes item i returns real
  9. native          SetItemPosition takes item i, real x, real y returns nothing
  10. native          SetItemDropOnDeath  takes item whichItem, boolean flag returns nothing
  11. native          SetItemDroppable takes item i, boolean flag returns nothing
  12. native          SetItemPawnable takes item i, boolean flag returns nothing
  13. native          SetItemPlayer    takes item whichItem, player whichPlayer, boolean changeColor returns nothing
  14. native          SetItemInvulnerable takes item whichItem, boolean flag returns nothing
  15. native          IsItemInvulnerable  takes item whichItem returns boolean
  16. native          SetItemVisible  takes item whichItem, boolean show returns nothing
  17. native          IsItemVisible   takes item whichItem returns boolean
  18. native          IsItemOwned     takes item whichItem returns boolean
  19. native          IsItemPowerup   takes item whichItem returns boolean
  20. native          IsItemSellable  takes item whichItem returns boolean
  21. native          IsItemPawnable  takes item whichItem returns boolean
  22. native          IsItemIdPowerup takes integer itemId returns boolean
  23. native          IsItemIdSellable takes integer itemId returns boolean
  24. native          IsItemIdPawnable takes integer itemId returns boolean
  25. native          EnumItemsInRect     takes rect r, boolexpr filter, code actionFunc returns nothing
  26. native          GetItemLevel    takes item whichItem returns integer
  27. native          GetItemType     takes item whichItem returns itemtype
  28. native          SetItemDropID   takes item whichItem, integer unitId returns nothing
  29. constant native GetItemName     takes item whichItem returns string
  30. native          GetItemCharges  takes item whichItem returns integer
  31. native          SetItemCharges  takes item whichItem, integer charges returns nothing
  32. native          GetItemUserData takes item whichItem returns integer
  33. native          SetItemUserData takes item whichItem, integer data returns nothing


Unit API
Reply #18 on: February 24, 2013, 09:58:04 AM

Code: jass
  1. //============================================================================
  2. // Unit API
  3. // Facing arguments are specified in degrees
  4. native          CreateUnit              takes player id, integer unitid, real x, real y, real face returns unit
  5. native          CreateUnitByName        takes player whichPlayer, string unitname, real x, real y, real face returns unit
  6. native          CreateUnitAtLoc         takes player id, integer unitid, location whichLocation, real face returns unit
  7. native          CreateUnitAtLocByName   takes player id, string unitname, location whichLocation, real face returns unit
  8. native          CreateCorpse            takes player whichPlayer, integer unitid, real x, real y, real face returns unit
  9.  
  10. native          KillUnit            takes unit whichUnit returns nothing
  11. native          RemoveUnit          takes unit whichUnit returns nothing
  12. native          ShowUnit            takes unit whichUnit, boolean show returns nothing
  13.  
  14. native          SetUnitState        takes unit whichUnit, unitstate whichUnitState, real newVal returns nothing
  15. native          SetUnitX            takes unit whichUnit, real newX returns nothing
  16. native          SetUnitY            takes unit whichUnit, real newY returns nothing
  17. native          SetUnitPosition     takes unit whichUnit, real newX, real newY returns nothing
  18. native          SetUnitPositionLoc  takes unit whichUnit, location whichLocation returns nothing
  19. native          SetUnitFacing       takes unit whichUnit, real facingAngle returns nothing
  20. native          SetUnitFacingTimed  takes unit whichUnit, real facingAngle, real duration returns nothing
  21. native          SetUnitMoveSpeed    takes unit whichUnit, real newSpeed returns nothing
  22. native          SetUnitFlyHeight    takes unit whichUnit, real newHeight, real rate returns nothing
  23. native          SetUnitTurnSpeed    takes unit whichUnit, real newTurnSpeed returns nothing
  24. native          SetUnitPropWindow   takes unit whichUnit, real newPropWindowAngle returns nothing
  25. native          SetUnitAcquireRange takes unit whichUnit, real newAcquireRange returns nothing
  26. native          SetUnitCreepGuard   takes unit whichUnit, boolean creepGuard returns nothing
  27.  
  28. native          GetUnitAcquireRange     takes unit whichUnit returns real
  29. native          GetUnitTurnSpeed        takes unit whichUnit returns real
  30. native          GetUnitPropWindow       takes unit whichUnit returns real
  31. native          GetUnitFlyHeight        takes unit whichUnit returns real
  32.  
  33. native          GetUnitDefaultAcquireRange      takes unit whichUnit returns real
  34. native          GetUnitDefaultTurnSpeed         takes unit whichUnit returns real
  35. native          GetUnitDefaultPropWindow        takes unit whichUnit returns real
  36. native          GetUnitDefaultFlyHeight         takes unit whichUnit returns real
  37.  
  38. native          SetUnitOwner        takes unit whichUnit, player whichPlayer, boolean changeColor returns nothing
  39. native          SetUnitColor        takes unit whichUnit, playercolor whichColor returns nothing
  40.  
  41. native          SetUnitScale        takes unit whichUnit, real scaleX, real scaleY, real scaleZ returns nothing
  42. native          SetUnitTimeScale    takes unit whichUnit, real timeScale returns nothing
  43. native          SetUnitBlendTime    takes unit whichUnit, real blendTime returns nothing
  44. native          SetUnitVertexColor  takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing
  45.  
  46. native          QueueUnitAnimation          takes unit whichUnit, string whichAnimation returns nothing
  47. native          SetUnitAnimation            takes unit whichUnit, string whichAnimation returns nothing
  48. native          SetUnitAnimationByIndex     takes unit whichUnit, integer whichAnimation returns nothing
  49. native          SetUnitAnimationWithRarity  takes unit whichUnit, string whichAnimation, raritycontrol rarity returns nothing
  50. native          AddUnitAnimationProperties  takes unit whichUnit, string animProperties, boolean add returns nothing
  51.  
  52. native          SetUnitLookAt       takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
  53. native          ResetUnitLookAt     takes unit whichUnit returns nothing
  54.  
  55. native          SetUnitRescuable    takes unit whichUnit, player byWhichPlayer, boolean flag returns nothing
  56. native          SetUnitRescueRange  takes unit whichUnit, real range returns nothing
  57.  
  58. native          SetHeroStr          takes unit whichHero, integer newStr, boolean permanent returns nothing
  59. native          SetHeroAgi          takes unit whichHero, integer newAgi, boolean permanent returns nothing
  60. native          SetHeroInt          takes unit whichHero, integer newInt, boolean permanent returns nothing
  61.  
  62. native          GetHeroStr          takes unit whichHero, boolean includeBonuses returns integer
  63. native          GetHeroAgi          takes unit whichHero, boolean includeBonuses returns integer
  64. native          GetHeroInt          takes unit whichHero, boolean includeBonuses returns integer
  65.  
  66. native          UnitStripHeroLevel  takes unit whichHero, integer howManyLevels returns boolean
  67.  
  68. native          GetHeroXP           takes unit whichHero returns integer
  69. native          SetHeroXP           takes unit whichHero, integer newXpVal,  boolean showEyeCandy returns nothing
  70.  
  71. native          GetHeroSkillPoints      takes unit whichHero returns integer
  72. native          UnitModifySkillPoints   takes unit whichHero, integer skillPointDelta returns boolean
  73.  
  74. native          AddHeroXP           takes unit whichHero, integer xpToAdd,   boolean showEyeCandy returns nothing
  75. native          SetHeroLevel        takes unit whichHero, integer level,  boolean showEyeCandy returns nothing
  76. constant native GetHeroLevel        takes unit whichHero returns integer
  77. constant native GetUnitLevel        takes unit whichUnit returns integer
  78. native          GetHeroProperName   takes unit whichHero returns string
  79. native          SuspendHeroXP       takes unit whichHero, boolean flag returns nothing
  80. native          IsSuspendedXP       takes unit whichHero returns boolean
  81. native          SelectHeroSkill     takes unit whichHero, integer abilcode returns nothing
  82. native          GetUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  83. native          DecUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  84. native          IncUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
  85. native          SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer
  86. native          ReviveHero          takes unit whichHero, real x, real y, boolean doEyecandy returns boolean
  87. native          ReviveHeroLoc       takes unit whichHero, location loc, boolean doEyecandy returns boolean
  88. native          SetUnitExploded     takes unit whichUnit, boolean exploded returns nothing
  89. native          SetUnitInvulnerable takes unit whichUnit, boolean flag returns nothing
  90. native          PauseUnit           takes unit whichUnit, boolean flag returns nothing
  91. native          IsUnitPaused        takes unit whichHero returns boolean
  92. native          SetUnitPathing      takes unit whichUnit, boolean flag returns nothing
  93.  
  94. native          ClearSelection      takes nothing returns nothing
  95. native          SelectUnit          takes unit whichUnit, boolean flag returns nothing
  96.  
  97. native          GetUnitPointValue       takes unit whichUnit returns integer
  98. native          GetUnitPointValueByType takes integer unitType returns integer
  99. //native        SetUnitPointValueByType takes integer unitType, integer newPointValue returns nothing
  100.  
  101. native          UnitAddItem             takes unit whichUnit, item whichItem returns boolean
  102. native          UnitAddItemById         takes unit whichUnit, integer itemId returns item
  103. native          UnitAddItemToSlotById   takes unit whichUnit, integer itemId, integer itemSlot returns boolean
  104. native          UnitRemoveItem          takes unit whichUnit, item whichItem returns nothing
  105. native          UnitRemoveItemFromSlot  takes unit whichUnit, integer itemSlot returns item
  106. native          UnitHasItem             takes unit whichUnit, item whichItem returns boolean
  107. native          UnitItemInSlot          takes unit whichUnit, integer itemSlot returns item
  108. native          UnitInventorySize       takes unit whichUnit returns integer
  109.  
  110. native          UnitDropItemPoint       takes unit whichUnit, item whichItem, real x, real y returns boolean
  111. native          UnitDropItemSlot        takes unit whichUnit, item whichItem, integer slot returns boolean
  112. native          UnitDropItemTarget      takes unit whichUnit, item whichItem, widget target returns boolean
  113.  
  114. native          UnitUseItem             takes unit whichUnit, item whichItem returns boolean
  115. native          UnitUseItemPoint        takes unit whichUnit, item whichItem, real x, real y returns boolean
  116. native          UnitUseItemTarget       takes unit whichUnit, item whichItem, widget target returns boolean
  117.  
  118. constant native GetUnitX            takes unit whichUnit returns real
  119. constant native GetUnitY            takes unit whichUnit returns real
  120. constant native GetUnitLoc          takes unit whichUnit returns location
  121. constant native GetUnitFacing       takes unit whichUnit returns real
  122. constant native GetUnitMoveSpeed    takes unit whichUnit returns real
  123. constant native GetUnitDefaultMoveSpeed takes unit whichUnit returns real
  124. constant native GetUnitState        takes unit whichUnit, unitstate whichUnitState returns real
  125. constant native GetOwningPlayer     takes unit whichUnit returns player
  126. constant native GetUnitTypeId       takes unit whichUnit returns integer
  127. constant native GetUnitRace         takes unit whichUnit returns race
  128. constant native GetUnitName         takes unit whichUnit returns string
  129. constant native GetUnitFoodUsed     takes unit whichUnit returns integer
  130. constant native GetUnitFoodMade     takes unit whichUnit returns integer
  131. constant native GetFoodMade         takes integer unitId returns integer
  132. constant native GetFoodUsed         takes integer unitId returns integer
  133. native          SetUnitUseFood      takes unit whichUnit, boolean useFood returns nothing
  134.  
  135. constant native GetUnitRallyPoint           takes unit whichUnit returns location
  136. constant native GetUnitRallyUnit            takes unit whichUnit returns unit
  137. constant native GetUnitRallyDestructable    takes unit whichUnit returns destructable
  138.  
  139. constant native IsUnitInGroup       takes unit whichUnit, group whichGroup returns boolean
  140. constant native IsUnitInForce       takes unit whichUnit, force whichForce returns boolean
  141. constant native IsUnitOwnedByPlayer takes unit whichUnit, player whichPlayer returns boolean
  142. constant native IsUnitAlly          takes unit whichUnit, player whichPlayer returns boolean
  143. constant native IsUnitEnemy         takes unit whichUnit, player whichPlayer returns boolean
  144. constant native IsUnitVisible       takes unit whichUnit, player whichPlayer returns boolean
  145. constant native IsUnitDetected      takes unit whichUnit, player whichPlayer returns boolean
  146. constant native IsUnitInvisible     takes unit whichUnit, player whichPlayer returns boolean
  147. constant native IsUnitFogged        takes unit whichUnit, player whichPlayer returns boolean
  148. constant native IsUnitMasked        takes unit whichUnit, player whichPlayer returns boolean
  149. constant native IsUnitSelected      takes unit whichUnit, player whichPlayer returns boolean
  150. constant native IsUnitRace          takes unit whichUnit, race whichRace returns boolean
  151. constant native IsUnitType          takes unit whichUnit, unittype whichUnitType returns boolean
  152. constant native IsUnit              takes unit whichUnit, unit whichSpecifiedUnit returns boolean
  153. constant native IsUnitInRange       takes unit whichUnit, unit otherUnit, real distance returns boolean
  154. constant native IsUnitInRangeXY     takes unit whichUnit, real x, real y, real distance returns boolean
  155. constant native IsUnitInRangeLoc    takes unit whichUnit, location whichLocation, real distance returns boolean
  156. constant native IsUnitHidden        takes unit whichUnit returns boolean
  157. constant native IsUnitIllusion      takes unit whichUnit returns boolean
  158.  
  159. constant native IsUnitInTransport   takes unit whichUnit, unit whichTransport returns boolean
  160. constant native IsUnitLoaded        takes unit whichUnit returns boolean
  161.  
  162. constant native IsHeroUnitId        takes integer unitId returns boolean
  163. constant native IsUnitIdType        takes integer unitId, unittype whichUnitType returns boolean
  164.  
  165. native UnitShareVision              takes unit whichUnit, player whichPlayer, boolean share returns nothing
  166. native UnitSuspendDecay             takes unit whichUnit, boolean suspend returns nothing
  167. native UnitAddType                  takes unit whichUnit, unittype whichUnitType returns boolean
  168. native UnitRemoveType               takes unit whichUnit, unittype whichUnitType returns boolean
  169.  
  170. native UnitAddAbility               takes unit whichUnit, integer abilityId returns boolean
  171. native UnitRemoveAbility            takes unit whichUnit, integer abilityId returns boolean
  172. native UnitMakeAbilityPermanent     takes unit whichUnit, boolean permanent, integer abilityId returns boolean
  173. native UnitRemoveBuffs              takes unit whichUnit, boolean removePositive, boolean removeNegative returns nothing
  174. native UnitRemoveBuffsEx            takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing
  175. native UnitHasBuffsEx               takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns boolean
  176. native UnitCountBuffsEx             takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns integer
  177. native UnitAddSleep                 takes unit whichUnit, boolean add returns nothing
  178. native UnitCanSleep                 takes unit whichUnit returns boolean
  179. native UnitAddSleepPerm             takes unit whichUnit, boolean add returns nothing
  180. native UnitCanSleepPerm             takes unit whichUnit returns boolean
  181. native UnitIsSleeping               takes unit whichUnit returns boolean
  182. native UnitWakeUp                   takes unit whichUnit returns nothing
  183. native UnitApplyTimedLife           takes unit whichUnit, integer buffId, real duration returns nothing
  184. native UnitIgnoreAlarm              takes unit whichUnit, boolean flag returns boolean
  185. native UnitIgnoreAlarmToggled       takes