making 3 scripts into 1

04/22/2008 03:09 ay1ko#1
Hello fellow script writers ^__^,

I need help on my script... cause I'm having trouble with my scripts I have 3 running scripts and wishes to make into 1 here are the codes...
the problem is when the restart script starts the attack and buff/healer contradicts with the restart script... so can anyone help?

attack script change some of it to for my preference (credits for Bob16)
Code:
While 1
 = PixelSearch( 100, 100, 1024, 718, 0xFFFD00, 50, 1)
 = PixelSearch( 100, 100, 1024, 718, 0XFFFF11, 50, 1)
 = PixelSearch( 100, 100, 1024, 718, 0XFFFF22, 50, 1)
 = PixelSearch( 100, 100, 1024, 718, 0XFFFF33, 50, 1)
 = PixelSearch( 100, 100, 1024, 718, 0XFFFF44, 50, 1)	

If Not @error Then
  MouseMove(,,0)
  MouseClick("left",,)
  Sleep (10)
EndIf
	Send("{Right 1}")
	Send("{Space}")
	Send("1")
	Sleep(900)
	Send("{Right 1}")
	Send("{Space}")
	Send("2")
	Sleep(900)
	Send("{Right 1}")
	Send("{Space}")
	Send("3")
	Sleep(900)
	Send("{Right 1}")
	Send("{Space}")
	Send("4")
	Sleep(900)
	Send("{Right 1}")
	Send("{Space}")
	Send("{Space}")
Wend
buffer/healer script... (credits also to Bob16)
the reason why I made another script for this is so that it will not interfere with the attack script
Code:
While 1
	WinActivate("CABAL")
	 = PixelSearch(82, 40, 167, 40, 0x000000, 10, 1)
	If Not @error Then
		Send("{0}")
	EndIf

	Send("5")
	Sleep(1000)
	Send("6")
	Sleep(1000)
	Send("7")
	Sleep(1000)
	Send("{Space}")
	Send("{Space}")
Wend
and lastly my restart script(credits to happydruid)
Code:
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("PixelCoordMode", 2)
Opt("MouseCoordMode", 2)
WinWait("CABAL", "")
If Not WinActive("CABAL", "") Then WinActivate("CABAL", "")
WinWaitActive("CABAL", "")
 = "CABAL"
 = WinGetProcess(, "") ;Open process
 = 0

Do
Send("o")
MouseMove(515,280)
sleep(200)
MouseMove(515,280)
sleep(10)
MouseMove(515,280)
sleep(10)
MouseClick("left")
sleep(10000)
Send("2")
Sleep(50)
Send("{ENTER}")
sleep(2700000)
Until  = 1
04/22/2008 05:40 furryberry#2
Simple answer
Quote:
while winactive("CABAL")
call("heal")
call("findcreature")
wend

function heal()
//put something here
endfunc

function findcreature()
//put something here
endfunc
the restart script does not have a place in this procedural script, i don't think autoit allows for asynchronous processing of functions. you *could* call the restart script from the main script, essentially starting a new process.

I hope you can make sense of this, and if not, i hope you have the sense to find out how.

Edit: Btw, you're in a no questions zone :/ This counts as a question, right ?
04/22/2008 16:34 St!gmata#3
Omfg - they donīt deserve it. :D godlike. :D Donīt worry. I wonīt post the quote of your post you deleted.

And again: Please read the Cabal Rules and the description of the sections first before you open a new thread. Some sections are marked with: NO Questions.
*closed*
*moved*
04/23/2008 02:25 furryberry#4
Oh i put it in quotes cause i couldn't find the [code] button in quick reply heh