Going Back To The Basics

09/01/2009 01:05 mongo2007#16
At this point I'm in need of variable associated with the various forms of Pixel search. there are many things that are clearly defined in the tutorials at AutoIt.

1. So can you give me a list of these Types of Pixel search we need to learn.

2. The proper formatting of the variables.

3. The work flow for a good AutoPill.


I'm sure either I or some other forum member can come up with a GUI we can use for the project. if anyone has any code snippets please feel free to share with each other.. but not in the forum.. we will keep security as high as possible. Please do not post memory addresess
09/01/2009 01:21 strikeraid#17
hahah. uhh i have no idea what you're asking, but i'll try to answer.

you need to declare a global variable for your coordinates. so at the top of the script should have something like this:

global $coord[2] = [0,0]

hope i'm doing this right. doing it from memory. D:

then in the script to do a pixelsearch you use:

$coord = pixelsearch(left, top, right, bottom, color, deviation)

some other parameters i think. i forgot. xD obviously the left, top, right, and bottom is where you want to search on the screen. Everything else should be in the autoit help file. This pixelsearch shouldn't be used for autopill though.

A pixelget function should be used instead. To know how to use this one, you can look in the autoit help file which came with the autoit download. Basically, you set up a spot on the screen you want to look at with pixelget and then if there is an ERROR then it should pot. the right format would be something like

$pixel = pixelget(x, y) ; i can't remember this one. never used it before.
$poophead = @error
If @error then
blahahakdlkjfdd
endif

something like that. I would be more specific and stuff, but I hope people reading this will actually try to learn and not get spoonfed every detail and every step. C'mon its in the autoit help file.
09/01/2009 01:35 mongo2007#18
lol I know ya had to weed through but you pegged it. I was having to decide if I wanted to go with $coord = PixelSearch( or $pixel = pixelget or a cobination of the two. So I'll get my head wrapped around $pixel = pixelget


$coord = PixelSearch( variables go something like this:


; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )
If Not @error Then
MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])
EndIf
09/01/2009 01:44 strikeraid#19
Hells yea, you got it. Now go make a bot for me. >.< hahaha. Jk.

offtopic: i really want a pizza. like i'm craving for it.

anyways, if you have all that going. you should make it lol. who cares about the gui. most don't. they just want it working.
09/01/2009 01:47 mongo2007#20
lol i'm working it.. AutoIt has about 4 post about $pixel = pixelget lol and most are questions. I'll have to do some trial an error.

But for the project i'll have to learn GUI as well. I won't just give a finished product with the memory addresses included. They're gonna have to get the addresses and put them in the mod..gonna have to read tutorials to get the addresses. a lot of work went into it.. why let it go to waste.

I'm from New York but some of the best Pizza you will ever get is in Dallas Texas...bigger is better
09/01/2009 02:01 skad304#21
Arrghhh it sucks to have xtrap in PH. Damn you Xtrap, ill burn you, you peace of shat!
09/01/2009 07:55 bakcil#22
Can you create that tutorial about GUI?
09/01/2009 16:34 mongo2007#23
Quote:
Originally Posted by bakcil View Post
Can you create that tutorial about GUI?
Well what I wont do is tell ya is to use a search button. I really dont know how to use GUI items yet. what I do know is it's a matter of defining names, positions, variables, attributes, of the form items you want to display. I have been concentrating on the code it's self. As soon as I figure that out I will do a tutorial.

Now to get you stated I would go to the AUTOIT site and download some example files people post there. The help file is a bit dry but it does have all the names of the controls. Get back with me on what ya find out.

[Only registered and activated users can see links. Click Here To Register...]


[Only registered and activated users can see links. Click Here To Register...]
09/01/2009 18:51 timeformiles#24
i had the same thing for the script but i never asked i should have but i wanted to do it bymyself and release it to help all the other people but i had the same error so i guess i did need a GUI, now i need to research that and see how to make it or use it aswell.
09/01/2009 19:42 mongo2007#25
Well thats what this thread and project is about.. Like anything in programming there are plenty of failed projects because people ran out of desire to finish, time or knowledge. This is where we bring it all together. Hopefully we'll produce a new crop of coders and I think thats good for the community as a whole.

