|
You last visited: Today at 07:32
Advertisement
[Help]How to join this 7 script
Discussion on [Help]How to join this 7 script within the AutoIt forum part of the Coders Den category.
09/13/2013, 09:22
|
#1
|
elite*gold: 0
Join Date: Sep 2009
Posts: 2
Received Thanks: 0
|
[Help]How to join this 7 script
hi all,
i just learn how to use autoit
so i made scripts for facebook flashgame using imagesearch and pixelsearch
i dont know how to put only in 1 file
this is example of few script
Script1
#include <ImageSearch.au3>
HotKeySet("+1", "Start")
HotKeySet("!1", "_Exit")
$X = 0
$Y = 0
While 1
Sleep(4000)
WEnd
Func Start()
Sleep(4000)
While 1
$Search = _ImageSearch('cast.png', 0, $X, $Y, 0)
If $Search = 1 Then
MouseMove($X, $Y, 10)
Sleep(4000)
MouseClick("Left")
MouseMove(10, 200, 1)
Sleep(4000)
EndIf
WEnd
Sleep(4000)
EndFunc
Sleep(4000)
Func _Exit()
Exit
EndFunc
Script 2
#include <ImageSearch.au3>
HotKeySet("+2", "Start")
HotKeySet("!2", "_Exit")
$X1 = 0
$Y1 = 0
While 1
Sleep(3000)
WEnd
Func Start()
While 1
$Search1 = _ImageSearch('strike.png', 0, $X1, $Y1, 0)
If $Search1 = 1 Then
MouseMove($X1, $Y1, 10)
MouseClick("Left")
MouseMove(10, 200, 10)
EndIf
WEnd
EndFunc
Func _Exit()
Exit
EndFunc
Script 3
#include <ImageSearch.au3>
HotKeySet("+6", "Start")
HotKeySet("!6", "_Exit")
While 1
Sleep(100)
WEnd
Func Start()
Sleep(100)
While 1
$Search5 = PixelSearch(0, 0, 1440, 900, 0x3A9B28)
If IsArray($Search5) = True Then
MouseMove($Search5[0], $Search5[1], 10)
Sleep(100)
MouseClick("Left")
MouseMove(10, 200, 10)
Sleep(100)
EndIf
WEnd
Sleep(100)
EndFunc
Sleep(100)
Func _Exit()
Exit
EndFunc
so how to join them in 1 script
when i run all 7 script at flash game it got lag because use big memory
thx alot
|
|
|
09/13/2013, 16:33
|
#2
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Joining these scripts into one script is kinda easy.
Think about on what you want to have first, then look at how the first script ends and relate to the 2nd one by inserting in it and the same with the 3rd one.
But pay attention! Don't use the same variablenames or same includes over and over again, these will create errors.
|
|
|
09/15/2013, 16:32
|
#3
|
elite*gold: 0
Join Date: Sep 2009
Posts: 2
Received Thanks: 0
|
Ok now already join in 1 script
and now i want to make it to pause all function every 30 minutes for clearing my inventory...i got confuse with timerint() and timerdiff()
and also all command still running together what should i use ?
for example if ok.png show at screen i want to pause cast.png until ok.png done
here is my script
thx before for your help
#include <ImageSearch.au3>
HotKeySet("+1", "Start")
HotKeySet("!1", "_Exit")
$X = 0
$Y = 0
$X1 = 0
$Y1 = 0
$X2 = 0
$Y2 = 0
$X3 = 0
$Y3 = 0
While 1
Sleep(100)
WEnd
Func Start()
While 1
$cast = _ImageSearch('cast.png', 0, $X, $Y, 0)
$strike = _ImageSearch('strike.png', 0, $X1, $Y1, 0)
$reward = PixelSearch(0, 0, 1370, 730, 0x7F5400)
$rewardok = _ImageSearch('OK.png', 0, $X2, $Y2, 0)
$hook = PixelSearch(0, 0, 1370, 730, 0x826740)
$collect = PixelSearch(0, 0, 1370, 730, 0x3A9B28)
$levelup = _ImageSearch('levelup.png', 0, $X3, $Y3, 0)
If $cast = 1 Then
_cast()
ElseIf $strike = 1 Then
MouseClick("Left", $X1, $Y1, 1, 10)
ElseIf IsArray($reward) = True Then
MouseClick("Left", $reward[0], $reward[1], 1, 10)
Sleep(300)
MouseClick("Left", $X2, $Y2, 1, 10)
ElseIf $rewardok = 1 Then
MouseClick("Left", $X2, $Y2, 1, 10)
ElseIf IsArray($hook) = True Then
MouseClick("Left", $hook[0], $hook[1], 1, 10)
ElseIf IsArray($collect) = True Then
MouseClick("Left", $collect[0], $collect[1], 1, 10)
ElseIf $levelup = 1 Then
MouseClick("Left", $X3, $Y3, 1, 10)
EndIf
WEnd
EndFunc
Func _cast()
Sleep(1500)
MouseClick("Left", $X, $Y, 1, 10)
EndFunc
Func _Exit()
Exit
EndFunc
|
|
|
09/15/2013, 16:57
|
#4
|
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
|
Just add:
Code:
AdLibRegister("PauseScript", 1800000)
Func PauseScript()
Sleep(5 * 60 * 1000); Pause for 5 Minutes.
EndFunc
This will run PauseScript every 30 minutes and sleeps for 5 minutes.
|
|
|
|
Similar Threads
|
LOOK>>> JOIN NOW! URIDIUM WARS PVP BATTLE!*EVENT OF ELITEPVPERS*14 mins remainto join
12/14/2012 - DarkOrbit - 20 Replies
HI ! ALL WHO WANT TO JOIN THIS EVENT GO TO 4-4 UPPER LEFT CORNER --- DO NOT ATTACK --- FIGHT START IN 20 MINS :D
|
[Script für "Random Game join"]
05/29/2011 - Diablo 2 - 1 Replies
Vorweg möchte ich darauf hinweißen, das ich den Code/Script weder geschrieben habe ,noch hier wirklich Supporten kann!
Ich hab in verschieden Theards hier gelesen das er gesucht wird!
Von daher möchte ich ihn hier posten!
Eig. reposte ich nur diesen Beitrag, auf Seite 11 von Njom´s Chestscript ist schon einmal der Link gepostet worden!
So hier die Originalquelle : Random Joiner
Also hier nochmal das Script :
var gameMinLength = 180000; // time in milliseconds, minimum game length,...
|
[Suche] Wow RND bG join/leave script (autoit3)
07/10/2010 - WoW Bots - 3 Replies
Ja hallo (:
Ich hab mir jetzt mal AutoIt3 gesaugt und beim starten will er ein Script von mir (hab kein Plan welchen etc.).
Nun wollte ich gerne wissen ob wer für mich nen script hat der bg join / einfahc nicht afk geht (von mir auch nur durch springen) / bg leavt.
Und wie das ganze funzt.
Btw ich will das auf Pserver benutzen und dort gibts kein "inaktiv"
|
Request Simple Auto Join War Script
06/24/2010 - 12Sky2 - 0 Replies
Hi im really not that well at coding in auto it , i was wondering if a more experienced player can make me a simple auto war join script , a continious one , thanks if this is possible , hope im not asking to much
thanks guys
|
All times are GMT +2. The time now is 07:32.
|
|