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.
User:Strutter/glass
From A Tale in the Desert
Jump to navigationJump to search// timestamp {mousex}, {mousey} // stop
constants
X = 17 y = 1 mousx = 17 barstart = 17 barend = 177 oldend = null found = 0 //loop flags done = 0 spike = 1 benchs = 1 //bencht = 1 //normal a2ccy = 120 a6ccy = 224 heatbary = 345 Sp1 = 100 sp2 = 142 sp3 = 141 sp4 = 124 // job = 127 // torch // job = 144 // jar // job = 159 // pipe // job = 177 // rod job = 192 // sheet glass // job = 206 // wine // bencht = 2 //soda // a2ccy = 120 // a6ccy = 150 // heatbary = 300 // job = 127 // blade // job = 144 // pipe // job = 159 // rod //sp1 = 92 // glass allowed low point //sp2 = 124 // glass allowed high point //sp3 = 120 // cc allowed high point //sp4 = 110 // cc allowed low point(main control point) // bencht = 3 //fine
end // constants Constructs
offset1 = List oldend2 = List
end
while $done = 0
delay 1000
loop $benchs
call getend
timestamp $found, $X
if $X < $Sp1//1600
continue //too cold do nothing
end
if $X > $Sp2 //2400
continue //too hot do nothing
end
if $spike = 0
isblack 14, 123
timestamp loading glass
mousepos $mousx, $job
rightclick
end
else
timestamp spiking
//mainly if meltglass active
continue
end
//stop
if $oldend = $x
continue
end
if $oldend < $x // its rising, do nothing
compute oldend = $x
timestamp rising... $oldend < $x
continue
end
// it fell so a tic happened
if $found = 1
compute oldend = $x
bell
call addcc
else // cold bench
timestamp not found
end
end //bench loop
end //while stop // end main
procedure getend
compute found = 0 // default to not found
while $found = 0
LoadRGB $X, $heatbary
//timestamp {rgbred} {rgbgreen} {rgbblue}
mousepos $X, $heatbary
if $X > $barend
compute found = 1
end
if {rgbred} < 135 // if bar is red at x,y
compute $y = $x + 1
LoadRGB $y, $heatbary
if {rgbred} > 150 // and the bar is not red at x+1,y
compute found = 1 // found temperature of bench
else
inc $x // need to look up
end
else
if $x = $barstart
compute found = -1 // bench is cold
else
compute $spike = 0
timestamp spike alert over
dec $x // not at start, not red, so look down
end
end
end // while
end // procedure
procedure addcc
mousepos 50,50
rightclick // update window
timestamp add temp range
if $X < $sp3 //2300
if $X < $sp4 //2000
// add = 6
isblack $mousx, 123
// click for no glass
mousepos 28, 237
rightclick
timestamp add6 w/o glass $x
else
// click for glass
mousepos $mousx, $a6ccy
rightclick
timestamp add6 w/ glass $x
end
else
//add = 2
isblack 14, 123
// click for no glass
mousepos $mousx, 223
rightclick
timestamp add2 w/o glass $x
else
// click for glass
mousepos $mousx, $a2ccy
rightclick
timestamp add2 w/ glass $x
end
end
end
end // procedure