My favorites | Sign in
Project Home Downloads Wiki Source
Search
for
GWCACommands  
Documentation of all GWCA commands
Featured
Updated May 26, 2010 by sunec...@gmail.com

This page contains documentation of all of the GWCA commands and how they are interacted with.

How-to use

First of all, to use GWCA you must inject the .Dll into Guild Wars. This can be done by using a Dll Injector application (search google).

Communication between GWCA and your script is performed using Named Pipes to make sure speeds are always at the best.

In AutoIt3, simply look at some of the scripts in the Scripts folder to get an idea of how it is done. Remember also to 'register' the necessary custom messages for your GUI using 'GUIRegisterMsg(identifier, functionname)'.

You can register up to 3 different messages with GWCA:

  • The SkillLogCallback and PartyCallback (0x4A): This uses the WM_COPYDATA message to send a structure from GWCA which contains information about skills being cast. See the GWCA SkillLog or Interrupt Bot. The SkillLogCallback is also the PartyCallback, which returns lots of information about your party. See GWCA MiniParty View for this.
  • The SkillCancelCallback (0x501): Which is commonly used with the SkillLogCallback if you wish to track which skills are cancelled/interrupted aswell.
  • The SkillCompleteCallback (0x502): Used to check whenever a skill completes activating. Does not trigger on skills without activation nor attack skills.

For instruction on how to use these 'Callbacks' please have a look at some of the example scripts in Scripts folder.

Also note, that when using the GWCA functions in AutoIt3, remember to set the $cbType variable to the right type before you use a command. For example, when you use CA_GETCOORDS, remember to set $cbType to "float", so that the values are automatically un-packed. If you - for some reason - wants to get a float value but $cbType = "int" then you may use the function _IntToFloat(). Use _FloatToInt() to do it the other way around. Return values are always in the $cbVar array. $cbVar[0] = first value, $cbVar[1] = last value, but you may also specify a variable that receives the contents of $cbVar - just take note that it's an array!

And last, but still very important: When using commands that require an id (of an agent), specifying -1 will automatically use your current target, and -2 will automatically use your self.

List of Commands

The commands follow a distinct identifier pattern because they are a custom enumeration. To use them in AutoIt3, this enumeration has been pre-declared in 'GWCAConstants.au3' so you don't have to remember all the numbers though.

General commands:

Command Description
CA_GetCurrentTarget No parameters, returns an integer with the id of your current target.
CA_GetMyId No parameters, returns an integer with the id of your own agent.
CA_Casting No parameters, returns a boolean which tells whether or not you're using a skill.
CA_SkillRecharge Parameter = skillslot, returns an integer which is either a timestamp if the skill is recharging, or 0 if it's recharged.
CA_SkillAdrenaline Parameter = skillslot, returns an integer telling how many points of adrenaline the specified skill has.
CA_SetLogAndHwnd Parameter = boolean to enable skill log, parameter 2 = hwnd of your script's window.
CA_GetAgentAndTargetPtr No parameters, used for debugging purposes.
CA_GetSkillbarSkillId Parameter = skillslot, obsolete.
CA_GetMyMaxHP No parameters, returns an integer with your max hp and an integer with your current hp. Optional parameter, supply the agent id of a hero to get the information on that instead.
CA_GetMyMaxEnergy No parameters, returns an integer with your max energy and an integer with your current energy. Optional parameter, supply the agent id of a hero to get the information on that instead.
CA_GetBuildNumber No parameters, returns an integer with the current build number of the GW client you're running.
CA_ChangeMaxZoom Parameter = integer with zoom value, changes your max zoom. Default is 750, default for observer mode is 1400.
CA_GetLastDialogId No parameters. Returns an integer with the id of the latest dialog option pressed. To be used with CA_Dialog.
CA_SetEngineHook Parameter = boolean whether to turn on or off. Disables rendering of graphics completely lowering CPU usage to 0-1%. Big thanks to ACB for this!
CA_GetHeroCasting Parameter = hero index. Returns the Casting variable of specified hero, just like CA_Casting for yourself.
CA_GetHeroSkillRecharge Parameter = hero index, parameter 2 = skill slot. Returns a timestamp of when the skill finishes recharging or 0 if recharged. Use HeroRechargeTimeLeft() to cope easier.
CA_GetHeroSkillAdrenaline Parameter = hero index, parameter 2 = skill slot. Returns the current amount of adrenaline points (not strikes) of the specified skill.
CA_GetHeroSkillId Parameter = hero index, parameter 2 = skill slot. Returns the skill id of the specified skill.
CA_GetHeroAgentId Parameter = hero index. Returns the agent id of the specified hero.


