Originally Posted by logicdoor
I would like to ask 3 questions:
(1) Currently, the MoveandAggro function is a bit annoying because it will sometimes go back to a way point that is further back if the fight function made the bot overrun. Wouldn't it be better if we were able to make the function use the waypoints that are actually closest to current position instead of previous waypoints?
For example if we structure the way points as an array, and then use MoveAndAggro($Arrray), instead of doing the way points in sequential order, we could have the function pick the way point that is currently closes to current position and start from there.
Can you think of a way to do that?
(2) Is there a way to identify chests easily. So far I found I can use either their "name" (inconvenience of having to mange multi-languages), or the static type GetIsStatic() or "extra type" 4582 or 8141.
I thought using extra type would work fine, but on froggy level 2, GotoSignPost($aAgent) makes my char attack the boulder? How can I prevent that?
(3) I have found an array of of runes and insignias to help salvage useful mods, but I haven't found a way to check if a weapon has useful mods or inscriptions. I would like an array of all mods and inscriptions to test against to see if a weapon has those or not.
Code:
Global $array_Runes[184][4] = [ _
[15545, "Dervish Rune of Minor Earth Prayers", 8, "012BE821"], _
[15545, "Dervish Rune of Minor Mysticism", 8, "012CE821"], _
[15545, "Dervish Rune of Minor Scythe Mastery", 8, "0129E821"], _
[15545, "Dervish Rune of Minor Wind Prayers", 8, "012AE821"], _
[15546, "Dervish Rune of Major Earth Prayers", 8, "022BE8210703"], _
[15546, "Dervish Rune of Major Mysticism", 8, "022CE8210703"], _
[15546, "Dervish Rune of Major Scythe Mastery", 8, "0229E8210703"], _
[15546, "Dervish Rune of Major Wind Prayers", 8, "022AE8210703"], _
[15547, "Dervish Rune of Superior Earth Prayers", 8, "032BE8210903"], _
[15547, "Dervish Rune of Superior Mysticism", 8, "032CE8210903"], _
[15547, "Dervish Rune of Superior Scythe Mastery", 8, "0329E8210903"], _
[15547, "Dervish Rune of Superior Wind Prayers", 8, "032AE8210903"], _
[15548, "Paragon Rune of Minor Command", 8, "0126E821"], _
[15548, "Paragon Rune of Minor Leadership", 8, "0128E821"], _
[15548, "Paragon Rune of Minor Motivation", 8, "0127E821"], _
[15548, "Paragon Rune of Minor Spear Mastery", 8, "0125E821"], _
[15549, "Paragon Rune of Major Command", 8, "0226E8210D03"], _
[15549, "Paragon Rune of Major Leadership", 8, "0228E8210D03"], _
[15549, "Paragon Rune of Major Motivation", 8, "0227E8210D03"], _
[15549, "Paragon Rune of Major Spear Mastery", 8, "0225E8210D03"], _
[15550, "Paragon Rune of Superior Command", 8, "0326E8210F03"], _
[15550, "Paragon Rune of Superior Leadership", 8, "0328E8210F03"], _
[15550, "Paragon Rune of Superior Motivation", 8, "0327E8210F03"], _
[15550, "Paragon Rune of Superior Spear Mastery", 8, "0325E8210F03"], _
[19124, "Vanguard's Insignia [Assassin]", 8, "DE010824"], _
[19125, "Infiltrator's Insignia [Assassin]", 8, "DF010824"], _
[19126, "Saboteur's Insignia [Assassin]", 8, "E0010824"], _
[19127, "Nightstalker's Insignia [Assassin]", 8, "E1010824"], _
[19128, "Artificer's Insignia [Mesmer]", 8, "E2010824"], _
[19129, "Prodigy's Insignia [Mesmer]", 8, "E3010824"], _
[19130, "Virtuoso's Insignia [Mesmer]", 8, "E4010824"], _
[19131, "Radiant Insignia", 8, "E5010824"], _
[19132, "Survivor Insignia", 8, "E6010824"], _
[19133, "Stalwart Insignia", 8, "E7010824"], _
[19134, "Brawler's Insignia", 8, "E8010824"], _
[19135, "Blessed Insignia", 8, "E9010824"], _
[19136, "Herald's Insignia", 8, "EA010824"], _
[19137, "Sentry's Insignia", 8, "EB010824"], _
[19138, "Bloodstained Insignia [Necromancer]", 8, "0A020824"], _
[19139, "Tormentor's Insignia [Necromancer]", 8, "EC010824"], _
[19140, "Undertaker's Insignia [Necromancer]", 8, "ED010824"], _
[19141, "Bonelace Insignia [Necromancer]", 8, "EE010824"], _
[19142, "Minion Master's Insignia [Necromancer]", 8, "EF010824"], _
[19143, "Blighter's Insignia [Necromancer]", 8, "F0010824"], _
[19144, "Prismatic Insignia [Elementalist]", 8, "F1010824"], _
[19145, "Hydromancer Insignia [Elementalist]", 8, "F2010824"], _
[19146, "Geomancer Insignia [Elementalist]", 8, "F3010824"], _
[19147, "Pyromancer Insignia [Elementalist]", 8, "F4010824"], _
[19148, "Aeromancer Insignia [Elementalist]", 8, "F5010824"], _
[19149, "Wanderer's Insignia [Monk]", 8, "F6010824"], _
[19150, "Disciple's Insignia [Monk]", 8, "F7010824"], _
[19151, "Anchorite's Insignia [Monk]", 8, "F8010824"], _
[19152, "Knight's Insignia [Warrior]", 8, "F9010824"], _
[19153, "Lieutenant's Insignia [Warrior]", 8, "08020824"], _
[19154, "Stonefist Insignia [Warrior]", 8, "09020824"], _
[19155, "Dreadnought Insignia [Warrior]", 8, "FA010824"], _
[19156, "Sentinel's Insignia [Warrior]", 8, "FB010824"], _
[19157, "Frostbound Insignia [Ranger]", 8, "FC010824"], _
[19158, "Earthbound Insignia [Ranger]", 8, "FD010824"], _
[19159, "Pyrebound Insignia [Ranger]", 8, "FE010824"], _
[19160, "Stormbound Insignia [Ranger]", 8, "FF010824"], _
[19161, "Beastmaster's Insignia [Ranger]", 8, "00020824"], _
[19162, "Scout's Insignia [Ranger]", 8, "01020824"], _
[19163, "Windwalker Insignia [Dervish]", 8, "02020824"], _
[19164, "Forsaken Insignia [Dervish]", 8, "03020824"], _
[19165, "Shaman's Insignia [Ritualist]", 8, "04020824"], _
[19166, "Ghost Forge Insignia [Ritualist]", 8, "05020824"], _
[19167, "Mystic's Insignia [Ritualist]", 8, "06020824"], _
[19168, "Centurion's Insignia [Paragon]", 8, "07020824"], _
[3612, "Mesmer Rune of Major Domination Magic", 8, "0202E8216B01"], _
[3612, "Mesmer Rune of Major Fast Casting", 8, "0200E8216B01"], _
[3612, "Mesmer Rune of Major Illusion Magic", 8, "0201E8216B01"], _
[3612, "Mesmer Rune of Major Inspiration Magic", 8, "0203E8216B01"], _
[5549, "Mesmer Rune of Superior Domination Magic", 8, "0302E8217701"], _
[5549, "Mesmer Rune of Superior Fast Casting", 8, "0300E8217701"], _
[5549, "Mesmer Rune of Superior Illusion Magic", 8, "0301E8217701"], _
[5549, "Mesmer Rune of Superior Inspiration Magic", 8, "0303E8217701"], _
[5550, "Rune of Clarity", 8, "01087827"], _
[5550, "Rune of Major Vigor", 8, "C202E927"], _
[5550, "Rune of Purity", 8, "05067827"], _
[5550, "Rune of Recovery", 8, "07047827"], _
[5550, "Rune of Restoration", 8, "00037827"], _
[5551, "Rune of Superior Vigor", 8, "C202EA27"], _
[5552, "Necromancer Rune of Major Blood Magic", 8, "0204E8216D01"], _
[5552, "Necromancer Rune of Major Curses", 8, "0207E8216D01"], _
[5552, "Necromancer Rune of Major Death Magic", 8, "0205E8216D01"], _
[5552, "Necromancer Rune of Major Soul Reaping", 8, "0206E8216D01"], _
[5553, "Necromancer Rune of Superior Blood Magic", 8, "0304E8217901"], _
[5553, "Necromancer Rune of Superior Curses", 8, "0307E8217901"], _
[5553, "Necromancer Rune of Superior Death Magic", 8, "0305E8217901"], _
[5553, "Necromancer Rune of Superior Soul Reaping", 8, "0306E8217901"], _
[5554, "Elementalist Rune of Major Air Magic", 8, "0208E8216F01"], _
[5554, "Elementalist Rune of Major Earth Magic", 8, "0209E8216F01"], _
[5554, "Elementalist Rune of Major Energy Storage", 8, "020CE8216F01"], _
[5554, "Elementalist Rune of Major Fire Magic", 8, "020AE8216F01"], _
[5554, "Elementalist Rune of Major Water Magic", 8, "020BE8216F01"], _
[5555, "Elementalist Rune of Superior Air Magic", 8, "0308E8217B01"], _
[5555, "Elementalist Rune of Superior Earth Magic", 8, "0309E8217B01"], _
[5555, "Elementalist Rune of Superior Energy Storage", 8, "030CE8217B01"], _
[5555, "Elementalist Rune of Superior Fire Magic", 8, "030AE8217B01"], _
[5555, "Elementalist Rune of Superior Water Magic", 8, "030BE8217B01"], _
[5556, "Monk Rune of Major Healing Prayers", 8, "020DE8217101"], _
[5556, "Monk Rune of Major Protection Prayers", 8, "020FE8217101"], _
[5556, "Monk Rune of Major Smiting Prayers", 8, "020EE8217101"], _
[5556, "Monk Rune of Major Divine Favor", 8, "0210E8217101"], _
[5557, "Monk Rune of Superior Divine Favor", 8, "0310E8217D01"], _
[5557, "Monk Rune of Superior Healing Prayers", 8, "030DE8217D01"], _
[5557, "Monk Rune of Superior Protection Prayers", 8, "030FE8217D01"], _
[5557, "Monk Rune of Superior Smiting Prayers", 8, "030EE8217D01"], _
[903, "Warrior Rune of Minor Absorption", 8, "EA02E827"], _
[903, "Warrior Rune of Minor Axe Mastery", 8, "0112E821"], _
[903, "Warrior Rune of Minor Hammer Mastery", 8, "0113E821"], _
[903, "Warrior Rune of Minor Strength", 8, "0111E821"], _
[903, "Warrior Rune of Minor Swordsmanship", 8, "0114E821"], _
[903, "Warrior Rune of Minor Tactics", 8, "0115E821"], _
[5558, "Warrior Rune of Major Absorption", 8, "EA02E927"], _
[5558, "Warrior Rune of Major Axe Mastery", 8, "0212E8217301"], _
[5558, "Warrior Rune of Major Hammer Mastery", 8, "0213E8217301"], _
[5558, "Warrior Rune of Major Strength", 8, "0211E8217301"], _
[5558, "Warrior Rune of Major Swordsmanship", 8, "0214E8217301"], _
[5558, "Warrior Rune of Major Tactics", 8, "0215E8217301"], _
[5559, "Warrior Rune of Superior Absorption", 8, "EA02EA27"], _
[5559, "Warrior Rune of Superior Axe Mastery", 8, "0312E8217F01"], _
[5559, "Warrior Rune of Superior Hammer Mastery", 8, "0313E8217F01"], _
[5559, "Warrior Rune of Superior Strength", 8, "0311E8217F01"], _
[5559, "Warrior Rune of Superior Swordsmanship", 8, "0314E8217F01"], _
[5559, "Warrior Rune of Superior Tactics", 8, "0315E8217F01"], _
[5560, "Ranger Rune of Major Beast Mastery", 8, "0216E8217501"], _
[5560, "Ranger Rune of Major Expertise", 8, "0217E8217501"], _
[5560, "Ranger Rune of Major Marksmanship", 8, "0219E8217501"], _
[5560, "Ranger Rune of Major Wilderness Survival", 8, "0218E8217501"], _
[5561, "Ranger Rune of Superior Beast Mastery", 8, "0316E8218101"], _
[5561, "Ranger Rune of Superior Expertise", 8, "0317E8218101"], _
[5561, "Ranger Rune of Superior Marksmanship", 8, "0319E8218101"], _
[5561, "Ranger Rune of Superior Marksmanship", 8, "0319E8218101"], _
[5561, "Ranger Rune of Superior Wilderness Survival", 8, "0318E8218101"], _
[6324, "Assassin Rune of Minor Critical Strikes", 8, "0123E821"], _
[6324, "Assassin Rune of Minor Dagger Mastery", 8, "011DE821"], _
[6324, "Assassin Rune of Minor Deadly Arts", 8, "011EE821"], _
[6324, "Assassin Rune of Minor Shadow Arts", 8, "011FE821"], _
[6325, "Assassin Rune of Major Critical Strikes", 8, "0223E8217902"], _
[6325, "Assassin Rune of Major Dagger Mastery", 8, "021DE8217902"], _
[6325, "Assassin Rune of Major Deadly Arts", 8, "021EE8217902"], _
[6325, "Assassin Rune of Major Shadow Arts", 8, "021FE8217902"], _
[6326, "Assassin Rune of Superior Critical Strikes", 8, "0323E8217B02"], _
[6326, "Assassin Rune of Superior Dagger Mastery", 8, "031DE8217B02"], _
[6326, "Assassin Rune of Superior Deadly Arts", 8, "031EE8217B02"], _
[6326, "Assassin Rune of Superior Shadow Arts", 8, "031FE8217B02"], _
[6327, "Ritualist Rune of Minor Channeling Magic", 8, "0122E821"], _
[6327, "Ritualist Rune of Minor Communing", 8, "0120E821"], _
[6327, "Ritualist Rune of Minor Restoration Magic", 8, "0121E821"], _
[6327, "Ritualist Rune of Minor Spawning Power", 8, "0124E821"], _
[6328, "Ritualist Rune of Major Channeling Magic", 8, "0222E8217F02"], _
[6328, "Ritualist Rune of Major Communing", 8, "0220E8217F02"], _
[6328, "Ritualist Rune of Major Restoration Magic", 8, "0221E8217F02"], _
[6328, "Ritualist Rune of Major Spawning Power", 8, "0224E8217F02"], _
[6329, "Ritualist Rune of Superior Channeling Magic", 8, "0322E8218102"], _
[6329, "Ritualist Rune of Superior Communing", 8, "0320E8218102"], _
[6329, "Ritualist Rune of Superior Restoration Magic", 8, "0321E8218102"], _
[6329, "Ritualist Rune of Superior Spawning Power", 8, "0324E8218102"], _
[898, "Rune of Attunement", 8, "0200D822"], _
[898, "Rune of Minor Vigor", 8, "C202E827"], _
[898, "Rune of Vitae", 8, "000A4823"], _
[899, "Mesmer Rune of Minor Domination Magic", 8, "0102E821"], _
[899, "Mesmer Rune of Minor Fast Casting", 8, "0100E821"], _
[899, "Mesmer Rune of Minor Illusion Magic", 8, "0101E821"], _
[899, "Mesmer Rune of Minor Inspiration Magic", 8, "0103E821"], _
[900, "Necromancer Rune of Minor Blood Magic", 8, "0104E821"], _
[900, "Necromancer Rune of Minor Curses", 8, "0107E821"], _
[900, "Necromancer Rune of Minor Death Magic", 8, "0105E821"], _
[900, "Necromancer Rune of Minor Soul Reaping", 8, "0106E821"], _
[901, "Elementalist Rune of Minor Air Magic", 8, "0108E821"], _
[901, "Elementalist Rune of Minor Earth Magic", 8, "0109E821"], _
[901, "Elementalist Rune of Minor Energy Storage", 8, "010CE821"], _
[901, "Elementalist Rune of Minor Water Magic", 8, "010BE821"], _
[901, "Elementalist Rune of Minor Fire Magic", 8, "010AE821"], _
[902, "Monk Rune of Minor Divine Favor", 8, "0110E821"], _
[902, "Monk Rune of Minor Healing Prayers", 8, "010DE821"], _
[902, "Monk Rune of Minor Protection Prayers", 8, "010FE821"], _
[902, "Monk Rune of Minor Smiting Prayers", 8, "010EE821"], _
[904, "Ranger Rune of Minor Beast Mastery", 8, "0116E821"], _
[904, "Ranger Rune of Minor Expertise", 8, "0117E821"], _
[904, "Ranger Rune of Minor Marksmanship", 8, "0119E821"], _
[904, "Ranger Rune of Minor Wilderness Survival", 8, "0118E821"]]
Using that array, I am able to test if an item has got the desired runes or insignias:
Code:
Func ItemHasUsefulRuneOrInsignia($aItem)
If DllStructGetData($aItem, 'Type') <> $TYPE_SALVAGE Then Return False
;things that should be kept
Local $lWhiteListInsignias[11] = [10, "Survivor Insignia", "Radiant Insignia", "Blessed Insignia", _
"Sentinel's Insignia [Warrior]", "Bloodstained Insignia [Necromancer]", "Prodigy's Insignia [Mesmer]", _
"Nightstalker's Insignia [Assassin]", "Shaman's Insignia [Ritualist]", "Windwalker Insignia [Dervish]", _
"Centurion's Insignia [Paragon]"]
Local $lWhiteListRunes[12] = [11, "Mesmer Rune of Superior Fast Casting", "Mesmer Rune of Superior Domination Magic", _
"Ritualist Rune of Superior Channeling Magic", "Ritualist Rune of Superior Communing", _
"Dervish Rune of Superior Earth Prayers", "Necromancer Rune of Superior Death Magic", _
"Rune of Superior Vigor", "Rune of Major Vigor", "Rune of Clarity", "Rune of Restoration", "Rune of Vitae"]
Local $lModStruct = GetModStruct($aItem)
Local $ListToUse
For $index = 0 To 1
If $index == 0 Then $ListToUse = $lWhiteListInsignias
If $index == 1 Then $ListToUse = $lWhiteListRunes
For $i = 0 To 183 ;all runes and insignias from Runes/Insignia Array
For $j = 1 To $ListToUse[0]
If $array_Runes[$i][1] == $ListToUse[$j] Then
If StringInStr($lModStruct, $array_Runes[$i][3]) > 0 Then
SetExtended($index)
Return True
EndIf
EndIf
Next
Next
Next
Return False
EndFunc ;==>ItemHasUsefulRuneOrInsignia
I'd like to use something similar but for weapon mods and inscriptions instead.
Any ideas where I can find an array of all possible mods and inscriptions?
|