Sign in to follow this  
Followers 0
Satanstheory

Help with packets

9 posts in this topic

Ok im wanting to create a bot for a small MMORPG i want it to search the landscap for moving creatures target them caste a spell rinse and repeat. Could somone give me some code examples please. Ive been searching google for like 7 hours going nuts. You can contact me on Aim , Msn, or Icq just Pm me . or post here ill check back .. and how would i add hot keys to that also im gonna do some research while i wait.

Share this post


Link to post
Share on other sites



Have you tried anything thus far at all?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Well im not good at programing. But is thier a function to search the entire screen for moving things not by color? But ya see flowers and things also move. I got the colors for fox,snake, and racoon. But that wont be much help when they die they leave a carcus

Share this post


Link to post
Share on other sites

Not quite sure what you mean 'Not by color'? Do the objects have 'Control Id's) if so you could use ControlGetPos().


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Global $Paused

HotKeySet("{Pause}","TogglePause")

HotKeySet("{ESC}","Terminate")

HotKeySet("+!d","ShowMessage")

; Define colour to match

Local $Match = 0x860C0C

; Loop indefinitely

While 1

; Search the entire desktop for colour

Local $Coords = PixelSearch(0, 0, @DesktopWidth - 1, @DesktopHeight - 1, $Match,)

; If successful then click that location

If Not @Error Then

MouseClick('Left', $Coords[0], $Coords[1])

; Wait until the colour at that point changes

Do

Sleep(1000)

Until PixelGetColor($Coords[0], $Coords[1]) <> $Match

Else

While 1

Sleep(100)

WEnd

Func Togglepause()

$Paused = NOT $Paused

while $Paused

sleep(100)

ToolTip(' Bot is Paused Master

"Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

Func ShowMessage()

MsgBox(4096m"","Terminated.")

EndFunc

Thats what i got so far But im getting a error that the Paused()

doesn't have a While Statement.

Also any idea's on how to get it to kill something before it switches to another target?It's Gotta use the insert key

Edited by Satanstheory

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Try putting:

ToolTip(' Bot is Paused Master

"Paused"',0,0)

On one line:

ToolTip(' Bot is Paused Master "Paused"',0,0)

Edit: This is going to throw an error also:

Func Terminate()
Exit 0
Func ShowMessage()
MsgBox(4096m"","Terminated.")
EndFunc

Can't have a function within a function:

Func Terminate()
    Exit
EndFunc

Func ShowMessage()
    MsgBox(4096, 'm', 'Terminated'); note the comma after 4096 and quote around 'm'.
EndFunc

Also Take a look here:

While 1
Local $Coords = PixelSearch(0, 0, @DesktopWidth - 1, @DesktopHeight - 1, $Match,)

If Not @Error And IsArray($Coord) Then
    MouseClick('Left', $Coords[0], $Coords[1], 1, 1)
    Do
        Sleep(1000)
    Until PixelGetColor($Coords[0], $Coords[1]) <> $Match
EndIf

WEnd
Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Thanks alot.. The program seems to just Run and doesn't target anything should i try adding a ,10 after match and see if i get anything.

Added a 10 to it still doesnt want to move the cursor to the red eyes on the bats and target them.

Edited by Satanstheory

Share this post


Link to post
Share on other sites

You catch on quick... yeh, start with 2 / 3 / 4 ... till you get the perfect blend... think of it as making the perfect steak... you can put every seasoning in the house on it, but it might not taste too good, or you can add little by little till it melts in your mouth.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thanks alot for all the help last night Smoke Got it to work off the black.. The bats seem to move a little faster then the cursor so it misses alot and somtimes retargets something else before i kill it. Im gonna use this till i finish off a packet based version....

Kinda like Client---> my program -----> Server

That way all traffic goes through my program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0