Difference between revisions of "AI Craftapalooza Machines"

From The Perfect Tower II
Jump to navigation Jump to search
Line 17: Line 17:
 
|craft 2:1
 
|craft 2:1
 
|16
 
|16
|
+
|{{AIScript
{| class="wikitable mw-collapsible mw-collapsed"
+
|code=
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
; Oven
 
:global double craft_inventory
 
:local int tier
 
:local double count
 
:local double plates
 
:local double blocks
 
:local double cables
 
 
 
tier = global.int.get("craft_tier:2.1")
 
count = global.double.get("craft_count:2.1")
 
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 
 
 
executesync("craft 2:1:in")
 
gotoif(99, global.int.get("craft_status") > 199)
 
 
 
plates = count * floor((88888888641.0 / (10.0 ^ i2d(tier))) % 10.0)
 
blocks = count * floor((22222000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 
cables = count * floor((44444333221.0 / (10.0 ^ i2d(tier))) % 10.0)
 
 
 
global.int.set("craft_status:3.9", 1)
 
execute("craft 2:1:plates")
 
 
 
global.int.set("craft_tier:3.6", tier)
 
global.double.set("craft_count:3.6", cables - craft_inventory * count("cable.insulated", tier))
 
executesync("craft 3:6")
 
gotoif(99, global.int.get("craft_status") > 199)
 
 
 
waituntil(global.int.get("craft_status:3.9") >= 3 & count("plate", tier) >= plates & count("block", tier) >= blocks & count("cable.insulated", tier) >= cables)
 
craft("machine.oven", tier, count)
 
 
 
 
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
 
CWNyYWZ0IDI6MQAAAAAAAAAAEAAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 
CWNyYWZ0IDI6MQAAAAAAAAAAEAAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 
bnQuZ2V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YXJp
 
c29uLmJvb2wPY29tcGFyaXNvbi5ib29sDmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0
 
c29uLmJvb2wPY29tcGFyaXNvbi5ib29sDmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0
YW50BBBjcmFmdF9zdGF0dXM6My45CGNvbnN0YW50BAI+PQhjb25zdGFudAIDAAAACGNvbnN0YW50BAEm
+
YW50BBBjcmFmdF9zdGF0dXM6Mi4xCGNvbnN0YW50BAI+PQhjb25zdGFudAIDAAAACGNvbnN0YW50BAEm
 
EWNvbXBhcmlzb24uZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBXBsYXRlDWxvY2Fs
 
EWNvbXBhcmlzb24uZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBXBsYXRlDWxvY2Fs
 
LmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEAj49EGxvY2FsLmRvdWJsZS5nZXQIY29uc3Rh
 
LmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEAj49EGxvY2FsLmRvdWJsZS5nZXQIY29uc3Rh
Line 104: Line 67:
 
Ymxlcw1mYWN0b3J5LmNyYWZ0CGNvbnN0YW50BAxtYWNoaW5lLm92ZW4NbG9jYWwuaW50LmdldAhjb25z
 
Ymxlcw1mYWN0b3J5LmNyYWZ0CGNvbnN0YW50BAxtYWNoaW5lLm92ZW4NbG9jYWwuaW50LmdldAhjb25z
 
dGFudAQEdGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
 
dGFudAQEdGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
 
+
|src=
</syntaxhighlight>
 
|}
 
|-
 
|craft 2:1:in
 
|18
 
|
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
 
; Oven
 
; Oven
 
:global double craft_inventory
 
:global double craft_inventory
Line 122: Line 75:
 
:local double blocks
 
:local double blocks
 
:local double cables
 
:local double cables
:local double ingots
 
  
 
tier = global.int.get("craft_tier:2.1")
 
tier = global.int.get("craft_tier:2.1")
 
count = global.double.get("craft_count:2.1")
 
count = global.double.get("craft_count:2.1")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
  
 +
executesync("craft 2:1:in")
 +
gotoif(99, global.int.get("craft_status") > 199)
  
; Verify ingots
+
plates = count * floor((88888888641.0 / (10.0 ^ i2d(tier))) % 10.0)
;plates = count * round((88888888640.0 / (10.0 ^ i2d(tier))) % 10.0)
+
blocks = count * floor((22222000001.0 / (10.0 ^ i2d(tier))) % 10.0)
;blocks = count * round((22222000000.0 / (10.0 ^ i2d(tier))) % 10.0)
+
cables = count * floor((44444333221.0 / (10.0 ^ i2d(tier))) % 10.0)
;cables = count * round((44444333220.0 / (10.0 ^ i2d(tier))) % 10.0)
 
  
ingots = 0.0 ; TODO
+
global.int.set("craft_status:2.1", 1)
global.int.set("craft_tier:ingot", tier)
+
execute("craft 2:1:plates")
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 
global.int.set("craft_verify:ingot", 1)
 
executesync("craft ingot")
 
gotoif(99, global.int.get("craft_status") > 199)
 
  
; Lower tier inputs
+
global.int.set("craft_tier:3.6", tier)
global.int.set("craft_tier:2.1", tier - 1)
+
global.double.set("craft_count:3.6", cables - craft_inventory * count("cable.insulated", tier))
global.double.set("craft_count:2.1", count - craft_inventory * count("machine.oven", tier - 1))
+
executesync("craft 3:6")
executesync("craft 2:1")
 
 
gotoif(99, global.int.get("craft_status") > 199)
 
gotoif(99, global.int.get("craft_status") > 199)
  
; Craft ingots
+
waituntil(global.int.get("craft_status:2.1") >= 3 & count("plate", tier) >= plates & count("block", tier) >= blocks & count("cable.insulated", tier) >= cables)
global.int.set("craft_tier:ingot", tier)
+
craft("machine.oven", tier, count)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
+
}}
executesync("craft ingot")
 
gotoif(99, global.int.get("craft_status") > 199)
 
  
; Restore state for this tier
 
global.int.set("craft_tier:2.1", tier)
 
global.double.set("craft_count:2.1", count)
 
 
 
</syntaxhighlight>
 
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|craft 2:1:in
 +
|18
 +
|{{AIScript
 +
|code=
 
DGNyYWZ0IDI6MTppbgAAAAAAAAAAEgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 
DGNyYWZ0IDI6MTppbgAAAAAAAAAAEgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
 
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
Line 190: Line 134:
 
Y29uc3RhbnQEBHRpZXIRZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjIuMRBs
 
Y29uc3RhbnQEBHRpZXIRZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjIuMRBs
 
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
 
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
 
+
|src=
</syntaxhighlight>
 
|}
 
|-
 
|craft 2:1:plates
 
|11
 
|
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
 
:global double craft_inventory
 
:global double craft_inventory
 
:local int tier
 
:local int tier
 
:local double count
 
:local double count
 +
:local double plates
 
:local double blocks
 
:local double blocks
:local double plates
+
:local double cables
 +
:local double ingots
  
 
tier = global.int.get("craft_tier:2.1")
 
tier = global.int.get("craft_tier:2.1")
 
count = global.double.get("craft_count:2.1")
 
count = global.double.get("craft_count:2.1")
  
blocks = count * floor((22222000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 
plates = count * floor((88888888641.0 / (10.0 ^ i2d(tier))) % 10.0)
 
  
global.int.set("craft_tier:3.4", tier)
+
; Verify ingots
global.double.set("craft_count:3.4", blocks - craft_inventory * count("block", tier))
+
;plates = count * round((88888888640.0 / (10.0 ^ i2d(tier))) % 10.0)
executesync("craft 3:4")
+
;blocks = count * round((22222000000.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
;cables = count * round((44444333220.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
 
 +
ingots = 0.0 ; TODO
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
  
plates: gotoif(end, plates < craft_inventory * count("plate", tier))
+
; Lower tier inputs
  waitwhile(active("presser"))
+
global.int.set("craft_tier:2.1", tier - 1)
  produce("ingot", tier, plates - craft_inventory * count("plate", tier), "presser")
+
global.double.set("craft_count:2.1", count - craft_inventory * count("machine.oven", tier - 1))
 +
executesync("craft 2:1")
 +
gotoif(99, global.int.get("craft_status") > 199)
  
end: global.int.set("craft_status:3.9", global.int.get("craft_status:3.9") + 2)
+
; Craft ingots
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
  
</syntaxhighlight>
+
; Restore state for this tier
 +
global.int.set("craft_tier:2.1", tier)
 +
global.double.set("craft_count:2.1", count)
 +
}}
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|craft 2:1:plates
 +
|11
 +
|{{AIScript
 +
|code=
 
EGNyYWZ0IDI6MTpwbGF0ZXMAAAAAAAAAAAsAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
 
EGNyYWZ0IDI6MTpwbGF0ZXMAAAAAAAAAAAsAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
 
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjEQbG9jYWwuZG91YmxlLnNldAhjb25z
 
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjEQbG9jYWwuZG91YmxlLnNldAhjb25z
Line 254: Line 208:
 
ZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNv
 
ZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNv
 
dW50CGNvbnN0YW50BAVwbGF0ZQ1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAdw
 
dW50CGNvbnN0YW50BAVwbGF0ZQ1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAdw
cmVzc2VyDmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6My45DmFyaXRobWV0aWMu
+
cmVzc2VyDmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6Mi4xDmFyaXRobWV0aWMu
aW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6My45CGNvbnN0YW50BAErCGNv
+
aW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6Mi4xCGNvbnN0YW50BAErCGNv
 
bnN0YW50AgIAAAA=
 
bnN0YW50AgIAAAA=
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double blocks
 +
:local double plates
 +
 +
tier = global.int.get("craft_tier:2.1")
 +
count = global.double.get("craft_count:2.1")
 +
 +
blocks = count * floor((22222000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
plates = count * floor((88888888641.0 / (10.0 ^ i2d(tier))) % 10.0)
  
</syntaxhighlight>
+
global.int.set("craft_tier:3.4", tier)
|}
+
global.double.set("craft_count:3.4", blocks - craft_inventory * count("block", tier))
 +
executesync("craft 3:4")
 +
 
 +
plates: gotoif(end, plates < craft_inventory * count("plate", tier))
 +
  waitwhile(active("presser"))
 +
  produce("ingot", tier, plates - craft_inventory * count("plate", tier), "presser")
 +
 
 +
end: global.int.set("craft_status:2.1", global.int.get("craft_status:2.1") + 2)
 +
}}
 
|}
 
|}
 
|-
 
|-
Line 273: Line 247:
 
|craft 2:2
 
|craft 2:2
 
|17
 
|17
|
+
|{{AIScript
{| class="wikitable mw-collapsible mw-collapsed"
+
|code=
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
; Assembler
 
:global double craft_inventory
 
:local int tier
 
:local double count
 
:local double motors
 
:local double chips
 
:local int chiptier
 
 
 
tier = global.int.get("craft_tier:2.2")
 
count = global.double.get("craft_count:2.2")
 
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 
 
 
executesync("craft 2:2:in")
 
gotoif(99, global.int.get("craft_status") > 199)
 
 
 
motors = count * ceil(i2d(tier) / 8.0)
 
chips = count * ceil(i2d(tier) / 9.0)
 
chiptier = d2i(floor((44332221111.0 / (10.0 ^ i2d(tier))) % 10.0))
 
 
 
global.int.set("craft_tier:3.1", chiptier)
 
global.double.set("craft_count:3.1", chips - craft_inventory * count("chip", chiptier))
 
executesync("craft 3:1")
 
global.int.set("craft_tier:3.8", tier)
 
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
 
executesync("craft 3:8")
 
gotoif(99, global.int.get("craft_status") > 199)
 
 
 
executesync("craft 2:2:plates")
 
craft("machine.oven", tier, count)
 
 
 
 
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
 
CWNyYWZ0IDI6MgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 
CWNyYWZ0IDI6MgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
Line 349: Line 286:
 
LmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0
 
LmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0
 
YW50AscAAAATZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQQY3JhZnQgMjoyOnBsYXRlcw1mYWN0
 
YW50AscAAAATZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQQY3JhZnQgMjoyOnBsYXRlcw1mYWN0
b3J5LmNyYWZ0CGNvbnN0YW50BAxtYWNoaW5lLm92ZW4NbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGll
+
b3J5LmNyYWZ0CGNvbnN0YW50BBFtYWNoaW5lLmFzc2VtYmxlcg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50
chBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
+
BAR0aWVyEGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQEBWNvdW50
 
+
|src=
</syntaxhighlight>
+
; Assembler
|}
 
|-
 
|craft 2:2:in
 
|13
 
|
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
; Oven
 
 
:global double craft_inventory
 
:global double craft_inventory
 
:local int tier
 
:local int tier
 
:local double count
 
:local double count
:local double plates
+
:local double motors
:local double blocks
+
:local double chips
:local double cables
+
:local int chiptier
:local double ingots
 
  
 
tier = global.int.get("craft_tier:2.2")
 
tier = global.int.get("craft_tier:2.2")
 
count = global.double.get("craft_count:2.2")
 
count = global.double.get("craft_count:2.2")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
  
; Ingots
+
executesync("craft 2:2:in")
ingots = 0.0 ; TODO
 
global.int.set("craft_tier:ingot", tier)
 
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 
;global.int.set("craft_verify:ingot", 1)
 
executesync("craft ingot")
 
 
gotoif(99, global.int.get("craft_status") > 199)
 
gotoif(99, global.int.get("craft_status") > 199)
  
; Lower tier inputs
+
motors = count * ceil(i2d(tier) / 8.0)
global.int.set("craft_tier:2.2", tier - 1)
+
chips = count * ceil(i2d(tier) / 9.0)
global.double.set("craft_count:2.2", count - craft_inventory * count("machine.assembler", tier - 1))
+
chiptier = d2i(floor((44332221111.0 / (10.0 ^ i2d(tier))) % 10.0))
executesync("craft 2:2")
+
 
 +
global.int.set("craft_tier:3.1", chiptier)
 +
global.double.set("craft_count:3.1", chips - craft_inventory * count("chip", chiptier))
 +
executesync("craft 3:1")
 +
global.int.set("craft_tier:3.8", tier)
 +
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
 +
executesync("craft 3:8")
 
gotoif(99, global.int.get("craft_status") > 199)
 
gotoif(99, global.int.get("craft_status") > 199)
  
; Restore state for this tier
+
executesync("craft 2:2:plates")
global.int.set("craft_tier:2.2", tier)
+
craft("machine.assembler", tier, count)
global.double.set("craft_count:2.2", count)
+
}}
  
 
</syntaxhighlight>
 
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|craft 2:2:in
 +
|13
 +
|{{AIScript
 +
|code=
 
DGNyYWZ0IDI6MjppbgAAAAAAAAAADQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 
DGNyYWZ0IDI6MjppbgAAAAAAAAAADQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
 
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
Line 419: Line 348:
 
c2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDoyLjIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291
 
c2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDoyLjIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291
 
bnQ=
 
bnQ=
 
+
|src=
</syntaxhighlight>
 
|}
 
|-
 
|craft 2:2:plates
 
|20
 
|
 
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
 
:global double craft_inventory
 
:global double craft_inventory
 
:local int tier
 
:local int tier
 
:local double count
 
:local double count
 
:local double plates
 
:local double plates
:local double pipes
+
:local double blocks
:local double rawplates
+
:local double cables
 +
:local double ingots
  
 
tier = global.int.get("craft_tier:2.2")
 
tier = global.int.get("craft_tier:2.2")
 
count = global.double.get("craft_count:2.2")
 
count = global.double.get("craft_count:2.2")
  
plates = count * 2.0 * floor((66555444331.0 / (10.0 ^ i2d(tier))) % 10.0)
+
; Ingots
gotoif(x, tier != 2) ; only 5 plates for T2
+
ingots = 0.0 ; TODO
plates = plates - 1.0
+
global.int.set("craft_tier:ingot", tier)
x: pipes = count * ceil(i2d(tier) / 5.0)
+
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
;global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
  
rawplates = max(0.0, plates * 9.0 - craft_inventory * (count("plate.dense", tier) + count("plate.stack", tier))) + max(0.0, pipes - craft_inventory * count("pipe", tier))
+
; Lower tier inputs
gotoif(plates, rawplates <= craft_inventory * count("plate", tier))
+
global.int.set("craft_tier:2.2", tier - 1)
  waitwhile(active("presser"))
+
global.double.set("craft_count:2.2", count - craft_inventory * count("machine.assembler", tier - 1))
  produce("ingot", tier, rawplates - craft_inventory * count("plate", tier), "presser")
+
executesync("craft 2:2")
  waitwhile(active("presser"))
+
gotoif(99, global.int.get("craft_status") > 199)
  
plates: gotoif(pipes, plates <= craft_inventory * count("plate.dense", tier))
+
; Restore state for this tier
  craft("plate.stack", tier, plates - craft_inventory * (count("plate.stack", tier) + count("plate.dense", tier)))
+
global.int.set("craft_tier:2.2", tier)
  waitwhile(active("presser"))
+
global.double.set("craft_count:2.2", count)
  produce("plate.stack", tier, plates - craft_inventory * count("plate.dense", tier), "presser")
+
}}
 
 
pipes: gotoif(end, pipes <= craft_inventory * count("pipe", tier))
 
  waitwhile(active("shaper"))
 
  produce("plate", tier, pipes - craft_inventory * count("pipe", tier), "shaper")
 
  
end: waituntil(count("plate.dense", tier) >= plates & count("pipe", tier) >= pipes)
 
wait(0.0)
 
 
</syntaxhighlight>
 
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|craft 2:2:plates
 +
|20
 +
|{{AIScript
 +
|code=
 
EGNyYWZ0IDI6MjpwbGF0ZXMAAAAAAAAAABQAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
 
EGNyYWZ0IDI6MjpwbGF0ZXMAAAAAAAAAABQAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
 
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjIQbG9jYWwuZG91YmxlLnNldAhjb25z
 
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjIQbG9jYWwuZG91YmxlLnNldAhjb25z
Line 535: Line 453:
 
bnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50
 
bnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50
 
BAVwaXBlcwxnZW5lcmljLndhaXQIY29uc3RhbnQDAAAAAAAAAAA=
 
BAVwaXBlcwxnZW5lcmljLndhaXQIY29uc3RhbnQDAAAAAAAAAAA=
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double plates
 +
:local double pipes
 +
:local double rawplates
 +
 +
tier = global.int.get("craft_tier:2.2")
 +
count = global.double.get("craft_count:2.2")
 +
 +
plates = count * 2.0 * floor((66555444331.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
gotoif(x, tier != 2) ; only 5 plates for T2
 +
plates = plates - 1.0
 +
x: pipes = count * ceil(i2d(tier) / 5.0)
 +
 +
rawplates = max(0.0, plates * 9.0 - craft_inventory * (count("plate.dense", tier) + count("plate.stack", tier))) + max(0.0, pipes - craft_inventory * count("pipe", tier))
 +
gotoif(plates, rawplates <= craft_inventory * count("plate", tier))
 +
  waitwhile(active("presser"))
 +
  produce("ingot", tier, rawplates - craft_inventory * count("plate", tier), "presser")
 +
  waitwhile(active("presser"))
  
</syntaxhighlight>
+
plates: gotoif(pipes, plates <= craft_inventory * count("plate.dense", tier))
|}
+
  craft("plate.stack", tier, plates - craft_inventory * (count("plate.stack", tier) + count("plate.dense", tier)))
 +
  waitwhile(active("presser"))
 +
  produce("plate.stack", tier, plates - craft_inventory * count("plate.dense", tier), "presser")
 +
 
 +
pipes: gotoif(end, pipes <= craft_inventory * count("pipe", tier))
 +
  waitwhile(active("shaper"))
 +
  produce("plate", tier, pipes - craft_inventory * count("pipe", tier), "shaper")
 +
 
 +
end: waituntil(count("plate.dense", tier) >= plates & count("pipe", tier) >= pipes)
 +
wait(0.0)
 +
}}
 
|}
 
|}
 +
 
|-
 
|-
 
|3
 
|3
Line 550: Line 500:
 
|-
 
|-
 
|craft 2:3
 
|craft 2:3
|
+
|16
|
+
|{{AIScript
{| class="wikitable mw-collapsible mw-collapsed"
+
|code=
!
+
CWNyYWZ0IDI6MwAAAAAAAAAAEAAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 +
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMxBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 +
b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi4zDmdlbmVyaWMuZ290
 +
b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29u
 +
LmJvb2wOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQB
 +
PAhjb25zdGFudAIBAAAACGNvbnN0YW50BAF8DmNvbXBhcmlzb24uaW50DWxvY2FsLmludC5nZXQIY29u
 +
c3RhbnQEBHRpZXIIY29uc3RhbnQEAT4IY29uc3RhbnQCCgAAAAhjb25zdGFudAQBfBFjb21wYXJpc29u
 +
LmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudAhjb25zdGFudAQBPAhjb25zdGFu
 +
dAMAAAAAAADwPwhjb25zdGFudAQBfA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFu
 +
dAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0YW50AscAAAATZ2VuZXJpYy5leGVjdXRlc3lu
 +
Ywhjb25zdGFudAQMY3JhZnQgMjozOmluDmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAAOY29tcGFy
 +
aXNvbi5pbnQOZ2xvYmFsLm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Y2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQ=
 +
|src=
 +
; Refiner
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double motors
 +
:local double pumps
 +
 
 +
tier = global.int.get("craft_tier:2.3")
 +
count = global.double.get("craft_count:2.3")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 +
 
 +
executesync("craft 2:3:in")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 
 +
;denseplates = count * 4.0
 +
;blocks = count * floor((55500000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
;rings = count * floor( (53333322211.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
motors = count * floor((42222211111.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
pumps = count * floor( (53333322211.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
 
 +
global.int.set("craft_tier:3.9", tier)
 +
global.double.set("craft_count:3.9", pumps - craft_inventory * count("pump", tier))
 +
executesync("craft 3:9")
 +
global.int.set("craft_tier:3.8", tier)
 +
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
 +
executesync("craft 3:8")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 
 +
executesync("craft 2:3:misc")
 +
craft("machine.refinery", tier, count)
 +
}}
 +
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|craft 2:3:in
x
+
|17
</syntaxhighlight>
+
|{{AIScript
 +
|code=
 +
DGNyYWZ0IDI6MzppbgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 +
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMxBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
 +
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi4zEGx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bnN0YW50BAVjb3VudAhj
 +
b25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLRFhcml0aG1ldGljLmRvdWJsZRFn
 +
bG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0YW50BAEqE2ZhY3Rv
 +
cnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGNoaXANbG9jYWwuaW50LmdldAhjb25zdGFudAQIY2hpcHRp
 +
ZXITZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQJY3JhZnQgMzox
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double ingots
 +
:local int chiptier
 +
 
 +
tier = global.int.get("craft_tier:2.3")
 +
count = global.double.get("craft_count:2.3")
 +
 
 +
; Ingots
 +
ingots = 0.0 ; TODO
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
;global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 
 +
; Lower tier inputs
 +
global.int.set("craft_tier:2.3", tier - 1)
 +
global.double.set("craft_count:2.3", count - craft_inventory * count("machine.refinery", tier - 1))
 +
executesync("craft 2:3")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 
 +
; Restore state for this tier
 +
global.int.set("craft_tier:2.3", tier)
 +
global.double.set("craft_count:2.3", count)
 +
 
 +
; chips
 +
; chips = count * 2.0
 +
chiptier = d2i(floor((54432222111.0 / (10.0 ^ i2d(tier))) % 10.0))
 +
global.int.set("craft_tier:3.1", chiptier)
 +
global.double.set("craft_count:3.1", count * 2.0 - craft_inventory * count("chip", chiptier))
 +
executesync("craft 3:1")
 +
}}
 +
 
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|craft 2:3:misc
x
+
|18
</syntaxhighlight>
+
|{{AIScript
|}
+
|code=
|-
+
DmNyYWZ0IDI6MzptaXNjAA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double count
 +
:local double blocks
 +
:local double rings
 +
 
 +
tier = global.int.get("craft_tier:2.3")
 +
count = global.double.get("craft_count:2.3")
 +
 
 +
;denseplates = count * 4.0
 +
blocks = count * floor((75550000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
rings = count * floor( (53333322211.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
 
 +
global.int.set("craft_tier:3.4", tier)
 +
global.double.set("craft_count:3.4", blocks - craft_inventory * count("block", tier))
 +
executesync("craft 3:4")
 +
 
 +
global.int.set("craft_tier:3.3", tier)
 +
global.double.set("craft_count:3.3", count * 4.0 - craft_inventory * count("plate.dense", tier))
 +
executesync("craft 3:3")
 +
 
 +
plates: gotoif(rings, rings <= craft_inventory * (count("ring", tier) + count("rod", tier)))
 +
  waitwhile(active("shaper"))
 +
  produce("ingot", tier, ceil((rings - craft_inventory * (count("ring", tier) + count("rod", tier)))/2.0), "shaper")
 +
 
 +
rings: gotoif(end, rings <= craft_inventory * count("ring", tier))
 +
  waitwhile(active("shaper"))
 +
  produce("rod", tier, rings - craft_inventory * count("ring", tier), "shaper")
 +
 
 +
end: waituntil(count("ring", tier) >= rings)
 +
wait(0.0)
 
|}
 
|}
 +
 
|-
 
|-
 
|4
 
|4
Line 577: Line 744:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|-
 +
|craft 2:4
 +
|14
 +
|{{AIScript
 +
|code=
 +
CWNyYWZ0IDI6NAAAAAAAAAAADgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 +
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNBBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 +
b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi40DmdlbmVyaWMuZ290
 +
b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXN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C5kb3VibGUuZ2V0CGNvbnN0YW50BA9jcmFm
 +
dF9pbnZlbnRvcnkIY29uc3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQLcGxhdGUu
 +
ZGVuc2UNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0
 +
YW50BAljcmFmdCAzOjMOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCYwAAAA5jb21wYXJpc29uLmludA5n
 +
bG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0YW50AscA
 +
AAANZmFjdG9yeS5jcmFmdAhjb25zdGFudAQPbWFjaGluZS5jcnVzaGVyDWxvY2FsLmludC5nZXQIY29u
 +
c3RhbnQEBHRpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQ=
 +
src=
 +
; Crusher
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double motors
 +
:local double denseplates
 +
 +
tier = global.int.get("craft_tier:2.4")
 +
count = global.double.get("craft_count:2.4")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 +
 +
motors = count * floor((22211111111.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
denseplates = count * floor((99988888871.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
 +
executesync("craft 2:4:in")
 +
 +
global.int.set("craft_tier:3.8", tier)
 +
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
 +
executesync("craft 3:8")
 +
global.int.set("craft_tier:3.3", tier)
 +
global.double.set("craft_count:3.3", denseplates - craft_inventory * count("plate.dense", tier))
 +
executesync("craft 3:3")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
craft("machine.crusher", tier, count)
 +
}}
 +
 +
|-
 +
|craft 2:4:in
 +
|18
 +
|{{AIScript
 +
|code=
 +
DGNyYWZ0I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GNvbnN0YW50BAR0aWVyCGNvbnN0YW50BANtb2QIY29uc3RhbnQDAAAAAAAAJEANbG9jYWwuaW50
 +
LnNldAhjb25zdGFudAQIY2hpcHRpZXIDZDJpDGRvdWJsZS5mbG9vchFhcml0aG1ldGljLmRvdWJsZRFh
 +
cml0aG1ldGljLmRvdWJsZQhjb25zdGFudAMAAG4Ws5ckQghjb25zdGFudAQBLxFhcml0aG1ldGljLmRv
 +
dWJsZQhjb25zdGFudAMAAAAAAAAkQAhjb25zdGFudAQDcG93A2kyZA1sb2NhbC5pbnQuZ2V0CGNvbnN0
 +
YW50BAR0aWVyCGNvbnN0YW50BANtb2QIY29uc3RhbnQDAAAAAAAAJEAOZ2xvYmFsLmludC5zZXQIY29u
 +
c3RhbnQEDmNyYWZ0X3RpZXI6My4xDWxvY2FsLmludC5nZXQIY29uc3RhbnQECGNoaXB0aWVyEWdsb2Jh
 +
bC5kb3VibGUuc2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDozLjERYXJpdGhtZXRpYy5kb3VibGUQbG9j
 +
YWwuZG91YmxlLmdldAhjb25zdGFudAQFY2hpcHMIY29uc3RhbnQEAS0RYXJpdGhtZXRpYy5kb3VibGUR
 +
Z2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQBKhNmYWN0
 +
b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARjaGlwDWxvY2FsLmludC5nZXQIY29uc3RhbnQECGNoaXB0
 +
aWVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQECWNyYWZ0IDM6MQ==
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double ingots
 +
:local double chips
 +
:local int chiptier
 +
 +
tier = global.int.get("craft_tier:2.4")
 +
count = global.double.get("craft_count:2.4")
 +
 +
; Ingots
 +
ingots = 0.0 ; TODO
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
;global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Lower tier inputs
 +
global.int.set("craft_tier:2.4", tier - 1)
 +
global.double.set("craft_count:2.4", count - craft_inventory * count("machine.crusher", tier - 1))
 +
executesync("craft 2:4")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Restore state for this tier
 +
global.int.set("craft_tier:2.4", tier)
 +
global.double.set("craft_count:2.4", count)
 +
 +
; chips
 +
chips = count * floor((33322222211.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
chiptier = d2i(floor((44222221111.0 / (10.0 ^ i2d(tier))) % 10.0))
 +
global.int.set("craft_tier:3.1", chiptier)
 +
global.double.set("craft_count:3.1", chips - craft_inventory * count("chip", chiptier))
 +
executesync("craft 3:1")
 +
}}
 +
|}
 +
 
|-
 
|-
 
|5
 
|5
Line 582: Line 902:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|-
 +
|craft 2:5
 +
|15
 +
|{{AIScript
 +
|code=
 +
CWNyYWZ0IDI6NQAAAAAAAAAADwAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 +
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 +
b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi41DmdlbmVyaWMuZ290
 +
b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29u
 +
LmJvb2wOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQB
 +
PAhjb25zdGFudAIBAAAACGNvbnN0YW50BAF8DmNvbXBh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RYXJpdGhtZXRpYy5kb3VibGUR
 +
YXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQIY29uc3RhbnQE
 +
ASoMZG91YmxlLmZsb29yEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50
 +
AwAAANBYMXVBCGNvbnN0YW50BAEvEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAAAAAAACRACGNv
 +
bnN0YW50BANwb3cDaTJkDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEA21vZAhj
 +
b25zdGFudAMAAAAAAAAkQAhjb25zdGFudAQBLRFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91Ymxl
 +
LmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291
 +
bnQIY29uc3RhbnQEBXBsYXRlDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXITZ2VuZXJpYy5leGVj
 +
dXRlc3luYwhjb25zdGFudAQJY3JhZnQgMzoyDmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAAOY29t
 +
cGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFudAQB
 +
Pghjb25zdGFudALHAAAADWZhY3RvcnkuY3JhZnQIY29uc3RhbnQEDm1hY2hpbmUuY3V0dGVyDWxvY2Fs
 +
LmludC5nZXQIY29uc3RhbnQEBHRpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQ=
 +
|src=
 +
; Cutter
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
 +
tier = global.int.get("craft_tier:2.5")
 +
count = global.double.get("craft_count:2.5")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 +
 +
executesync("craft 2:5:in")
 +
 +
; blocks = count * floor((64400000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.4", tier)
 +
global.double.set("craft_count:3.4", count * floor((64400000001.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("block", tier))
 +
executesync("craft 3:4")
 +
 +
; denseplates = count * floor((22244333331.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.3", tier)
 +
global.double.set("craft_count:3.3", count * floor((22244333331.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("plate.dense", tier))
 +
executesync("craft 3:3")
 +
 +
; plates = count * floor((00022222221.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.2", tier)
 +
global.double.set("craft_count:3.2", count * floor((00022222221.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("plate", tier))
 +
executesync("craft 3:2")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
craft("machine.cutter", tier, count)
 +
}}
 +
 +
|-
 +
|craft 2:5:in
 +
|17
 +
|{{AIScript
 +
|code=
 +
DGNyYWZ0IDI6NTppbgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 +
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
 +
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi41EGxvY2FsLmRv
 +
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
 +
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
 +
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9j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nN0YW50BAVtb3Rvcg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50
 +
BAR0aWVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQECWNyYWZ0IDM6OA==
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double ingots
 +
:local double chips
 +
:local int chiptier
 +
 +
tier = global.int.get("craft_tier:2.5")
 +
count = global.double.get("craft_count:2.5")
 +
 +
; Ingots
 +
ingots = 0.0 ; TODO
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
;global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Lower tier inputs
 +
global.int.set("craft_tier:2.5", tier - 1)
 +
global.double.set("craft_count:2.5", count - craft_inventory * count("machine.cutter", tier - 1))
 +
executesync("craft 2:5")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Restore state for this tier
 +
global.int.set("craft_tier:2.5", tier)
 +
global.double.set("craft_count:2.5", count)
 +
 +
:local double motors
 +
motors = count * floor((75555444431.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.8", tier)
 +
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
 +
executesync("craft 3:8")
 +
}}
 +
 +
|-
 +
|craft 2:5:plates
 +
|12
 +
|{{AIScript
 +
|code=
 +
EGNyYWZ0IDI6NTpwbGF0ZXMAAAAAAAAAAAwAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
 +
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjUQbG9jYWwuZG91YmxlLnNldAhjb25z
 +
dGFudAQFY291bnQRZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjIuNQ5nZW5l
 +
cmljLmdvdG9pZghjb25zdGFudAJjAAAAD2NvbXBhcm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yOjMuMg1sb2NhbC5p
 +
bnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BA9jcmFmdF9jb3Vu
 +
dDozLjIRYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhj
 +
b25zdGFudAQFY291bnQIY29uc3RhbnQEASoMZG91YmxlLmZsb29yEWFyaXRobWV0aWMuZG91YmxlEWFy
 +
aXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAAANBYMXVBCGNvbnN0YW50BAEvEWFyaXRobWV0aWMuZG91
 +
YmxlCGNvbnN0YW50AwAAAAAAACRACGNvbnN0YW50BANwb3cDaTJkDWxvY2FsLmludC5nZXQIY29uc3Rh
 +
bnQEBHRpZXIIY29uc3RhbnQEA21vZAhjb25zdGFudAMAAAAAAAAkQAhjb25zdGFudAQBLRFhcml0aG1l
 +
dGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0
 +
YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBXBsYXRlDWxvY2FsLmludC5nZXQIY29u
 +
c3RhbnQEBHRpZXITZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQJY3JhZnQgMzoy
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
 +
tier = global.int.get("craft_tier:2.5")
 +
count = global.double.get("craft_count:2.5")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 +
 +
; blocks = count * floor((64400000001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.4", tier)
 +
global.double.set("craft_count:3.4", count * floor((64400000001.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("block", tier))
 +
executesync("craft 3:4")
 +
 +
; denseplates = count * floor((22244333331.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.3", tier)
 +
global.double.set("craft_count:3.3", count * floor((22244333331.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("plate.dense", tier))
 +
executesync("craft 3:3")
 +
 +
; plates = count * floor((00022222221.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.2", tier)
 +
global.double.set("craft_count:3.2", count * floor((00022222221.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("plate", tier))
 +
executesync("craft 3:2")
 +
}}
 +
|}
 +
 
|-
 
|-
 
|6
 
|6
Line 587: Line 1,134:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|-
 +
|craft 2:6
 +
|17
 +
|{{AIScript
 +
|code=
 +
CWNyYWZ0IDI6NgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
 +
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
 +
b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi42DmdlbmVyaWMuZ290
 +
b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29u
 +
LmJvb2wOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQB
 +
PAhjb25zdGFudAIBAAAACGNvbnN0YW50BAF8DmNvbXBhcmlzb24uaW50DWxvY2FsLmludC5nZXQIY29u
 +
c3RhbnQEBHRpZXIIY29uc3RhbnQEAT4IY29uc3RhbnQCCgAAAAhjb25zdGFudAQBfBFjb21wYXJpc29u
 +
LmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50B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udAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0
 +
YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBHdpcmUNbG9jYWwuaW50LmdldAhjb25z
 +
dGFudAQEdGllcghjb25zdGFudAQIcmVmaW5lcnkRZ2VuZXJpYy53YWl0dW50aWwRY29tcGFyaXNvbi5k
 +
b3VibGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEd2lyZQ1sb2NhbC5pbnQuZ2V0CGNvbnN0
 +
YW50BAR0aWVyCGNvbnN0YW50BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAV3aXJlcw1mYWN0
 +
b3J5LmNyYWZ0CGNvbnN0YW50BA9tYWNoaW5lLnByZXNzZXINbG9jYWwuaW50LmdldAhjb25zdGFudAQE
 +
dGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
 +
|src=
 +
; Presser
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
 +
tier = global.int.get("craft_tier:2.6")
 +
count = global.double.get("craft_count:2.6")
 +
gotoif(99, tier < 1 | tier > 10 | count < 1.0 | global.int.get("craft_status") > 199)
 +
 +
executesync("craft 2:6:in")
 +
 +
; blocks = count * floor((55555400001.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.4", tier)
 +
global.double.set("craft_count:3.4", count * floor((55555400001.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("block", tier))
 +
executesync("craft 3:4")
 +
 +
; plates = count * floor((99999777541.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
global.int.set("craft_tier:3.2", tier)
 +
global.double.set("craft_count:3.2", count * floor((99999777541.0 / (10.0 ^ i2d(tier))) % 10.0) - craft_inventory * count("plate", tier))
 +
executesync("craft 3:2")
 +
 +
:local double wires
 +
wires = count * floor((33333222111.0 / (10.0 ^ i2d(tier))) % 10.0)
 +
waitwhile(active("refinery"))
 +
produce("ingot", tier, ceil((wires - craft_inventory * (count("cable", tier) + count("wire", tier))) / 2.0), "refinery")
 +
waitwhile(active("refinery"))
 +
produce("cable", tier, wires - craft_inventory * count("wire", tier), "refinery")
 +
 +
waituntil(count("wire", tier) >= wires)
 +
craft("machine.presser", tier, count)
 +
}}
 +
 +
|-
 +
|
 +
|
 +
|{{AIScript
 +
|code=
 +
craft 2:6:in
 +
0 0 22
 +
DGNyYWZ0IDI6NjppbgAAAAAAAAAAFgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
 +
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
 +
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi42EGxvY2FsLmRv
 +
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
 +
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
 +
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdBFhcml0aG1ldGljLmRvdWJsZRBs
 +
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAZpbmdvdHMIY29uc3RhbnQEAS0TZmFjdG9yeS5pdGVtcy5j
 +
b3VudAhjb25zdGFudAQFaW5nb3QNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchNnZW5lcmljLmV4
 +
ZWN1dGVzeW5jCGNvbnN0YW50BAtjcmFmdCBpbmdvdA5nZW5lcmljLmdvdG9pZghjb25zdGFudAJjAAAA
 +
DmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29uc3Rh
 +
bnQEAT4IY29u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lcmljLmNsaWNrDnZlYy5mcm9tQ29vcmRzEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0
 +
YW50A7gehetRuO4/CGNvbnN0YW50BAEqA2kyZAxzY3JlZW4ud2lkdGgRYXJpdGhtZXRpYy5kb3VibGUI
 +
Y29uc3RhbnQDXI/C9Shc3z8IY29uc3RhbnQEASoDaTJkDXNjcmVlbi5oZWlnaHQNZ2VuZXJpYy5jbGlj
 +
aw52ZWMuZnJvbUNvb3JkcxFhcml0aG1ldGljLmRvdWJsZQhjb25zdGFudANSuB6F61HoPwhjb25zdGFu
 +
dAQBKgNpMmQMc2NyZWVuLndpZHRoEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAAAAAAAOg/CGNv
 +
bnN0YW50BAEqA2kyZA1zY3JlZW4uaGVpZ2h0DGdlbmVyaWMud2FpdAhjb25zdGFudAMAAAAAAADgPw1n
 +
ZW5lcmljLmNsaWNrDnZlYy5mcm9tQ29vcmRzEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50A1K4HoXr
 +
Ueg/CGNvbnN0YW50BAEqA2kyZAxzY3JlZW4ud2lkdGgRYXJpdGhtZXRpYy5kb3VibGUIY29uc3RhbnQD
 +
AAAAAAAA6D8IY29uc3RhbnQEASoDaTJkDXNjcmVlbi5oZWlnaHQ=
 +
|src=
 +
:global double craft_inventory
 +
:local int tier
 +
:local double count
 +
:local double ingots
 +
 +
tier = global.int.get("craft_tier:2.6")
 +
count = global.double.get("craft_count:2.6")
 +
 +
; Ingots
 +
ingots = 0.0 ; TODO
 +
global.int.set("craft_tier:ingot", tier)
 +
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
 +
;global.int.set("craft_verify:ingot", 1)
 +
executesync("craft ingot")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Lower tier inputs
 +
global.int.set("craft_tier:2.6", tier - 1)
 +
global.double.set("craft_count:2.6", count - craft_inventory * count("machine.presser", tier - 1))
 +
executesync("craft 2:6")
 +
gotoif(99, global.int.get("craft_status") > 199)
 +
 +
; Restore state for this tier
 +
global.int.set("craft_tier:2.6", tier)
 +
global.double.set("craft_count:2.6", count)
 +
 +
; chips
 +
;:local double chips
 +
; chips = count * 2.0
 +
:local int chiptier
 +
chiptier = d2i(floor((44332221111.0 / (10.0 ^ i2d(tier))) % 10.0))
 +
global.int.set("craft_tier:3.1", chiptier)
 +
global.double.set("craft_count:3.1", count * 2.0 - craft_inventory * count("chip", chiptier))
 +
executesync("craft 3:1")
 +
 +
gotoif(99, global.int.get("craft_status") > 199 | tier > 1)
 +
; Tier 1 has to buy hammers!
 +
click(vec(0.96 * i2d(width()), 0.49 * i2d(height())))
 +
click(vec(0.76 * i2d(width()), 0.75 * i2d(height())))
 +
wait(0.5)
 +
click(vec(0.76 * i2d(width()), 0.75 * i2d(height())))
 +
}}
 +
|}
 +
 
|-
 
|-
 
|7
 
|7
Line 592: Line 1,331:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|}
 +
 
|-
 
|-
 
|8
 
|8
Line 597: Line 1,342:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|}
 +
 
|-
 
|-
 
|9
 
|9
Line 602: Line 1,353:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|}
 +
 
|-
 
|-
 
|10
 
|10
Line 607: Line 1,364:
 
(pic)
 
(pic)
 
|
 
|
 +
{| class="wikitable"
 +
!Name
 +
!Lines
 +
!Code
 +
|}
 +
 
|}
 
|}

Revision as of 07:36, 22 January 2021

Machine scripts

Output Machine Scripts
1 oven

(pic)

Name Lines Code
craft 2:1 16
CWNyYWZ0IDI6MQAAAAAAAAAAEAAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aW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1zLmNvdW50
CGNvbnN0YW50BAVibG9jaw1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAI+PRBs
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAZibG9ja3MIY29uc3RhbnQEASYRY29tcGFyaXNvbi5kb3Vi
bGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQPY2FibGUuaW5zdWxhdGVkDWxvY2FsLmludC5n
ZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQEAj49EGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQEBmNh
Ymxlcw1mYWN0b3J5LmNyYWZ0CGNvbnN0YW50BAxtYWNoaW5lLm92ZW4NbG9jYWwuaW50LmdldAhjb25z
dGFudAQEdGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
; Oven
:global double craft_inventory
:local int tier
:local double count
:local double plates
:local double blocks
:local double cables

tier = global.int.get("craft_tier:2.1")
count = global.double.get("craft_count:2.1")
gotoif(99, tier < 1


craft 2:1:in 18
DGNyYWZ0IDI6MTppbgAAAAAAAAAAEgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi4xEGxvY2FsLmRv
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdBFhcml0aG1ldGljLmRvdWJsZRBs
b2N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wuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3Rh
dHVzCGNvbnN0YW50BAE+CGNvbnN0YW50AscAAAAOZ2xvYmFsLmludC5zZXQIY29uc3RhbnQEEGNyYWZ0
X3RpZXI6aW5nb3QNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchFnbG9iYWwuZG91YmxlLnNldAhj
b25zdGFudAQRY3JhZnRfY291bnQ6aW5nb3QRYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdl
dAhjb25zdGFudAQGaW5nb3RzCGNvbnN0YW50BAEtE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQE
BWluZ290DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXITZ2VuZXJpYy5leGVjdXRlc3luYwhjb25z
dGFudAQLY3JhZnQgaW5nb3QOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCYwAAAA5jb21wYXJpc29uLmlu
dA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0YW50
AscAAAAOZ2xvYmFsLmludC5zZXQIY29uc3RhbnQEDmNyYWZ0X3RpZXI6Mi4xDWxvY2FsLmludC5nZXQI
Y29uc3RhbnQEBHRpZXIRZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjIuMRBs
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
:global double craft_inventory
:local int tier
:local double count
:local double plates
:local double blocks
:local double cables
:local double ingots

tier = global.int.get("craft_tier:2.1")
count = global.double.get("craft_count:2.1")


; Verify ingots
;plates = count * round((88888888640.0 / (10.0 ^ i2d(tier))) % 10.0)
;blocks = count * round((22222000000.0 / (10.0 ^ i2d(tier))) % 10.0)
;cables = count * round((44444333220.0 / (10.0 ^ i2d(tier))) % 10.0)

ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.1", tier - 1)
global.double.set("craft_count:2.1", count - craft_inventory * count("machine.oven", tier - 1))
executesync("craft 2:1")
gotoif(99, global.int.get("craft_status") > 199)

; Craft ingots
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.1", tier)
global.double.set("craft_count:2.1", count)
craft 2:1:plates 11
EGNyYWZ0IDI6MTpwbGF0ZXMAAAAAAAAAAAsAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjEQbG9jYWwuZG91YmxlLnNldAhjb25z
dGFudAQFY291bnQRZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjIuMRBsb2Nh
bC5kb3VibGUuc2V0CGNvbnN0YW50BAZibG9ja3MRYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91Ymxl
LmdldAhjb25zdGFudAQFY291bnQIY29uc3RhbnQEASoMZG91YmxlLmZsb29yEWFyaXRobWV0aWMuZG91
YmxlEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAABD4jshRCCGNvbnN0YW50BAEvEWFyaXRobWV0
aWMuZG91YmxlCGNvbnN0YW50AwAAAAAAACRACGNvbnN0YW50BANwb3cDaTJkDWxvY2FsLmludC5nZXQI
Y29uc3RhbnQEBHRpZXIIY29uc3RhbnQEA21vZAhjb25zdGFudAMAAAAAAAAkQBBsb2NhbC5kb3VibGUu
c2V0CGNvbnN0YW50BAZwbGF0ZXMRYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhjb25z
dGFudAQFY291bnQIY29uc3Rhbn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Uu
YWN0aXZlCGNvbnN0YW50BAdwcmVzc2VyD2ZhY3RvcnkucHJvZHVjZQhjb25zdGFudAQFaW5nb3QNbG9j
YWwuaW50LmdldAhjb25zdGFudAQEdGllchFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0
CGNvbnN0YW50BAZwbGF0ZXMIY29uc3RhbnQEAS0RYXJpdGhtZXRpYy5kb3VibGURZ2xvYmFsLmRvdWJs
ZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNv
dW50CGNvbnN0YW50BAVwbGF0ZQ1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAdw
cmVzc2VyDmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6Mi4xDmFyaXRobWV0aWMu
aW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFmdF9zdGF0dXM6Mi4xCGNvbnN0YW50BAErCGNv
bnN0YW50AgIAAAA=
:global double craft_inventory
:local int tier
:local double count
:local double blocks
:local double plates

tier = global.int.get("craft_tier:2.1")
count = global.double.get("craft_count:2.1")

blocks = count * floor((22222000001.0 / (10.0 ^ i2d(tier))) % 10.0)
plates = count * floor((88888888641.0 / (10.0 ^ i2d(tier))) % 10.0)

global.int.set("craft_tier:3.4", tier)
global.double.set("craft_count:3.4", blocks - craft_inventory * count("block", tier))
executesync("craft 3:4")

plates: gotoif(end, plates < craft_inventory * count("plate", tier))
  waitwhile(active("presser"))
  produce("ingot", tier, plates - craft_inventory * count("plate", tier), "presser")

end: global.int.set("craft_status:2.1", global.int.get("craft_status:2.1") + 2)
2 assembler

(pic)

Name Lines Code
craft 2:2 17
CWNyYWZ0IDI6MgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0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bnQuc2V0CGNvbnN0YW50BA5jcmFmdF90aWVy
OjMuOA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50
BA9jcmFmdF9jb3VudDozLjgRYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhjb25zdGFu
dAQGbW90b3JzCGNvbnN0YW50BAEtEWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNv
bnN0YW50BA9jcmFmdF9pbnZlbnRvcnkIY29uc3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25z
dGFudAQFbW90b3INbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchNnZW5lcmljLmV4ZWN1dGVzeW5j
CGNvbnN0YW50BAljcmFmdCAzOjgOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCYwAAAA5jb21wYXJpc29u
LmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0
YW50AscAAAATZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQQY3JhZnQgMjoyOnBsYXRlcw1mYWN0
b3J5LmNyYWZ0CGNvbnN0YW50BBFtYWNoaW5lLmFzc2VtYmxlcg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50
BAR0aWVyEGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQEBWNvdW50
; Assembler
:global double craft_inventory
:local int tier
:local double count
:local double motors
:local double chips
:local int chiptier

tier = global.int.get("craft_tier:2.2")
count = global.double.get("craft_count:2.2")
gotoif(99, tier < 1


craft 2:2:in 13
DGNyYWZ0IDI6MjppbgAAAAAAAAAADQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMhBsb2NhbC5kb3VibGUuc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0ZW1zLmNvdW50CGNvbnN0YW50BBFtYWNoaW5lLmFzc2VtYmxlcg5h
cml0aG1ldGljLmludA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAEtCGNvbnN0
YW50AgEAAAATZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQJY3JhZnQgMjoyDmdlbmVyaWMuZ290
b2lmCGNvbnN0YW50AmMAAAAOY29tcGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEDGNy
YWZ0X3N0YXR1cwhjb25zdGFudAQBPghjb25zdGFudALHAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50
BA5jcmFmdF90aWVyOjIuMg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2JhbC5kb3VibGUu
c2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDoyLjIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291
bnQ=
:global double craft_inventory
:local int tier
:local double count
:local double plates
:local double blocks
:local double cables
:local double ingots

tier = global.int.get("craft_tier:2.2")
count = global.double.get("craft_count:2.2")

; Ingots
ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
;global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.2", tier - 1)
global.double.set("craft_count:2.2", count - craft_inventory * count("machine.assembler", tier - 1))
executesync("craft 2:2")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.2", tier)
global.double.set("craft_count:2.2", count)


craft 2:2:plates 20
EGNyYWZ0IDI6MjpwbGF0ZXMAAAAAAAAAABQAAAANbG9jYWwuaW50LnNldAhjb25zdGFudAQEdGllcg5n
bG9iYWwuaW50LmdldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjIQbG9jYWwuZG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AAAAAAAAAA=
:global double craft_inventory
:local int tier
:local double count
:local double plates
:local double pipes
:local double rawplates

tier = global.int.get("craft_tier:2.2")
count = global.double.get("craft_count:2.2")

plates = count * 2.0 * floor((66555444331.0 / (10.0 ^ i2d(tier))) % 10.0)
gotoif(x, tier != 2) ; only 5 plates for T2
plates = plates - 1.0
x: pipes = count * ceil(i2d(tier) / 5.0)

rawplates = max(0.0, plates * 9.0 - craft_inventory * (count("plate.dense", tier) + count("plate.stack", tier))) + max(0.0, pipes - craft_inventory * count("pipe", tier))
gotoif(plates, rawplates <= craft_inventory * count("plate", tier))
  waitwhile(active("presser"))
  produce("ingot", tier, rawplates - craft_inventory * count("plate", tier), "presser")
  waitwhile(active("presser"))

plates: gotoif(pipes, plates <= craft_inventory * count("plate.dense", tier))
  craft("plate.stack", tier, plates - craft_inventory * (count("plate.stack", tier) + count("plate.dense", tier)))
  waitwhile(active("presser"))
  produce("plate.stack", tier, plates - craft_inventory * count("plate.dense", tier), "presser")
  
pipes: gotoif(end, pipes <= craft_inventory * count("pipe", tier))
  waitwhile(active("shaper"))
  produce("plate", tier, pipes - craft_inventory * count("pipe", tier), "shaper")

end: waituntil(count("plate.dense", tier) >= plates & count("pipe", tier) >= pipes)
wait(0.0)
3 refiner

(pic)

Name Lines Code
craft 2:3 16
CWNyYWZ0IDI6MwAAAAAAAAAAEAAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMxBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi4zDmdlbmVyaWMuZ290
b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29u
LmJvb2wOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAh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VudG9yeQhjb25zdGFudAQBKhNm
YWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVtb3Rvcg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0
aWVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQECWNyYWZ0IDM6OA5nZW5lcmljLmdvdG9pZghj
b25zdGFudAJjAAAADmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BAxjcmFmdF9z
dGF0dXMIY29uc3RhbnQEAT4IY29uc3RhbnQCxwAAABNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50
BA5jcmFmdCAyOjM6bWlzYw1mYWN0b3J5LmNyYWZ0CGNvbnN0YW50BBBtYWNoaW5lLnJlZmluZXJ5DWxv
Y2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQ=
; Refiner
:global double craft_inventory
:local int tier
:local double count
:local double motors
:local double pumps

tier = global.int.get("craft_tier:2.3")
count = global.double.get("craft_count:2.3")
gotoif(99, tier < 1


craft 2:3:in 17
DGNyYWZ0IDI6MzppbgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuMxBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi4zEGxvY2FsLmRv
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9jb3Vud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Y3JhZnQgMzox
:global double craft_inventory
:local int tier
:local double count
:local double ingots
:local int chiptier

tier = global.int.get("craft_tier:2.3")
count = global.double.get("craft_count:2.3")

; Ingots
ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
;global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.3", tier - 1)
global.double.set("craft_count:2.3", count - craft_inventory * count("machine.refinery", tier - 1))
executesync("craft 2:3")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.3", tier)
global.double.set("craft_count:2.3", count)

; chips
; chips = count * 2.0
chiptier = d2i(floor((54432222111.0 / (10.0 ^ i2d(tier))) % 10.0))
global.int.set("craft_tier:3.1", chiptier)
global.double.set("craft_count:3.1", count * 2.0 - craft_inventory * count("chip", chiptier))
executesync("craft 3:1")


craft 2:3:misc 18 {{AIScript code=

DmNyYWZ0IDI6MzptaXNjAAAAAAAAAAASAAAADWxvY2FsLmludC5zZXQIY29uc3RhbnQEBHRpZXIOZ2xv YmFsLmludC5nZXQIY29uc3RhbnQEDmNyYWZ0X3RpZXI6Mi4zEGxvY2FsLmRvdWJsZS5zZXQIY29uc3Rh bnQEBWNvdW50EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BA9jcmFmdF9jb3VudDoyLjMQbG9jYWwu ZG91YmxlLnNldAhjb25zdGFudAQGYmxvY2tzEWFyaXRobWV0aWMuZG91YmxlEGxvY2FsLmRvdWJsZS5n ZXQIY29uc3RhbnQEBWNvdW50CGNvbnN0YW50BAEqDGRvdWJsZS5mbG9vchFhcml0aG1ldGljLmRvdWJs ZRFhcml0aG1ldGljLmRvdWJsZQhjb25zdGFudAMAAIGDIZcxQghjb25zdGFudAQBLxFhcml0aG1ldGlj LmRvdWJsZQhjb25zdGFudAMAAAAAAAAkQAhjb25zdGFudAQDcG93A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mNvdW50CGNvbnN0YW50BARyaW5nDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRp ZXIIY29uc3RhbnQEBnNoYXBlchFnZW5lcmljLndhaXR1bnRpbBFjb21wYXJpc29uLmRvdWJsZRNmYWN0 b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARyaW5nDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXII Y29uc3RhbnQEAj49EGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQEBXJpbmdzDGdlbmVyaWMud2FpdAhj b25zdGFudAMAAAAAAAAAAA==

src=
global double craft_inventory
local int tier
local double count
local double blocks
local double rings

tier = global.int.get("craft_tier:2.3") count = global.double.get("craft_count:2.3")

denseplates = count * 4.0

blocks = count * floor((75550000001.0 / (10.0 ^ i2d(tier))) % 10.0) rings = count * floor( (53333322211.0 / (10.0 ^ i2d(tier))) % 10.0)

global.int.set("craft_tier:3.4", tier) global.double.set("craft_count:3.4", blocks - craft_inventory * count("block", tier)) executesync("craft 3:4")

global.int.set("craft_tier:3.3", tier) global.double.set("craft_count:3.3", count * 4.0 - craft_inventory * count("plate.dense", tier)) executesync("craft 3:3")

plates: gotoif(rings, rings <= craft_inventory * (count("ring", tier) + count("rod", tier)))

 waitwhile(active("shaper"))
 produce("ingot", tier, ceil((rings - craft_inventory * (count("ring", tier) + count("rod", tier)))/2.0), "shaper")

rings: gotoif(end, rings <= craft_inventory * count("ring", tier))

 waitwhile(active("shaper"))
 produce("rod", tier, rings - craft_inventory * count("ring", tier), "shaper")
 

end: waituntil(count("ring", tier) >= rings) wait(0.0)

4 crusher

(pic)

Name Lines Code
craft 2:4 14
CWNyYWZ0IDI6NAAAAAAAAAAADgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNBBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
b3VudBFnbG9iYW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ZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BA9jcmFm
dF9pbnZlbnRvcnkIY29uc3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQLcGxhdGUu
ZGVuc2UNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0
YW50BAljcmFmdCAzOjMOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCYwAAAA5jb21wYXJpc29uLmludA5n
bG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50BAE+CGNvbnN0YW50AscA
AAANZmFjdG9yeS5jcmFmdAhjb25zdGFudAQPbWFjaGluZS5jcnVzaGVyDWxvY2FsLmludC5nZXQIY29u
c3RhbnQEBHRpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQFY291bnQ=
src=
; Crusher
:global double craft_inventory
:local int tier
:local double count
:local double motors
:local double denseplates

tier = global.int.get("craft_tier:2.4")
count = global.double.get("craft_count:2.4")
gotoif(99, tier < 1


craft 2:4:in 18
DGNyYWZ0IDI6NDppbgAAAAAAAAAAEgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNBBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi40EGxvY2FsLmRv
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdB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XRpYy5kb3VibGUQbG9j
YWwuZG91YmxlLmdldAhjb25zdGFudAQFY2hpcHMIY29uc3RhbnQEAS0RYXJpdGhtZXRpYy5kb3VibGUR
Z2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQBKhNmYWN0
b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARjaGlwDWxvY2FsLmludC5nZXQIY29uc3RhbnQECGNoaXB0
aWVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQECWNyYWZ0IDM6MQ==
:global double craft_inventory
:local int tier
:local double count
:local double ingots
:local double chips
:local int chiptier

tier = global.int.get("craft_tier:2.4")
count = global.double.get("craft_count:2.4")

; Ingots
ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
;global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.4", tier - 1)
global.double.set("craft_count:2.4", count - craft_inventory * count("machine.crusher", tier - 1))
executesync("craft 2:4")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.4", tier)
global.double.set("craft_count:2.4", count)

; chips
chips = count * floor((33322222211.0 / (10.0 ^ i2d(tier))) % 10.0)
chiptier = d2i(floor((44222221111.0 / (10.0 ^ i2d(tier))) % 10.0))
global.int.set("craft_tier:3.1", chiptier)
global.double.set("craft_count:3.1", chips - craft_inventory * count("chip", chiptier))
executesync("craft 3:1")
5 cutter

(pic)

Name Lines Code
craft 2:5 15
CWNyYWZ0IDI6NQAAAAAAAAAADwAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p
bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj
b3VudBFnbG9iYWw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ft_inventory
:local int tier
:local double count

tier = global.int.get("craft_tier:2.5")
count = global.double.get("craft_count:2.5")
gotoif(99, tier < 1


craft 2:5:in 17
DGNyYWZ0IDI6NTppbgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2Jh
bC5pbnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjIuNRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50
BAVjb3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6Mi41EGxvY2FsLmRv
dWJsZS5zZXQIY29uc3RhbnQEBmluZ290cwhjb25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhj
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2Jh
bC5kb3VibGUuc2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdBFhcml0aG1ldGljLmRvdWJsZRBs
b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAZpbmdvdHMIY29uc3RhbnQEAS0TZmFjdG9yeS5pdGVtcy5j
b3VudAhjb25zdGFudAQFaW5nb3QNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchNnZW5lcmljLmV4
ZWN1dGVzeW5jCGNvbnN0YW50BAtjcmFmdCBpbmdvdA5nZW5lcmljLmdvdG9pZghjb25zdGFudAJjAAAA
DmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29uc3Rh
bnQEAT4IY29uc3RhbnQCxwAAAA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQOY3JhZnRfdGllcjoyLjUO
YXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQBLQhjb25z
dGFudAIBAAAAEWdsb2JhbC5kb3VibGUu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nQu
Z2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BANtb2QIY29uc3RhbnQDAAAAAAAAJEAOZ2xvYmFsLmlu
dC5zZXQIY29uc3RhbnQEDmNyYWZ0X3RpZXI6My44DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIR
Z2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2NyYWZ0X2NvdW50OjMuOBFhcml0aG1ldGljLmRvdWJs
ZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAZtb3RvcnMIY29uc3RhbnQEAS0RYXJpdGhtZXRpYy5k
b3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeQhjb25zdGFudAQB
KhNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVtb3Rvcg1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50
BAR0aWVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQECWNyYWZ0IDM6OA==
:global double craft_inventory
:local int tier
:local double count
:local double ingots
:local double chips
:local int chiptier

tier = global.int.get("craft_tier:2.5")
count = global.double.get("craft_count:2.5")

; Ingots
ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
;global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.5", tier - 1)
global.double.set("craft_count:2.5", count - craft_inventory * count("machine.cutter", tier - 1))
executesync("craft 2:5")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.5", tier)
global.double.set("craft_count:2.5", count)

:local double motors
motors = count * floor((75555444431.0 / (10.0 ^ i2d(tier))) % 10.0)
global.int.set("craft_tier:3.8", tier)
global.double.set("craft_count:3.8", motors - craft_inventory * count("motor", tier))
executesync("craft 3:8")


craft 2:5:plates 12
EGN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2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEC3BsYXRlLmRl
bnNlDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXITZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFu
dAQJY3JhZnQgMzozDmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjMuMg1sb2NhbC5p
bnQuZ2V0CGNvbnN0YW50BAR0aWVyEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BA9jcmFmdF9jb3Vu
dDozLjIRYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhj
b25zdGFudAQFY291bnQIY29uc3RhbnQEASoMZG91YmxlLmZsb29yEWFyaXRobWV0aWMuZG91YmxlEWFy
aXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAAANBYMXVBCGNvbnN0YW50BAEvEWFyaXRobWV0aWMuZG91
YmxlCGNvbnN0YW50AwAAAAAAACRACGNvbnN0YW50BANwb3cDaTJkDWxvY2FsLmludC5nZXQIY29uc3Rh
bnQEBHRpZXIIY29uc3RhbnQEA21vZAhjb25zdGFudAMAAAAAAAAkQAhjb25zdGFudAQBLRFhcml0aG1l
dGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0
YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBXBsYXRlDWxvY2FsLmludC5nZXQIY29u
c3RhbnQEBHRpZXITZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQJY3JhZnQgMzoy
:global double craft_inventory
:local int tier
:local double count

tier = global.int.get("craft_tier:2.5")
count = global.double.get("craft_count:2.5")
gotoif(99, tier < 1
6 presser

(pic)

Name Lines Code
craft 2:6 17
CWNyYWZ0IDI6NgAAAAAAAAAAEQAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW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YW50BAR3aXJlDWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXII
Y29uc3RhbnQEAS8IY29uc3RhbnQDAAAAAAAAAEAIY29uc3RhbnQECHJlZmluZXJ5EWdlbmVyaWMud2Fp
dHdoaWxlFmZhY3RvcnkubWFjaGluZS5hY3RpdmUIY29uc3RhbnQECHJlZmluZXJ5D2ZhY3RvcnkucHJv
ZHVjZQhjb25zdGFudAQFY2FibGUNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchFhcml0aG1ldGlj
LmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAV3aXJlcwhjb25zdGFudAQBLRFhcml0aG1l
dGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0
YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBHdpcmUNbG9jYWwuaW50LmdldAhjb25z
dGFudAQEdGllcghjb25zdGFudAQIcmVmaW5lcnkRZ2VuZXJpYy53YWl0dW50aWwRY29tcGFyaXNvbi5k
b3VibGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEd2lyZQ1sb2NhbC5pbnQuZ2V0CGNvbnN0
YW50BAR0aWVyCGNvbnN0YW50BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAV3aXJlcw1mYWN0
b3J5LmNyYWZ0CGNvbnN0YW50BA9tYWNoaW5lLnByZXNzZXINbG9jYWwuaW50LmdldAhjb25zdGFudAQE
dGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudA==
; Presser
:global double craft_inventory
:local int tier
:local double count

tier = global.int.get("craft_tier:2.6")
count = global.double.get("craft_count:2.6")
gotoif(99, tier < 1


craft 2:6:in
0 0 22
DGNyYWZ0IDI6NjppbgAAAAAAAAAAFgAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb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VpZ2h0DGdlbmVyaWMud2FpdAhjb25zdGFudAMAAAAAAADgPw1n
ZW5lcmljLmNsaWNrDnZlYy5mcm9tQ29vcmRzEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50A1K4HoXr
Ueg/CGNvbnN0YW50BAEqA2kyZAxzY3JlZW4ud2lkdGgRYXJpdGhtZXRpYy5kb3VibGUIY29uc3RhbnQD
AAAAAAAA6D8IY29uc3RhbnQEASoDaTJkDXNjcmVlbi5oZWlnaHQ=
:global double craft_inventory
:local int tier
:local double count
:local double ingots

tier = global.int.get("craft_tier:2.6")
count = global.double.get("craft_count:2.6")

; Ingots
ingots = 0.0 ; TODO
global.int.set("craft_tier:ingot", tier)
global.double.set("craft_count:ingot", ingots - count("ingot", tier))
;global.int.set("craft_verify:ingot", 1)
executesync("craft ingot")
gotoif(99, global.int.get("craft_status") > 199)

; Lower tier inputs
global.int.set("craft_tier:2.6", tier - 1)
global.double.set("craft_count:2.6", count - craft_inventory * count("machine.presser", tier - 1))
executesync("craft 2:6")
gotoif(99, global.int.get("craft_status") > 199)

; Restore state for this tier
global.int.set("craft_tier:2.6", tier)
global.double.set("craft_count:2.6", count)

; chips
;:local double chips
; chips = count * 2.0
:local int chiptier
chiptier = d2i(floor((44332221111.0 / (10.0 ^ i2d(tier))) % 10.0))
global.int.set("craft_tier:3.1", chiptier)
global.double.set("craft_count:3.1", count * 2.0 - craft_inventory * count("chip", chiptier))
executesync("craft 3:1")

gotoif(99, global.int.get("craft_status") > 199
7 mixer

(pic)

Name Lines Code
8 belt

(pic)

Name Lines Code
9 shaper

(pic)

Name Lines Code
10 boiler

(pic)

Name Lines Code