Sign in to follow this  
Followers 0
Masqo

Big help needed!

7 posts in this topic

Hello ! Im the beginner yet in autoit , so i made my first script. Its the diablo 2 spambot (for my use only). But i got a problem with that making a gui.

Like i got a inifile for modifications , inisettings.exe for modify the ini file inside gui and spambot.exe the main program.

Inisettings :

; ----------------------------------------------------------------------------
;
; AutoIt Version: v3.0.103
; Language:       English
; Platform:       Win 2000/XP
; Author:         Masqo <Masqo@hotmail.com>
;
; Script Function:
;   Spamming Diablo 2 channels and games.
;
; ----------------------------------------------------------------------------

;MY OPTS :


Opt("CaretCoordMode", 0)
AutoItSetOption ( "CaretCoordMode", 0 )
Opt("MouseClickDelay", 30)

;MY VARIABLES : 

$d2path = IniRead ( "spambot.ini", "Config", "path", "default" );

$d2exe = IniRead ( "spambot.ini", "Config", "exe", "default" );

$paras = IniRead ( "spambot.ini", "Config", "paras", "-w -skiptobnet -screensize 800x600");

$title = IniRead ( "spambot.ini", "Config", "title", "default");

$d2acc = IniRead ( "spambot.ini", "Login", "acc", "default" );

$d2pass = IniRead ( "spambot.ini" , "Login", "pass" , "default");

$charloc = IniRead ( "spambot.ini" , "Login", "char" , "default");

$spamcount = Iniread ("spambot.ini" , "Spam configurations" , "spamcount" , "default");

$spamnumber = Iniread ("spambot.ini" , "Spam configurations" , "spamnumber" , "default");

$rsleep = random ( 7500 )


; ----------------------------------------------------------------------------
; Script Start - Add your code below here
; ----------------------------------------------------------------------------

#include <GUIConstants.au3>
TrayTip("Inisettings" , "Please modify this file and then close the window and start spambot V 1.2", 10 , 1 )
GUICreate("Spambot V 1.2" , 400 , 450)
GUISetState (@SW_SHOW)
GUICtrlCreateLabel ("Inisettings for Spambot V 1.2",  100, 5 , 500, 150)
GUICtrlSetFont (-1,9, 400, 2, "Comic Sans")
GUICtrlSetColor(-1,0x446099) 

$d2acc1 = GUICtrlCreateInput ($d2acc, 15,  40, 100, 20)
GUICtrlCreateLabel ("Your account here",  150, 40 , 300, 20)
$save1 = GUICtrlCreateButton ( "Save", 15, 62, 90, 20)

$d2pass1 = GUICtrlCreateInput ($d2pass, 15, 90 , 100, 20)
GUICtrlCreateLabel ("Password",  150, 90 , 300, 20)
$save2 = GUICtrlCreateButton ( "Save", 15, 112, 90, 20)

$charloc1 = GUICtrlCreateInput ($charloc, 15, 140, 100, 20)
GUICtrlCreateLabel ("Character number(look char.txt)",  150, 140, 300, 20)
$save3 = GUICtrlCreateButton ( "Save", 15, 162, 90, 20)

$d2path1 = GUICtrlCreateInput ($d2path, 15, 190, 200, 20)
GUICtrlCreateLabel ("Full patch to Diablo 2",  260, 190 , 300, 20)
$save4 = GUICtrlCreateButton ( "Save", 15, 212, 90, 20)

$d2exe1 = GUICtrlCreateInput ($d2exe, 15, 240, 200, 20)
GUICtrlCreateLabel ("Diablo 2 Executable",  260, 240 , 300, 20)
$save5 = GUICtrlCreateButton ( "Save", 15, 262, 90, 20)

$paras1 = GUICtrlCreateInput ($paras, 15, 290, 200, 20)
GUICtrlCreateLabel ("Diablo 2 parameters",  260, 290 , 650, 20)
$save6 = GUICtrlCreateButton ( "Save", 15, 312, 90, 20)

$title1 = GUICtrlCreateInput ($title, 15, 340, 200, 20)
GUICtrlCreateLabel ("Diablo 2 Title name",  260, 340 , 300, 20)
$save7 = GUICtrlCreateButton ( "Save", 15, 362, 90, 20)



$guibutton1 = GUICtrlCreateButton ( "Exit", 15, 420, 90, 20)
$guibutton2 = GUICtrlCreateButton ( "Restart program", 120, 420, 90, 20)
$guibutton3 = GUICtrlCreateButton ( "Save all", 225, 420, 90, 20)


