GWCA based Chestbot

02/21/2010 19:08 Garry goes Sheep#121
Quote:
Originally Posted by Wuppie18 View Post
Great bot, 1 question:
The bot never ID's and sells at my side. Im a complete noob with these bots and stuff, just that you know. Can I fix this by just changing the number of chests from -1 to 25 or 35?

EDIT: Changed script to this:

Global $runs = 0 ;Variable for number of runs completed
Global $chests = 0 ;Variable for number of chests opened (total)
Global $chestcheck = 25 ;Variable for number of chests opened per "loop" ## Important to know when to sell the Items


He still keeps running items till infinity :/

Or do I have to change something here?

Const $bag1 = IniRead("Chestbot.ini"," Identify and Sell ","$bag1","Not found") ;Number of free Slots in Bag 1
Const $bag2 = IniRead("Chestbot.ini"," Identify and Sell ","$bag2","Not found") ;Number of free Slots in Bag 2
Const $bag3 = IniRead("Chestbot.ini"," Identify and Sell ","$bag3","Not found") ;Number of free Slots in Bag 3
Help!
If you use my bot, please press the "Thanks" Button. You don't have to pay anything for it. That's all i want...

No, you should not change anything in the sourcecode. But you can edit your Chestbot.ini
Let's say you have 20 free spots in your first bag: Set the $bag1 parameter to 20
Code:
;  min=0 ## max=20
$bag1=20
Do the same with bag 2 and 3 (take a look on the interface.jpg).

If you set 20 on the first bag, 5 on the second bag and 7 on the third bag (for example), the bot will do 20+5+7=32 runs. Then he will identify and sell...and then he will restart.
By default these parameters are set to 20, 5 and 10. So he will do 35 runs by default. Just edit it like you want.

