Difference between revisions of "User:Akerus"
Jump to navigation
Jump to search
(Fix integration into "craft ingot") |
(Updated count resources script) |
||
Line 226: | Line 226: | ||
:global double resources_tier_1 | :global double resources_tier_1 | ||
− | resources_tier_10 = max(0.0,count("ingot",10) + | + | resources_tier_10 = max(0.0,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) + | + | resources_tier_9 = max(0.0,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) + | + | resources_tier_8 = max(0.0,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) + | + | resources_tier_7 = max(0.0,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) + | + | resources_tier_6 = max(0.0,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) + | + | resources_tier_5 = max(0.0,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) + | + | resources_tier_4 = max(0.0,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) + | + | resources_tier_3 = max(0.0,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) + | + | resources_tier_2 = max(0.0,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) + | + | resources_tier_1 = max(0.0,count("ingot",1) + count("dust", 1) + count("ore",1) - 1.0) |
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | FGR1c3RfY291bnRfcmVzb3VyY2VzAAAAAAAAAAAKAAAAEWdsb2JhbC5kb3VibGUuc2V0CGNvbnN0YW50 | |
− | + | BBFyZXNvdXJjZXNfdGllcl8xMApkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | |
− | + | E2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgoAAAAIY29uc3RhbnQE | |
− | + | ASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAIKAAAACGNvbnN0YW50 | |
− | + | BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAIKAAAACGNvbnN0YW50 | |
− | + | BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29u | |
− | + | c3RhbnQCCQAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFu | |
− | + | dAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfOQpkb3Vi | |
− | + | bGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | |
− | + | EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29u | |
− | + | c3RhbnQEBWluZ290CGNvbnN0YW50AgkAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhj | |
− | + | b25zdGFudAQEZHVzdAhjb25zdGFudAIJAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQI | |
− | + | Y29uc3RhbnQEA29yZQhjb25zdGFudAIJAAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2Zh | |
− | + | Y3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29uc3RhbnQCCAAAAAhjb25zdGFudAQBKghj | |
− | + | b25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91Ymxl | |
− | + | LnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfOApkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAA | |
− | + | EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | |
− | + | bWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AggA | |
− | + | AAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAII | |
− | + | AAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAII | |
− | + | AAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3Rh | |
− | + | bnQEBGx1bXAIY29uc3RhbnQCBwAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFu | |
− | + | dAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2Vz | |
− | + | X3RpZXJfNwpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | |
− | + | bWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRl | |
− | + | bXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgcAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5p | |
− | + | dGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAIHAAAACGNvbnN0YW50BAErE2ZhY3Rvcnku | |
− | + | aXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAIHAAAACGNvbnN0YW50BAErEWFyaXRobWV0 | |
− | + | aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29uc3RhbnQCBgAAAAhj | |
− | + | b25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFn | |
− | + | bG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfNgpkb3VibGUubWF4CGNvbnN0 | |
− | + | YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290 | |
− | + | CGNvbnN0YW50AgYAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVz | |
− | + | dAhjb25zdGFudAIGAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29y | |
− | + | ZQhjb25zdGFudAIGAAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMu | |
− | + | Y291bnQIY29uc3RhbnQEBGx1bXAIY29uc3RhbnQCBQAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAA | |
− | + | AAAAQAhjb25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFu | |
− | + | dAQQcmVzb3VyY2VzX3RpZXJfNQpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | |
− | + | E2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgUAAAAIY29uc3RhbnQE | |
− | + | ASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAIFAAAACGNvbnN0YW50 | |
− | + | BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAIFAAAACGNvbnN0YW50 | |
− | + | BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29u | |
− | + | c3RhbnQCBAAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFu | |
− | + | dAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfNApkb3Vi | |
− | + | bGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91Ymxl | |
− | + | EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29u | |
− | + | c3RhbnQEBWluZ290CGNvbnN0YW50AgQAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhj | |
− | + | b25zdGFudAQEZHVzdAhjb25zdGFudAIEAAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQI | |
− | + | Y29uc3RhbnQEA29yZQhjb25zdGFudAIEAAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2Zh | |
− | + | Y3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29uc3RhbnQCAwAAAAhjb25zdGFudAQBKghj | |
− | + | b25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91Ymxl | |
− | + | LnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfMwpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAA | |
− | + | EWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | |
− | + | bWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgMA | |
− | + | AAAIY29uc3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAID | |
− | + | AAAACGNvbnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAID | |
− | + | AAAACGNvbnN0YW50BAErEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3Rh | |
− | + | bnQEBGx1bXAIY29uc3RhbnQCAgAAAAhjb25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFu | |
− | + | dAQBLQhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2Vz | |
− | + | X3RpZXJfMgpkb3VibGUubWF4CGNvbnN0YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRo | |
− | + | bWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlE2ZhY3RvcnkuaXRl | |
− | + | bXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgIAAAAIY29uc3RhbnQEASsTZmFjdG9yeS5p | |
− | + | dGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAICAAAACGNvbnN0YW50BAErE2ZhY3Rvcnku | |
− | + | aXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAICAAAACGNvbnN0YW50BAErEWFyaXRobWV0 | |
− | + | aWMuZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBGx1bXAIY29uc3RhbnQCAQAAAAhj | |
− | + | b25zdGFudAQBKghjb25zdGFudAMAAAAAAAAAQAhjb25zdGFudAQBLQhjb25zdGFudAMAAAAAAADwPxFn | |
− | + | bG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQQcmVzb3VyY2VzX3RpZXJfMQpkb3VibGUubWF4CGNvbnN0 | |
− | + | YW50AwAAAAAAAAAAEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMuZG91YmxlEWFyaXRobWV0aWMu | |
− | + | ZG91YmxlE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEBWluZ290CGNvbnN0YW50AgEAAAAIY29u | |
− | + | c3RhbnQEASsTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQEZHVzdAhjb25zdGFudAIBAAAACGNv | |
− | + | bnN0YW50BAErE2ZhY3RvcnkuaXRlbXMuY291bnQIY29uc3RhbnQEA29yZQhjb25zdGFudAIBAAAACGNv | |
− | + | bnN0YW50BAEtCGNvbnN0YW50AwAAAAAAAPA/ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 12: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 |
|
|
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 |
|