UPDATE

Fellas I'm having problems with memory of the game. I'm a web designer, and when making web pages you can store and retrieve information from cookies and sessions.. This equates to memory addresses and globals I think. Now I have done searches for various elements of the memory functions in Autoit such as:


$mem = MemGetStats()
MsgBox(0, "Total physical RAM (KB):", $mem[1])

I think this is to display memory from the windows system. no practical use for bots.

I'm thinking it would go something like this for our purposes



$OpenProccess = _MemoryOpen($needtofinda12sky2value)

If @error Then
MsgBox(0,"error","error opening process.")
Exit
EndIf


$Read = _MemoryRead($OpenProccess, 0x123456, 4); <------this could be any 12 sky address

If IsArray($Read) Then
_ArrayDisplay($Read, "Read Var" )
EndIf

MsgBox(0,$Read, $Read)

_MemoryClose($OpenProccess)


now this may read an address but i'm not sure how to retrieve it or display it. I'm also going to need to learn to do this for a GUI to change variables and options.


If anyone have a few code snipletts that would be practical to use as a AutoPill hack such as variable lists, ways to display the current chi and health in a gradient bar that would be helpful. sorry been up all night trying to figure this our excuse the overflow and errors.
09/01/2009 19:56 timeformiles#26
i will look into that soon, prob in 30mins i will try to seach for somthing to add into that.
09/01/2009 23:20 pagabboy#27
yo , you guys have allot of time on your hands :d , nice job on the links mongo
maybe ppl will start reading the help files from CE to and stop screaming for adresses
and of course we must not forget chaoticjapan's guide ( best guide on forum,just my opinion) . one thing i forgot to mention ,the pixelget bot can be used only for same level
mobs grinding, becose its a lill slow i use it with aio2 from strike just for the aoe bot but only when drops are 2x :D.
09/02/2009 02:50 skad304#28
can you make the address or memory a function?
09/02/2009 06:15 mongo2007#29
Quote:
Originally Posted by skad304 View Post
can you make the address or memory a function?
can you make the address.. memory addresses are store and used by the game. you can use those addresses and values for your own purposes.


or memory a function?
the memory address is nothing more than a defined address to a value that's stored by the game. If you know the address you can freeze the value or change the value to what you want it to be.
09/02/2009 08:09 mongo2007#30
Ok folks this is the basic GUI. nothing fancy yet but you'll get the idea of the simplicity of the project. I'll be learning to add variables and memory results tonight.


#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ProgressConstants.au3>
#include <SliderConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 410, 224, 484, 126)
$Progress1 = GUICtrlCreateProgress(24, 32, 150, 17)
GUICtrlSetColor(-1, 0xFF0000)
$Progress2 = GUICtrlCreateProgress(24, 112, 150, 17)
$Slider1 = GUICtrlCreateSlider(16, 144, 166, 45)
$Slider2 = GUICtrlCreateSlider(16, 64, 166, 45)
$Input1 = GUICtrlCreateInput("Input1", 304, 24, 73, 21)
$Input2 = GUICtrlCreateInput("Input2", 304, 56, 73, 21)
$Input3 = GUICtrlCreateInput("Input3", 304, 88, 73, 21)
$Input4 = GUICtrlCreateInput("Input4", 304, 120, 73, 21)
$Label1 = GUICtrlCreateLabel("Current Health", 216, 32, 72, 17)
$Label2 = GUICtrlCreateLabel("Maximum Health", 216, 64, 82, 17)
$Label3 = GUICtrlCreateLabel("Current Chi", 216, 96, 56, 17)
$Label4 = GUICtrlCreateLabel("Maximum Chi", 216, 128, 66, 17)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
$Submit = GUICtrlCreateButton("Submit", 304, 160, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd