Difference between revisions of "User:Troylaurin"
Jump to navigation
Jump to search
Troylaurin (talk | contribs) (Fixed craft GO and craft script check) |
Troylaurin (talk | contribs) (fix "craft ingot" + minor touchups) |
||
Line 125: | Line 125: | ||
<br /> | <br /> | ||
− | | | + | |13 |
| | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
Line 403: | Line 403: | ||
| | | | ||
| | | | ||
− | | | + | |3 |
| | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
Line 609: | Line 609: | ||
| | | | ||
| | | | ||
− | | | + | |13 |
| | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
Line 615: | Line 615: | ||
|- | |- | ||
|<syntaxhighlight lang="actionscript"> | |<syntaxhighlight lang="actionscript"> | ||
+ | :local int verify_mode | ||
+ | |||
; tier = global.int.get("craft_tier:ingot") | ; tier = global.int.get("craft_tier:ingot") | ||
; count = global.double.get("craft_count:ingot") | ; count = global.double.get("craft_count:ingot") | ||
− | + | verify_mode = global.int.get("craft_verify:ingot") | |
global.int.set("craft_verify:ingot", 0) | global.int.set("craft_verify:ingot", 0) | ||
gotoif(99, global.int.get("craft_tier:ingot") < 1 | global.int.get("craft_tier:ingot") > 10 | global.double.get("craft_count:ingot") <= 0.0 | global.int.get("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 | global.int.get("craft_status") > 199) | ||
Line 623: | Line 625: | ||
gotoif(99, global.double.get("craft_count:ingot") <= count("ingot", global.int.get("craft_tier:ingot"))) | gotoif(99, global.double.get("craft_count:ingot") <= count("ingot", global.int.get("craft_tier:ingot"))) | ||
gotoif(bad, global.double.get("craft_count:ingot") > count("ingot", global.int.get("craft_tier:ingot")) + count("dust", global.int.get("craft_tier:ingot")) - 1.0) | gotoif(bad, global.double.get("craft_count:ingot") > count("ingot", global.int.get("craft_tier:ingot")) + count("dust", global.int.get("craft_tier:ingot")) - 1.0) | ||
− | gotoif(99, | + | gotoif(99, verify_mode > 0) |
waitwhile(active("oven")) | waitwhile(active("oven")) | ||
produce("dust", global.int.get("craft_tier:ingot"), ceil(global.double.get("craft_count:ingot") - count("ingot", global.int.get("craft_tier:ingot"))), "oven") | produce("dust", global.int.get("craft_tier:ingot"), ceil(global.double.get("craft_count:ingot") - count("ingot", global.int.get("craft_tier:ingot"))), "oven") | ||
Line 636: | Line 638: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | C2NyYWZ0IGluZ290AAAAAAAAAAANAAAADWxvY2FsLmludC5zZXQIY29uc3RhbnQEC3ZlcmlmeV9tb2Rl | |
− | + | Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BBJjcmFmdF92ZXJpZnk6aW5nb3QOZ2xvYmFsLmludC5zZXQI | |
− | + | Y29uc3RhbnQEEmNyYWZ0X3ZlcmlmeTppbmdvdAhjb25zdGFudAIAAAAADmdlbmVyaWMuZ290b2lmCGNv | |
− | + | bnN0YW50AmMAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24uYm9vbA9jb21wYXJpc29uLmJvb2wO | |
− | + | Y29tcGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QIY29u | |
− | + | c3RhbnQEATwIY29uc3RhbnQCAQAAAAhjb25zdGFudAQBfA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50 | |
− | + | LmdldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdAhjb25zdGFudAQBPghjb25zdGFudAIKAAAACGNv | |
− | + | bnN0YW50BAF8EWNvbXBhcmlzb24uZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBFjcmFm | |
− | + | dF9jb3VudDppbmdvdAhjb25zdGFudAQCPD0IY29uc3RhbnQDAAAAAAAAAAAIY29uc3RhbnQEAXwOY29t | |
− | + | cGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFudAQB | |
− | + | Pghjb25zdGFudALHAAAADmdlbmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAARY29tcGFyaXNvbi5kb3Vi | |
− | + | bGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3RhbnQEEWNyYWZ0X2NvdW50OmluZ290CGNvbnN0YW50BAI8 | |
− | + | PRNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BAVpbmdvdA5nbG9iYWwuaW50LmdldAhjb25zdGFu | |
− | + | dAQQY3JhZnRfdGllcjppbmdvdA5nZW5lcmljLmdvdG9pZghjb25zdGFudAILAAAAEWNvbXBhcmlzb24u | |
− | + | ZG91YmxlEWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdAhjb25zdGFu | |
− | + | dAQBPhFhcml0aG1ldGljLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRNmYWN0b3J5Lml0ZW1zLmNvdW50 | |
− | + | CGNvbnN0YW50BAVpbmdvdA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdAhj | |
− | + | b25zdGFudAQBKxNmYWN0b3J5Lml0ZW1zLmNvdW50CGNvbnN0YW50BARkdXN0Dmdsb2JhbC5pbnQuZ2V0 | |
− | + | CGNvbnN0YW50BBBjcmFmdF90aWVyOmluZ290CGNvbnN0YW50BAEtCGNvbnN0YW50AwAAAAAAAPA/Dmdl | |
− | + | bmVyaWMuZ290b2lmCGNvbnN0YW50AmMAAAAOY29tcGFyaXNvbi5pbnQNbG9jYWwuaW50LmdldAhjb25z | |
− | + | dGFudAQLdmVyaWZ5X21vZGUIY29uc3RhbnQEAT4IY29uc3RhbnQCAAAAABFnZW5lcmljLndhaXR3aGls | |
− | + | ZRZmYWN0b3J5Lm1hY2hpbmUuYWN0aXZlCGNvbnN0YW50BARvdmVuD2ZhY3RvcnkucHJvZHVjZQhjb25z | |
− | + | dGFudAQEZHVzdA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQQY3JhZnRfdGllcjppbmdvdAtkb3VibGUu | |
− | + | Y2VpbBFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQRY3JhZnRfY291 | |
− | + | bnQ6aW5nb3QIY29uc3RhbnQEAS0TZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQFaW5nb3QOZ2xv | |
− | + | YmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QIY29uc3RhbnQEBG92ZW4RZ2VuZXJp | |
− | + | Yy53YWl0dW50aWwRY29tcGFyaXNvbi5kb3VibGUTZmFjdG9yeS5pdGVtcy5jb3VudAhjb25zdGFudAQF | |
− | + | aW5nb3QOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEEGNyYWZ0X3RpZXI6aW5nb3QIY29uc3RhbnQEAj49 | |
− | + | EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBFjcmFmdF9jb3VudDppbmdvdAxnZW5lcmljLmdvdG8I | |
− | + | Y29uc3RhbnQCYwAAAA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQSY3JhZnRfcmVxdWlyZV90aWVyDmds | |
− | + | b2JhbC5pbnQuZ2V0CGNvbnN0YW50BBBjcmFmdF90aWVyOmluZ290EWdsb2JhbC5kb3VibGUuc2V0CGNv | |
− | + | bnN0YW50BBNjcmFmdF9yZXF1aXJlX2NvdW50EWdsb2JhbC5kb3VibGUuZ2V0CGNvbnN0YW50BBFjcmFm | |
+ | dF9jb3VudDppbmdvdA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQMY3JhZnRfc3RhdHVzCGNvbnN0YW50 | ||
+ | ApwBAAA= | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 10:26, 19 January 2021
A bunch of scripts to craft stuff.
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);
});
})();
|
IN DEVELOPMENT. USE AT YOUR OWN RISK.
General scripts
Script | Impulses | Conditions | Lines | Source | |||
---|---|---|---|---|---|---|---|
craft init |
|
9 |
| ||||
craft GO |
|
|
13 |
| |||
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 | 13 |
|
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 |
|