The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "User:Moses/oven"
From A Tale in the Desert
Jump to navigationJump to search (New page: //Charcoal Oven // // Setup: This handles from 1 to 8 charcoal ovens at a time. Pin the windows // in 2 rows of 4 starting in top left corner. But them up together but // ...) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | //Charcoal Oven | + | Oven Macro by Anka |
− | // | + | |
− | // Setup: This handles from 1 to 8 charcoal ovens at a time. Pin the windows | + | //Charcoal Oven |
− | // in 2 rows of 4 starting in top left corner. But them up together but | + | // |
− | // Don't overlap them at all. I suggest at least 300 | + | // Setup: This handles from 1 to 8 charcoal ovens at a time. Pin the windows |
− | // wood per oven and a normally hold about 150 water jugs. | + | // in 2 rows of 4 starting in top left corner. But them up together but |
− | // All ovens are slightly different but I suggest that you put your | + | // Don't overlap them at all. I suggest at least 300 |
− | // fastest burning oven first in line. You can tweak the settings | + | // wood per oven and a normally hold about 150 water jugs. |
− | // to your liking in the new GUI window. Your settings will be saved. | + | // All ovens are slightly different but I suggest that you put your |
− | // | + | // fastest burning oven first in line. You can tweak the settings |
− | // If you see anything odd, /chat me. | + | // to your liking in the new GUI window. Your settings will be saved. |
− | // | + | // |
− | // ENJOY! :) | + | // If you see anything odd, /chat me. |
− | // Anka | + | // |
− | // | + | // ENJOY! :) |
− | Constants | + | // Anka |
+ | // | ||
+ | Constants | ||
//User Definable variables | //User Definable variables | ||
Ovens = 3 //Number of Ovens you are running. 1-8 | Ovens = 3 //Number of Ovens you are running. 1-8 | ||
Line 82: | Line 84: | ||
CountM = 0 | CountM = 0 | ||
MouseX = 0 | MouseX = 0 | ||
− | MouseY = 0 | + | MouseY = 0 |
− | + | End | |
− | End | + | Form ccOven, Settings |
− | |||
− | Form ccOven, Settings | ||
ed1=Combobox:Ovens:1, 2, 3, 4, 5, 6, 7, 8 | ed1=Combobox:Ovens:1, 2, 3, 4, 5, 6, 7, 8 | ||
ed2=CheckBox:Guilded?:True | ed2=CheckBox:Guilded?:True | ||
Line 99: | Line 99: | ||
ed9=Editbox:RGBBlue:220 | ed9=Editbox:RGBBlue:220 | ||
ed12=Editbox:Check Bars Interval (miliseconds):4000 | ed12=Editbox:Check Bars Interval (miliseconds):4000 | ||
− | end | + | end |
− | + | FormLoad ccOven, ccOven.frm | |
− | FormLoad ccOven, ccOven.frm | + | if ShowForm ccOven |
− | |||
− | if ShowForm ccOven | ||
SetConst Ovens = ccOven[ed1] | SetConst Ovens = ccOven[ed1] | ||
If ccOven[ed2] = True | If ccOven[ed2] = True | ||
Line 120: | Line 118: | ||
SetConst HeatMax = ccOven[ed11] | SetConst HeatMax = ccOven[ed11] | ||
SetConst CheckDelay = ccOven[ed12] | SetConst CheckDelay = ccOven[ed12] | ||
− | else | + | else |
Stop | Stop | ||
− | end | + | end |
− | + | FormSave ccOven, ccOven.frm | |
− | FormSave ccOven, ccOven.frm | + | MousePos 100, 20 //Activates eGenesis window.. Don't run ACTool maximized. |
− | + | Delay $MDelay | |
− | MousePos 100, 20 //Activates eGenesis window.. Don't run ACTool maximized. | + | LeftClick |
− | Delay $MDelay | + | Delay 2000 |
− | LeftClick | + | If $Guild = 1 |
− | Delay 2000 | ||
− | |||
− | If $Guild = 1 | ||
Call Guild | Call Guild | ||
− | End | + | End |
− | + | SetConst NewX = $BeginX | |
− | SetConst NewX = $BeginX | + | SetConst NewY = $BeginY |
− | SetConst NewY = $BeginY | + | SetConst Count = 1 |
− | SetConst Count = 1 | + | Loop $Ovens |
− | Loop $Ovens | ||
If $Count = $Jump | If $Count = $Jump | ||
SetConst NewX = $BeginX | SetConst NewX = $BeginX | ||
Line 149: | Line 143: | ||
Compute NewX = $NewX + $AddX | Compute NewX = $NewX + $AddX | ||
Compute Count = $Count + 1 | Compute Count = $Count + 1 | ||
− | End | + | End |
− | SetConst NewX = $BeginX //Dont remember why this is here :) | + | SetConst NewX = $BeginX //Dont remember why this is here :) |
− | Call Main | + | Call Main |
− | + | Procedure Main | |
− | Procedure Main | ||
SetConst CountM = 1 | SetConst CountM = 1 | ||
SetConst Status = 0 | SetConst Status = 0 | ||
Line 261: | Line 254: | ||
SetConst Status = 0 | SetConst Status = 0 | ||
End | End | ||
− | End | + | End |
− | + | Procedure CheckBars | |
− | Procedure CheckBars | ||
MousePos $HeatMinX, $HeatY | MousePos $HeatMinX, $HeatY | ||
Delay $SDelay | Delay $SDelay | ||
Line 272: | Line 264: | ||
Set HeatMin = 0 | Set HeatMin = 0 | ||
End | End | ||
− | |||
MousePos $HeatX, $HeatY | MousePos $HeatX, $HeatY | ||
Delay $SDelay | Delay $SDelay | ||
Line 281: | Line 272: | ||
SetConst Heat = 0 | SetConst Heat = 0 | ||
End | End | ||
− | |||
MousePos $HeatMaxX, $HeatY | MousePos $HeatMaxX, $HeatY | ||
Delay $SDelay | Delay $SDelay | ||
Line 290: | Line 280: | ||
SetConst HeatMax = 0 | SetConst HeatMax = 0 | ||
End | End | ||
− | |||
MousePos $Oxy1X, $OxyY | MousePos $Oxy1X, $OxyY | ||
Delay $SDelay | Delay $SDelay | ||
Line 299: | Line 288: | ||
SetConst Oxy = 0 | SetConst Oxy = 0 | ||
End | End | ||
− | |||
MousePos $Oxy2X, $OxyY | MousePos $Oxy2X, $OxyY | ||
Delay $SDelay | Delay $SDelay | ||
Line 306: | Line 294: | ||
SetConst Oxy = 2 | SetConst Oxy = 2 | ||
End | End | ||
− | |||
MousePos $WoodX, $WoodY | MousePos $WoodX, $WoodY | ||
Delay $S1Delay | Delay $S1Delay | ||
Line 315: | Line 302: | ||
SetConst Wood = 0 | SetConst Wood = 0 | ||
End | End | ||
− | |||
MousePos $WaterX, $WaterY | MousePos $WaterX, $WaterY | ||
Delay $S1Delay | Delay $S1Delay | ||
Line 324: | Line 310: | ||
SetConst Water = 0 | SetConst Water = 0 | ||
End | End | ||
− | |||
MousePos $HeatX, $DangerY | MousePos $HeatX, $DangerY | ||
Delay $S1Delay | Delay $S1Delay | ||
Line 333: | Line 318: | ||
SetConst Danger = 0 | SetConst Danger = 0 | ||
End | End | ||
− | |||
MousePos $HeatMaxX, $DangerY | MousePos $HeatMaxX, $DangerY | ||
Delay $S1Delay | Delay $S1Delay | ||
Line 342: | Line 326: | ||
SetConst DangerMax = 0 | SetConst DangerMax = 0 | ||
End | End | ||
− | |||
MousePos $StatusX, $StatusY | MousePos $StatusX, $StatusY | ||
LoadRGB {MouseX}, {MouseY} | LoadRGB {MouseX}, {MouseY} | ||
Line 351: | Line 334: | ||
SetConst Status = 0 | SetConst Status = 0 | ||
End | End | ||
− | End | + | End |
− | + | Procedure Water | |
− | Procedure Water | ||
SetConst NewX = $WaterBX | SetConst NewX = $WaterBX | ||
SetConst NewY = $WoodBY | SetConst NewY = $WoodBY | ||
Line 370: | Line 352: | ||
End | End | ||
SetConst NewX = $WaterBX | SetConst NewX = $WaterBX | ||
− | End | + | End |
− | + | Procedure Vent | |
− | Procedure Vent | ||
SetConst NewX = $VentBX | SetConst NewX = $VentBX | ||
SetConst NewY = $WoodBY | SetConst NewY = $WoodBY | ||
Line 389: | Line 370: | ||
End | End | ||
SetConst NewX = $VentBX | SetConst NewX = $VentBX | ||
− | End | + | End |
− | + | Procedure Snuff | |
− | Procedure Snuff | ||
SetConst New2X = $WaterBX | SetConst New2X = $WaterBX | ||
SetConst New3X = $Vent2 | SetConst New3X = $Vent2 | ||
Line 414: | Line 394: | ||
Compute New3X = $New3X + $AddX | Compute New3X = $New3X + $AddX | ||
End | End | ||
− | End | + | End |
− | + | Procedure Wood | |
− | Procedure Wood | ||
SetConst NewX = $WoodBX | SetConst NewX = $WoodBX | ||
SetConst NewY = $WoodBY | SetConst NewY = $WoodBY | ||
Line 433: | Line 412: | ||
End | End | ||
SetConst NewX = $WoodBX | SetConst NewX = $WoodBX | ||
− | End | + | End |
− | + | Procedure Guild | |
− | Procedure Guild | ||
//Compute BeginX = $BeginX - 7 | //Compute BeginX = $BeginX - 7 | ||
Compute BeginY = $BeginY + 16 | Compute BeginY = $BeginY + 16 | ||
Line 454: | Line 432: | ||
//Compute StatusX = $StatusX - 5 | //Compute StatusX = $StatusX - 5 | ||
Compute StatusY = $StatusY + 16 | Compute StatusY = $StatusY + 16 | ||
− | End | + | End |
− | //Written with ACTool 5.3.0 by Anka | + | //Written with ACTool 5.3.0 by Anka |
− | Bell Asterisk | + | Bell Asterisk |
Latest revision as of 17:30, 11 August 2009
Oven Macro by Anka
//Charcoal Oven // // Setup: This handles from 1 to 8 charcoal ovens at a time. Pin the windows // in 2 rows of 4 starting in top left corner. But them up together but // Don't overlap them at all. I suggest at least 300 // wood per oven and a normally hold about 150 water jugs. // All ovens are slightly different but I suggest that you put your // fastest burning oven first in line. You can tweak the settings // to your liking in the new GUI window. Your settings will be saved. // // If you see anything odd, /chat me. // // ENJOY! :) // Anka // Constants //User Definable variables Ovens = 3 //Number of Ovens you are running. 1-8 HeatMinX = 129 HeatX = 157 //Threshold for Heat bar, increase or decrease as needed. HeatMaxX = 178 Oxy1X = 82 Oxy2X = 133 WoodX = 109 //Wood threshold, adds wood/round up to this point. WaterX = 76 //Alowable water level, not much play here.. dont lower more than 2 DangerX = 170 // 162 //Threshold for Danger bar, increase or decrease as needed. RGBBlue = 220 //Threshold for detecting the color blue. RGBGreen = 250 //Threshold for detecting the color green. Some video cards // are having problems with this. If you are having problems, run // just 1 oven and try lowering this number by 10 at a time. It's // hard for me to see what is going on without using your pc :( // This method is used for RGBBlue and RGBGreen. CheckDelay = 3900 Guild = 1 // 1 for Guilded or public ovens, 0 for Personal ovens //End User variables AddX = 212 // 215-Personal 212-Guilded Add2X = 15 Add1Y = 65 Add2Y = 17 Add3Y = 233 HeatMin = 0 HeatMax = 0 DangerMax = 0 BeginX = 103 BeginY = 229 NewX = 0 New2X = 0 New3X = 0 New2Y = 0 NewY = 0 Heat = 0 Oxy = 0 Wood = 0 Water = 0 Danger = 0 Status = 0 HeatY = 140 OxyY = 152 WoodY = 164 WaterY = 176 DangerY = 188 StatusX = 172 StatusY = 200 WoodBX = 35 WoodBY = 234 WaterBX = 85 Vent0 = 130 Vent1 = 155 Vent2 = 180 VentBX = 0 OldVent = 1 Num = 0 Jump = 5 JumpM = 0 Jumped = 0 Used = 0 WoodNum = 0 MDelay = 200 SDelay = 150 S1Delay = 100 Count = 0 CountM = 0 MouseX = 0 MouseY = 0 End Form ccOven, Settings ed1=Combobox:Ovens:1, 2, 3, 4, 5, 6, 7, 8 ed2=CheckBox:Guilded?:True ed3=Editbox:Heat (75-188):162 ed10=Editbox:HeatMin (75-188):116 ed11=Editbox:HeatMax (75-188):184 ed4=Editbox:Low Oxy (75-188):82 ed5=Editbox:High Oxy (75-188):134 ed6=Editbox:Wood (75-188):109 ed7=Editbox:Water (75-188):77 ed8=Editbox:RGBGreen:240 ed9=Editbox:RGBBlue:220 ed12=Editbox:Check Bars Interval (miliseconds):4000 end FormLoad ccOven, ccOven.frm if ShowForm ccOven SetConst Ovens = ccOven[ed1] If ccOven[ed2] = True SetConst Guild = 1 Else SetConst Guild = 0 End SetConst HeatX = ccOven[ed3] SetConst Oxy1X = ccOven[ed4] SetConst Oxy2X = ccOven[ed5] SetConst WoodX = ccOven[ed6] SetConst WaterX = ccOven[ed7] SetConst RGBGreen = ccOven[ed8] SetConst RGBBlue = ccOven[ed9] SetConst HeatMin = ccOven[ed10] SetConst HeatMax = ccOven[ed11] SetConst CheckDelay = ccOven[ed12] else Stop end FormSave ccOven, ccOven.frm MousePos 100, 20 //Activates eGenesis window.. Don't run ACTool maximized. Delay $MDelay LeftClick Delay 2000 If $Guild = 1 Call Guild End SetConst NewX = $BeginX SetConst NewY = $BeginY SetConst Count = 1 Loop $Ovens If $Count = $Jump SetConst NewX = $BeginX Compute NewY = $BeginY + $Add3Y End MousePos $NewX, $NewY Delay $MDelay Rightclick Delay $MDelay Compute NewX = $NewX + $AddX Compute Count = $Count + 1 End SetConst NewX = $BeginX //Dont remember why this is here :) Call Main Procedure Main SetConst CountM = 1 SetConst Status = 0 Compute JumpM = $Jump - 1 Loop $Ovens If $CountM = $Jump SetConst NewX = $StatusX Compute NewY = $StatusY + $Add3Y SetConst New2X = $WaterBX Compute New2Y = $WoodBY + $Add3Y End While $Status = 0 Call CheckBars If $Status = 1 Call Snuff //code to advance to next hearth Compute Used = $Used + 1 If $Used = $JumpM Compute HeatMinX = $HeatMinX - (($Used - 1) * $AddX) Compute HeatX = $HeatX - (($Used - 1) * $AddX) Compute HeatMaxX = $HeatMaxX - (($Used - 1) * $AddX) Compute HeatY = $HeatY + $Add3Y Compute Oxy1X = $Oxy1X - (($Used - 1) * $AddX) Compute Oxy2X = $Oxy2X - (($Used - 1) * $AddX) Compute OxyY = $OxyY + $Add3Y Compute WoodX = $WoodX - (($Used - 1) * $AddX) Compute WoodY = $WoodY + $Add3Y Compute WaterX = $WaterX - (($Used - 1) * $AddX) Compute WaterY = $WaterY + $Add3Y //Compute DangerX = $DangerX - (($Used - 1) * $AddX) Compute DangerY = $DangerY + $Add3Y Compute StatusX = $StatusX - (($Used - 1) * $AddX) Compute StatusY = $StatusY + $Add3Y //Compute WaterBX = $WaterBX - (($Used -1) * $AddX) //Compute WoodBX = $WoodBX - (($Used - 1 ) * $AddX) //Compute WoodBY = $WoodBY + $Add3Y SetConst Jumped = 1 Continue Else Compute HeatMinX = $HeatMinX + $AddX Compute HeatX = $HeatX + $AddX Compute HeatMaxX = $HeatMaxX + $AddX Compute Oxy1X = $Oxy1X + $AddX Compute Oxy2X = $Oxy2X + $AddX Compute WoodX = $WoodX + $AddX Compute WaterX = $WaterX + $AddX //Compute DangerX = $DangerX + $AddX Compute StatusX = $StatusX + $AddX //Compute WaterBX = $WaterBX + $AddX //Compute WoodBX = $WoodBX + $AddX End Continue End Case When $HeatMin = 1 Call Wood Set WoodNum = 1 Else If $Heat = 0 and $Danger = 0 If $WoodNum = 0 and $Wood = 0 Call Wood Set WoodNum = 1 else Set WoodNum = 0 End Else If $Heat = 1 or $Danger = 1 If $Water = 0 or $HeatMax = 1 or $DangerMax = 1 Call Water End End End End If {loopno} > 3 Case When $Oxy = 0 // Open vent full If $OldVent <> $Oxy SetConst VentBX = $Vent2 Call Vent SetConst OldVent = 0 Delay 100 End When $Oxy = 1 // Oxy set normal If $OldVent <> $Oxy SetConst VentBX = $Vent1 Call Vent SetConst OldVent = 1 Delay 100 End When $Oxy = 2 // Close vent If $OldVent <> $Oxy SetConst VentBX = $Vent0 Call Vent SetConst OldVent = 2 Delay 100 End End End Delay $CheckDelay End Compute CountM = $CountM + 1 SetConst Status = 0 End End Procedure CheckBars MousePos $HeatMinX, $HeatY Delay $SDelay LoadRGB {MouseX}, {MouseY} if {RGBBlue} < $RGBBlue SetConst HeatMin = 1 else Set HeatMin = 0 End MousePos $HeatX, $HeatY Delay $SDelay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst Heat = 1 Else SetConst Heat = 0 End MousePos $HeatMaxX, $HeatY Delay $SDelay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst HeatMax = 1 Else SetConst HeatMax = 0 End MousePos $Oxy1X, $OxyY Delay $SDelay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst Oxy = 1 Else SetConst Oxy = 0 End MousePos $Oxy2X, $OxyY Delay $SDelay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst Oxy = 2 End MousePos $WoodX, $WoodY Delay $S1Delay LoadRGB {mousex}, {mousey} if {RGBBlue} > $RGBBlue SetConst Wood = 1 Else SetConst Wood = 0 End MousePos $WaterX, $WaterY Delay $S1Delay LoadRGB {mousex}, {mousey} if {RGBBlue} > $RGBBlue SetConst Water = 1 Else SetConst Water = 0 End MousePos $HeatX, $DangerY Delay $S1Delay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst Danger = 1 Else SetConst Danger = 0 End MousePos $HeatMaxX, $DangerY Delay $S1Delay LoadRGB {MouseX}, {MouseY} if {RGBBlue} > $RGBBlue SetConst DangerMax = 1 Else SetConst DangerMax = 0 End MousePos $StatusX, $StatusY LoadRGB {MouseX}, {MouseY} if {RGBGreen} > $RGBGreen //if {RGBRed} = 6 and {RGBGreen} = 254 and {RGBBlue} = 5 SetConst Status = 1 Else SetConst Status = 0 End End Procedure Water SetConst NewX = $WaterBX SetConst NewY = $WoodBY Loop $Ovens IF {loopno} = $Jump SetConst NewX = $WaterBX Compute NewY = $WoodBY + $Add3Y End If {loopno} > $Used MousePos $NewX, $NewY Delay $SDelay Rightclick Delay $SDelay End Compute NewX = $NewX + $AddX End SetConst NewX = $WaterBX End Procedure Vent SetConst NewX = $VentBX SetConst NewY = $WoodBY Loop $Ovens IF {loopno} = $Jump SetConst NewX = $VentBX Compute NewY = $WoodBY + $Add3Y End If {loopno} > $Used MousePos $NewX, $NewY Delay $SDelay Rightclick Delay $SDelay End Compute NewX = $NewX + $AddX End SetConst NewX = $VentBX End Procedure Snuff SetConst New2X = $WaterBX SetConst New3X = $Vent2 SetConst New2Y = $WoodBY Compute Num = $Used + 1 Loop $Ovens IF {loopno} = $Jump SetConst New2X = $WaterBX SetConst New3X = $Vent2 Compute New2Y = $WoodBY + $Add3Y End If {loopno} = $Num MousePos $New2X, $New2Y Loop 8 Rightclick End MousePos $New3X, $WoodBY Delay 200 Rightclick End Compute New2X = $New2X + $AddX Compute New3X = $New3X + $AddX End End Procedure Wood SetConst NewX = $WoodBX SetConst NewY = $WoodBY Loop $Ovens IF {loopno} = $Jump SetConst NewX = $WoodBX Compute NewY = $WoodBY + $Add3Y End If {loopno} > $Used MousePos $NewX, $NewY Delay $SDelay Rightclick Delay $SDelay End Compute NewX = $NewX + $AddX End SetConst NewX = $WoodBX End Procedure Guild //Compute BeginX = $BeginX - 7 Compute BeginY = $BeginY + 16 Compute AddX = $AddX - 3 Compute Add3Y = $Add3Y + 16 Compute Add1Y = $Add1Y - 16 Compute WoodBY = $WoodBY + 16 //Compute HeatX = $HeatX - 4 Compute HeatY = $HeatY + 16 //Compute Oxy1X = $Oxy1X //Compute Oxy2X = Compute OxyY = $OxyY + 16 //Compute WoodX = $WoodX - 1 Compute WoodY = $WoodY + 16 Compute WaterY = $WaterY + 16 //Compute DangerX = $DangerX - 4 Compute DangerY = $DangerY + 16 //Compute StatusX = $StatusX - 5 Compute StatusY = $StatusY + 16 End //Written with ACTool 5.3.0 by Anka Bell Asterisk