Kaufman Posted June 23, 2008 Share Posted June 23, 2008 Hi to all, I'm searching fot help for a script i bought. It's a script for Dofus a MMORPG game for farming automatically. My problem is that the stupid script don't work to click in the box to cut the desired cereal... damn it... I will post the code to someone help me... plz... someone... expandcollapse popup; <AUT2EXE VERSION: 3.0.102.0> ; ---------------------------------------------------------------------------- ; <AUT2EXE INCLUDE-START: C:\Documents and Settings\NoT\Bureau\Dofuscripts\recolte_win.au3> ; ---------------------------------------------------------------------------- ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x / NT ; Author: A.N.Other <myemail@nowhere.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; ---------------------------------------------------------------------------- ; Set up our defaults ; ---------------------------------------------------------------------------- ;AutoItSetOption("MustDeclareVars", 1) AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("PixelCoordMode", 0) ;AutoItSetOption("RunErrorsFatal", 0) ;AutoItSetOption("TrayIconDebug", 1) ;AutoItSetOption("WinTitleMatchMode", 4) ; ---------------------------------------------------------------------------- ; Script Start ; ---------------------------------------------------------------------------- HotKeySet("^!x", "MyExit") Func MyExit() Exit EndFunc ;~ fonction qui click sur la coord si le point est de couleur $color func MouseClickColor($button,$x,$y,$t1,$t2,$color) $pixel = PixelGetColor( $x,$y) $pixel = Hex($pixel, 6) if ($pixel=$color) then MouseClick($button,$x,$y,$t1,$t2) endif endfunc ;~ fonction qui click sur le pixel recherché dans la zone spécifiée func ClickPixel($x1,$y1,$x2,$y2,$pixel_rech) $coord = PixelSearch($x1,$y1,$x2,$y2, "0x"& $pixel_rech) if not @error then MouseClick("left",$coord[0], $coord[1],1,1) return $coord endif endfunc ; Fonction qui gère le decalage ; à partir d'une reso 1280*1024 vers du 10 ;~ pixel au format type x150 ou y158 $type_cereale = InputBox("FA Cereal 0.15","Quel type de céréal voulez-vous botter ? /n ( 0=Blé , 2=Avoine , 5=Seigle )",0) if @error=1 Then call ("MyExit") endif $positionnement = '' dim $tab_couleur[200][5] ;~ Blé $tab_couleur[0][0] = "FBBA00" $tab_couleur[0][1] = "A06000" $tab_couleur[0][2] = "C49909" $tab_couleur[0][3] = "A48E06" $tab_couleur[0][4] = "FFDE12" ;~ Orge $tab_couleur[1][0] = "6A6D00" $tab_couleur[1][1] = "C2E400" $tab_couleur[1][2] = "526E01" $tab_couleur[1][3] = "868F00" $tab_couleur[1][4] = "C0E200" ;~ Avoine $tab_couleur[2][0] = "CD6B00" $tab_couleur[2][1] = "CB6900" $tab_couleur[2][2] = "FFC700" $tab_couleur[2][3] = "F29600" $tab_couleur[2][4] = "FFE900" ;~ Houblon $tab_couleur[3][0] = "378D3F" $tab_couleur[3][1] = "073F46" $tab_couleur[3][2] = "45783D" $tab_couleur[3][3] = "479639" $tab_couleur[3][4] = "56A21E" ;~ Lin $tab_couleur[4][0] = "DFD6B5" $tab_couleur[4][1] = "766B43" $tab_couleur[4][2] = "DBD5BF" $tab_couleur[4][3] = "795F46" $tab_couleur[4][4] = "9BA035" ;~ Seigle $tab_couleur[5][0] = "4D7E03" $tab_couleur[5][1] = "426700" $tab_couleur[5][2] = "258405" $tab_couleur[5][3] = "1A9800" $tab_couleur[5][4] = "377D01" ;~ Manganèse $tab_couleur[101][0] = "A2BAC5" $tab_couleur[101][1] = "A2BAC5" $tab_couleur[101][2] = "A2BAC5" $tab_couleur[101][3] = "A2BAC5" $tab_couleur[101][4] = "A2BAC5" ;~ $type_cereale = 5; $cpt=0 Do ;~ recherche le céréale dans la zone sleep(1000) Do $coord = ClickPixel(52,82,708,432,$tab_couleur[$type_cereale][$cpt]) $cpt=$cpt+1 if $cpt=5 then $cpt=1 endif until not @error if not @error then ;~ msgbox(0,'',$coord[0]) sleep(1000) ;~ recherche du bouton faucher ;$coord = ClickPixel($coord[0],$coord[1],$coord[0]+50,$coord[1]+30,"D5CFAA") if ($type_cereale=4) then; lin sur la 2e ligne MouseClickColor('left',$coord[0]+50,$coord[1]+40,1,1,"D5CFAA") else MouseClickColor('left',$coord[0]+50,$coord[1]+30,1,1,"D5CFAA") endif endif sleep(1000) ;~ Passage de niveau ? ;MouseClickColor( "left", 656, 357,1,1,'FF6100') MouseClickColor( "left", 328, 290,1,1,'FF6100') $pixel = PixelGetColor( 664,457); detection du bouton passer $pixel = Hex($pixel, 6) if ($pixel='FF6600') then bip() endif until 1=0 Exit func bip() soundPlay("./blip.wav") endfunc ; ---------------------------------------------------------------------------- ; <AUT2EXE INCLUDE-END: C:\Documents and Settings\NoT\Bureau\Dofuscripts\recolte_win.au3> ; ---------------------------------------------------------------------------- Hoping to someone help me PLZ!!! Thks to all... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now