New version of OmniFarmer is out, hope it's working as intented, ... i'm sure you guys will let me know if anything is messed up.
When starting LDoA 11-20, using a N/Mo, error: "Unable to get your primary profession." I am looking through the code from a previously working script.
Thank you so much.
When starting LDoA 11-20, using a N/Mo, error: "Unable to get your primary profession." I am looking through the code from a previously working script.
Thank you so much.
This is an issue with the GWA2 "framework", happens from time to time on all class's, simply click okay and re-ropen the script.
any way i could fix it ?
its really bad if you want to do that AFK and script crashes every 2-5 runs..
you using default combat system or custom system? I can try and see if I can fix it, but my guess is that it's trying to check during loading (when character data is unavailable), might be a simple sleep / pingsleep could fix it
I did some editing to the Derv Bot since i didn't like that it won't pickup golds and some other stuff, also included a jade brotherhood farm, it will load automatically any buld needed (something that was missing) for each farm,
I did around 40 run tests for the Jade and is working fine,
Please take notice, there is no selling option yet, I'm new to the bot coding so It will take a little before I can update it as I want it to be,
Also if you find any issue, don't hesitate to edit, the combat for Jade is a bit clunky in some parts but it doesn't fail the run,
I did some editing to the Derv Bot since i didn't like that it won't pickup golds and some other stuff, also included a jade brotherhood farm, it will load automatically any buld needed (something that was missing) for each farm,
I did around 40 run tests for the Jade and is working fine,
Please take notice, there is no selling option yet, I'm new to the bot coding so It will take a little before I can update it as I want it to be,
Also if you find any issue, don't hesitate to edit, the combat for Jade is a bit clunky in some parts but it doesn't fail the run,
KR
Similar function to what the Vaettir Bot does.
I added all the IDs from the items identified in your script to Keep, any item not found in the $ItemsToKeep array and not excluded from being sold by subsequent conditions will be sold.
Code:
; Func Identify($BagIndex)
Local $Bag
Local $I
Local $aItem
$Bag = GetBAG($BagIndex)
For $I = 1 To DllStructGetData($Bag, "slots")
$aItem = GetItemBySlot($BagIndex, $I)
If DllStructGetData($aItem, "ID") = 0 Then ContinueLoop
IdentifyItem($aItem)
Sleep(GetPing()+500)
Next
EndFunc
Func Sell($BagIndex)
Local $aItem
Local $Bag = GetBAG($BagIndex)
Local $SlotCount = DllStructGetData($Bag, "slots")
For $I = 1 To $SlotCount
Out("Selling Item: " & $BagIndex & ", " & $I)
$aItem = GetItemBySlot($BagIndex, $I)
If DllStructGetData($aItem, "ID") = 0 Then ContinueLoop
If CanSell($aItem) Then
SellItem($aItem)
EndIf
Sleep(GetPing()+250)
Next
EndFunc
Func CanSell($aItem)
Local $lModelID = DllStructGetData($aItem, "ModelID")
Local $ItemsToKeep = Array(2511, 19185, 19183, 15557, 22269, 24353, 24354, 921, 929)
For $i = 0 To UBound($ItemsToKeep) - 1
If $lModelID == $ItemsToKeep[$i] Then
Return False
EndIf
EndIf
; Existing CanSell conditions...
Local $LRarity = GetRarity($aItem)
If $lModelID == $Item_ID_Dyes Then
Switch DllStructGetData($aItem, "ExtraID")
Case $Item_ExtraID_BlackDye, $Item_ExtraID_WhiteDye, $Item_ExtraID_PinkDye
Return False
Case Else
Return True
EndSwitch
EndIf
If CheckArrayAllDrops($lModelID) Then Return False
If CheckArrayTomes($lModelID) Then Return False
If CheckArrayMaterials($lModelID) Then Return False
If CheckArrayWeaponMods($lModelID) Then Return False
If CheckArrayGeneralItems($lModelID) Then Return False
If $lModelID == $Item_ID_Glacial_Stones Then Return True
If CheckArrayPscon($lModelID) Then Return False
If $LRarity == $Rarity_Gold Then Return True
If $LRarity == $Rarity_Purple Then Return True
If $LRarity == $Rarity_Blue Then Return True
If $LRarity == $Rarity_White Then Return True
Return True
EndFunc