Quote:
So I've lightly modified the DoA script and tried to add in statements to search for and pick up q8 max dmg weapons but the function "GetItemMaxDmg" doesn't exist in GWA2, Inventory or the main script. Anyone know of a function to do something similar to this line?
If $Attribute = 20 And $Requirement = 8 And GetItemMaxDmg($itemstruct) = 22 Then ; req8 Swords - Swordsmanship
Return True
I thought Q8 max items did not drop in DOA because the enemy are too high of a level.
Here try this for your function:
Code:
Func GetItemMaxDmg($aItem)
If Not IsDllStruct($aItem) Then $aItem = GetItemByItemID($aItem)
Local $lModString = GetModStruct($aItem)
Local $lPos = StringInStr($lModString, "A8A7") ; Weapon Damage
If $lPos = 0 Then $lPos = StringInStr($lModString, "C867") ; Energy (focus)
If $lPos = 0 Then $lPos = StringInStr($lModString, "B8A7") ; Armor (shield)
If $lPos = 0 Then Return 0
Return Int("0x" & StringMid($lModString, $lPos - 2, 2))
EndFunc ;==>GetItemMaxDmg
Func GetIsRareShield($aItem)
Local $Attribute = GetItemAttribute($aItem)
Local $Requirement = GetItemReq($aItem)
Local $Damage = GetItemMaxDmg($aItem)
If $Attribute = $ATTRIB_Swordsmanship And $Requirement <= 8 And $Damage = 22 Then ; req8 Swords
Return True
ElseIf $Attribute = $ATTRIB_Strength And $Requirement <= 8 And $Damage = 16 Then ; req8 Shields
Return True
ElseIf $Attribute = $ATTRIB_Tactics And $Requirement <= 8 And $Damage = 16 Then ; Req8 Shields
Return True
ElseIf $Attribute = $ATTRIB_Command And $Requirement <= 8 And $Damage = 16 Then ; Req8 Shields
Return True
ElseIf $Attribute = $ATTRIB_Motivation And $Requirement <= 8 And $Damage = 16 Then ; Req Shields
Return True
EndIf
Return False
EndFunc
I have seen other ways to do it. Here is another example:
Code:
Func IsQ8MaxItem($aItem) Local $Attribute = GetItemAttribute($aItem) Local $Requirement = GetItemReq($aItem) Local $lRarity = GetRarity($aItem) If $lRarity <> $RARITY_WHITE And $Requirement == 8 Then If ($Attribute == $Swordsmanship And GetItemMaxDmg($aItem) == 22) Then Return True If ($Attribute == $AxeMastery And GetItemMaxDmg($aItem) == 28) Then Return True If ($Attribute == $HammerMastery And GetItemMaxDmg($aItem) == 35) Then Return True If ($Attribute == $Marksmanship And GetItemMaxDmg($aItem) == 28) Then Return True If ($Attribute == $DaggerMastery And GetItemMaxDmg($aItem) == 17) Then Return True If ($Attribute == $ScytheMastery And GetItemMaxDmg($aItem) == 41) Then Return True If ($Attribute == $Spearmastery And GetItemMaxDmg($aItem) == 27) Then Return True If (IsShieldAttribute($Attribute) And GetItemMaxDmg($aItem) == 16) Then Return True If (IsCasterAttribute($Attribute) And GetItemMaxDmg($aItem) == 22) Then Return True If (IsCasterAttribute($Attribute) And GetItemMaxDmg($aItem) == 12) Then Return True EndIf Return False EndFunc Func IsQArmourShield($aItem, $aReq, $aArmor) Local $Attribute = GetItemAttribute($aItem) Local $Requirement = GetItemReq($aItem) Local $lRarity = GetRarity($aItem) If $lRarity <> $RARITY_WHITE And $Requirement == $aReq Then If (IsShieldAttribute($Attribute) And GetItemMaxDmg($aItem) >= $aArmor) Then Return True EndIf Return False EndFunc Func IsCasterAttribute($Attribute) Return (($Attribute >= $FastCasting And $Attribute <= $DivineFavor) Or ($Attribute >= $Communing And $Attribute <= $ChannelingMagic)) EndFunc Func IsShieldAttribute($Attribute) Return ($Attribute == $Strength Or $Attribute == $Tactics Or $Attribute == $Command Or $Attribute == $Motivation) EndFunc
Code:
#Region Attributes Global $FastCasting = 0 Global $IllusionMagic = 1 Global $DominationMagic = 2 Global $InspirationMagic = 3 Global $BloodMagic = 4 Global $DeathMagic = 5 Global $SoulReaping = 6 Global $Curses = 7 Global $AirMagic = 8 Global $EarthMagic = 9 Global $FireMagic = 10 Global $WaterMagic = 11 Global $EnergyStorage = 12 Global $HealingPrayers = 13 Global $SmitingPrayers = 14 Global $ProtectionPrayers = 15 Global $DivineFavor = 16 Global $Strength = 17 Global $AxeMastery = 18 Global $HammerMastery = 19 Global $Swordsmanship = 20 Global $Tactics = 21 Global $BeastMastery = 22 Global $Expertise = 23 Global $WildernessSurivival = 24 Global $Marksmanship = 25 Global $DaggerMastery = 29 Global $DeadlyArts = 30 Global $ShadowArts = 31 Global $Communing = 32 Global $RestorationMagic = 33 Global $ChannelingMagic = 34 Global $CriticalStrikes = 35 Global $SpawningPower = 36 Global $Spearmastery = 37 Global $Command = 38 Global $Motivation = 39 Global $Leadership = 40 Global $ScytheMastery = 41 Global $WindPrayers = 42 Global $EarthPrayers = 43 Global $Mysticism = 44 #EndRegion Attributes