While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then Traytip("Inisettings" , "Have a nice day!", 10, 1)
    If $msg = $GUI_EVENT_CLOSE Then Sleep('500')
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If $msg = $guibutton1 Then Traytip("Inisettings" , "Have a nice day!", 10, 1)
    If $msg = $guibutton1 Then Sleep('500')
    If $msg = $guibutton1 Then Exit
    If $msg = $guibutton2 Then Run('Spambot V 1.2.exe')
    If $msg = $guibutton2 Then Exit(0)
    If $msg = $save1 Then IniDelete ( "spambot.ini", "Login", "acc" )
    If $msg = $save1 Then IniWrite ( "spambot.ini", "Login", "acc", $d2acc1)
    If $msg = $save2 Then IniDelete ( "spambot.ini", "Login", "pass" )
    If $msg = $save2 Then IniWrite ( "spambot.ini", "Login", "pass",$d2pass1)
    If $msg = $save3 Then IniDelete ( "spambot.ini", "Login", "char" )
    If $msg = $save3 Then IniWrite ( "spambot.ini", "Login", "char", $charloc1)
    If $msg = $save4 Then IniDelete ( "spambot.ini", "Config", "path" )
    If $msg = $save4 Then IniWrite ( "spambot.ini", "Config", "path", $d2path1)
    If $msg = $save5 Then IniDelete ( "spambot.ini", "Config", "exe" )
    If $msg = $save5 Then IniWrite ( "spambot.ini", "Config", "exe", $d2exe)
    If $msg = $save6 Then IniDelete ( "spambot.ini", "Config", "paras" )
    If $msg = $save6 Then IniWrite ( "spambot.ini", "Config", "paras", $paras1)
    If $msg = $save4 Then IniDelete ( "spambot.ini", "Config", "title" )
    If $msg = $save7 Then IniWrite ( "spambot.ini", "Config", "title", $title1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "acc", $d2acc1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "pass",$d2pass1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "char", $charloc1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "path", $d2path1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "exe", $d2exe)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "paras", $paras1)
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "title", $title1)
Wend

Ini file :

[Config]

path=13            <<<< SEE ? Thats the whole problem! It just saves the number if i modify the ini inside inisettings.exe , strange :S
;Full Patch to diablo 2

exe=Diablo II.exe
;Diablo 2 exe (D2loader recommended)

paras=19
;Parameters to run with diablo 2, please do not remove -w or -screensize 800x600 or -skiptobnet



title=D2
;Title for diablo :)

[Login]
acc=4
;Account to spam with

pass=7
;Password to spamming account

char=10
;Character location , look char.txt for more info

[Messages]

msg=Spam message 1
;Message to spam 

msg1=Spam message 2
;Message to spam 2 (It will spam these all messages randomly!)

msg2=Spam message 3
;Message to spam 3 (It will spam these all messages randomly!)

msg3=Spam message 4
;Message to spam 4 (It will spam these all messages randomly!)

msg4=Spam message 5
;Message to spam 5 (It will spam these all messages randomly!)

msg5=Spam message 6
;Message to spam 6 (It will spam these all messages randomly!)

;PS ! If u want to spam only one message , copy the message to all msg-s!

[Spamming Channels]

chan1=Diablo II Europe-NLD-1
chan2=Diablo II Europe-FIN-1
chan3=Diablo II Europe-SWE-1
chan4=Diablo II Europe-DNK-1
chan5=Diablo II Europe-DEU-1
chan6=Diablo II Europe-GBR-1
chan7=Diablo II Europe-ITA-1
chan8=Diablo II Europe-FRA-1
chan9=Diablo II Europe-USA-1
chan10=Diablo II Europe-ISR-1
chan11=Diablo II Europe-RUS-1
chan12=Diablo II Europe-NOR-1
chan13=Diablo II Europe-EST-1
chan14=Diablo II Europe-GBR-2
chan15=Diablo II Europe-SWE-2
chan16=Diablo II Europe-NOR-2
chan17=Diablo II Europe-USA-2
chan18=LoD Trading Europe-1
chan19=LoD Trading Europe-2
chan20=LoD Trading Europe-3
chan21=LoD Ladder Trading Europe-1
chan22=LoD Ladder Trading Europe-2
chan23=LoD Ladder Trading Europe-3
chan24=LoD Ladder Trading Europe-4
chan25=LoD Hardcore Europe-1
chan26=Diablo II Europe-GBR-2
chan27=LoD Ladder Trading Europe-4
chan28=LoD Ladder Trading Europe-1
chan29=Diablo II Europe-ITA-1
chan30=Diablo II Europe-USA-1
chan31=
chan32=
chan33=
chan34=
chan35=
;Enter the channels bot to go , u may repeat channels so bot got 50% more chance to go to that channel. Entering Channels randomly!

[Spam Configurations]

spamcount=0
;DO NOT MODIFY

spamnumber=50000
;How many messages to spam before quiting