Action-related commands:

Command Description
CA_Attack Parameter = id of target, attacks the specified target with weapon.
CA_Move Parameters = X and Y coords of location to move to, remember to pack the float values (or simply use MoveEx()) when using this command.
CA_MoveOld Same parameters as CA_Move. This command uses the old mechanics of Move - simply sending a CLICK_LOCATION packet.
CA_UseSkill Parameter = skill slot, parameter 2 = target id. Works on all skills including attack skills. Remember that some skills that target yourself may require that specified (if so, use -2 as target id). Current target = -1.
CA_ChangeWeaponSet Parameter = weapon slot, changes weapon set.
CA_ZoneMap Parameter = zone id, optional parameter 2 = district number (use 0 for active district), zones to the outpost/city specified and if district number is provided also attempts to enter that district. Always uses current region and language.
CA_DropGold Parameter = amount of gold, drops the gold on the ground.
CA_GoNpc Parameter = id of NPC, goes to specified NPC.
CA_GoPlayer Parameter = id of player, goes to specified player (for use in outposts/cities).
CA_GoSignpost Parameter = id of signpost/chest, goes to specified signpost/chest (yellow name).
CA_EnterChallenge No parameters, enters the challenge if you're in a Challenge Mission outpost.
CA_EnterChallengeForeign No parameters, used after CA_EnterChallenge, it allows you to skip past the foreign character window.
CA_OpenChest No parameters, opens the nearest chest if you're within 'close range'.
CA_SetEventSkillMode Obsolete, don't use it.
CA_PickupItem Parameter = agent id of item, picks up the specified item.
CA_Dialog Parameter = dialog option id, experimental function, requires knowledge about the NPC's dialog options. Can be found by using CA_GetLastDialogId
CA_ChangeTarget Parameter = id of target, changes target.
CA_TargetNearestFoe No parameters, targets the nearest foe.
CA_TargetNearestAlly No parameters, targets the nearest ally.
CA_TargetNearestItem No parameters, targets the nearest item/signpost/chest.
CA_TargetCalledTarget No parameters, targets the currently called target of the party.
CA_UseHero1Skill Parameter = skillslot, parameter 2 = id of target.
CA_UseHero2Skill Parameter = skillslot, parameter 2 = id of target.
CA_UseHero3Skill Parameter = skillslot, parameter 2 = id of target.
CA_CancelAction No parameters, cancels your current action. Just like pressing ESC.
CA_GetName Parameter = id of target, returns a pointer to a wchar_t with the name of the player (can only be used for players), which can be ReadProcessMemory()'ed.
CA_CommandHero1 Parameters = X and Y floats packed of course. To unflag, set X and Y to $FLAG_RESET like this: Cmd($CA_CommandHero1, $FLAG_RESET, $FLAG_RESET)
CA_CommandHero2 Same as CA_COMMANDHERO1.
CA_CommandHero3 Same as CA_COMMANDHERO1.
CA_CommandAll Same as CA_COMMANDHERO1.
CA_ChangeDistrict Parameter = region (-2 = international, 0 = america, 1 = asia korean, 2 = europe, 3 = asia chinese, 4 = asia japanese), parameter 2 = language (experiment around with this!).
CA_Resign No parameters.
CA_UpdateAgentPosition Parameter = agent id (or -1/-2). Abuses the fact that the client actually knows where you are, even though it may not display the correct position.
CA_ReturnToOutpost No parameters. "Presses" the Return To Outpost button after resigning.
CA_GoAgent Parameter = id of agent. Goes to the specified target. Same as follow. Will not open NPC dialog or attack enemy.
CA_DonateFaction Parameter = 0 for Kurzick, 1 for Luxon. Donates 5000 faction towards your faction. Not recently tested, but it should require open dialog with Faction Npc.
CA_SetSkillbarSkill Parameter = skill slot, parameter 2 = skill id.
CA_ChangeSecondProfession Parameter = profession number. Follows this enumeration 0-10 = { None,W,R,Mo,N,Me,E,A,Rt,P,D }.
CA_TargetNextPartyMember No parameters. Functions like the GW Control: Targetting - Party Member: Next
CA_TargetNextFoe No parameters. Functions like the GW Control: Targetting - Next Foe
CA_SkipCinematic No parameters. Skips the current cinematic/cutscene.
CA_DismissBuff Parameter = Hero (from 0 = self to 3 = Hero3), parameter 2 = index of the buff in order it was casted.
CA_SendChat Parameter = pointer to text. Use SendChat() in GWCAConstants.au3 as wrapper function.
CA_WriteWhisper Parameter = pointer to message, parameter 2 = pointer to sender. Use wrapper function WriteWhisper() in GWCAConstants.au3
CA_OpenStorage No parameters. Experimental function which visually opens your storage. Note: only works after opening your storage once! Else GW will crash!
CA_PrepareZoneMapEx Internal command. Please use ZoneMapEx() function instead of this.
CA_ZoneMapEx Internal command. Requires previous call to CA_PrepareZoneMapEx, so please use ZoneMapEx() function instead of this.


