ecstatic Posted May 16, 2009 Share Posted May 16, 2009 Func CheckHealth() $HealthCheck = PixelChecksum(74,551,74,551) $HealthCheck2 = PixelCheckSum(74, 571, 74, 571) $ChickenCheck = PixelCheckSum(74, 591, 74, 591) If $ChickenCheck = Changed? Then do something. EndIf If $HealthCheck = Changed? Then Drink Potion EndIf If $healthcheck2 = Changed? Then Drink 2 health potions EndIf Endfunc What do i put for the IF statements? Link to comment Share on other sites More sharing options...
Authenticity Posted May 16, 2009 Share Posted May 16, 2009 Maybe if you define the function as taking 3 parameters you can use them in the 3 conditions. Link to comment Share on other sites More sharing options...
ecstatic Posted May 16, 2009 Author Share Posted May 16, 2009 Maybe if you define the function as taking 3 parameters you can use them in the 3 conditions.waaaaaah... *urgently searches for newb-friendly answer* Link to comment Share on other sites More sharing options...
andybiochem Posted May 16, 2009 Share Posted May 16, 2009 perhaps something like this? ;----- This needs to go at the top of your script ----- Global $ChickenCheck = PixelCheckSum(74, 591, 74, 591) Global $HealthCheck = PixelChecksum(74,551,74,551) Global $Healthcheck2 = PixelCheckSum(74, 571, 74, 571) <BODY OF CODE> Func CheckHealth() $HealthCheckTemp = PixelChecksum(74,551,74,551) $HealthCheck2Temp = PixelCheckSum(74, 571, 74, 571) $ChickenCheckTemp = PixelCheckSum(74, 591, 74, 591) If $ChickenCheck <> $ChickenCheckTemp Then $ChickenCheck = $ChickenCheckTemp ;do something. EndIf If $HealthCheck <> $HealthCheckTemp Then $HealthCheck = $HealthCheckTemp ;Drink Potion EndIf If $healthcheck2 <> $HealthCheck2Temp Then $Healthcheck2 = $HealthCheck2Temp ;Drink 2 health potions EndIf Endfunc This will trigger your 'actions' EVERY time there is a difference and you call the function. - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar! 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