will88 Posted June 17, 2008 Posted June 17, 2008 (edited) hello, can anyone help me with this? expandcollapse popuptooltip( "checking mana") PixelSearch( 0, 0, 1000, 800, 0x000095 );mana check sleep(random(500, 700)) If Not @error Then tooltip( "mana full") sleep(random(500, 1000));if not full mana else tooltip( "I need mana") sleep(random(100, 200));low mana, drink send('-') sleep(random(7000, 9000)) endIf tooltip( "finding mob") send('{tab}');find mob sleep(random(500, 700)) PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );if mob selected sleep(random(500, 700)) If Not @error Then;if mob found tooltip( "mob found") sleep(random(500, 1000)) send('1') sleep(random(300, 600)) send('2') sleep(random(10000, 15000)) $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is still alive sleep(random(500, 700)) If Not @error Then tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) EndIf If $Loop = 1 Then Sleep(1000) Else ExitLoop EndIf EndIF Im trying to loop this until the pixlesearch fails $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is targeted/Alive sleep(random(500, 700)) If Not @error Then tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) Edited June 17, 2008 by will88 Password-Keeper
Kip Posted June 17, 2008 Posted June 17, 2008 Do Until Not IsArray($mobalive) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
will88 Posted June 17, 2008 Author Posted June 17, 2008 Do Until Not IsArray($mobalive) thanks for the reply but, I tried changing $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is targeted/Alive sleep(random(500, 700)) If Not @error Then tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) to $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is targeted/Alive sleep(random(500, 700)) If Not @error Then Do tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) Until Not IsArray($mobalive) and it kept doing send('2') and never went back to tooltip( "checking mana") PixelSearch( 0, 0, 1000, 800, 0x000095 );mana check sleep(random(500, 700)) If Not @error Then tooltip( "mana full") sleep(random(500, 1000));if not full mana else tooltip( "I need mana") sleep(random(100, 200));low mana, drink send('-') sleep(random(7000, 9000)) endIf Password-Keeper
TehWhale Posted June 17, 2008 Posted June 17, 2008 Yes. Do ;your code here Until Not IsArray($mobalive)
will88 Posted June 17, 2008 Author Posted June 17, 2008 Yes. Do ;your code here Until Not IsArray($mobalive)as I said in my post, I changed it to $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is targeted/Alive sleep(random(500, 700)) If Not @error Then Do tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) Until Not IsArray($mobalive) and it kept doing send('2') and never went back to the other part of the script when the color: 0xBDBA00 didnt exist. Password-Keeper
PsaltyDS Posted June 17, 2008 Posted June 17, 2008 as I said in my post, I changed it to $mobalive = PixelSearch( 0, 0, 1000, 800, 0xBDBA00 );checks to see if mob is targeted/Alive sleep(random(500, 700)) If Not @error Then Do tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) Until Not IsArray($mobalive) and it kept doing send('2') and never went back to the other part of the script when the color: 0xBDBA00 didnt exist. You're not paying attention to the answer you already got: The only thing that changes $mobalive is your PixelSearch(). So the only way it's going to change is if you put that inside the Do/Until loop also. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
will88 Posted June 17, 2008 Author Posted June 17, 2008 You're not paying attention to the answer you already got: The only thing that changes $mobalive is your PixelSearch(). So the only way it's going to change is if you put that inside the Do/Until loop also. I am paying attention but if I do that I get an error that says: until statement with no matching Do statement. Do $mobalive = PixelSearch( 0, 0, 1000, 800, 0x525100 );mob still alive? sleep(random(500, 700)) If Not @error Then;if mob alive then tooltip( "mob is still alive") send('2') sleep(random(2500, 3000)) Until Not IsArray($mobalive) Password-Keeper
AdmiralAlkex Posted June 17, 2008 Posted June 17, 2008 You need to close your mutliline if's with EndIf() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Kip Posted June 17, 2008 Posted June 17, 2008 because you need an EndIf MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
PsaltyDS Posted June 17, 2008 Posted June 17, 2008 I am paying attention... If Not @error Then;if mob alive then Ahem... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Kip Posted June 17, 2008 Posted June 17, 2008 Ahem... MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
will88 Posted June 17, 2008 Author Posted June 17, 2008 (edited) If Not @error Then;if mob alive then that was a note for me..If there wasnt an error then the color(the mob) still existed. Anyways I figured it out by adding this: Do $mobalive = PixelSearch( 0, 0, 1000, 800, 0x525100 );mob still alive? sleep(random(500, 700)) If @error Then dead();mob is dead Else alive();mob still alive tooltip( "mob still alive" ) EndIf Until Not IsArray($mobalive) EndIf and Func alive() send('2') sleep(random(3000, 5000)) EndFunc Func dead() $loop = 1 EndFunc Thanks for the help. Edited June 17, 2008 by will88 Password-Keeper
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