BUMP ((Hello - I would love some coding help (: I just tried the Rit Dust Bot (page 21) and it works great thx for the upload and update.
I would love if it could pick up all whites,blue... I have tried to change some of the numbers under "canpickup" func but i guess its not that simple or i dont have the right numbers.
Is this to big a job for a nub :P ))
Quote:
Originally Posted by ForgottenRelic
I just looked at the dust bot and it's saying that it should already be picking up the whites and blues. Will look into this more in a few.
..
So I'm the only one where this pick up other stuff is not working for? Is it simple to change? (:
BUMP ((Hello - I would love some coding help (: I just tried the Rit Dust Bot (page 21) and it works great thx for the upload and update.
I would love if it could pick up all whites,blue... I have tried to change some of the numbers under "canpickup" func but i guess its not that simple or i dont have the right numbers.
Is this to big a job for a nub :P ))
So I'm the only one where this pick up other stuff is not working for? Is it simple to change? (:
yes, its a simple change.
There are many ways you can write your loot functions but here is an easy way that I do it.
At the top of the script for the dust farmer add these constants (with your other global constants):
Code:
Global Const $RARITY_Gold = 2624
Global Const $RARITY_Purple = 2626
Global Const $RARITY_Blue = 2623
Global Const $RARITY_White = 2621
Then down below near the bottom where all your functions are located add:
Code:
;~ Description: standard pickup function, only modified to increment a custom counter when taking stuff with a particular ModelID
Func PickUpLoot()
Local $lAgent
Local $lItem
Local $lDeadlock
For $i = 1 To GetMaxAgents()
If GetIsDead(-2) Then Return
$lAgent = GetAgentByID($i)
If DllStructGetData($lAgent, 'Type') <> 0x400 Then ContinueLoop
$lItem = GetItemByAgentID($i)
If CanPickup($lItem) Then
PickUpItem($lItem)
$lDeadlock = TimerInit()
While GetAgentExists($i)
Sleep(100)
If GetIsDead(-2) Then Return
If TimerDiff($lDeadlock) > 10000 Then ExitLoop
WEnd
EndIf
Next
EndFunc ;==>PickUpLoot
; Checks if should pick up the given item. Returns True or False
Func CanPickUp($aItem)
Local $lModelID = DllStructGetData(($aItem), 'ModelID')
Local $aExtraID = DllStructGetData($aItem, "ExtraID")
Local $lRarity = GetRarity($aItem)
Local $Requirement = GetItemReq($aItem)
If (($lModelID == 2511) And (GetGoldCharacter() < 99000)) Then
Return True ; gold coins (only pick if character has less than 99k in inventory)
ElseIf ($lModelID == $ITEM_ID_Dyes) Then ; if dye
If (($aExtraID == $ITEM_ExtraID_BlackDye) Or ($aExtraID == $ITEM_ExtraID_WhiteDye)) Then ; only pick up white and black ones
Return True
EndIf
ElseIf ($lRarity == $RARITY_Gold) Then ; gold items
Return True
ElseIf ($lRarity == $RARITY_Purple) Then ; purple items
Return True
ElseIf ($lRarity == $RARITY_Purple) Then ; purple items
Return True
ElseIf ($lRarity == $RARITY_White Then ; white items
Return True
Else
Return False
EndIf
EndFunc ;==>CanPickUp
Finally, go through the code (use search function) and replace PickupItems() with PickUpLoot(). Too easy.
Finally complete a generic pack manager bot. Comes with its own GUI or can be used with other bots through calling individual functions.
How to use:
Use Bags: select how many bags should be accessed
Store Golds: moves unid golds from bags to storage
Get Golds: moves unid golds from storage to bags
Identify All: identifies all items in selected bags
Sell All: sells all items (excluding special items*)
Salvage Runes: salvage all valuable runes from all items
Salvage Mats: salvages materials from all items (with exclusions)
Deposit Max: deposit all gold
Withdraw Max: withdraw 100k
*special items are ones that generally not sold, so ID/salvage kits, runes, books, materials, etc.
Make sure to talk to trader for functions Identify All, Sell All, Salvage Runes, Salvage Mats, so bot can buy id/salvage kits if it runs out.
Bot salvages materials from all items except if they contain a valuable rune/insignia or if the item's modelID is in $DONT_SALVAGE_ARR. Currently it has only some modelID's of items that salvage to wood.
Button in top right initializes the bot and also refreshes for if relogging to different character.
Currently the general function that does a full inventory clear (with storing unid golds and rune salvage) is FullClearAtGToB(). But its very easy to change to different town, just need to replace GTOB mapID, merchant coords and rune trader coords, and should be set.
Finally if using the included GUI, can press {ESC} during any of the functions to abort, in case pressed wrong button.
This wasn't loading the GUI anymore so I tried the updated GWA2. Got the GUI back after editing out a few duplicate functions but then crash at Kneel. If anyone can get one of these running again that'd be great.
Uploaded files DO NOT have the updated GWA2 btw. Uploaded before find that update. Sorry
Finally complete a generic pack manager bot. Comes with its own GUI or can be used with other bots through calling individual functions.
How to use:
Use Bags: select how many bags should be accessed
Store Golds: moves unid golds from bags to storage
Get Golds: moves unid golds from storage to bags
Identify All: identifies all items in selected bags
Sell All: sells all items (excluding special items*)
Salvage Runes: salvage all valuable runes from all items
Salvage Mats: salvages materials from all items (with exclusions)
Deposit Max: deposit all gold
Withdraw Max: withdraw 100k
*special items are ones that generally not sold, so ID/salvage kits, runes, books, materials, etc.
Make sure to talk to trader for functions Identify All, Sell All, Salvage Runes, Salvage Mats, so bot can buy id/salvage kits if it runs out.
Bot salvages materials from all items except if they contain a valuable rune/insignia or if the item's modelID is in $DONT_SALVAGE_ARR. Currently it has only some modelID's of items that salvage to wood.
Button in top right initializes the bot and also refreshes for if relogging to different character.
Currently the general function that does a full inventory clear (with storing unid golds and rune salvage) is FullClearAtGToB(). But its very easy to change to different town, just need to replace GTOB mapID, merchant coords and rune trader coords, and should be set.
Finally if using the included GUI, can press {ESC} during any of the functions to abort, in case pressed wrong button.
This is working well for weapon drops - but is there a way to get it to salvage trophy items too?
Here you go. I'm no coder but I edited this at the last patheon bonus week so it now kneels at Chantry as well as TOA.
Much more useful if you're looking to safely farm (i.e. only kneel in empty districts) as it will actively switch between chantry districts only which are much emptier than TOA.
Also fixed the multiple kneel from the original - only kneels once and works fine.
Again I'm not a coder - anyone can do this with a bit of patience!