Difference between revisions of "User:Akerus"
Jump to navigation
Jump to search
(Fix in modified "craft ingot" script) |
(some fixes and refactoring) |
||
Line 92: | Line 92: | ||
|- | |- | ||
|<syntaxhighlight lang="actionscript"> | |<syntaxhighlight lang="actionscript"> | ||
− | |||
:global int target_dust_tier | :global int target_dust_tier | ||
:global double target_dust_count | :global double target_dust_count | ||
− | + | :global double dust_up_conserve_ingots | |
− | :global double | ||
key.1() | key.1() | ||
Line 104: | Line 102: | ||
target_dust_tier = 8 | target_dust_tier = 8 | ||
target_dust_count = 350.0 | target_dust_count = 350.0 | ||
− | + | dust_up_conserve_ingots = 1.0 | |
− | + | executesync("dust_up_integrated") | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | executesync(" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | B2R1c3RfdXABAAAABWtleS4xAQAAABJ0b3duLndpbmRvdy5pc29wZW4IY29uc3RhbnQEB2ZhY3RvcnkE | |
AAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBB0YXJnZXRfZHVzdF90aWVyCGNvbnN0YW50AggAAAAR | AAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBB0YXJnZXRfZHVzdF90aWVyCGNvbnN0YW50AggAAAAR | ||
Z2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQEEXRhcmdldF9kdXN0X2NvdW50CGNvbnN0YW50AwAAAAAA | Z2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQEEXRhcmdldF9kdXN0X2NvdW50CGNvbnN0YW50AwAAAAAA | ||
− | + | 4HVAEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNlcnZlX2luZ290cwhjb25z | |
− | + | dGFudAMAAAAAAADwPxNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBJkdXN0X3VwX2ludGVncmF0 | |
− | + | ZWQ= | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 165: | Line 131: | ||
:global int target_dust_tier | :global int target_dust_tier | ||
− | + | executesync("dust_count_resources") | |
− | + | executesync("dust_calc_needed") | |
− | + | gotoif(99, resources_needed_tier_1 > 0.0) | |
− | + | dust_up_loop_tier = 1 | |
− | + | loop: dust_up_missing = max(0.0, (global.double.get("resources_needed_tier_" . i2s(dust_up_loop_tier + 1)) * 4.0) - count("dust", dust_up_loop_tier)) | |
− | + | gotoif(mix, dust_up_missing < 1.0) | |
− | + | executesync("dust_up_process_lump") | |
− | + | executesync("dust_up_process_ore") | |
− | + | executesync("dust_up_process_ingot") | |
− | + | mix: waitwhile(active("crusher")) | |
− | + | executesync("dust_up_mix") | |
− | + | dust_up_loop_tier = dust_up_loop_tier + 1 | |
− | + | gotoif(loop, dust_up_loop_tier < target_dust_tier) | |
+ | executesync("dust_up_finalize") | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | EmR1c3RfdXBfaW50ZWdyYXRlZAAAAAAAAAAADgAAABNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50 | |
− | + | BBRkdXN0X2NvdW50X3Jlc291cmNlcxNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBBkdXN0X2Nh | |
− | + | bGNfbmVlZGVkDmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAARY29tcGFyaXNvbi5kb3VibGURZ2xv | |
− | + | YmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEF3Jlc291cmNlc19uZWVkZWRfdGllcl8xCGNvbnN0YW50BAE+ | |
− | + | CGNvbnN0YW50AwAAAAAAAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBFkdXN0X3VwX2xvb3BfdGll | |
− | + | cghjb25zdGFudAIBAAAAEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BA9kdXN0X3VwX21pc3NpbmcK | |
− | + | ZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAAABFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRv | |
− | + | dWJsZRFnbG9iYWwuZG91YmxlLmdldAZjb25jYXQIY29uc3RhbnQEFnJlc291cmNlc19uZWVkZWRfdGll | |
− | + | cl8DaTJzDmFyaXRobWV0aWMuaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBFkdXN0X3VwX2xvb3Bf | |
− | + | dGllcghjb25zdGFudAQBKwhjb25zdGFudAIBAAAACGNvbnN0YW50BAEqCGNvbnN0YW50AwAAAAAAABBA | |
− | + | CGNvbnN0YW50BAEtE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGR1c3QOZ2xvYmFsLmludC5n | |
− | + | ZXQIY29uc3RhbnQEEWR1c3RfdXBfbG9vcF90aWVyDmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AgoAAAAR | |
− | + | Y29tcGFyaXNvbi5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQED2R1c3RfdXBfbWlzc2lu | |
− | + | Zwhjb25zdGFudAQBPAhjb25zdGFudAMAAAAAAADwPxNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50 | |
− | + | BBRkdXN0X3VwX3Byb2Nlc3NfbHVtcBNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBNkdXN0X3Vw | |
− | + | X3Byb2Nlc3Nfb3JlE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEFWR1c3RfdXBfcHJvY2Vzc19p | |
− | + | bmdvdBFnZW5lcmljLndhaXR3aGlsZRZmYWN0b3J5Lm1hY2hpbmUuYWN0aXZlCGNvbnN0YW50BAdjcnVz | |
− | + | aGVyE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEC2R1c3RfdXBfbWl4Dmdsb2JhbC5pbnQuc2V0 | |
− | + | CGNvbnN0YW50BBFkdXN0X3VwX2xvb3BfdGllcg5hcml0aG1ldGljLmludA5nbG9iYWwuaW50LmdldAhj | |
− | + | b25zdGFudAQRZHVzdF91cF9sb29wX3RpZXIIY29uc3RhbnQEASsIY29uc3RhbnQCAQAAAA5nZW5lcmlj | |
− | + | LmdvdG9pZghjb25zdGFudAIFAAAADmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50 | |
− | + | BBFkdXN0X3VwX2xvb3BfdGllcghjb25zdGFudAQBPA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQQdGFy | |
− | + | Z2V0X2R1c3RfdGllchNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBBkdXN0X3VwX2ZpbmFsaXpl | |
+ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 227: | Line 195: | ||
:global double resources_tier_2 | :global double resources_tier_2 | ||
:global double resources_tier_1 | :global double resources_tier_1 | ||
+ | :global double dust_up_conserve_ingots | ||
− | resources_tier_10 = max(0.0,count("ingot",10) + count("dust", 10) + count("ore",10) + (count("lump",9) * 2.0) - 1.0) | + | resources_tier_10 = max(0.0,(dust_up_conserve_ingots * count("ingot",10)) + count("dust", 10) + count("ore",10) + (count("lump",9) * 2.0) - 1.0) |
− | resources_tier_9 = max(0.0,count("ingot",9) + count("dust", 9) + count("ore",9) + (count("lump",8) * 2.0) - 1.0) | + | resources_tier_9 = max(0.0,(dust_up_conserve_ingots * count("ingot",9)) + count("dust", 9) + count("ore",9) + (count("lump",8) * 2.0) - 1.0) |
− | resources_tier_8 = max(0.0,count("ingot",8) + count("dust", 8) + count("ore",8) + (count("lump",7) * 2.0) - 1.0) | + | resources_tier_8 = max(0.0,(dust_up_conserve_ingots * count("ingot",8)) + count("dust", 8) + count("ore",8) + (count("lump",7) * 2.0) - 1.0) |
− | resources_tier_7 = max(0.0,count("ingot",7) + count("dust", 7) + count("ore",7) + (count("lump",6) * 2.0) - 1.0) | + | resources_tier_7 = max(0.0,(dust_up_conserve_ingots * count("ingot",7)) + count("dust", 7) + count("ore",7) + (count("lump",6) * 2.0) - 1.0) |
− | resources_tier_6 = max(0.0,count("ingot",6) + count("dust", 6) + count("ore",6) + (count("lump",5) * 2.0) - 1.0) | + | resources_tier_6 = max(0.0,(dust_up_conserve_ingots * count("ingot",6)) + count("dust", 6) + count("ore",6) + (count("lump",5) * 2.0) - 1.0) |
− | resources_tier_5 = max(0.0,count("ingot",5) + count("dust", 5) + count("ore",5) + (count("lump",4) * 2.0) - 1.0) | + | resources_tier_5 = max(0.0,(dust_up_conserve_ingots * count("ingot",5)) + count("dust", 5) + count("ore",5) + (count("lump",4) * 2.0) - 1.0) |
− | resources_tier_4 = max(0.0,count("ingot",4) + count("dust", 4) + count("ore",4) + (count("lump",3) * 2.0) - 1.0) | + | resources_tier_4 = max(0.0,(dust_up_conserve_ingots * count("ingot",4)) + count("dust", 4) + count("ore",4) + (count("lump",3) * 2.0) - 1.0) |
− | resources_tier_3 = max(0.0,count("ingot",3) + count("dust", 3) + count("ore",3) + (count("lump",2) * 2.0) - 1.0) | + | resources_tier_3 = max(0.0,(dust_up_conserve_ingots * count("ingot",3)) + count("dust", 3) + count("ore",3) + (count("lump",2) * 2.0) - 1.0) |
− | resources_tier_2 = max(0.0,count("ingot",2) + count("dust", 2) + count("ore",2) + (count("lump",1) * 2.0) - 1.0) | + | resources_tier_2 = max(0.0,(dust_up_conserve_ingots * count("ingot",2)) + count("dust", 2) + count("ore",2) + (count("lump",1) * 2.0) - 1.0) |
− | resources_tier_1 = max(0.0,count("ingot",1) + count("dust", 1) + count("ore",1) - 1.0) | + | resources_tier_1 = max(0.0,(dust_up_conserve_ingots * count("ingot",1)) + count("dust", 1) + count("ore",1) - 1.0) |
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
Line 244: | Line 213: | ||
BBFyZXNvdXJjZXNfdGllcl8xMApkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMu | BBFyZXNvdXJjZXNfdGllcl8xMApkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMu | ||
ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | ||
− | + | EWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNl | |
− | + | cnZlX2luZ290cwhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVpbmdvdAhj | |
− | + | b25zdGFudAIKAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGR1c3QI | |
− | + | Y29uc3RhbnQCCgAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BANvcmUI | |
− | + | Y29uc3RhbnQCCgAAAAhjb25zdGFudAQBKxFhcml0aG1ldGljLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNv | |
− | + | dW50CGNvbnN0YW50BARsdW1wCGNvbnN0YW50AgkAAAAIY29uc3RhbnQEASoIY29uc3RhbnQDAAAAAAAA | |
− | + | AEAIY29uc3RhbnQEAS0IY29uc3RhbnQDAAAAAAAA8D8RZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQE | |
− | + | EHJlc291cmNlc190aWVyXzkKZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAAABFhcml0aG1ldGljLmRv | |
− | + | dWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFh | |
− | + | cml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQXZHVzdF91cF9jb25zZXJ2 | |
− | + | ZV9pbmdvdHMIY29uc3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QIY29u | |
− | + | c3RhbnQCCQAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARkdXN0CGNv | |
− | + | bnN0YW50AgkAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQDb3JlCGNv | |
− | + | bnN0YW50AgkAAAAIY29uc3RhbnQEASsRYXJpdGhtZXRpYy5kb3VibGUTZmFjdG9yeS5pdGVtcy5jb3Vu | |
+ | dAhjb25zdGFudAQEbHVtcAhjb25zdGFudAIIAAAACGNvbnN0YW50BAEqCGNvbnN0YW50AwAAAAAAAABA | ||
+ | CGNvbnN0YW50BAEtCGNvbnN0YW50AwAAAAAAAPA/EWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBBy | ||
+ | ZXNvdXJjZXNfdGllcl84CmRvdWJsZS5tYXgIY29uc3RhbnQDAAAAAAAAAAARYXJpdGhtZXRpYy5kb3Vi | ||
+ | bGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJp | ||
+ | dGhtZXRpYy5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEF2R1c3RfdXBfY29uc2VydmVf | ||
+ | aW5nb3RzCGNvbnN0YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0 | ||
+ | YW50AggAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25z | ||
+ | dGFudAIIAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25z | ||
+ | dGFudAIIAAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQI | ||
+ | Y29uc3RhbnQEBGx1bXAIY29uc3RhbnQCBwAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhj | ||
+ | b25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVz | ||
+ | b3VyY2VzX3RpZXJfNwpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91Ymxl | ||
EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | ||
− | + | bWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNlcnZlX2lu | |
− | + | Z290cwhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVpbmdvdAhjb25zdGFu | |
− | + | dAIHAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGR1c3QIY29uc3Rh | |
+ | bnQCBwAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BANvcmUIY29uc3Rh | ||
+ | bnQCBwAAAAhjb25zdGFudAQBKxFhcml0aG1ldGljLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNv | ||
+ | bnN0YW50BARsdW1wCGNvbnN0YW50AgYAAAAIY29uc3RhbnQEASoIY29uc3RhbnQDAAAAAAAAAEAIY29u | ||
+ | c3RhbnQEAS0IY29uc3RhbnQDAAAAAAAA8D8RZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQEEHJlc291 | ||
+ | cmNlc190aWVyXzYKZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAAABFhcml0aG1ldGljLmRvdWJsZRFh | ||
+ | cml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1l | ||
+ | dGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQXZHVzdF91cF9jb25zZXJ2ZV9pbmdv | ||
+ | dHMIY29uc3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QIY29uc3RhbnQC | ||
+ | BgAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARkdXN0CGNvbnN0YW50 | ||
+ | AgYAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQDb3JlCGNvbnN0YW50 | ||
+ | AgYAAAAIY29uc3RhbnQEASsRYXJpdGhtZXRpYy5kb3VibGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25z | ||
+ | dGFudAQEbHVtcAhjb25zdGFudAIFAAAACGNvbnN0YW50BAEqCGNvbnN0YW50AwAAAAAAAABACGNvbnN0 | ||
+ | YW50BAEtCGNvbnN0YW50AwAAAAAAAPA/EWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBByZXNvdXJj | ||
+ | ZXNfdGllcl81CmRvdWJsZS5tYXgIY29uc3RhbnQDAAAAAAAAAAARYXJpdGhtZXRpYy5kb3VibGURYXJp | ||
+ | dGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRp | ||
+ | Yy5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEF2R1c3RfdXBfY29uc2VydmVfaW5nb3Rz | ||
+ | CGNvbnN0YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgUA | ||
+ | AAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAIF | ||
+ | AAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAIF | ||
AAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3Rh | AAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3Rh | ||
− | + | bnQEBGx1bXAIY29uc3RhbnQCBAAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFu | |
dAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2Vz | dAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2Vz | ||
− | + | X3RpZXJfNApkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | |
− | + | bWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNlcnZlX2luZ290cwhj | |
− | + | b25zdGFudAQBKhNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVpbmdvdAhjb25zdGFudAIEAAAA | |
− | + | CGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGR1c3QIY29uc3RhbnQCBAAA | |
− | + | AAhjb25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BANvcmUIY29uc3RhbnQCBAAA | |
− | + | AAhjb25zdGFudAQBKxFhcml0aG1ldGljLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50 | |
− | + | BARsdW1wCGNvbnN0YW50AgMAAAAIY29uc3RhbnQEASoIY29uc3RhbnQDAAAAAAAAAEAIY29uc3RhbnQE | |
− | + | AS0IY29uc3RhbnQDAAAAAAAA8D8RZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQEEHJlc291cmNlc190 | |
− | + | aWVyXzMKZG91YmxlLm1heAhjb25zdGFudAMAAAAAAAAAABFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1l | |
− | + | dGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRv | |
− | + | dWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQXZHVzdF91cF9jb25zZXJ2ZV9pbmdvdHMIY29u | |
− | + | c3RhbnQEASoTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QIY29uc3RhbnQCAwAAAAhj | |
− | + | b25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARkdXN0CGNvbnN0YW50AgMAAAAI | |
− | + | Y29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQDb3JlCGNvbnN0YW50AgMAAAAI | |
− | + | Y29uc3RhbnQEASsRYXJpdGhtZXRpYy5kb3VibGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQE | |
− | + | bHVtcAhjb25zdGFudAICAAAACGNvbnN0YW50BAEqCGNvbnN0YW50AwAAAAAAAABACGNvbnN0YW50BAEt | |
− | + | CGNvbnN0YW50AwAAAAAAAPA/EWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBByZXNvdXJjZXNfdGll | |
− | + | cl8yCmRvdWJsZS5tYXgIY29uc3RhbnQDAAAAAAAAAAARYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRp | |
− | + | Yy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3VibGURYXJpdGhtZXRpYy5kb3Vi | |
− | + | bGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEF2R1c3RfdXBfY29uc2VydmVfaW5nb3RzCGNvbnN0 | |
− | + | YW50BAEqE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgIAAAAIY29u | |
− | + | c3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAICAAAACGNv | |
− | + | bnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAICAAAACGNv | |
− | + | bnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1 | |
− | + | bXAIY29uc3RhbnQCAQAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhj | |
− | + | b25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJf | |
− | + | MQpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0 | |
− | + | CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNlcnZlX2luZ290cwhjb25zdGFudAQBKhNmYWN0b3J5Lml0ZW1z | |
− | + | LmNvdW50CGNvbnN0YW50BAVpbmdvdAhjb25zdGFudAIBAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRl | |
− | + | bXMuY291bnQIY29uc3RhbnQEBGR1c3QIY29uc3RhbnQCAQAAAAhjb25zdGFudAQBKxNmYWN0b3J5Lml0 | |
− | + | ZW1zLmNvdW50CGNvbnN0YW50BANvcmUIY29uc3RhbnQCAQAAAAhjb25zdGFudAQBLQhjb25zdGFudAMA | |
− | + | AAAAAADwPw== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 488: | Line 471: | ||
|- | |- | ||
|<syntaxhighlight lang="actionscript"> | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Process ingots into dust | ||
:global int dust_up_loop_tier | :global int dust_up_loop_tier | ||
:global double dust_up_missing | :global double dust_up_missing | ||
:local double number_ingot | :local double number_ingot | ||
:local double number_ingot_used | :local double number_ingot_used | ||
+ | :global double dust_up_conserve_ingots | ||
+ | gotoif(99, dust_up_conserve_ingots > 0.0) | ||
number_ingot = count("ingot",dust_up_loop_tier) | number_ingot = count("ingot",dust_up_loop_tier) | ||
gotoif(processpartially, number_ingot > dust_up_missing) | gotoif(processpartially, number_ingot > dust_up_missing) | ||
Line 506: | Line 492: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | FWR1c3RfdXBfcHJvY2Vzc19pbmdvdAAAAAAAAAAACwAAAA5nZW5lcmljLmdvdG9pZghjb25zdGFudAJj | |
− | + | AAAAEWNvbXBhcmlzb24uZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBdkdXN0X3VwX2Nv | |
− | + | bnNlcnZlX2luZ290cwhjb25zdGFudAQBPghjb25zdGFudAMAAAAAAAAAABBsb2NhbC5kb3VibGUuc2V0 | |
− | + | CGNvbnN0YW50BAxudW1iZXJfaW5nb3QTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QO | |
− | + | Z2xvYmFsLmludC5nZXQIY29uc3RhbnQEEWR1c3RfdXBfbG9vcF90aWVyDmdlbmVyaWMuZ290b2lmCGNv | |
− | + | bnN0YW50AggAAAARY29tcGFyaXNvbi5kb3VibGUQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQMbnVt | |
− | + | YmVyX2luZ290CGNvbnN0YW50BAE+EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BA9kdXN0X3VwX21p | |
− | + | c3NpbmcRZ2VuZXJpYy53YWl0d2hpbGUWZmFjdG9yeS5tYWNoaW5lLmFjdGl2ZQhjb25zdGFudAQHY3J1 | |
− | + | c2hlcg9mYWN0b3J5LnByb2R1Y2UIY29uc3RhbnQEBWluZ290Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50 | |
− | + | BBFkdXN0X3VwX2xvb3BfdGllchBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BAxudW1iZXJfaW5nb3QI | |
− | + | Y29uc3RhbnQEB2NydXNoZXIRZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2R1c3RfdXBfbWlzc2lu | |
− | + | ZxFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPZHVzdF91cF9taXNz | |
− | + | aW5nCGNvbnN0YW50BAEtEGxvY2FsLmRvdWJsZS5nZXQIY29uc3RhbnQEDG51bWJlcl9pbmdvdAxnZW5l | |
− | + | cmljLmdvdG8IY29uc3RhbnQCYwAAABBsb2NhbC5kb3VibGUuc2V0CGNvbnN0YW50BBFudW1iZXJfaW5n | |
− | + | b3RfdXNlZBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPZHVzdF91cF9taXNzaW5nEWdlbmVyaWMu | |
− | + | d2FpdHdoaWxlFmZhY3RvcnkubWFjaGluZS5hY3RpdmUIY29uc3RhbnQEB2NydXNoZXIPZmFjdG9yeS5w | |
− | + | cm9kdWNlCGNvbnN0YW50BAVpbmdvdA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQRZHVzdF91cF9sb29w | |
− | + | X3RpZXIQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQRbnVtYmVyX2luZ290X3VzZWQIY29uc3RhbnQE | |
+ | B2NydXNoZXIRZ2xvYmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2R1c3RfdXBfbWlzc2luZwhjb25zdGFu | ||
+ | dAMAAAAAAAAAAA== | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 586: | Line 574: | ||
|- | |- | ||
|<syntaxhighlight lang="actionscript"> | |<syntaxhighlight lang="actionscript"> | ||
+ | ; Dust up finalizing script | ||
:global int target_dust_tier | :global int target_dust_tier | ||
:global double target_dust_count | :global double target_dust_count | ||
:global int dust_up_loop_tier | :global int dust_up_loop_tier | ||
:global double dust_up_missing | :global double dust_up_missing | ||
+ | :global double dust_up_conserve_ingots | ||
gotoif(99, dust_up_loop_tier != target_dust_tier) | gotoif(99, dust_up_loop_tier != target_dust_tier) | ||
− | dust_up_missing = max(0.0, global.double.get("resources_needed_tier_" . i2s(dust_up_loop_tier)) - count("dust", dust_up_loop_tier) - count("ingot", dust_up_loop_tier)) | + | dust_up_missing = max(0.0, global.double.get("resources_needed_tier_" . i2s(dust_up_loop_tier)) - count("dust", dust_up_loop_tier) - (count("ingot", dust_up_loop_tier) * dust_up_conserve_ingots)) |
gotoif(99, dust_up_missing < 1.0) | gotoif(99, dust_up_missing < 1.0) | ||
executesync("dust_up_process_lump") | executesync("dust_up_process_lump") | ||
Line 599: | Line 589: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | EGR1c3RfdXBfZmluYWxpemUAAAAAAAAAAAUAAAAOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCYwAAAA5j | |
− | + | b21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQRZHVzdF91cF9sb29wX3RpZXIIY29u | |
− | + | c3RhbnQEAiE9Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBB0YXJnZXRfZHVzdF90aWVyEWdsb2JhbC5k | |
− | + | b3VibGUuc2V0CGNvbnN0YW50BA9kdXN0X3VwX21pc3NpbmcKZG91YmxlLm1heAhjb25zdGFudAMAAAAA | |
− | + | AAAAABFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAZj | |
− | + | b25jYXQIY29uc3RhbnQEFnJlc291cmNlc19uZWVkZWRfdGllcl8DaTJzDmdsb2JhbC5pbnQuZ2V0CGNv | |
− | + | bnN0YW50BBFkdXN0X3VwX2xvb3BfdGllcghjb25zdGFudAQBLRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNv | |
− | + | bnN0YW50BARkdXN0Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBFkdXN0X3VwX2xvb3BfdGllcghjb25z | |
− | + | dGFudAQBLRFhcml0aG1ldGljLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVpbmdv | |
− | + | dA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQRZHVzdF91cF9sb29wX3RpZXIIY29uc3RhbnQEASoRZ2xv | |
− | + | YmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEF2R1c3RfdXBfY29uc2VydmVfaW5nb3RzDmdlbmVyaWMuZ290 | |
− | + | b2lmCGNvbnN0YW50AmMAAAARY29tcGFyaXNvbi5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3Rh | |
− | + | bnQED2R1c3RfdXBfbWlzc2luZwhjb25zdGFudAQBPAhjb25zdGFudAMAAAAAAADwPxNnZW5lcmljLmV4 | |
− | + | ZWN1dGVzeW5jCGNvbnN0YW50BBRkdXN0X3VwX3Byb2Nlc3NfbHVtcBNnZW5lcmljLmV4ZWN1dGVzeW5j | |
+ | CGNvbnN0YW50BBNkdXN0X3VwX3Byb2Nlc3Nfb3Jl | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 15:59, 19 January 2021
A collection of helpful scripts This page structure (and the tamperscript) is copied directly from user Troylaurin https://www.perfecttower2.com/wiki/index.php?title=User:Troylaurin
Click to copy (tamperscript) |
---|
// ==UserScript==
// @name Click to copy on <pre> tags
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add click to copy buttons to <pre> tags
// @author Troy.Laurin@gmail.com
// @match https://www.perfecttower2.com/wiki/*
// @grant GM_addStyle
// @require https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js
// @require http://code.jquery.com/jquery-3.5.1.slim.min.js
// ==/UserScript==
(function() {
'use strict';
// ------------------------------------------
// CSS part injected in the page
GM_addStyle(" \
.precontainer { \
position: relative; \
} \
.copy-btn { \
background: #DDD; \
font-family: monospace; \
font-weight: bolder; \
margin: 0; \
opacity: 0; \
padding: 4px; \
position: absolute; \
right: 1px; \
top: 1px; \
cursor: pointer; \
-webkit-transition: opacity 0.3s ease-in-out; \
-o-transition: opacity 0.3s ease-in-out; \
transition: opacity 0.3s ease-in-out; \
} \
.precontainer:hover >.copy-btn { \
opacity: 1; \
} \
table { width: 100% } \
");
$('pre').wrap('<div class="precontainer"></div>');
$('pre').before($('<span class="copy-btn"></></span>'));
new ClipboardJS('.copy-btn', {
text: function(trigger) {
return $(trigger.nextElementSibling).text();
}
})
.on('success',function (e) {
$(e.trigger).html("<copied/>")
setTimeout(function() {
$(e.trigger).html("</>");
}, 3000);
})
.on('error',function (e) {
$(e.trigger).html("Error!")
setTimeout(function() {
$(e.trigger).html("</>");
}, 3000);
});
})();
|
Dust Up Scripts
Script | Impulses | Conditions | Lines | Source | |||
---|---|---|---|---|---|---|---|
dust_up |
|
|
16 |
| |||
dust_up_integrated | 13 |
| |||||
dust_count_resources | 10 |
| |||||
dust_calc_needed | 11 |
| |||||
dust_up_process_lump | 11 |
| |||||
dust_up_process_ore | 10 |
| |||||
dust_up_process_ingot | 10 |
| |||||
dust_up_mix | 10 |
| |||||
dust_up_finalize | 5 |
|
Examples of integrating the Dust Up scripts
Name | Impulses | Conditions | Lines | Code | |||
---|---|---|---|---|---|---|---|
Troylaurin's crafting scripts:
"craft ingot" as of 2021-01-19 |
13 |
|