Difference between revisions of "User:Akerus"
Jump to navigation
Jump to search
(Created page with "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:Troy...") |
(First initialization) |
||
Line 73: | Line 73: | ||
− | == | + | ==Dust Up Scripts== |
{| class="wikitable" | {| class="wikitable" | ||
!Script | !Script | ||
Line 81: | Line 81: | ||
!Source | !Source | ||
|- | |- | ||
− | | | + | |dust_up |
| | | | ||
− | * | + | *key 1 |
| | | | ||
+ | * actory screen open | ||
|9 | |9 | ||
| | | | ||
Line 91: | Line 92: | ||
|- | |- | ||
|<syntaxhighlight lang="actionscript"> | |<syntaxhighlight lang="actionscript"> | ||
− | + | :global double resources_needed_tier_1 | |
+ | :global int target_dust_tier | ||
+ | :global double target_dust_count | ||
+ | :global int dust_up_loop_tier | ||
+ | :global double dust_up_missing | ||
− | + | key.1() | |
− | + | ||
− | + | isopen("factory") | |
− | global.double. | + | |
− | + | target_dust_tier = 8 | |
− | + | target_dust_count = 350.0 | |
− | + | 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: 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"> | ||
− | + | B2R1c3RfdXABAAAABWtleS4xAQAAABJ0b3duLndpbmRvdy5pc29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5nb3RvaWYIY29uc3RhbnQCDAAAABFjb21wYXJpc29uLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPZHVzdF91cF9taXNzaW5nCGNvbnN0YW50BAE8CGNvbnN0YW50AwAAAAAAAPA/E2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEFGR1c3RfdXBfcHJvY2Vzc19sdW1wE2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEE2R1c3RfdXBfcHJvY2Vzc19vcmUTZ2VuZXJpYy5leGVjdXRlc3luYwhjb25zdGFudAQVZHVzdF91cF9wcm9jZXNzX2luZ290E2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEC2R1c3RfdXBfbWl4Dmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBFkdXN0X3VwX2xvb3BfdGllcg5hcml0aG1ldGljLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQRZHVzdF91cF9sb29wX3RpZXIIY29uc3RhbnQEASsIY29uc3RhbnQCAQAAAA5nZW5lcmljLmdvdG9pZghjb25zdGFudAIHAAAADmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBFkdXN0X3VwX2xvb3BfdGllcghjb25zdGFudAQBPA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQQdGFyZ2V0X2R1c3RfdGllchNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBBkdXN0X3VwX2ZpbmFsaXpl | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 08:15, 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 |
|
|
9 |
| |||
craft GO |
|
|
12 |
| |||
craft tier up |
|
|
1 |
| |||
craft mode up |
|
|
2 |
| |||
craft output up |
|
|
2 |
| |||
craft count up |
|
|
5 |
| |||
craft count down |
|
|
5 |
| |||
craft inventory use |
|
|
1 |
| |||
craft script check | 3 |
| |||||
craft producer set (pg1) |
|
|
14 |
| |||
craft producer set (pg2) |
|
|
13 |
| |||
craft output machine |
|
|
4 |
| |||
craft ingot | 12 |
|
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 |
|