Welcome to Chaox.us
Diablo 2 LOD Battle.net US East Ladder Channel: Clan ChX
Don't forget to favorite www.Chaox.us
 
Clan ChxClan Chx  HomeHome  Log inLog in  RegisterRegister  

Share | 
 

 So I made a bot

View previous topic View next topic Go down 
AuthorMessage
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: So I made a bot   8/23/2012, 4:32 am

First bot I have ever personally made from scratch

Code:
Global $UnPaused
HotKeySet("{Home}", "TogglePause")
HotKeySet("{End}", "Terminate")
Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client
Opt('PixelCoordMode', 0)
;AutoitSetOption("PixelCoordMode", 0)
AutoItSetOption("WinTitleMatchMode",2)
AutoItWinSetTitle("SHunter")         ;Set title of bot
Opt("SendKeyDownDelay", 50)            ;Set down delay to 250 miliseconds
$d = "{a DOWN} {s DOWN} {x DOWN} {z DOWN}"
$u = "{a DOWN} {s UP} {x UP} {z UP}"
$n = 0

While 1
    Sleep(100)
    ToolTip("Script is Paused",0,0)
WEnd

Func TogglePause()
  $UnPaused = NOT $UnPaused
  ToolTip("Resets:" & $n & " Bot started....",0,0)
  Sleep(100)
     While $UnPaused
$s = 0
$p = 0
$r = 0
     Do
$start = PixelGetColor(650,230)          ;Checking to see if it's the start screen
       If $start = 0x400000 Then
         ToolTip("Resets:" & $n & " Press Start Screen",0,0)
         Send("{x}")
         Sleep(750)
       Else
         $s = 1
       EndIf
       $s = 1
     Until $s = 1
     Do
$profile = PixelGetColor(400,500)          ;Coordinates of the Profile select screen
       If $profile = 0x505890 Then
         ToolTip("Resets:" & $n & " Select Profile Screen",0,0)
         Send("{x}")
         Sleep(100)
       Else
         $p = 1
       EndIf
       $p = 1
     Until $p = 1
       If $s+$p >= 2 Then
         Send("{z}")                  ;Exiting Journal
         Sleep(500)
$b = PIxelGetColor(373,244)
         If $b = 0x903828 Then
           ToolTip("Resets:" & $n & " Pokeball found! selecting Charmander.",0,0)
         Send("{x}")                ;Select Pokemon
         Sleep(500)
         Send("{x}")                ;Get past message
         Sleep(500)
         Send("{x}")                ;Confirm
         Sleep(750)
         Send("{z}")                ;Get past message
         Sleep(1000)
         Send("{z}")                  ;No
         Sleep(1500)
         Send("{z}")                ;Gary's message
         Sleep(850)
         ToolTip("Resets:" & $n & " Checking Charmander....",0,0)
         Send("{s}")                ;Open Menu
         Sleep(400)
         Send("{x}")                ;Select "Pokemon"
         Sleep(400)
         Send("{x}")                ;Select Charmander
         Sleep(400)
         Send("{x}")                ;Summary
         Sleep(400)
       Else
         Send("{z 10}")
         Sleep(100)
         ToolTip("Resets:" & $n & " Checking Charmander...." & " " & $n & " Resets",0,0)
         Sleep(100)
         Send("{s}")                ;Open Menu
         Sleep(500)
         Send("{x}")                ;Select "Pokemon"
         Sleep(500)
         Send("{x}")                ;Select Charmander
         Sleep(500)
         Send("{x}")                ;Summary
         Sleep(500)
       EndIf
     EndIf
