Attempting to Find Item Damage/Armor Before Picking Up

02/28/2024 21:50 albino albatross#1
Hello I am quite new to AutoIt and GWA2. I found there are several useful functions for finding out the item's ModelID, Rarity, and Requirement. But I was wondering if there is anyway to return the item's damage/armor numbers (before picking it up). For example, if I wanted to only pick up max damage swords (15-22) and not anything else.
03/01/2024 15:32 Kronos8#2
Hello, this should do the trick :
Quote:
;~ Get the item damage (maximum, not minimum)
Func GetItemMaxDmg($item)
If Not IsDllStruct($item) Then $item = GetItemByItemID($item)
Local $modString = GetModStruct($item)
Local $position = StringInStr($modString, "A8A7"); Weapon Damage
If $position = 0 Then $position = StringInStr($modString, "C867"); Energy (focus)
If $position = 0 Then $position = StringInStr($modString, "B8A7"); Armor (shield)
If $position = 0 Then Return 0
Return Int("0x" & StringMid($modString, $position - 2, 2))
EndFunc
03/03/2024 04:06 albino albatross#3
Thank you that works well!