If this does not work (i have no idea why it shouldn't...) you should change this part of the Chestbot.ini
Code:
;  Number of Chests to open ## -1 = Infinity
$maxChests=-1
When you have (like in the exapmle before) 32 free spots in your inventory, just set $maxChests=32 and the bot will stop after 32 runs. Then you can identify, sell, eat pizza..whatever you like and restart the bot on your own.

And don't forget...

Edit: I don't think that a tome/quest item/pizza on that special spot is important. It's just for safety, nothing else.
02/21/2010 19:28 Wuppie18#122
Thanks for your fast response. I will see if it works now.
02/21/2010 19:51 Wuppie18#123
Weird, I am using your bot yes, and I didnt change anything but it is still running after 35 chests. While he should ID @ 35 allready :s

EDIT: He went to the merchant after 40 chests. But then he stops walking :P
02/21/2010 21:00 Garry goes Sheep#124
Quote:
Originally Posted by Wuppie18 View Post
Weird, I am using your bot yes, and I didnt change anything but it is still running after 35 chests. While he should ID @ 35 allready :s

EDIT: He went to the merchant after 40 chests. But then he stops walking :P
If he dies, this does not count as a completed run. If he does 8 runs, dies in the 9. run, then he will go on with run nr. 9

But i have no idea what could be the problem...sry
02/21/2010 23:28 Wuppie18#125
Quote:
Originally Posted by Garry goes Sheep View Post
If he dies, this does not count as a completed run. If he does 8 runs, dies in the 9. run, then he will go on with run nr. 9

But i have no idea what could be the problem...sry
He never dies here, but I ment 40 drops.
02/22/2010 19:48 dimitjeeuuhh#126
I've got some little suggestions. Would it be possible to make a little GUI for it, so you can just open the program and are able to click, start/stop, pause/resume. Also it would be cool if it would be possible to manually identify & sell the items. Because sometimes I stop the bot when he's half-filled, and then I'm too lazy to ID/sell the items myself :P. So if you could include a button which would ID & sell the items, without having to wait till it is completely filled, I'd be very grateful.
02/22/2010 22:11 Garry goes Sheep#127
Quote:
Originally Posted by dimitjeeuuhh View Post
I've got some little suggestions. Would it be possible to make a little GUI for it, so you can just open the program and are able to click, start/stop, pause/resume. Also it would be cool if it would be possible to manually identify & sell the items. Because sometimes I stop the bot when he's half-filled, and then I'm too lazy to ID/sell the items myself :P. So if you could include a button which would ID & sell the items, without having to wait till it is completely filled, I'd be very grateful.
I think i will update this bot soon..some little improvements.

The problem with GUI is, that i have no idea how to write it. I am everything else than a good programmer^^
02/22/2010 22:17 buFFy!#128
Copypasta ist erlaubt.
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$GUI = GUICreate("Demo", 374, 225, -1, -1) ;-1/-1 = Centered
$Start = GUICtrlCreateButton("Start", 144, 80, 75, 25, $WS_GROUP)
$Stop = GUICtrlCreateButton("Stop", 144, 120, 75, 25, $WS_GROUP)
GUISetState()

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Start
			MsgBox(0x40, "GUI", "Hier würde der Bot gestartet werden")
		Case $Stop
			MsgBox(0x40, "GUI", "Hier würde der Bot gestoppt werden")
	EndSwitch
WEnd
02/22/2010 22:20 kknb#129
wäre cool wenn der bot goldies in die truhe schieben würde. ausserdem wäre noch ne möglichkeit den fensternamen oder prozessnamen anzugeben, damit man mehrere bots laufen lassen kann.
02/22/2010 23:09 Garry goes Sheep#130
Danke@U-Core

Quote:
Originally Posted by kknb View Post
wäre cool wenn der bot goldies in die truhe schieben würde. ausserdem wäre noch ne möglichkeit den fensternamen oder prozessnamen anzugeben, damit man mehrere bots laufen lassen kann.

Das mit den Goldies wollte ich schonmal tun, hatte aber keine Lust mehr zu überlegen. Ich lass mir das nochmal durch den Kopf gehen.
(Zählen Elite-Folis als Goldies?)

Die Sache mit den Namen....ich hab dazu schonmal einen Thread geöffnet, außerdem hab ich mir von Gabba den Source seines SD-Bots schicken lassen und die "Windowname"-Funktion integriert, aber die wollte bei mir einfach nicht so wie bei ihm. Irgendwann hatte ich keine Lust mehr...
02/23/2010 16:21 buFFy!#131
Ja Folis haben aber alle die Selbe Modelid (sollte dich aber eigentlich nicht interessieren, solange du nicht zwischen Foli's differenzieren willst. Da gibts auch nen Weg für)
02/23/2010 17:00 Garry goes Sheep#132
Quote:
Originally Posted by u-coRe View Post
Ja Folis haben aber alle die Selbe Modelid (sollte dich aber eigentlich nicht interessieren, solange du nicht zwischen Foli's differenzieren willst. Da gibts auch nen Weg für)
Ok^^

Ich häng aber jetzt an nem anderen Problem.
Das mit dem GUI funktioniert ganz gut..mit den Buttons, Labels usw.
Wenn ich Wo draufklicke, werden die entsprechenden Funktionen gestartet und die Schriftzug wird auch umgeändert (z.b. Von "Graphics Enabled" zu "Graphics Disabled"). Ebenso die Labels (Per AdlibEnable).

Gibt nur ein Problem, aber das hat große Auswirkungen.
Wenn ich den Bot -oder genauer- den Chestrun starte, fängt er schön brav mit den Chestruns an. Anschließend reagiert er jedoch nicht mehr auf weitere Befehle, weil er (denke ich mal) zunächst den Chestrun beenden möchte, was etwas unpraktisch ist, weil das ne Endlosschleife ist.
Ebenso kann ich dann die Grafik nicht deaktivieren, weil eben keine Signale ankommen.
Die Frage also: Wie krieg ich's hin, dass das Drücken der Buttons Priorität vor der aktuellen Aktion hat? Wenn ich auf Stop drücke, soll er aufhören und wenn ich zwischendrin einstelle, dass er Goldies lagern soll, dann soll er das auch mitkriegen^^

Code:
Global $cGUI = GUICreate("Chestbot", 275, 155, -1, -1)
$BotState 			= "Doing Nothing..."
$GraphicsState 		= "Graphics Enabled"
$StoreGoldiesState	= "Store Goldies Disabled"
$B_StartStop 		= GUICtrlCreateButton($BotState, 10, 10, 115, 30, $WS_GROUP)
$B_CheckGraphics	= GUICtrlCreateButton($GraphicsState, 10, 40, 115, 30)
$B_StoreGoldies		= GUICtrlCreateButton($StoreGoldiesState, 10, 70, 115, 30)
$B_IdentAndSell		= GUICtrlCreateButton("Identify And Sell", 10, 100, 115, 30)

$L_runs 			= GUICtrlCreateLabel("Runs:                  "&$runs, 140, 15)
$L_chests 			= GUICtrlCreateLabel("Chests opened:   "&$chests, 140, 30)
$L_Goldies			= GUICtrlCreateLabel("Golden Items:      "&$Goldies, 140, 45)
$L_Treasure			= GUICtrlCreateLabel("Treasure Hunter: "&$Treasure, 140, 60)
$L_Wisdom			= GUICtrlCreateLabel("Wisdom:              "&$Wisdom, 140, 75)
$L_Lucky			= GUICtrlCreateLabel("Lucky:                 "&$Lucky, 140, 90)
$L_Unlucky			= GUICtrlCreateLabel("Unlucky:             "&$Unlucky, 140, 105)
LabelUpdater()
GUISetState()

;#### Teil des Codes weggelassen, weil die Aufrufe an sich ja funktionieren

		Case $B_StartStop
			If $BotState = "Doing Nothing..." Then
				$BotState = "Doing Something ;)"
				GUICtrlSetData($B_StartStop, $BotState)
				LocationCheck()
				MainLoop()
			EndIf
			
			If $BotState = "Doing Something ;)" Then
				MsgBox(0x40, "GUI", "Hier würde der Bot gestoppt werden")
				$BotState = "Doing Nothing..."
				GUICtrlSetData($B_StartStop, $BotState) ;#############Chestrun beenden!!

			EndIf
			
		Case $B_CheckGraphics
			If $GraphicsState = "Graphics Enabled" Then
				Cmd($CA_SETENGINEHOOK, 1)
				$GraphicsState = "Graphics Disabled"
				GUICtrlSetData($B_CheckGraphics, $GraphicsState)
				
			ElseIf $GraphicsState = "Graphics Disabled" Then
				Cmd($CA_SETENGINEHOOK, 0)
				$GraphicsState = "Graphics Enabled"
				GUICtrlSetData($B_CheckGraphics, $GraphicsState)
			EndIf
Ich weiß nicht, ob meine Methode, die Buttons "neu zu beschriften", elegant ist, aber sie funktioniert immerhin, von daher ist das jetzt nicht so wichtig, denke ich^^

Und noch was...
Ich bastel grad an der Funktion zum Verstauen der goldenen Items rum. Dabei verwende ich die Funktion CmdCB($CA_FindEmptySlot, 6) [6, weil 6 das erste Register der Truhe ist, wenn ich mich nicht täusche]

Im Inventar funktioniert die Funktion einwandfrei, in der Truhe spuckt sie aber ständig falsche Werte aus.

Sowohl im Inventar als auch in der Truhe werden die Slots waagrecht gezählt, oder? Also..
1..2..3..4..5
6..7..8..9..10 usw.

Oder etwa nicht?
02/24/2010 10:43 Sh4Qu!ll3#133
Hi also der chest bot läuft super

meine frage ist in welcher zeile von der scource datei kann ich die anzahl der chestruns eingeben bzw umschreiben

mfg Sh4Q
02/24/2010 11:03 Sh4Qu!ll3#134
hab es gefunden :D chest.ini klaert+lesen ftw
02/24/2010 11:39 Sh4Qu!ll3#135
andere frage noch: wie kann ich die ind+sell funktion ausstellen ?!