Jump to content

Diablo 2 AFK Bot


Abaddon
 Share

Recommended Posts

Hi, I made a D2 AFK bot to send a message every 10 seconds to say that you are afk for trades. I need the user to be able to select what to say without having to edit the script.

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

Send ( "{ALTDOWN}" )

Send ( "{TAB} " )

Sleep (10000)

Send ( "{ALTUP}" )

Sleep (500)

While 1

Send ( "{ENTER}" )

Sleep (500)

Send ( "Hi I am AFK. Please leave your account name and how many GCs you have and I will get back with you" )

Sleep (500)

Send ( "{ENTER}" )

Sleep (10000)

Wend

Func Close()

Exit

EndFunc

Link to comment
Share on other sites

Firstly, I suggest you use WinWaitActive to wait for the D2 window to be active. Second, you can use the following code to get user-input:

$usertext = InputBox(<title>, <prompt>)

The above script can be simplified to this:

HotKeySet( "{ESC}" , "Close" )
Dim $usertext = InputBox("Please enter AFK text", "Please enter the text you wish to spam while AFK")
WinWaitActive("Diablo 2")
While 1
Send($usertext)
Sleep(500)
Send("{ENTER}")
Sleep(10000)
WEnd
Func Close()
Exit
EndFunc
Link to comment
Share on other sites

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

Global $usertext = InputBox("Please enter AFK text", "Please enter the text you wish to spam while AFK", IniRead("settings.ini", "Settings", "Text", ""))
If $usertext <> "" Then IniWrite("settings.ini", "Settings", "Text", $usertext)

WinWaitActive("Diablo 2")

While 1
    Send($usertext)
    Sleep(500)
    Send("{ENTER}")
    Sleep(10000)
WEnd

Func Close()
    Exit
EndFunc

Might as well make it save the last entry so that the user doesn't have to input a new one each time. I'm really tired so if there's any errors--and I'm sure there are, as I wrote it in the web-browser without testing it--please excuse them :P

Link to comment
Share on other sites

Here is the complete script. It works like a freakin charm I love it.

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

Global $usertext = InputBox("AFK Bot v1.0", "Please enter the text you wish to spam while AFK", IniRead("settings.ini", "Settings", "Text", ""))

If $usertext <> "" Then IniWrite("settings.ini", "Settings", "Text", $usertext)

WinWaitActive("Diablo II")

Sleep(5000)

While 1

Send("{ENTER}")

Sleep(500)

Send($usertext)

Sleep(500)

Send("{ENTER}")

Sleep(20000)

WEnd

Func Close()

Exit

EndFunc

I changed some thing around. Mostly just things you know from playing the game.

P.S. I don't know how to do the code box thing without it lookin all gay LOL.

Link to comment
Share on other sites

I don't know if the Blizzard bot scanners are still on guard,

but just a safety advise :

If you use sleep() in your code, try to use randomized sleep times :

ex. : Sleep (Random(17000,22000))

That way you are simulating more "human" behaviour. :P

Edited by Gyzmok
D2charkeeper = No more 'expired characters' in D2.File Date Changer = Change the file date(s), attributes and the filename case of multiple files @ once.Updater_full = Copy/Update your autoitscripts, pictures, .mp3, .avi etc ... subdirs from your PC to your memory stick or to your external harddisk. Now with scheduling and logging.Questmapper
Link to comment
Share on other sites

I don't know if the Blizzard bot scanners are still on guard,

but just a safety advise :

If you use sleep() in your code, try to use randomized sleep times :

ex. : Sleep (Random(17000,22000))

That way you are simulating more "human" behaviour. :)

The above will not help you in the least as it is not at all how Warden scans.

A little reading goes a long way. Post count means nothing.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...