$shiny = PixelGetColor(200,240)
$female = PixelGetColor(330, 130)
       If $shiny <> 0xD84848 Then         ;Shiny Charmander
         ToolTip("Resets:" & $n & " Shiny Charmander Found, checking sex",0,0)
           If $female = 0xF8B870 Then   ;Gender Color
              ToolTip("Resets:" & $n & " Shiny Female Charmander Found!",0,0)
              Sleep(500)
              Send("{z}")            ;Exiting Summary
              Sleep(750)
              Send("{z}")            ;Exiting Pokemon Menu
              Sleep(750)
              Send("{z}")            ;Exiting Pokemon
              Sleep(750)
              Send("{DOWN}")         ;Moving to Save feature
              Sleep(750)
              Send("{DOWN}")         ;Moving to Save feature
              Sleep(750)
              Send("{DOWN}")         ;Moving to Save feature
              Sleep(750)
              Send("{x}")             ;Selecting save
              Sleep(750)
              Send("{x}")             ;Yes
              Sleep(750)
              Send("{x}")             ;Yes
              Sleep(5000)             ;Waiting while saving
              WinActivate("Notepad")
              WinWaitActive("Notepad")
              Send("Congrats Kyle you got yourself a shiny Female Charmander!")
              Exit
           Else
              ToolTip("Resets:" & $n & " Male shiny Charmander, Skipping",0,0)
              Sleep(500)
           EndIf
         ElseIf $shiny = 0xD84848 Then      ;Not Shiny
              ToolTip("Resets:" & $n & " Not a shiny Charmander :(",0,0)
              Sleep(500)
              $n = $n + 1
              ToolTip("Resets:" & $n & " Restarting",0,0)
              Send($d)
              Sleep(10)
              Send($u)
              Sleep(100)
              $s = 0
              $p = 0
              Sleep(100)
              ToolTip("Resets:" & $n & " Skipping Intro",0,0)
              Sleep(250)
              Send("{x}")
              Sleep(750)
         EndIf
  WEnd
EndFunc

Func Terminate()
  Exit 0
EndFunc

Autoit bot to find a shiny Charmander in an emulated Firered version lol

~Edited
~shaved a few seconds off the start to finish time
~Got rid of extra lines

_________________

~I survived the 2012 apocalypse~


Last edited by Kyle on 8/24/2012, 4:28 am; edited 1 time in total
Back to top Go down
http://www.d2chaox.com
Jamie
Moderator
Moderator
avatar

Posts : 746
Registered : 2010-06-22

Nick-Name : Jamie

PostSubject: Re: So I made a bot   8/24/2012, 12:23 am

Fail.

_________________
Back to top Go down
http://www.facebook.com/jamesgranbyii
BlUWUlF
V.I.P. Member
V.I.P. Member
avatar

Posts : 585
Registered : 2008-02-21

Nick-Name : Blu

PostSubject: Re: So I made a bot   8/24/2012, 2:39 am

omfg you are hella bored kyle xD

dunno why, never got into pokemon much.

ever done NT stuff for custom cubing? if so pm me bout it cause I'd have a fun project for you

_________________
I believe in honesty and respect. You fuck with me? Damn straight I'm going to fuck with you Razz

I joke alot, so don't take too much I say personally
(if you do have a problem with me, just talk to me)

Back to top Go down
http://forums.d2jsp.org/user.php?i=401714
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   8/24/2012, 4:28 am

Didn't do it cause I was bored, did it cause I wanted a fucking shiny charmander and I didn't wanna spend days doing it myself

Trying to get the bot to work in the background but it relies on PixelGetColor(x,y) and that only works if the window is visible

It worked lastnight, I woke up and found one Smile but it wasn't a female so I edited it and threw in the lines to get a shiny female

Actually enjoying this so much I'm thinking of learning some programming languages so I can do more shit, this project was so fun (Got like.... 16 hours in this bot lol)

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
dragonslayer999
Very Active Member
Very Active Member
avatar

Posts : 207
Registered : 2007-09-29

Nick-Name : Dragon / Devil

PostSubject: Re: So I made a bot   8/24/2012, 4:19 pm

kyle there is a way to get it to do it in the background. but it will take quite a bit of work to do it lol.
Back to top Go down
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   8/24/2012, 7:05 pm

dragonslayer999 wrote:
kyle there is a way to get it to do it in the background. but it will take quite a bit of work to do it lol.

I know it will, problem is I know very little of any language... autoit is probably the language I know best just because of this lol....

