Difference between revisions of "User:Akerus"
Jump to navigation
Jump to search
(Updated line counts) |
|||
Line 623: | Line 623: | ||
| | | | ||
| | | | ||
− | | | + | |14 |
| | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
Line 635: | Line 635: | ||
: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 | ||
gotoif(99, (((global.int.get("craft_tier:ingot") < 1) | (global.int.get("craft_tier:ingot") > 10)) | (global.double.get("craft_count:ingot") <= 0.0)) | (craft_status > 199)) | gotoif(99, (((global.int.get("craft_tier:ingot") < 1) | (global.int.get("craft_tier:ingot") > 10)) | (global.double.get("craft_count:ingot") <= 0.0)) | (craft_status > 199)) | ||
Line 642: | Line 643: | ||
target_dust_tier = global.int.get("craft_tier:ingot") | target_dust_tier = global.int.get("craft_tier:ingot") | ||
target_dust_count = ceil(global.double.get("craft_count:ingot")) | target_dust_count = ceil(global.double.get("craft_count:ingot")) | ||
+ | dust_up_conserve_ingots = 1.0 | ||
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 655: | Line 657: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | C2NyYWZ0IGluZ290AAAAAAAAAAAOAAAADmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAAPY29tcGFy | |
aXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29uLmJvb2wOY29tcGFyaXNvbi5pbnQOZ2xv | aXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29uLmJvb2wOY29tcGFyaXNvbi5pbnQOZ2xv | ||
YmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QIY29uc3RhbnQEATwIY29uc3RhbnQC | YmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QIY29uc3RhbnQEATwIY29uc3RhbnQC | ||
Line 669: | Line 671: | ||
b25zdGFudAQQY3JhZnRfdGllcjppbmdvdBFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQRdGFyZ2V0 | b25zdGFudAQQY3JhZnRfdGllcjppbmdvdBFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQRdGFyZ2V0 | ||
X2R1c3RfY291bnQLZG91YmxlLmNlaWwRZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEEWNyYWZ0X2Nv | X2R1c3RfY291bnQLZG91YmxlLmNlaWwRZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEEWNyYWZ0X2Nv | ||
− | + | dW50OmluZ290EWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50BBdkdXN0X3VwX2NvbnNlcnZlX2luZ290 | |
− | + | cwhjb25zdGFudAMAAAAAAADwPxNnZW5lcmljLmV4ZWN1dGVzeW5jCGNvbnN0YW50BBJkdXN0X3VwX2lu | |
− | + | dGVncmF0ZWQOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCDAAAABFjb21wYXJpc29uLmRvdWJsZRFnbG9i | |
− | + | YWwuZG91YmxlLmdldAhjb25zdGFudAQXcmVzb3VyY2VzX25lZWRlZF90aWVyXzEIY29uc3RhbnQEAT4I | |
− | + | Y29uc3RhbnQDAAAAAAAAAAARZ2VuZXJpYy53YWl0d2hpbGUWZmFjdG9yeS5tYWNoaW5lLmFjdGl2ZQhj | |
− | + | b25zdGFudAQEb3Zlbg9mYWN0b3J5LnByb2R1Y2UIY29uc3RhbnQEBGR1c3QOZ2xvYmFsLmludC5nZXQI | |
− | + | Y29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QLZG91YmxlLmNlaWwRYXJpdGhtZXRpYy5kb3VibGURZ2xv | |
− | + | YmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEEWNyYWZ0X2NvdW50OmluZ290CGNvbnN0YW50BAEtE2ZhY3Rv | |
− | + | cnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFm | |
− | + | dF90aWVyOmluZ290CGNvbnN0YW50BARvdmVuEWdlbmVyaWMud2FpdHdoaWxlFmZhY3RvcnkubWFjaGlu | |
− | + | ZS5hY3RpdmUIY29uc3RhbnQEBG92ZW4MZ2VuZXJpYy5nb3RvCGNvbnN0YW50AmMAAAAOZ2xvYmFsLmlu | |
− | + | dC5zZXQIY29uc3RhbnQEEmNyYWZ0X3JlcXVpcmVfdGllcg5nbG9iYWwuaW50LmdldAhjb25zdGFudAQQ | |
− | + | Y3JhZnRfdGllcjppbmdvdBFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQTY3JhZnRfcmVxdWlyZV9j | |
− | + | b3VudBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQRY3JhZnRfY291bnQ6aW5nb3QOZ2xvYmFsLmlu | |
+ | dC5zZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFudAKcAQAA | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
|} | |} |
Revision as of 16:04, 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 |
|
|
4 |
| |||
dust_up_integrated | 14 |
| |||||
dust_count_resources | 10 |
| |||||
dust_calc_needed | 11 |
| |||||
dust_up_process_lump | 11 |
| |||||
dust_up_process_ore | 10 |
| |||||
dust_up_process_ingot | 11 |
| |||||
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 |
14 |
|