Hello guys, i updated Dust farm rit bot and i post it here.
Changed some dup functions and changed some no gwa2 functions.
After a long time im able to repair some bots, and im proud of myself. ^^
I post it because some of you good people updated and posted some old bots for me. Thx guys.
Im no creator of this bot, i just updated it. All credits go to creator of this bot. It picks dust, shadowy remains, event items and dyes. He stores dust after every 5th run. If you wanna make him to pick up gold items, just add some item id-s.
Hello
I have Downloaded this bot and it works fine after updating it. However i cant figure out how to add the item id's so the bot will pick up other items.
If I want the bot to pick up lets say "Truncheon". I get a Truncheon in my bag and use GwToolbox to get the Model ID. I then add this line "Global Const $ITEM_ID_Truncheon = 259" in the script same place as all the other ids.
but the bot is still not picking it up? what am I doing wrong?
Hello
I have Downloaded this bot and it works fine after updating it. However i cant figure out how to add the item id's so the bot will pick up other items.
If I want the bot to pick up lets say "Truncheon". I get a Truncheon in my bag and use GwToolbox to get the Model ID. I then add this line "Global Const $ITEM_ID_Truncheon = 259" in the script same place as all the other ids.
but the bot is still not picking it up? what am I doing wrong?
look for the function named something similar to
Func PickUpLoot()
U go into the PickUpItem($aItem) function and see what happens. If u struggle with the basics of programming, then maybe go and learn the basics?^^
so true .. but normally when u give me hints I figurer it out. But this time I'm lost. But yes i should just start searching for basics and start reading. Thx again
I found the function and even looked at other bot scrips (but no scripts look alike). And i cant seems to figurer out how to put in the code :/
The is the only "pickup" function the script
Code:
Func PickupItems($iItems = -1, $fMaxDistance = 1012)
Local $aItemID, $lNearestDistance, $lDistance
$tDeadlock = TimerInit()
Do
$aItem = GetNearestItemToAgent(-2)
$lDistance = [MENTION=368499]Extended[/MENTION]
$aItemID = DllStructGetData($aItem, 'ID')
If $aItemID = 0 Or $lDistance > $fMaxDistance Or TimerDiff($tDeadlock) > 30000 Then ExitLoop
PickUpItem($aItem)
$tDeadlock2 = TimerInit()
Do
Sleep(500)
If TimerDiff($tDeadlock2) > 5000 Then ContinueLoop 2
Until DllStructGetData(GetAgentById($aItemID), 'ID') == 0
$iItems_Picked += 1
;UpdateStatus("Picked total " & $iItems_Picked & " items")
Until $iItems_Picked = $iItems
Return $iItems_Picked
EndFunc
Quote:
Originally Posted by ARJ
so true .. but normally when u give me hints I figurer it out. But this time I'm lost. But yes i should just start searching for basics and start reading. Thx again
basicly, you see a function "PickupItems" which has no "If-Statements" where they actually check for the item. Then you see another function which calls to pick up an item. Its called "PickUpItem($aItem)". So there is a high chance that ur checks about what to pick up is inside the next function being called.
But if so, it would be strange, because the function keeps logging when it is picked up and adds a counter of items being picked up.
Maybe double check if this is really the function which is being called by your bot.
you would need to provide more code for backtracking what is not working.
But please check:
1. To actually initialize ur bot
2. declare all vars
3. GetAgentByID is returning a struct or anything
ok thanks it works
hello, i have a question again. Is it possible to return the name of the enemy? Which is the best strategy to select for example the boss of a group? Thanks for help