[Source]Script Dofus > Connexion de compte

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

xg7xg7pat

Membre Banni
Sep 17, 2011
52
0
311
Bonjour a tous,

Il y a 2 semaine, ont m'as demander de crée un petit script pour
pour pouvoir connecter 8 compte sur Dofus, donc je les fait et vue que sa me sert a rient, je vous le fait partager .

Plusieurs amélioration sont a prévoir, j'ai fait sa vite fait :hap:
Et, il faut régler le temps selon la rapidité de votre ordinateur :)
Le logiciel, écrit vos ID et MDP dans un fichier.ini, pour ne pas avoir a les retaper a chaque fois.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#RequireAdmin
#Region ### START Koda GUI section ### Form=c:\koda\forms\pierric.kxf
$Form1_1 = GUICreate("Dofus Logiciel Version 1.0.0", 615, 681, 192, 124)
GUICtrlSetFont(-1, 20, 800, 2, "Palatino Linotype")
GUICtrlSetColor(-1, 0x000000)
$Checkbox1 = GUICtrlCreateCheckbox("Utilisation du compte 1", 24, 104, 137, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Utilisation du compte 2", 24, 168, 121, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Utilisation du compte 3", 24, 232, 129, 17)
$Checkbox4 = GUICtrlCreateCheckbox("Utilisation du compte 4", 24, 296, 129, 17)
$Checkbox5 = GUICtrlCreateCheckbox("Utilisation du compte 5", 24, 360, 129, 17)
$Checkbox6 = GUICtrlCreateCheckbox("Utilisation du compte 6", 24, 424, 129, 17)
$Checkbox7 = GUICtrlCreateCheckbox("Utilisation du compte 7", 24, 488, 129, 17)
$Checkbox8 = GUICtrlCreateCheckbox("Utilisation du compte 8", 24, 552, 129, 17)
$Label2 = GUICtrlCreateLabel("ID:", 168, 96, 18, 17)
$Input1 = GUICtrlCreateInput("Input1", 192, 88, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 192, 112, 121, 21)
$Input3 = GUICtrlCreateInput("Input3", 192, 152, 121, 21)
$Input4 = GUICtrlCreateInput("Input4", 192, 176, 121, 21)
$Input5 = GUICtrlCreateInput("Input5", 192, 216, 121, 21)
$Input6 = GUICtrlCreateInput("Input6", 192, 240, 121, 21)
$Input7 = GUICtrlCreateInput("Input7", 192, 280, 121, 21)
$Input8 = GUICtrlCreateInput("Input8", 192, 304, 121, 21)
$Input9 = GUICtrlCreateInput("Input9", 192, 344, 121, 21)
$Input10 = GUICtrlCreateInput("Input10", 192, 368, 121, 21)
$Input11 = GUICtrlCreateInput("Input11", 192, 408, 121, 21)
$Input12 = GUICtrlCreateInput("Input12", 192, 432, 121, 21)
$Input13 = GUICtrlCreateInput("Input13", 192, 472, 121, 21)
$Input14 = GUICtrlCreateInput("Input14", 192, 496, 121, 21)
$Input15 = GUICtrlCreateInput("Input15", 192, 536, 121, 21)
$Input16 = GUICtrlCreateInput("Input16", 192, 560, 121, 21)
$Label3 = GUICtrlCreateLabel("MDP:", 160, 120, 31, 17)
$Label4 = GUICtrlCreateLabel("ID:", 168, 160, 18, 17)
$Label5 = GUICtrlCreateLabel("MDP:", 160, 184, 31, 17)
$Label6 = GUICtrlCreateLabel("ID:", 168, 224, 18, 17)
$Label7 = GUICtrlCreateLabel("MDP:", 160, 248, 31, 17)
$Label8 = GUICtrlCreateLabel("ID:", 168, 288, 18, 17)
$Label9 = GUICtrlCreateLabel("MDP:", 160, 312, 31, 17)
$Label10 = GUICtrlCreateLabel("ID:", 168, 352, 18, 17)
$Label11 = GUICtrlCreateLabel("MDP:", 160, 376, 31, 17)
$Label12 = GUICtrlCreateLabel("ID:", 168, 416, 18, 17)
$Label13 = GUICtrlCreateLabel("MDP:", 160, 440, 31, 17)
$Label14 = GUICtrlCreateLabel("ID:", 168, 480, 18, 17)
$Label15 = GUICtrlCreateLabel("MDP:", 160, 504, 31, 17)
$Label16 = GUICtrlCreateLabel("ID:", 168, 544, 18, 17)
$Label17 = GUICtrlCreateLabel("MDP:", 160, 568, 31, 17)
$Label18 = GUICtrlCreateLabel("Coded by Mizio", 384, 624, 208, 44)
GUICtrlSetFont(-1, 18, 800, 2, "Segoe Script")
GUICtrlSetColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Start", 424, 296, 75, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Parcourir", 16, 600, 75, 25)
$Label19 = GUICtrlCreateLabel("Chemin du fichier :", 96, 600, 459, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

; Lecture et Ecriture dans le logiciel = Input ...
;***************************************************************************************************************

$id1 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 1","")
GUICtrlSetData($Input1,$id1,"")
$mdp1 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 1","")
GUICtrlSetData($Input2,$mdp1,"")
$id2 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 2","")
GUICtrlSetData($Input3,$id2,"")
$mdp2 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 2","")
GUICtrlSetData($Input4,$mdp2,"")
$id3 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 3","")
GUICtrlSetData($Input5,$id3,"")
$mdp3 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 3","")
GUICtrlSetData($Input6,$mdp3,"")
$id4 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 4","")
GUICtrlSetData($Input7,$id4,"")
$mdp4 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 4","")
GUICtrlSetData($Input8,$mdp4,"")
$id5 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 5","")
GUICtrlSetData($Input9,$id5,"")
$mdp5 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 5","")
GUICtrlSetData($Input10,$mdp5,"")
$id6 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 6","")
GUICtrlSetData($Input11,$id6,"")
$mdp6 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 6","")
GUICtrlSetData($Input12,$mdp6,"")
$id7 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 7","")
GUICtrlSetData($Input13,$id7,"")
$mdp7 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 7","")
GUICtrlSetData($Input14,$mdp7,"")
$id8 = IniRead(@DesktopDir&"\Option.ini","parametres","ID 8","")
GUICtrlSetData($Input15,$id8,"")
$mdp8 = IniRead(@DesktopDir&"\Option.ini","parametres","MDP 8","")
GUICtrlSetData($Input16,$mdp8,"")
$chemin = IniRead(@DesktopDir&"\Option.ini","parametres","Chemin du fichier","")
$SourceFile = $chemin
GUICtrlSetData($Label19,$chemin,"")

_SetPasswordStyle($Form1_1, $Input2, '=')
_SetPasswordStyle($Form1_1, $Input4, '=')
_SetPasswordStyle($Form1_1, $Input8, '=')
_SetPasswordStyle($Form1_1, $Input10, '=')
_SetPasswordStyle($Form1_1, $Input12, '=')
_SetPasswordStyle($Form1_1, $Input14, '=')
_SetPasswordStyle($Form1_1, $Input16, '=')
_SetPasswordStyle($Form1_1, $Input6, '=')

;***************************************************************************************************************
; Boucle principal

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Ecriture()
Compte1()
Compte2()
Compte3()
Compte4()
Compte5()
Compte6()
Compte7()
Compte8()
Case $Button2
$SourceFile = FileOpenDialog("Chemin Du fichier : ",@ScriptDir&'\',"Tous (*.*)",9)
GUICtrlSetData($Label19,"Chemin du fichier : "& $SourceFile)
EndSwitch
WEnd
;*********************************************************************************************************************
; Debut des Fonction
Func Compte1() ; sa marche
If _IsChecked($Checkbox1) Then
$cpt1_1 = GUICtrlRead($Input1)
$cpt1_2 = GUICtrlRead($Input2)
ShellExecute($SourceFile)
Sleep(20000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte1")
Sleep(500)
$ZeroCoor = WinGetPos ("Compte1")
; MsgBox(0, "Active window stats (x,y,width,height):", $ZeroCoor[0] & " " & $ZeroCoor[1] & " " & $ZeroCoor[2] & " " & $ZeroCoor[3])
ControlSend("Compte1", "","", $cpt1_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte1", "","", $cpt1_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(2000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte2()
If _IsChecked($Checkbox2) Then
$cpt2_1 = GUICtrlRead($Input3)
$cpt2_2 = GUICtrlRead($Input4)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte2")
Sleep(500)
$ZeroCoor2 = WinGetPos ("Compte2")
ControlSend("Compte2", "","", $cpt2_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte2", "","", $cpt2_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(500)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte3()
If _IsChecked($Checkbox3) Then
$cpt3_1 = GUICtrlRead($Input5)
$cpt3_2 = GUICtrlRead($Input6)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte3")
Sleep(500)
$ZeroCoor3 = WinGetPos ("Compte3")
ControlSend("Compte3", "","", $cpt3_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(500)
ControlSend("Compte3", "","", $cpt3_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(1000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte4()
If _IsChecked($Checkbox4) Then
$cpt4_1 = GUICtrlRead($Input7)
$cpt4_2 = GUICtrlRead($Input8)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte4")
Sleep(500)
$ZeroCoor4 = WinGetPos ("Compte4")
ControlSend("Compte4", "","", $cpt4_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte4", "","", $cpt4_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(1000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte5()
If _IsChecked($Checkbox5) Then
$cpt5_1 = GUICtrlRead($Input9)
$cpt5_2 = GUICtrlRead($Input10)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte5")
Sleep(2000)
$ZeroCoor5 = WinGetPos ("Compte5")
ControlSend("Compte5", "","", $cpt5_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte5", "","", $cpt5_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(20000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(2000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte6()
If _IsChecked($Checkbox6) Then
$cpt6_1 = GUICtrlRead($Input11)
$cpt6_2 = GUICtrlRead($Input12)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte6")
Sleep(2000)
$ZeroCoor6 = WinGetPos ("Compte6")
ControlSend("Compte6", "","", $cpt6_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte6", "","", $cpt6_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(2000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte7()
If _IsChecked($Checkbox7) Then
$cpt7_1 = GUICtrlRead($Input13)
$cpt7_2 = GUICtrlRead($Input14)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte7")
Sleep(2000)
$ZeroCoor7 = WinGetPos ("Compte7")
ControlSend("Compte7", "","", $cpt7_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte7", "","", $cpt7_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(2000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Compte8()
If _IsChecked($Checkbox8) Then
$cpt8_1 = GUICtrlRead($Input15)
$cpt8_2 = GUICtrlRead($Input16)
ShellExecute($SourceFile)
Sleep(30000)
WinWaitActive("Dofus")
WinSetTitle("Dofus", "","Compte8")
Sleep(2000)
$ZeroCoor8 = WinGetPos ("Compte8")
ControlSend("Compte8", "","", $cpt8_1) ; Tape ID
Sleep(2000)
MouseClick("left",580,360, 1, 3)
Sleep(2000)
ControlSend("Compte8", "","", $cpt8_2) ; Tape MDP
Sleep(2000)
MouseClick("left",690,470, 1, 3) ; JOUER
Sleep(8000)
MouseClick("left",390,360, 1, 3) ; Choisir personnage
Sleep(2000)
MouseClick("left",682,550, 3) ; Selectionner
Sleep(10000)
MouseClick("left",687,644, 1, 3) ; Jouer
Sleep(5000)
EndIf
EndFunc

Func Ecriture()
If _IsChecked($Checkbox1) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 1",GUICtrlRead($Input1))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 1",GUICtrlRead($Input2))
EndIf
If _IsChecked($Checkbox2) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 2",GUICtrlRead($Input3))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 2",GUICtrlRead($Input4))
EndIf
If _IsChecked($Checkbox3) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 3",GUICtrlRead($Input5))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 3",GUICtrlRead($Input6))
EndIf
If _IsChecked($Checkbox4) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 4",GUICtrlRead($Input7))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 4",GUICtrlRead($Input8))
EndIf
If _IsChecked($Checkbox5) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 5",GUICtrlRead($Input9))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 5",GUICtrlRead($Input10))
EndIf
If _IsChecked($Checkbox6) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 6",GUICtrlRead($Input11))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 6",GUICtrlRead($Input12))
EndIf
If _IsChecked($Checkbox7) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 7",GUICtrlRead($Input13))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 7",GUICtrlRead($Input14))
EndIf
If _IsChecked($Checkbox8) Then
IniWrite(@DesktopDir&"\Option.ini","parametres","ID 8",GUICtrlRead($Input15))
IniWrite(@DesktopDir&"\Option.ini","parametres","MDP 8",GUICtrlRead($Input16))
EndIf
IniWrite(@DesktopDir&"\Option.ini","parametres","Chemin du fichier",$SourceFile)
EndFunc

Func _SetPasswordStyle($hwnd_GUI, $hwnd_ControlID, $sEncode = '', $v_Font = 'Webdings', $i_FontSize = 9)
Local $EM_SETPASSWORDCHAR = 0xCC
If $sEncode = '' Then
GUICtrlSendMsg($hwnd_ControlID, $EM_SETPASSWORDCHAR, 0, 0)
ControlFocus($hwnd_GUI, '', $hwnd_ControlID)
GUICtrlSetFont($hwnd_ControlID, $i_FontSize, '', '', $v_Font)
Else
GUICtrlSendMsg($hwnd_ControlID, $EM_SETPASSWORDCHAR, Asc($sEncode), 0)
ControlFocus($hwnd_GUI, '', $hwnd_ControlID)
GUICtrlSetFont($hwnd_ControlID, 6, '', '', $v_Font)
EndIf
EndFunc

Func _IsChecked($h_ctrl)
Return BitAND(GUICtrlRead($h_ctrl), $GUI_CHECKED) = $GUI_CHECKED
EndFunc ;==>_IsChecked

030503gggggggggggggg.png
 
Last edited:

drov

V
Feb 27, 2012
1,427
1
944
Mouais le code à l'air fonctionnel à première vue.

Il y a trop de copier coller. Fais une fonction et change juste les valeurs entre chaque compte