You don't think this took a lot of work to do? I've got about 16 hours of coding into that little bot, and I know how to do everything in the background except look for a certain color of the VisualBoyAdvance (emulator) to see if it's on the start screen, profile screen, pokeball screen, and to see if it's Shiny + female

Asked about it on a couple other places, http://msdn.microsoft.com/en-us/library/windows/desktop/dd145216%28v=vs.85%29.aspx looks like something that could work.... just have to figure it out

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   9/4/2012, 5:15 pm

After a few revisions, edit here and an edit there I easily have over 50,000 soft resets trying to get a shiny female Charmander and....
http://img853.imageshack.us/img853/7201/pokemonk.png



That's right people, I'm a fucking boss Smile
Who else out there would make a bot to fucking look for a shiny starter pokemon!

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
dragonslayer999
Very Active Member
Very Active Member
avatar

Posts : 207
Registered : 2007-09-29

Nick-Name : Dragon / Devil

PostSubject: Re: So I made a bot   9/4/2012, 9:34 pm

you could have just used cheats to give yourself one. would have only taken a few minutes at most. xD
Back to top Go down
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   9/4/2012, 10:01 pm

dragonslayer999 wrote:
you could have just used cheats to give yourself one. would have only taken a few minutes at most. xD

Yes I could have, but I made a bot

That is my rebuttal

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
dragonslayer999
Very Active Member
Very Active Member
avatar

Posts : 207
Registered : 2007-09-29

Nick-Name : Dragon / Devil

PostSubject: Re: So I made a bot   9/5/2012, 12:48 am

Kyle wrote:
dragonslayer999 wrote:
you could have just used cheats to give yourself one. would have only taken a few minutes at most. xD

Yes I could have, but I made a bot

That is my rebuttal

hmm. thats a tough one.
Back to top Go down
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   9/5/2012, 1:25 am

dragonslayer999 wrote:
Kyle wrote:
dragonslayer999 wrote:
you could have just used cheats to give yourself one. would have only taken a few minutes at most. xD

Yes I could have, but I made a bot

That is my rebuttal

hmm. thats a tough one.

I made it more legit than making a shiny and look legit.
I had fun making the bot.
I had fun running into errors and learning how to deal with them.
and doing this makes me want to learn coding so I can apply it to other games

C++ here I come, gonna hack some fps games! in a year or so.... lol

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
dragonslayer999
Very Active Member
Very Active Member
avatar

Posts : 207
Registered : 2007-09-29

Nick-Name : Dragon / Devil

PostSubject: Re: So I made a bot   9/5/2012, 9:30 am

coding is really something i would like to get into. but i really dont know where to start. and my memory is for the most part absolutely terrible most of the time. so im thinking i will forget half of what i learned but if i use it enough i shouldnt. but i still dont really know where to start lol
Back to top Go down
Kyle
Administrator
Administrator
avatar

Posts : 3709
Registered : 2007-10-03

Nick-Name : Kyle/Kail

PostSubject: Re: So I made a bot   9/5/2012, 3:20 pm

dragonslayer999 wrote:
coding is really something i would like to get into. but i really dont know where to start. and my memory is for the most part absolutely terrible most of the time. so im thinking i will forget half of what i learned but if i use it enough i shouldnt. but i still dont really know where to start lol

I plan on learning C++ then using what I learn to make a hack for something like combat arms... lol

Cause those hacks are 100% made in C++ and after you've learned a language it's easy to pick up another one

Autoit was fun, very simple language and I'm sure there's some tutorials out there for learning it but it's just not powerful enough to do what I want Smile

_________________

~I survived the 2012 apocalypse~
Back to top Go down
http://www.d2chaox.com
Sponsored content




PostSubject: Re: So I made a bot   

Back to top Go down
 
So I made a bot
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Fan made Chaos Dwarf army book
» If they made a Gears of War movie....
» lamborghini home made in china
» THIS IS THE BEST DRAWING I HAVE PROBABLY EVER MADE.
» So I Made A Hipster Cry Today

Permissions in this forum:You cannot reply to topics in this forum
Clan Chx :: Off Topic :: Random Chatting-
Jump to: