Difference between revisions of "User:Akerus"
Jump to navigation
Jump to search
(Added integration example) |
(Fix integration into "craft ingot") |
||
Line 207: | Line 207: | ||
|dust_count_resources | |dust_count_resources | ||
| | | | ||
− | |||
| | | | ||
Line 534: | Line 533: | ||
|dust_up_mix | |dust_up_mix | ||
| | | | ||
− | |||
| | | | ||
Line 621: | Line 619: | ||
|} | |} | ||
− | === Examples of integrating the Dust Up scripts === | + | ===Examples of integrating the Dust Up scripts=== |
<br /> | <br /> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 654: | Line 652: | ||
target_dust_tier = global.int.get("craft_tier:ingot") | target_dust_tier = global.int.get("craft_tier:ingot") | ||
− | target_dust_count = | + | target_dust_count = global.double.get("craft_count:ingot") |
executesync("dust_up_integrated") | executesync("dust_up_integrated") | ||
gotoif(bad, resources_needed_tier_1 > 0.0) | gotoif(bad, resources_needed_tier_1 > 0.0) | ||
Line 681: | Line 679: | ||
GllcjppbmdvdA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQQdGFyZ2V0X2R1c3RfdGllcg5nbG9iYWwu | GllcjppbmdvdA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQQdGFyZ2V0X2R1c3RfdGllcg5nbG9iYWwu | ||
aW50LmdldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdBFnbG9iYWwuZG91YmxlLnNldAhjb25zdGF | aW50LmdldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdBFnbG9iYWwuZG91YmxlLnNldAhjb25zdGF | ||
− | + | udAQRdGFyZ2V0X2R1c3RfY291bnQRZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEEWNyYWZ0X2NvdW | |
− | + | 50OmluZ290E2dlbmVyaWMuZXhlY3V0ZXN5bmMIY29uc3RhbnQEEmR1c3RfdXBfaW50ZWdyYXRlZA5nZ | |
− | + | W5lcmljLmdvdG9pZghjb25zdGFudAILAAAAEWNvbXBhcmlzb24uZG91YmxlEWdsb2JhbC5kb3VibGUu | |
− | + | Z2V0CGNvbnN0YW50BBdyZXNvdXJjZXNfbmVlZGVkX3RpZXJfMQhjb25zdGFudAQBPghjb25zdGFudAM | |
− | + | AAAAAAAAAABFnZW5lcmljLndhaXR3aGlsZRZmYWN0b3J5Lm1hY2hpbmUuYWN0aXZlCGNvbnN0YW50BA | |
− | + | RvdmVuD2ZhY3RvcnkucHJvZHVjZQhjb25zdGFudAQEZHVzdA5nbG9iYWwuaW50LmdldAhjb25zdGFud | |
− | + | AQQY3JhZnRfdGllcjppbmdvdAtkb3VibGUuY2VpbBFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91 | |
− | + | YmxlLmdldAhjb25zdGFudAQRY3JhZnRfY291bnQ6aW5nb3QIY29uc3RhbnQEAS0TZmFjdG9yeS5pdGV | |
− | + | tcy5jb3VudAhjb25zdGFudAQFaW5nb3QOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZX | |
− | + | I6aW5nb3QIY29uc3RhbnQEBG92ZW4RZ2VuZXJpYy53YWl0dW50aWwRY29tcGFyaXNvbi5kb3VibGUTZ | |
− | + | mFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQE | |
− | + | EGNyYWZ0X3RpZXI6aW5nb3QIY29uc3RhbnQEAj49EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBF | |
− | + | jcmFmdF9jb3VudDppbmdvdAxnZW5lcmljLmdvdG8IY29uc3RhbnQCYwAAAA5nbG9iYWwuaW50LnNldA | |
− | + | hjb25zdGFudAQSY3JhZnRfcmVxdWlyZV90aWVyDmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFmd | |
− | + | F90aWVyOmluZ290EWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBNjcmFmdF9yZXF1aXJlX2NvdW50 | |
− | + | EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdA5nbG9iYWwuaW50LnN | |
− | + | ldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50ApwBAAA= | |
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
|} | |} |
Revision as of 10:16, 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 |
|
|
15 |
| |||
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 | 9 |
| |||||
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 |
|