complex Posted February 23, 2010 Share Posted February 23, 2010 I don't know how to go about this, but I have a basic casting rotation that uses case statements. Select Case $Mana >= 3017 Cast(0) Case $Spells = 0 Cast(1) Case $Spells = 0 Cast(2) Case $Spells = 0 Cast(3) To the end of this case statement I want to add a few pixel searches as cases. I want the case to check the location of one pixel, if its there then cast, otherwise move onto the next case. I have tried: ( I'm not at home, so I don't have the specific pixel information) Case PixelSearch(0,0,0,0,0x000000) = Not @error; Cast(6) Case PixelSearch(1,1,1,1,0x111111) = Not @error; Cast(5) Else Case Cast(4) I am open to the idea of using an if statement to choose which of the 3 spells to case, but there is another problem with that idea: Case Else $cord = PixelSearch(0,0,0,0,0x000000) If Not @error Then Cast(6) EndIf $cord = PixelSearch(1,1,1,1,0x111111) If Not @error Then Cast(5) ElseIf Cast(4) EndSelect At any one time both of the PixelSearches can be true, but the first one has priority over the second one, and if either one is chosen, the case needs to reset. I tried to add a specific EndSelect to each if statement, but Autoit says that is a no no. Any thoughts? Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now