Symplystyc Posted June 17, 2007 Share Posted June 17, 2007 expandcollapse popupFunc Drink($DrinkType);Type of drink. 0 = Full rejuv, 1 = Regular rejuv, 2 = Merc For $N = 0 To 3 $Check = PixelChecksum(($BeltX + ($N * 31)) - 1, $BeltY - 1, ($BeltX + ($N * 31)) + 1, $BeltY + 1, 1) If $Check = $beltfrjchecksum Then $BeltData[$N] = 1 ElseIf $Check = $beltrjchecksum Then $BeltData[$N] = 2 ElseIf $Check = $beltshpchecksum Then $BeltData[$N] = 3 ElseIf $Check = $beltsmpchecksum Then $BeltData[$N] = 4 Else $BeltData[$N] = 0 EndIf Next LogEvent(0, "Belt Data:") $LogFile = FileOpen($BotDir & "\Logs\LifeCheck.txt", 1) For $N = 0 To 3 Select Case $BeltData[$N] = 1 FileWrite($LogFile, "(F)") Case $BeltData[$N] = 2 FileWrite($LogFile, "(R)") Case $BeltData[$N] = 3 FileWrite($LogFile, "(H)") Case $BeltData[$N] = 4 FileWrite($LogFile, "(S)") Case Else FileWrite($LogFile, "(E)") EndSelect Next FileWrite($LogFile, @CRLF) FileClose($LogFile) $A = 0 Select Case $DrinkType = 0 ;Prioritize Full rejuves For $N = 0 To 3 If $BeltData[$N] = 1 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "Drank a Full Rejuv from belt slot " & $N + 1) ExitLoop EndIf ;Next If $A = 0 Then For $N = 0 To 3 If $BeltData[$N] = 2 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "No more Full Rejuvs, so we Drank a Regular Rejuv instead from belt slot " & $N + 1) ExitLoop EndIf If $A = 0 Then For $N = 0 to 3 If $BeltData[$N] = 3 Then Send($Char_Key_PotionsRow[$N + 1]) $A =1 LogEvent(0, "No more Rejuvs, so we Drank a Super Healing instad from belt slot " & $N +1) ExitLoop EndIf Next EndIf Next EndIf If $A = 0 Then LogEvent(0, "We are out of pots, Chickening...") Chicken() EndIf Case $DrinkType = 1 ;Prioritize Regular rejuves For $N = 0 To 3 If $BeltData[$N] = 2 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "Drank a Regular Rejuv from belt slot " & $N + 1) ExitLoop EndIf Next If $A = 0 Then For $N = 0 To 3 If $BeltData[$N] = 3 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "No more Regular Rejuvs, so we Drank a Super Healing instead from belt slot " & $N + 1) ExitLoop EndIf If $A = 0 Then For $N = 0 to 3 If $BeltData[$N] = 1 Then Send($Char_Key_PotionsRow[$N + 1]) $A =1 LogEvent(0, "No more Rejuvs, so we Drank a Full Rejuv instad from belt slot " & $N +1) ExitLoop EndIf Next EndIf Next EndIf If $A = 0 Then LogEvent(0, "We are out of pots, Chickening...") Chicken() EndIf Case $DrinkType = 2 ;Send a pot to the merc, Prioritize Regular rejuves Send("{SHIFTDOWN}") For $N = 0 To 3 If $BeltData[$N] = 2 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "Sent a Regular Rejuv to the Merc from belt slot " & $N + 1) ExitLoop EndIf Next If $A = 0 Then For $N = 0 To 3 If $BeltData[$N] = 3 Then Send($Char_Key_PotionsRow[$N + 1]) $A = 1 LogEvent(0, "No more Regular Rejuvs to send to the Merc, so we'll send a Healing pot instead from belt slot " & $N + 1) ExitLoop EndIf Next If $A = 0 Then For $N = 0 to 3 If $BeltData[$N] = 3 Then Send($Char_Key_PotionsRow[$N + 1]) $A =1 LogEvent(0, "No more Rejuvs, so we Drank a Full Rejuv instad from belt slot " & $N +1) ExitLoop EndIf Next EndIf Send("{SHIFTUP}") If $A = 0 Then LogEvent(0, "We are out of pots, Chickening...") ;Chicken() EndIf EndSelect EndFunc ;==>Drink I know somethings wong with this but I dont know what. The glass is neither half empty nor half full, it is simply twice as big as it needs to be. Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 17, 2007 Share Posted June 17, 2007 I know somethings wong with this but I dont know what.Your posted script never calls the function Drink(). See? Wasn't that hard. If there's more to the script, then post it and/or say something about what it's supposed to do, and what it actually does instead. 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 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