Difference between revisions of "User:Troylaurin"
Jump to navigation
Jump to search
Troylaurin (talk | contribs) m |
Troylaurin (talk | contribs) (All parts) |
||
Line 654: | Line 654: | ||
:local double circuit_lo | :local double circuit_lo | ||
:local double circuit_hi | :local double circuit_hi | ||
− | |||
− | |||
tier = global.int.get("craft_tier:3.1") | tier = global.int.get("craft_tier:3.1") | ||
Line 690: | Line 688: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | CWNyYWZ0IDM6MQAAAAAAAAAAEwAAAA1sb2NhbC5pbnQuc2V0CGNvbnN0YW50BAR0aWVyDmdsb2JhbC5p | |
− | + | bnQuZ2V0CGNvbnN0YW50BA5jcmFmdF90aWVyOjMuMRBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAVj | |
− | + | b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfY291bnQ6My4xDmdlbmVyaWMuZ290 | |
− | + | b2lmCGNvbnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA5jb21wYXJpc29u | |
− | + | LmludA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAE8CGNvbnN0YW50AgEAAAAI | |
− | + | Y29uc3RhbnQEAXwOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25z | |
− | + | dGFudAQBPghjb25zdGFudAIKAAAACGNvbnN0YW50BAF8EWNvbXBhcmlzb24uZG91YmxlEGxvY2FsLmRv | |
− | + | dWJsZS5nZXQIY29uc3RhbnQEBWNvdW50CGNvbnN0YW50BAE8CGNvbnN0YW50AwAAAAAAAPA/E2dlbmVy | |
− | + | aWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEDGNyYWZ0IDM6MTppbhBsb2NhbC5kb3VibGUuc2V0CGNvbnN0 | |
− | + | YW50BAhib2FyZF9sbxFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVj | |
− | + | b3VudAhjb25zdGFudAQBKgNpMmQOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQIY29uc3RhbnQC | |
− | + | mjANAAhjb25zdGFudAQBLw5hcml0aG1ldGljLmludAhjb25zdGFudAIKAAAACGNvbnN0YW50BANwb3cN | |
− | + | bG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQDbW9kCGNvbnN0YW50AgoAAAAQbG9j | |
− | + | YWwuZG91YmxlLnNldAhjb25zdGFudAQKY2lyY3VpdF9sbxFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5k | |
− | + | b3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQA5nbG9i | |
− | + | YWwuaW50LnNldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdA5hcml0aG1ldGljLmludA5hcml0aG1l | |
− | + | dGljLmludA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVyCGNvbnN0YW50BAEqCGNvbnN0YW50AgIA | |
− | + | AAAIY29uc3RhbnQEAS0IY29uc3RhbnQCAQAAABFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQRY3Jh | |
− | + | ZnRfY291bnQ6aW5nb3QRYXJpdGhtZXRpYy5kb3VibGUKZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAA | |
− | + | ABFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAhib2FyZF9sbwhjb25z | |
− | + | dGFudAQBLRFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRf | |
− | + | aW52ZW50b3J5CGNvbnN0YW50BAEqEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQI | |
− | + | Y29uc3RhbnQEBXBsYXRlDmFyaXRobWV0aWMuaW50DmFyaXRobWV0aWMuaW50DWxvY2FsLmludC5nZXQI | |
− | + | Y29uc3RhbnQEBHRpZXIIY29uc3RhbnQEASoIY29uc3RhbnQCAgAAAAhjb25zdGFudAQBLQhjb25zdGFu | |
− | + | dAIBAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEDXBsYXRlLmNpcmN1 | |
− | + | aXQOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGll | |
− | + | cghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0YW50BAEtCGNvbnN0YW50AgEAAAAIY29uc3Rh | |
− | + | bnQEASsKZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAAAAtkb3VibGUuY2VpbBFhcml0aG1ldGljLmRv | |
− | + | dWJsZRFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BApjaXJjdWl0X2xv | |
− | + | CGNvbnN0YW50BAEtEWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BA9j | |
− | + | cmFmdF9pbnZlbnRvcnkIY29uc3RhbnQEASoRYXJpdGhtZXRpYy5kb3VibGUTZmFjdG9yeS5pdGVtcy5j | |
− | + | b3VudAhjb25zdGFudAQFY2FibGUOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50 | |
− | + | LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0YW50BAEtCGNv | |
− | + | bnN0YW50AgEAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQHY2lyY3Vp | |
− | + | dA5hcml0aG1ldGljLmludA5hcml0aG1ldGljLmludA1sb2NhbC5pbnQuZ2V0CGNvbnN0YW50BAR0aWVy | |
− | + | CGNvbnN0YW50BAEqCGNvbnN0YW50AgIAAAAIY29uc3RhbnQEAS0IY29uc3RhbnQCAQAAAAhjb25zdGFu | |
− | + | dAQBLwhjb25zdGFudAMAAAAAAAAAQBNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BAtjcmFmdCBp | |
− | + | bmdvdBBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BAhib2FyZF9oaRFhcml0aG1ldGljLmRvdWJsZRBs | |
− | + | b2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudAhjb25zdGFudAQBKgNpMmQOYXJpdGhtZXRpYy5p | |
− | + | bnQOYXJpdGhtZXRpYy5pbnQIY29uc3RhbnQCAigNAAhjb25zdGFudAQBLw5hcml0aG1ldGljLmludAhj | |
− | + | b25zdGFudAIKAAAACGNvbnN0YW50BANwb3cNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25z | |
− | + | dGFudAQDbW9kCGNvbnN0YW50AgoAAAAQbG9jYWwuZG91YmxlLnNldAhjb25zdGFudAQKY2lyY3VpdF9o | |
− | + | aRFhcml0aG1ldGljLmRvdWJsZRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAVjb3VudAhjb25zdGFu | |
− | + | dAQBKgNpMmQOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQIY29uc3RhbnQCpGwDAAhjb25zdGFu | |
− | + | dAQBLw5hcml0aG1ldGljLmludAhjb25zdGFudAIKAAAACGNvbnN0YW50BANwb3cNbG9jYWwuaW50Lmdl | |
− | + | dAhjb25zdGFudAQEdGllcghjb25zdGFudAQDbW9kCGNvbnN0YW50AgoAAAAOZ2xvYmFsLmludC5zZXQI | |
− | + | Y29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhjb25z | |
− | + | dGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAAEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0 | |
− | + | YW50BBFjcmFmdF9jb3VudDppbmdvdBFhcml0aG1ldGljLmRvdWJsZQpkb3VibGUubWF4CGNvbnN0YW50 | |
− | + | AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQECGJvYXJk | |
− | + | X2hpCGNvbnN0YW50BAEtEWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50 | |
− | + | BA9jcmFmdF9pbnZlbnRvcnkIY29uc3RhbnQEASoRYXJpdGhtZXRpYy5kb3VibGUTZmFjdG9yeS5pdGVt | |
− | + | cy5jb3VudAhjb25zdGFudAQFcGxhdGUOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFu | |
− | + | dAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMu | |
− | + | Y291bnQIY29uc3RhbnQEDXBsYXRlLmNpcmN1aXQOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhj | |
+ | b25zdGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0YW50BAErCmRvdWJsZS5t | ||
+ | YXgIY29uc3RhbnQDAAAAAAAAAAALZG91YmxlLmNlaWwRYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRp | ||
+ | Yy5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQKY2lyY3VpdF9oaQhjb25zdGFudAQBLRFh | ||
+ | cml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5 | ||
+ | CGNvbnN0YW50BAEqEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQE | ||
+ | BWNhYmxlDmFyaXRobWV0aWMuaW50DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQE | ||
+ | ASoIY29uc3RhbnQCAgAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAdj | ||
aXJjdWl0DmFyaXRobWV0aWMuaW50DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQE | aXJjdWl0DmFyaXRobWV0aWMuaW50DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQE | ||
− | + | ASoIY29uc3RhbnQCAgAAAAhjb25zdGFudAQBLwhjb25zdGFudAMAAAAAAAAAQBNnZW5lcmljLmV4ZWN1 | |
− | + | dGVzeW5jCGNvbnN0YW50BAtjcmFmdCBpbmdvdA5nZW5lcmljLmdvdG9pZghjb25zdGFudAJjAAAADmNv | |
− | + | bXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29uc3RhbnQE | |
− | + | AT4IY29uc3RhbnQCxwAAAA9nZW5lcmljLmV4ZWN1dGUIY29uc3RhbnQED2NyYWZ0IDM6MTpib2FyZA9n | |
− | + | ZW5lcmljLmV4ZWN1dGUIY29uc3RhbnQEEWNyYWZ0IDM6MTpjaXJjdWl0EWdlbmVyaWMud2FpdHVudGls | |
− | + | D2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29uLmJvb2wPY29tcGFyaXNvbi5ib29sEWNvbXBhcmlzb24u | |
− | + | ZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEDXBsYXRlLmNpcmN1aXQOYXJpdGhtZXRp | |
− | + | Yy5pbnQOYXJpdGhtZXRpYy5pbnQNbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQB | |
− | + | Kghjb25zdGFudAICAAAACGNvbnN0YW50BAEtCGNvbnN0YW50AgEAAAAIY29uc3RhbnQEAj49EGxvY2Fs | |
− | + | LmRvdWJsZS5nZXQIY29uc3RhbnQECGJvYXJkX2xvCGNvbnN0YW50BAEmEWNvbXBhcmlzb24uZG91Ymxl | |
− | + | E2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEDXBsYXRlLmNpcmN1aXQOYXJpdGhtZXRpYy5pbnQN | |
− | + | bG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0 | |
− | + | YW50BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAhib2FyZF9oaQhjb25zdGFudAQBJhFjb21w | |
− | + | YXJpc29uLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAdjaXJjdWl0DmFyaXRobWV0 | |
− | + | aWMuaW50DmFyaXRobWV0aWMuaW50DWxvY2FsLmludC5nZXQIY29uc3RhbnQEBHRpZXIIY29uc3RhbnQE | |
− | + | ASoIY29uc3RhbnQCAgAAAAhjb25zdGFudAQBLQhjb25zdGFudAIBAAAACGNvbnN0YW50BAI+PRBsb2Nh | |
− | + | bC5kb3VibGUuZ2V0CGNvbnN0YW50BApjaXJjdWl0X2xvCGNvbnN0YW50BAEmEWNvbXBhcmlzb24uZG91 | |
− | + | YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEB2NpcmN1aXQOYXJpdGhtZXRpYy5pbnQNbG9j | |
− | + | YWwuaW50LmdldAhjb25zdGFudAQEdGllcghjb25zdGFudAQBKghjb25zdGFudAICAAAACGNvbnN0YW50 | |
− | + | BAI+PRBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BApjaXJjdWl0X2hpDWZhY3RvcnkuY3JhZnQIY29u | |
− | + | c3RhbnQEBGNoaXANbG9jYWwuaW50LmdldAhjb25zdGFudAQEdGllchBsb2NhbC5kb3VibGUuZ2V0CGNv | |
− | + | bnN0YW50BAVjb3VudA== | |
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 1,162: | Line 1,161: | ||
|} | |} | ||
|- | |- | ||
+ | |2 | ||
+ | |plates | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:2 | ||
+ | |9 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Regular plates | ||
+ | :global int craft_status | ||
+ | :local double count | ||
+ | :local int tier | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.2") | ||
+ | count = global.double.get("craft_count:3.2") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", count) | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, craft_status > 199) | ||
+ | |||
+ | waitwhile(active("presser")) | ||
+ | produce("ingot", tier, count, "presser") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |3 | ||
+ | |dense plates | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:3 | ||
+ | |14 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Dense plates | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double plates | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.3") | ||
+ | count = global.double.get("craft_count:3.3") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | plates = count * 9.0 - craft_inventory * count("plate.stack", tier) | ||
+ | |||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", plates) | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | plates: gotoif(stacks, plates <= craft_inventory * count("plate", tier)) | ||
+ | waitwhile(active("presser")) | ||
+ | produce("ingot", tier, plates - craft_inventory * count("plate", tier), "presser") | ||
+ | |||
+ | stacks: waitwhile(count("plate", tier) < plates | active("presser")) | ||
+ | craft("plate.stack", tier, count - craft_inventory * count("plate.stack", tier)) | ||
+ | produce("plate.stack", tier, count, "presser") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |4 | ||
+ | |blocks | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:4 | ||
+ | |10 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Blocks | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double platesperblock | ||
+ | :local double stacks | ||
+ | :local double plates | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.4") | ||
+ | count = global.double.get("craft_count:3.4") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | plates: platesperblock = 4.0 * round((33332222220.0 / (10.0 ^ i2d(tier))) % 10.0) | ||
+ | global.int.set("craft_tier:3.3", tier) | ||
+ | global.double.set("craft_count:3.3", count * platesperblock - craft_inventory * count("plate.dense", tier)) | ||
+ | executesync("craft part:3") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | waitwhile(count("plate.dense", tier) < count * platesperblock) | ||
+ | craft("block", tier, count) | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |5 | ||
+ | |cables | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:5 | ||
+ | |9 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Cables | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.5") | ||
+ | count = global.double.get("craft_count:3.5") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", count / 2.0) | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | waitwhile(active("refinery")) | ||
+ | produce("ingot", tier, ceil(count / 2.0), "refinery") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |6 | ||
+ | |insulated cables | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:6 | ||
+ | |17 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Insulated cables | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double cables | ||
+ | :local double rubber | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.6") | ||
+ | count = global.double.get("craft_count:3.6") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | cables = count * max(max(1.0, i2d(tier) - 2.0), max(10.0 - (5.0 * ((i2d(tier) - 8.0) ^ 2.0)), ceil(((i2d(tier) - 1.0) ^ 1.5) - 11.0))) | ||
+ | rubber = count * max(0.0, ((2.0 * i2d(tier)) - 4.0) - max(0.0, 2.0 - ((i2d(tier) - 8.0) * (i2d(tier) - 9.0)))) | ||
+ | |||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", (cables - count("cable", tier)) / 2.0) | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | cables: gotoif(rubber, cables <= craft_inventory * count("cable", tier)) | ||
+ | waitwhile(active("refinery")) | ||
+ | produce("ingot", tier, ceil((cables - craft_inventory * count("cable", tier)) / 2.0), "refinery") | ||
+ | |||
+ | rubber: gotoif(craft, rubber <= count("plate.rubber", 1)) | ||
+ | waitwhile(active("presser")) | ||
+ | produce("rubber", tier, rubber, "presser") | ||
+ | |||
+ | craft: waituntil(count("cable", tier) >= cables & count("plate.rubber", 1) >= rubber) | ||
+ | craft("cable.insulated", tier, count) | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |7 | ||
+ | |rods | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:7 | ||
+ | |9 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Rods | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.7") | ||
+ | count = global.double.get("craft_count:3.7") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", count / 2.0) | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | waitwhile(active("refinery")) | ||
+ | produce("ingot", tier, ceil(count / 2.0), "shaper") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |8 | ||
+ | |motors | ||
+ | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:8 | ||
+ | |14 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Motor | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double plates | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.8") | ||
+ | count = global.double.get("craft_count:3.8") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | ; ingots | ||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", count * 5.625) ; TODO count existing bits | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | execute("craft part:8:rods") | ||
+ | execute("craft part:8:wire") | ||
+ | |||
+ | ; plates | ||
+ | ;plates = count * 4.0 | ||
+ | |||
+ | gotoif(wait, count * 4.0 <= craft_inventory * count("plate", global.int.get("craft_tier:3.2"))) | ||
+ | waitwhile(active("presser")) | ||
+ | produce("ingot", tier, count * 4.0 - craft_inventory * count("plate", tier), "presser") | ||
+ | |||
+ | wait: waituntil(count("plate", tier) >= count * 4.0 & count("rod", tier) >= count * 2.0 & count("screw", tier) >= count & count("wire", tier) >= count) | ||
+ | craft("motor", tier, count) | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |- | ||
+ | |craft 3:8:rods | ||
+ | |14 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double rods | ||
+ | ;:local double screws | ||
+ | |||
+ | ; rods & screws | ||
+ | tier = global.int.get("craft_tier:3.8") | ||
+ | count = global.double.get("craft_count:3.8") | ||
+ | ;screws = count | ||
+ | rods = count * 2.0 + max(0.0, ceil((count - craft_inventory * count("screw", tier))/4.0)) | ||
+ | |||
+ | ; gotoif | ||
+ | waitwhile(active("shaper")) | ||
+ | produce("ingot", tier, ceil((rods - craft_inventory * count("rod", tier))/2.0), "shaper") | ||
+ | |||
+ | ; gotoif | ||
+ | waitwhile(count("rod", tier) < (count - craft_inventory * count("screw", tier))/4.0 | active("cutter")) | ||
+ | produce("rod", tier, ceil((count - craft_inventory * count("screw", tier))/4.0), "cutter") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |- | ||
+ | |craft 3:8:wire | ||
+ | |14 | ||
+ | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | |||
+ | ; rods & screws | ||
+ | tier = global.int.get("craft_tier:3.8") | ||
+ | count = global.double.get("craft_count:3.8") | ||
+ | |||
+ | gotoif(wire, count <= craft_inventory * (count("cable", tier) + count("wire", tier))) | ||
+ | waitwhile(active("refinery")) | ||
+ | produce("ingot", tier, ceil((count - craft_inventory * (count("cable", tier) + count("wire", tier)))/2.0), "refinery") | ||
+ | |||
+ | wire: gotoif(99, count <= craft_inventory * count("wire", tier)) | ||
+ | waitwhile(count("cable", tier) < count - count - craft_inventory * count("wire", tier) | active("refinery")) | ||
+ | produce("cable", tier, count - craft_inventory * count("wire", tier), "refinery") | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
+ | |- | ||
+ | |9 | ||
+ | |pumps | ||
| | | | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |craft 3:9 | ||
+ | |19 | ||
| | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Pumps | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | :local double rods | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.9") | ||
+ | count = global.double.get("craft_count:3.9") | ||
+ | gotoif(99, tier < 1 | tier > 10 | count < 1.0) | ||
+ | |||
+ | ; ingots | ||
+ | global.int.set("craft_tier:ingot", tier) | ||
+ | global.double.set("craft_count:ingot", count * 8.625) ; TODO count existing bits | ||
+ | executesync("craft ingot") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | global.int.set("craft_tier:3.8", tier) | ||
+ | global.double.set("craft_count:3.8", count - craft_inventory * count("motor", tier)) | ||
+ | executesync("craft 3:8") | ||
+ | gotoif(99, global.int.get("craft_status") > 199) | ||
+ | |||
+ | execute("craft 3:9:plates") | ||
+ | |||
+ | ; 2 rings | ||
+ | rods = count * 2.0 - count("ring", tier) | ||
+ | waitwhile(active("shaper")) | ||
+ | produce("ingot", tier, ceil((rods - craft_inventory * count("rod", tier))/2.0), "shaper") | ||
+ | |||
+ | waitwhile(count("rod", tier) < rods | active("shaper")) | ||
+ | produce("rod", tier, count*2.0 - craft_inventory * count("ring", tier), "shaper") | ||
+ | |||
+ | waituntil(count("plate", tier) >= count*2.0 & count("plate.rubber", 1) >= count*4.0 & count("ring", tier) >= count*2.0) | ||
+ | craft("pump", tier, count) | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |- | ||
+ | |craft 3:9:plates | ||
+ | |? | ||
| | | | ||
+ | {| class="wikitable mw-collapsible mw-collapsed" | ||
+ | ! | ||
+ | |- | ||
+ | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Pumps | ||
+ | :global double craft_inventory | ||
+ | :local int tier | ||
+ | :local double count | ||
+ | |||
+ | tier = global.int.get("craft_tier:3.9") | ||
+ | count = global.double.get("craft_count:3.9") | ||
+ | |||
+ | ; 2 rings | ||
+ | ;plates = count * 2.0 | ||
+ | ; TODO gotoif | ||
+ | plates: waitwhile(active("presser")) | ||
+ | produce("ingot", tier, count*2.0 - craft_inventory * count("plate", tier), "presser") | ||
+ | |||
+ | ; TODO gotoif | ||
+ | rubber: waitwhile(active("presser")) | ||
+ | produce("rubber", 1, count*4.0 - craft_inventory * count("plate.rubber", tier), "presser") | ||
+ | </syntaxhighlight> | ||
+ | |- | ||
+ | |<syntaxhighlight lang="text"> | ||
+ | x | ||
+ | </syntaxhighlight> | ||
+ | |} | ||
+ | |} | ||
|} | |} | ||
<br /> | <br /> | ||
Line 1,177: | Line 1,632: | ||
<br /> | <br /> | ||
+ | {| class="wikitable" | ||
+ | !Name | ||
+ | !Lines | ||
+ | !Code | ||
+ | |- | ||
+ | |x | ||
+ | |x | ||
+ | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
! | ! | ||
Line 1,187: | Line 1,650: | ||
x | x | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |} | ||
|} | |} |
Revision as of 07:39, 16 January 2021
A bunch of scripts to craft stuff.
IN DEVELOPMENT. USE AT YOUR OWN RISK.
General scripts
Script | Info | Source | |||
---|---|---|---|---|---|
craft init | 1 impulse
no conditions 9 actions |
| |||
craft GO | 1 impulse
1 condition
12 actions |
| |||
craft tier up | 1 impulse
1 condition
1 action |
| |||
craft mode up | 1 impulse
1 condition
2 actions |
| |||
craft output up | 1 impulse
1 condition
2 actions |
| |||
craft count up | 1 impulse
1 condition
5 actions |
| |||
craft count down | 1 impulse
1 condition
5 actions |
| |||
craft inventory use | 1 impulse
1 condition
1 action |
| |||
craft script check | 3 actions |
| |||
craft producer set (pg1) | 1 impulse
1 condition
14 actions |
| |||
craft producer set (pg2) | 1 impulse
1 condition
13 actions |
| |||
craft machine set | 1 impulse
1 condition
4 actions |
| |||
craft ingot | 15 actions |
|
Parts scripts
Output | Part | Scripts | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | chips |
| |||||||||||||||||||||||||||
2 | plates |
| |||||||||||||||||||||||||||
3 | dense plates |
| |||||||||||||||||||||||||||
4 | blocks |
| |||||||||||||||||||||||||||
5 | cables |
| |||||||||||||||||||||||||||
6 | insulated cables |
| |||||||||||||||||||||||||||
7 | rods |
| |||||||||||||||||||||||||||
8 | motors |
| |||||||||||||||||||||||||||
9 | pumps |
|
Producer scripts
Machine scripts
Name | Lines | Code | |||
---|---|---|---|---|---|
x | x |
|