GW Working Bots 2020

09/20/2021 12:27 ARJ#2086
Quote:
Originally Posted by Dupljakus View Post
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?
09/20/2021 14:27 Blind995#2087
Quote:
Originally Posted by ARJ View Post
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()

Add the id into that function
09/20/2021 19:05 TheKuM1Ko#2088
not a question about a bot but i dont wanna create a new topic.
Whats the restrictions for automated gvg games?
09/21/2021 10:54 *JuMpEr#2089
Good Morning
Does anyone have a working chest runner bot?
Mine only farms the inventory once and then crashes :(
09/21/2021 15:30 Macbeth01#2090
Quote:
Originally Posted by *JuMpEr View Post
Good Morning
Does anyone have a working chest runner bot?
Mine only farms the inventory once and then crashes :(
Any chest runner? Or a specific one?
09/21/2021 15:33 *JuMpEr#2091
Quote:
Originally Posted by Macbeth01 View Post
Any chest runner? Or a specific one?
It is only important to me that it runs well and that I am not forced to restart the game every 30 minutes
09/21/2021 15:36 Macbeth01#2092
Quote:
Originally Posted by *JuMpEr View Post
It is only important to me that it runs well and that I am not forced to restart the game every 30 minutes
Here you are, one for Sin, the other one is free-for-all classes.
09/21/2021 15:45 ARJ#2093
Quote:
Originally Posted by Blind995 View Post
look for the function named something similar to
Func PickUpLoot()

Add the id into that function
Hey 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
09/21/2021 16:49 Zvend#2094
Quote:
Originally Posted by ARJ View Post
Hey 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
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?^^
09/21/2021 18:58 ARJ#2095
Quote:
Originally Posted by Zvend View Post
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 :)
09/21/2021 19:02 Zvend#2096
Quote:
Originally Posted by ARJ View Post
Hey 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 View Post
;) 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.
09/22/2021 00:00 lalilu11#2097
hey guys i need a dumper or something for coords tracking. I found an old one but its not working as expected.

I also tried to plot my current position with:

Local $lMe
$lMe = GetAgentByID(-2)
$posx = DllStructGetData($lMe, 'X')
$posy = DllStructGetData($lMe, 'Y')

but x,y is always 0 :D

thanks for help
09/22/2021 02:08 Zvend#2098
Quote:
Originally Posted by lalilu11 View Post
hey guys i need a dumper or something for coords tracking. I found an old one but its not working as expected.

I also tried to plot my current position with:

Local $lMe
$lMe = GetAgentByID(-2)
$posx = DllStructGetData($lMe, 'X')
$posy = DllStructGetData($lMe, 'Y')

but x,y is always 0 :D

thanks for help
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
09/22/2021 05:32 lalilu11#2099
Quote:
Originally Posted by Zvend View Post
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
09/24/2021 11:50 Blind995#2100
Any tips on how to work around the Outpost Map ID and the Explorable Map ID being the same number?