Look , if i modify ini file inside the inisettings.exe , it will just remove the ini line and then enters some numbers , not the same thing i entered to the gui :/

very strange , if u need the spambot.exe code , i can copy it too but i think its not necessary.

Thanks for answers :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello ! Im the beginner yet in autoit , so i made my first script. Its the diablo 2 spambot (for my use only). But i got a problem with that making a gui.

Like i got a inifile for modifications , inisettings.exe for modify the ini file inside gui and spambot.exe the main program.

Look , if i modify ini file inside the inisettings.exe , it will just remove the ini line and then enters some numbers , not the same thing i entered to the gui :/

very strange , if u need the spambot.exe code , i can copy it too but i think its not necessary.

Thanks for answers  :)

<{POST_SNAPBACK}>

Use GuiRead() to retrieve the value of an input field.

The $d2acc1 field contains a handle to the input field.

ps:

1. why do an inidelete first everytime?

2. this looks like a typo:

If $msg = $save6 Then IniWrite ( "spambot.ini", "Config", "paras", $paras1)

If $msg = $save4 Then IniDelete ( "spambot.ini", "Config", "title" )

If $msg = $save7 Then IniWrite ( "spambot.ini", "Config", "title", $title1)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Use GuiRead() to retrieve the value of an input field.

The $d2acc1 field contains a handle to the input field.

ps:

1. why do an inidelete first everytime?

2. this looks like a typo:

  If $msg = $save6 Then IniWrite ( "spambot.ini", "Config", "paras", $paras1)

  If $msg = $save4 Then IniDelete ( "spambot.ini", "Config", "title" )

  If $msg = $save7 Then IniWrite ( "spambot.ini", "Config", "title", $title1)

<{POST_SNAPBACK}>

yep , ur right ... 2. is a typo but 1. , can it be without a inidelete too? :)

K but how to use guiread? like If $msg = $save6 Then GuiRead() or something? dunno how to do that.. can u make me an example plz? :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

yep , ur right ... 2. is a typo but 1. , can it be without a inidelete too? :)

K but how to use guiread? like If $msg = $save6 Then GuiRead() or something? dunno how to do that.. can u make me an example plz? :)

<{POST_SNAPBACK}>

Did you look at the examples in the Helpfile? Something like this should do it for you:
If $msg = $save1 Then IniWrite ( "spambot.ini", "Login", "acc", GuiRead($d2acc1))

Don't understand why you ask: "can it be without a inidelete too?"

Why remove something first when you override it with a new value in the next statement?

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

hmm hey i did as u recommend me.. the guiread method.. and everything worked , except the d2exe :S

Thats the inisettings file

; ----------------------------------------------------------------------------
;
; AutoIt Version: v3.0.103
; Language:       English
; Platform:       Win 2000/XP
; Author:         Masqo <Masqo@hotmail.com>
;
; Script Function:
;   Spamming Diablo 2 channels and games.
;
; ----------------------------------------------------------------------------

;MY OPTS :


Opt("CaretCoordMode", 0)
AutoItSetOption ( "CaretCoordMode", 0 )
Opt("MouseClickDelay", 30)

;MY VARIABLES : 

$d2path = IniRead ( "spambot.ini", "Config", "path", "default" );

$d2exe = IniRead ( "spambot.ini", "Config", "exe", "default" );

$paras = IniRead ( "spambot.ini", "Config", "paras", "-w -skiptobnet -screensize 800x600");

$title = IniRead ( "spambot.ini", "Config", "title", "default");

$d2acc = IniRead ( "spambot.ini", "Login", "acc", "default" );

$d2pass = IniRead ( "spambot.ini" , "Login", "pass" , "default");

$charloc = IniRead ( "spambot.ini" , "Login", "char" , "default");

$spamcount = Iniread ("spambot.ini" , "Spam configurations" , "spamcount" , "default");

$spamnumber = Iniread ("spambot.ini" , "Spam configurations" , "spamnumber" , "default");

$rsleep = random ( 7500 )


; ----------------------------------------------------------------------------
; Script Start - Add your code below here
; ----------------------------------------------------------------------------

#include <GUIConstants.au3>
TrayTip("Inisettings" , "Please modify this file and then close the window and start spambot V 1.2", 10 , 1 )
GUICreate("Spambot V 1.2" , 400 , 450)
GUISetState (@SW_SHOW)
GUICtrlCreateLabel ("Inisettings for Spambot V 1.2",  100, 5 , 500, 150)
GUICtrlSetFont (-1,9, 400, 2, "Comic Sans")
GUICtrlSetColor(-1,0x446099) 

$d2acc1 = GUICtrlCreateInput ($d2acc, 15,  40, 100, 20)
GUICtrlCreateLabel ("Your account here",  150, 40 , 300, 20)
$save1 = GUICtrlCreateButton ( "Save", 15, 62, 90, 20)