Specific memory commands:

Command Description
CA_GetMapLoading No parameters, returns an integer which is 0, 1 or 2.
CA_GetMapId No parameters, returns the id of the current map/zone.
CA_GetPing No parameters, returns the current ping displayed on the Performance Monitor in GW.
CA_GetLoggedIn No parameters, returns boolean.
CA_GetDead No parameters, returns boolean, but kinda obsolete though.
CA_GetBalthFaction No parameters, returns integer of current balthazar faction and integer of maximum balthazar faction.
CA_GetKurzFaction No parameters, returns integer of current kurzick faction and integer of maximum kurzick faction.
CA_GetLuxonFaction No parameters, returns integer of current luxon faction and integer of maximum luxon faction.
CA_GetTitleTreasure No parameters, returns integer of current treasure title.
CA_GetTitleLucky No parameters, returns integer of current lucky title.
CA_GetTitlyUnlucky No parameters, returns integer of current unlucky title.
CA_GetTitleWisdom No parameters, returns integer of current wisdom title.
CA_GetTitleGamer No parameters, returns integer of current gamer title.
CA_GetExperience No parameters, returns integer of your current experience points.
CA_GetConnection No parameters, returns integer of your connection status. 2 = logged into character, 1/0 = not logged into character.
CA_GetMatchStatus No parameters, returns integer of the match status. For RA, when in a match, this value is 1 before it starts, 2 when started, and 3 when the match is over (check if you're dead at this point to see if you won the match). Values may vary in other PvP types!


Agent info commands:

Command Description
CA_GetAgentExist Parameter = id of agent/target, returns boolean.
CA_GetProfessions Parameter = id of agent, returns integer of primary and integer of secondary profession.
CA_GetPlayerNumber Parameter = id of agent, returns integer of player number or, if the agent is an NPC/monster, the 'Model number'.
CA_GetHP Parameter = id of agent, returns float between 0 and 1 with the health in percent.
CA_GetRotation Parameter = id of agent, returns float of rotation in degrees.
CA_GetSkill Parameter = id of agent, returns integer of current skill being used by agent.
CA_GetCoords Parameter = id of agent, returns float of X and float of Y coordinate, packed of course.
CA_GetWeaponSpeeds Parameter = id of agent, returns floats of the weapon speeds (figure them out yourself if you really need them).
CA_GetSpiritRange Obsolete and unfunctional.
CA_GetTeamId Parameter = id of agent, returns integer of team id. 1 = blue, 2 = red, 3 = yellow and so on.
CA_GetCombatMode Obsolete, don't use it.
CA_GetModelMode Also obsolete.
CA_GetHpPips Parameter = id of agent, returns integer of how many pips the target has.
CA_GetEffects Parameter = id of agent, returns bitmap with the information that displays the different effects that you see on the health bar of the target, like enchanted, poisoned, deep wound etc.
CA_GetHex Parameter = id of agent, returns integer. If 0, target is not hexed. If 1, target is hexed without degen and if 2, target is hexed with degen.
CA_GetModelAnimation Parameter = id of agent, returns integer. The model animation number depends on profession and sex, but can be used to determine emotes, etc.
CA_GetEnergy Obsolete, as it only works for yourself. Just use CA_GetMyMaxEnergy.
CA_GetAgentPtr Parameter = id of agent, returns pointer to the agent structure of target in GW memory.
CA_GetAgentMovementPtr Parameter = id of agent, returns pointer to the agent movement structure of target in GW memory.
CA_GetType Parameter = id of agent, returns integer. 0xDB = players/npc's/monsters (living stuff), 0x200 = signposts/chests/solid objects, 0x400 = items that can be picked up.
CA_GetLevel Parameter = id of agent, returns integer with the level.
CA_GetNameProperties Obsolete.
CA_GetMaxId No parameters, returns integer with the size of the agent array divided by 4 (because the agent array consists of Agent pointers (pointer = 4 bytes)).
CA_GetMyNearestAgent No parameters, returns id of your nearest agent.
CA_GetMyDistanceToAgent Parameter = id of agent, returns float with distance.
CA_GetNearestAgentToAgent Parameter = id of agent, returns id of the nearest agent to the specified agent.
CA_GetDistanceFromAgentToAgent Parameter = id of agent, parameter 2 = id of other agent. Returns the distance between the two agents as a float.
CA_GetNearestAgentToAgentEx Parameter = id of agent, same as CA_GetNearestAgentToAgent, but also returns float with distance between them.
CA_GetModelState Kinda obsolete.
CA_GetIsAttacking Parameter = id of agent, returns boolean.
CA_GetIsKnockedDown Parameter = id of agent, returns boolean.
CA_GetIsMoving Same as the other 'Is' commands, but this one can even tell the truth through rubberbanding and random stuck!
CA_GetIsDead Same as the other 'Is' commands.
CA_GetIsCasting Obsolete when there's CA_GetSkill, but whatever.
CA_GetFirstAgentByPlayerNumber Parameter = player/model number, returns the first (id-wise) agent with that number.
CA_GetAllegiance Parameter = id of agent, returns integer with the allegiance of agent. 0x100 = ally/non-attackable, 0x300 = enemy, 0x400 = spirit/pet, 0x500 = minion, 0x600 = npc/minipet.
CA_GetNearestEnemyToAgentEx Parameter = id of agent, returns id of nearest enemy to agent by team id (so, only for PvP) and float of distance.
CA_GetIsAttackedMelee Parameter = id of agent, returns integer with estimate of whether agent is being attacked by melee. Kinda obsolete function.
CA_GetNearestItemToAgentEx Parameter = id of agent, returns agent id of item and distance as float.
CA_GetNearestAgentByPlayerNumber Same as CA_GetFirstAgentByPlayerNumberexcept it returns the nearest agent to you.
CA_GetSpeed Parameter = id of agent, returns float with current speed of agent (how far the agent moves per second in GW units).
CA_GetNearestEnemyToAgentByAllegiance Parameter = id of agent, returns id of enemy and distance as float. Only works for yourself or your allies.
CA_GetNearestAliveEnemyToAgent Parameter = id of agent, returns id of enemy and distance as float. Only works for yourself or your allies.
CA_GetWeaponType Parameter = id of agent, returns integer with weapon type. 1=bow, 2=axe, 3=hammer, 4=daggers, 5=scythe, 6=spear, 7=sword, 10=wand.
CA_GetNearestSignpostToAgent Parameter = id of agent, returns id of the nearest signpost/chest.
CA_GetNearestNpcToAgentByAllegiance Parameter = id of agent, returns id of the nearest NPC.
CA_GetNearestAgentToCoords Parameters = x and y coordinates packed. Returns the nearest agent to the specified coords.
CA_GetNearestNpcToCoords Parameters = x and y coordinates packed. Returns the nearest NPC to the specified coords.
CA_GetLoginNumber Parameter = id of agent. Returns the unique login number in instance of player. If used on non-player it will return 0.
CA_GetNumberOfAgentsByPlayerNumber Parameter = player/model number. Returns the number of alive agents within compass range with specified id.
CA_GetNumberOfAliveEnemyAgents No parameters. Returns the number of alive and visible enemy agents in total.
CA_GetNextItem Parameter = starting id. Returns the agent id of the next item. For looping through all items, use this command with the returned agent id as parameter after taking care of that item.
CA_GetTarget Parameter = agent id. Returns the currently logged target of the specified agent.
CA_SetAttribute Parameter = attribute id, parameter 2 = value. Remember to use CA_ResetAttributes before starting to set attributes in scripts! See the $ATTRIB constants in GWCAConstants.au3 or http://wiki.guildwars.com/wiki/Template_format for attribute id's.
CA_ResetAttributes No parameters. Resets the saved attributes, does NOT set your attributes to 0! To be used before a series of CA_SetAttribute.
CA_PlayerHasBuff Parameter = Skill Id. Returns boolean.
CA_Hero1HasBuff Parameter = Skill Id. Returns boolean.
CA_Hero2HasBuff Parameter = Skill Id. Returns boolean.
CA_Hero3HasBuff Parameter = Skill Id. Returns boolean.
CA_GetAgentDanger Parameter = agent id (or -1/-2). Returns the number of foes to the agent which are currently targetting it.
CA_GetTypeMap Parameter = agent id (or -1/-2). Returns the bitmap integer used to determine things such as boss (0xC00), spirit (0x40000) and player (0x400000). Remember to use BitAND() like with CA_GetEffects.
CA_GetAgentWeapons Parameter = agent id (or -1/-2). Returns the item id('s) of the agent's weapon(s). Can be used to acquire a bit more detailed info about weapons than CA_GetWeaponType.
CA_GetNextAgent Parameter = starting id. Returns the agent id of the next valid agent. For looping through all agents, use this command with the returned agent id again.
CA_GetNextAlly Parameter = starting id. Returns the agent id of the next valid ally. For looping through all allies, use this command with the returned agent id again.
CA_GetNextFoe Parameter = starting id. Returns the agent id of the next valid foe. For looping through all foes, use this command with the returned agent id again.
CA_GetExtraType Paramter = agent id (or -1/-2). Returns the extra type of the agent as integer. This number can be used for distinguishing between chests and signposts for example.
CA_PrepareNearestPlayerNumberToCoords Parameter = player/model number. Sets up the CA_GetNearestPlayerNumberToCoords command. But please use the wrapper function GetNearestPlayerNumberToCoords() in GWCAConstants.au3 instead!
CA_GetNearestPlayerNumberToCoords Parameters = coordinate set in packed floats. Requires previous call to CA_PrepareNearestPlayerNumberToCoords. But please use the wrapper function GetNearestPlayerNumberToCoords() in GWCAConstants.au3 instead!
CA_GetFirstAgentByPlayerNumberByTeam Parameter = player/model number, parameter 2 = team id. Returns the first agent (iteration-wise) with the specified player/model number and team id making you able to easily identify your Ghostly Hero etc. in PvP.
CA_GetNearestAliveEnemyToCoords Parameters = coordinate set in packed floats. Returns the nearest alive enemy to the specified coordinates and the distance to the enemy.
CA_GetNextAliveFoe Parameter = starting id. Returns the agent id of the next valid alive foe. For looping through all alive foes, use this command with the returned agent id again.
CA_PrepareNearestAliveEnemyToCoordsByPlayerNumber Internal command used in GetNearestAliveEnemyToCoordsByPlayerNumber(). Please use this function instead!
CA_GetNearestAliveEnemyToCoordsByPlayerNumber Internal command. Requires previous call to CA_PrepareNearestAliveEnemyToCoordsByPlayerNumber, but please use the GetNearestAliveEnemyToCoordsByPlayerNumber() function instead!
CA_GetNearestAliveAgentByPlayerNumber Parameter = player/model number. Returns the nearest alive agent with specified player/model number and your distance to it.


Item related commands:

Command Description
CA_GetGold No parameters. Returns integer with gold on your character and integer with gold in your storage.
CA_GetBagSize Parameter = bag index (see $BAG declarations in GWCAConstants.au3). Returns the number of slots and the number of items currently in the bag.
CA_SetBag Parameter = bag index. Sets the current bag to work with.
CA_GetItemId Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns item id and item model id.
CA_GetIdKit No parameters. Returns item id of the first ID kit it finds. If return is non-zero then you have an ID kit in your inventory.
CA_IdentifyItem Parameter = bag index, parameter 2 = item slot.
CA_IdentifyItemById Parameter = item id. If you've returned the item id from one of the prior commands you can use this command instead of CA_IdentifyItem.
CA_DepositGold Parameter = amount of gold to deposit in storage. Specify -1 if you want to deposit the maximum amount. Can be used anywhere in the outpost.
CA_WithdrawGold Parameter = amount of gold to withdraw from storage. Specify -1 if you want to withdraw the maximum amount. Can be used anywhere in the outpost.
CA_SellItem Parameter = bag index, parameter 2 = item slot. Requires an open dialog with the Merchant of the outpost!
CA_SellItemById Parameter = item id. Requires an open dialog with the Merchant of the outpost!
CA_BuyIdKit No parameters. Requires an open dialog with the Merchant of the outpost!
CA_BuySuperiorIdKit No parameters. Requires an open dialog with the Merchant of the outpost!
CA_PrepareMoveItem For internal use. Use the wrapper functions MoveItem() and MoveItemById() instead.
CA_MoveItem For internal use. Use the wrapper functions MoveItem() and MoveItemById() instead. See the declaration of the bag id's in GWCAConstants.au3
CA_GetItemInfo Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns integer with item rarity and integer with quantity.
CA_UseItem Parameter = bag index, parameter 2 = item slot. Uses the item specified.
CA_UseItemById Parameter = item id. Uses the item specified.
CA_DropItem Parameter = bag index, parameter 2 = item slot. Drops the specified item. If the quantity is above 1 then this command will drop it all.
CA_DropItemById Parameter = item id, parameter 2 = amount. Drops the specified item by the specified amount. Setting amount to -1 will drop it all.
CA_AcceptAllItems No parameters. Accepts all unclaimed items (from the unclaimed items window that may appear). Doesn't check if there isn't room for all the items, this simply accepts them!
CA_GetItemLastModifier Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns integer with the last modifier of the item and wchar_t* with customize text. Last modifier can be used to check which dye (model id 146) it is. If customize text = 0 then item is not customized.
CA_FindItemByModelId Parameter = item model id. Searches for the first occurence of the specified model id and returns integer with the item id or 0 if item wasn't found.
CA_FindEmptySlot Parameter = bag index to start searching from. Returns integer with bag index and integer with item slot. This function also searches the storage. If any of the returns = 0, then no empty slots were found.
CA_FindGoldItem Optional parameter = bag index of last bag to search in. Searches from the backpack until (and including) the bag index supplied. If not set the function will search all bags including storage. The return is integer with item id of the gold item found and integer with the item's model id. If return value is 0 then no gold items were found.
CA_GetItemPositionByItemId Parameter = item id. Returns the position of the item; bag and slot-wise. If any of the returns are 0, the item was not found.
CA_GetItemPositionByModelId Parameter = item model id. Returns the position of the item; bag and slot-wise. If any of the returns are 0, the item was not found.
CA_GetItemPositionByRarity Parameter = rarity (use constants declared in GWCAConstants.au3). Returns the position of the item; bag and slot-wise. If any of the returns are 0, the item was not found.
CA_GetItemModelIdById Parameter = item id. Returns the model id of the specified item.
CA_GetItemInfoById Parameter = item id. Returns the rarity and quantity of the specified item.
CA_GetItemLastModifierById Parameter = item id. Returns the last modifier (see CA_GetItemLastModifier) and customized text of the specified item.
CA_EquipItem Parameter = bag index, parameter 2 = item slot. Equips the specified item.
CA_EquipItemById Parameter = item id. Equips the specified item.
CA_SalvageItem Parameter = item id OR locate item by index with bag index,item slot. Searches for a salvage kit and uses it on the specified item. Currently disabled cause it doesnt work!
CA_GetSalvageKit No parameters. Searches for a salvage kit and returns the item id if it finds one.
CA_BuyItem Parameter = merchant item index (in the order you see at your merchant's window, starting from 1), parameter 2 = gold cost of the item. Buys the specified item if you used the right gold cost.
CA_GetItemIdByAgent Parameter = agent id (or -1/-2). Returns item id and model id of the specified agent, if it's an item.
CA_GetItemInfoByAgent Parameter = agent id (or -1/-2). Returns item rarity and quantity of the specified agent, if it's an item.
CA_GetItemLastModifierByAgent Parameter = agent id (or -1/-2). Returns the last modifier (see CA_GetItemLastModifier) and customized wchar_t of the specified agent, if it's an item.
CA_GetNearestItemByModelId Parameter = item model id. Finds the nearest item with the specified model id and returns the agent id and the distance between you and the item as a float.
CA_GetItemExtraId Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns the extra id of the item - used to determine dye color etc.
CA_GetItemExtraIdById Parameter = item id. Returns the extra id of the item - used to determine dye color etc.
CA_GetItemExtraIdByAgent Parameter = agent id (or -1/-2). Returns the extra id of the item - used to determine dye color etc.
CA_GetItemReq Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns the attribute requirement of the item.
CA_GetItemReqById Parameter = item id. Returns the attribute requirement of the item.
CA_GetItemReqByAgent Parameter = agent id (or -1/-2). Returns the attribute requirement of the item.
CA_GetDyePositionByColor Parameter = dye color id (see GWCAConstants.au3 $DYE), optional parameter 2 = starting bag. Returns the position, if found, of the specified dye as bag,slot.
CA_GetItemDmgMod Parameter = item slot. Optional parameter = bag index (otherwise use CA_SetBag). Returns the damage mod of the item. Only works for offhands/shields!
CA_GetItemDmgModById Parameter = item id. Returns the damage mod of the item. Only works for offhands/shields!
CA_GetItemDmgModByAgent Parameter = agent id (or -1/-2). Returns the damage mod of the item. Only works for offhands/shields!


Title related commands:

Command Description
CA_GetTitleSunspear No parameters. Returns integer with title progress.
CA_GetTitleLightbringer No parameters. Returns integer with title progress.
CA_GetTitleVanguard No parameters. Returns integer with title progress.
CA_GetTitleNorn No parameters. Returns integer with title progress.
CA_GetTitleAsura No parameters. Returns integer with title progress.
CA_GetTitleDeldrimor No parameters. Returns integer with title progress.
CA_GetTitleNorthMastery No parameters. Returns integer with title progress.
CA_GetTitleDrunkard No parameters. Returns integer with title progress.
CA_GetTitleSweet No parameters. Returns integer with title progress.
CA_GetTitleParty No parameters. Returns integer with title progress.
CA_GetTitleCommander No parameters. Returns integer with title progress.
CA_GetTitleLuxon No parameters. Returns integer with title progress.
CA_GetTitleKurzick No parameters. Returns integer with title progress.


More general commands:

Command Description
CA_AddHero Parameter = hero id. Adds hero to the party.
CA_KickHero Parameter = hero id. Kicks hero from the party.
CA_SwitchMode Parameter = boolean to set HM or NM. HM = 1, NM = 0.
CA_AddNpc Parameter = henchman id according to Party Search list. Adds henchman to the party.
CA_KickNpc Parameter = henchman id. Kicks henchman from the party.
CA_TravelGH No parameters. Travels to your Guild Hall.
CA_LeaveGH No parameters. Leaves your Guild Hall.
CA_InitMapLoad No parameters. Inits the CA_MapIsLoaded command.
CA_MapIsLoaded No parameters. Returns boolean. Use CA_InitMapLoad before !!!
CA_GetMapOverlayCoords Parameter = map overlay id (get this with CA_GetNearestMapOverlayToCoords). Returns the x,y coords of the specified map overlay.
CA_GetMapOverlayInfo Parameter = map overlay id. Returns the option variable (usually color) and the icon model id of the specified map overlay.
CA_GetNearestMapOverlayToCoords Parameters = x and y coordinates packed. Returns the nearest Map Overlay to the specified coords.
CA_GetPartyInfo Parameter = team id, parameter 2 = script hwnd. Advanced command. Uses a team size of 8 by default. Change this with CA_SetTeamSize. See the definition of $tagPARTYINFO in GWCAConstants.au3 and the example script GWCA MiniParty View.au3.
CA_ClearPacketQueue No parameters. Advanced command to clean up packet queue if GW surprises you with a load screen (to avoid crashing). If used with CmdCB() it returns the number of packets removed from the queue.
CA_SetHeroMode Parameter = hero index (1,2,3), parameter 2 = hero mode (see $HEROMODE variables). Changes the mode of the specified hero to the specified state. 0 = fight, 1 = guard, 2 = avoid.
CA_QuestCheck Parameter = quest id (or -1 for active quest). If the quest is in your Quest Log, it returns the quest id and the current log state.
CA_QuestCoords Parameter = quest id (or -1 for active quest). If the quest is in your Quest Log, it returns the X,Y coordinates of the marker.
CA_QuestActive No parameters. Returns the quest id of the currently active quest.
CA_QuestAbandon Parameter = quest id (or -1 for active quest). Abandons the specified quest.
CA_SetTeamSize Parameter = team size. For use with CA_GetPartyInfo. Set the team size to be evaluated using the CA_GetPartyInfo command.
CA_AllocMem Parameter = size. Returns pointer to memory. Example script: http://pastebin.com/f52bae4a0 - credits to Gabba for the function.
CA_FreeMem Parameter = 0, parameter 2 = pointer to memory. Frees allocated memory.
CA_GetRegionAndLanguage No parameters. Returns your current region and language.
CA_TraderRequest Parameter = item index. The item index is the number on the list at the trader. For the Rune trader experiment around. Use this to setup CA_TraderBuy.
CA_TraderCheck No parameters. Returns the trader item id and it's cost that is currently active. Loop this until the item id or cost is non-zero to verify that the info has been received before calling CA_TraderBuy.
CA_TraderBuy No parameters. Optionally returns whether the packet was sent or not as boolean. Requires a CA_TraderRequest and waiting until item id and cost has been received before it works!
CA_TraderRequestSell Parameter = bag index, parameter 2 = item slot. Sends a Request Quote on the specified item (remember to use the right trader for the item). Wait using CA_TraderCheck until the info is received.
CA_TraderRequestSellById Parameter = item id. Same as CA_TraderRequestSell, but instead, simply takes an item id as input.
CA_TraderSell No parameters. Optionally returns whether the packet was sent or not as boolean. Requires a CA_TraderRequestSell(ById) and waiting until item id and cost has been received before it works!
CA_GetNumberOfFoesInRangeOfAgent Parameter = agent id (or -1/-2), parameter 2 = radius as float. Returns the number of foes counted.
CA_GetNumberOfAlliesInRangeOfAgent Parameter = agent id (or -1/-2), parameter 2 = radius as float. Returns the number of allies counted.
CA_GetNumberOfItemsInRangeOfAgent Parameter = agent id (or -1/-2), parameter 2 = radius as float. Returns the number of items counted.
CA_TradePlayer Parameter = agent id (or -1/-2). Like pressing the "Trade" button next to a player's name.
CA_GetMapBoundariesPtr No parameters. Returns a pointer to the structure that defines the boundaries of the current map. If return is zero, the client hasn't fully loaded the zone.
CA_GetTimeStamp No parameters. Returns the current internal time stamp. Used in skill recharges, effects durations and other things.
CA_LockHero Parameter = hero index, parameter 2 = agent target (or -1/-2). Set to 0 to un-lock the target of the hero.
CA_CancelMaintainedEnchantment Parameter = skill id. Cancels the specified self-targetting or in other way targetting you maintained enchantment.
CA_GetSkillType Parameter = skill id. Returns the type of the specified skill. See the $SKILLTYPE variables in GWCAConstants.au3 for use.


Player trade related commands

Command Description
CA_SubmitOffer Parameter = gold amount to offer. Like pressing the "Submit Offer" button, but also including the amount of gold offered.
CA_ChangeOffer No parameters. Like pressing the "Change Offer" button.
CA_OfferItem Parameter = bag index, parameter 2 = item slot OR parameter 1 = item id and parameter 2 = 0. Offers the specified item in the trade window.
CA_CancelTrade No parameters. Like pressing the "Cancel" button in a trade.
CA_AcceptTrade No parameters. Like pressing the "Accept" button in a trade. Can only be used after both players have submitted their offer.


Effect monitor related commands

Command Description
CA_GetEffectCount No parameters. Returns the number of effects currently on you.
CA_GetEffect Parameter = skill id. If the effect exists on you, the id of the effect is returned.
CA_GetEffectByIndex Parameter = index (0-based) of effect. Returns the skill id of the specified effect.
CA_GetEffectDuration Parameter = skill id. If the effect exists on you, the total duration and the current time left of the effect is returned as floats in milliseconds.


Equipment related commands

Command Description
CA_GetEquipmentModelId Parameter = agent id (or -1/-2), parameter 2 = equipment index. Returns the model id of the specified equipment piece.
CA_GetEquipmentDyeInfo Parameter = agent id (or -1/-2), parameter 2 = equipment index. Returns the dye id and shinyness of the specified equipment piece.
CA_SetEquipmentAgent Parameter = agent id (or -1/-2). Sets the agent to currently work with equipment commands. Does not need to be set for the Get commands - only the Set commands.
CA_SetEquipmentModelId Parameter = equipment index, parameter 2 = item model id. Sets the model id of the equipment piece and updates the agent.
CA_SetEquipmentDye Parameter = equipment index, parameter 2 = dye id. Sets the dye id of the equipment piece and updates the agent.
CA_SetEquipmentShinyness Parameter = equipment index, parameter 2 = shinyness. Sets the shinyness of the equipment piece and updates the agent. The shinyness is the rendering mask that is used alongside the dye id.


Sign in to add a comment
Powered by Google Project Hosting