$d2pass1 = GUICtrlCreateInput ($d2pass, 15, 90 , 100, 20)
GUICtrlCreateLabel ("Password",  150, 90 , 300, 20)
$save2 = GUICtrlCreateButton ( "Save", 15, 112, 90, 20)

$charloc1 = GUICtrlCreateInput ($charloc, 15, 140, 100, 20)
GUICtrlCreateLabel ("Character number(look char.txt)",  150, 140, 300, 20)
$save3 = GUICtrlCreateButton ( "Save", 15, 162, 90, 20)

$d2path1 = GUICtrlCreateInput ($d2path, 15, 190, 200, 20)
GUICtrlCreateLabel ("Full patch to Diablo 2",  260, 190 , 300, 20)
$save4 = GUICtrlCreateButton ( "Save", 15, 212, 90, 20)

$d2exe1 = GUICtrlCreateInput ($d2exe, 15, 240, 200, 20)
GUICtrlCreateLabel ("Diablo 2 Executable",  260, 240 , 300, 20)
$save5 = GUICtrlCreateButton ( "Save", 15, 262, 90, 20)

$paras1 = GUICtrlCreateInput ($paras, 15, 290, 200, 20)
GUICtrlCreateLabel ("Diablo 2 parameters",  260, 290 , 650, 20)
$save6 = GUICtrlCreateButton ( "Save", 15, 312, 90, 20)

$title1 = GUICtrlCreateInput ($title, 15, 340, 200, 20)
GUICtrlCreateLabel ("Diablo 2 Title name",  260, 340 , 300, 20)
$save7 = GUICtrlCreateButton ( "Save", 15, 362, 90, 20)



$guibutton1 = GUICtrlCreateButton ( "Exit", 15, 420, 90, 20)
$guibutton2 = GUICtrlCreateButton ( "Restart program", 120, 420, 90, 20)
$guibutton3 = GUICtrlCreateButton ( "Save all", 225, 420, 90, 20)


While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then Traytip("Inisettings" , "Have a nice day!", 10, 1)
    If $msg = $GUI_EVENT_CLOSE Then Sleep('500')
    If $msg = $GUI_EVENT_CLOSE Then Exit
    If $msg = $guibutton1 Then Traytip("Inisettings" , "Have a nice day!", 10, 1)
    If $msg = $guibutton1 Then Sleep('500')
    If $msg = $guibutton1 Then Exit
    If $msg = $guibutton2 Then Run('Spambot V 1.2.exe')
    If $msg = $guibutton2 Then Exit(0)
    If $msg = $save1 Then IniWrite ( "spambot.ini", "Login", "acc", GuiRead($d2acc1))
    If $msg = $save2 Then IniWrite ( "spambot.ini", "Login", "pass",GuiRead($d2pass1))
    If $msg = $save3 Then IniWrite ( "spambot.ini", "Login", "char",GuiRead($charloc1))
    If $msg = $save4 Then IniWrite ( "spambot.ini", "Config", "path",GuiRead($d2path1))
    If $msg = $save5 Then IniWrite ( "spambot.ini", "Config", "exe", GuiRead($d2exe))
    If $msg = $save6 Then IniWrite ( "spambot.ini", "Config", "paras", GuiRead($paras1))
    If $msg = $save7 Then IniWrite ( "spambot.ini", "Config", "title", GuiRead($title1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "acc", GuiRead($d2acc1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "pass",GuiRead($d2pass1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Login", "char", GuiRead($charloc1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "path", GuiRead($d2path1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "exe", GuiRead($d2exe))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "paras", GuiRead($paras1))
    If $msg = $guibutton3 Then IniWrite ( "spambot.ini", "Config", "title", GuiRead($title1))
Wend

And thats the part of ini what does not work :

,,,,,


[Config]

path=C:/Program Files/Diablo II/
;Full Patch to diablo 2

exe=1243456
;Diablo 2 exe (D2loader recommended)


,,,,,

why the exe is typed as 1243456 ? i typed in diablo 2.exe but it showed numbers :S

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

hmm hey i did as u recommend me.. the guiread method.. and everything worked , except the d2exe :S

why the exe is typed as 1243456 ? i typed in diablo 2.exe but it showed numbers :S

<{POST_SNAPBACK}>

you are not reading the proper Handle... it should be:

If $msg = $save5 Then IniWrite("spambot.ini", "Config", "exe", GUIRead($d2exe1))
:) Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

you are not reading the proper Handle... it should be:

If $msg = $save5 Then IniWrite("spambot.ini", "Config", "exe", GUIRead($d2exe1))
;)

<{POST_SNAPBACK}>

oh yeah , sry was a typo :) :)

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