Difference between revisions of "User:Troylaurin"
Jump to navigation
Jump to search
Troylaurin (talk | contribs) |
Troylaurin (talk | contribs) |
||
Line 147: | Line 147: | ||
execute("craft script check") | execute("craft script check") | ||
global.int.set("craft_status", 102) ; Processing | global.int.set("craft_status", 102) ; Processing | ||
+ | wait(0.0) | ||
stop("craft script check") | stop("craft script check") | ||
Line 161: | Line 162: | ||
CGNyYWZ0IEdPAQAAAAVrZXkuMAEAAAAPY29tcGFyaXNvbi5ib29sDmNvbXBhcmlzb24uaW50Dmdsb2Jh | CGNyYWZ0IEdPAQAAAAVrZXkuMAEAAAAPY29tcGFyaXNvbi5ib29sDmNvbXBhcmlzb24uaW50Dmdsb2Jh | ||
bC5pbnQuZ2V0CGNvbnN0YW50BApjcmFmdF9idXN5CGNvbnN0YW50BAI9PQhjb25zdGFudAIAAAAACGNv | bC5pbnQuZ2V0CGNvbnN0YW50BApjcmFmdF9idXN5CGNvbnN0YW50BAI9PQhjb25zdGFudAIAAAAACGNv | ||
− | + | bnN0YW50BAEmEnRvd24ud2luZG93Lmlzb3Blbghjb25zdGFudAQHZmFjdG9yeQ0AAAAOZ2xvYmFsLmlu | |
dC5zZXQIY29uc3RhbnQECmNyYWZ0X2J1c3kIY29uc3RhbnQCAQAAAA5nbG9iYWwuaW50LnNldAhjb25z | dC5zZXQIY29uc3RhbnQECmNyYWZ0X2J1c3kIY29uc3RhbnQCAQAAAA5nbG9iYWwuaW50LnNldAhjb25z | ||
dGFudAQSY3JhZnRfcmVxdWlyZV90aWVyCGNvbnN0YW50AgAAAAARZ2xvYmFsLmRvdWJsZS5zZXQIY29u | dGFudAQSY3JhZnRfcmVxdWlyZV90aWVyCGNvbnN0YW50AgAAAAARZ2xvYmFsLmRvdWJsZS5zZXQIY29u | ||
Line 172: | Line 173: | ||
dC5nZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQLY3Jh | dC5nZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dBFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQLY3Jh | ||
ZnRfY291bnQPZ2VuZXJpYy5leGVjdXRlCGNvbnN0YW50BBJjcmFmdCBzY3JpcHQgY2hlY2sOZ2xvYmFs | ZnRfY291bnQPZ2VuZXJpYy5leGVjdXRlCGNvbnN0YW50BBJjcmFmdCBzY3JpcHQgY2hlY2sOZ2xvYmFs | ||
− | + | LmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFudAJmAAAADGdlbmVyaWMud2FpdAhj | |
− | + | b25zdGFudAMAAAAAAAAAAAxnZW5lcmljLnN0b3AIY29uc3RhbnQEEmNyYWZ0IHNjcmlwdCBjaGVjaxNn | |
− | + | ZW5lcmljLmV4ZWN1dGVzeW5jBmNvbmNhdAZjb25jYXQGY29uY2F0CGNvbnN0YW50BAZjcmFmdCADaTJz | |
− | + | Dmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BApjcmFmdF9tb2RlCGNvbnN0YW50BAE6A2kycw5nbG9iYWwu | |
− | + | aW50LmdldAhjb25zdGFudAQMY3JhZnRfb3V0cHV0DmdlbmVyaWMuZ290b2lmCGNvbnN0YW50Ag0AAAAO | |
− | + | Y29tcGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhjb25zdGFu | |
− | + | dAQBPghjb25zdGFudALHAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29u | |
− | + | c3RhbnQCyAAAAA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAIAAAAA | |
+ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 399: | Line 401: | ||
| | | | ||
| | | | ||
− | | | + | |4 |
| | | | ||
{| class="wikitable mw-collapsible mw-collapsed" | {| class="wikitable mw-collapsible mw-collapsed" | ||
Line 410: | Line 412: | ||
executesync("craft " . craft_mode . ":" . craft_output) | executesync("craft " . craft_mode . ":" . craft_output) | ||
global.int.set("craft_status", 404) ; Script not found | global.int.set("craft_status", 404) ; Script not found | ||
+ | stop("craft " . craft_mode . ":" . craft_output) | ||
loop: goto(loop) | loop: goto(loop) | ||
Line 415: | Line 418: | ||
|- | |- | ||
|<syntaxhighlight lang="text"> | |<syntaxhighlight lang="text"> | ||
− | + | EmNyYWZ0IHNjcmlwdCBjaGVjawAAAAAAAAAABAAAABNnZW5lcmljLmV4ZWN1dGVzeW5jBmNvbmNhdAZj | |
b25jYXQGY29uY2F0CGNvbnN0YW50BAZjcmFmdCADaTJzDmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BApj | b25jYXQGY29uY2F0CGNvbnN0YW50BAZjcmFmdCADaTJzDmdsb2JhbC5pbnQuZ2V0CGNvbnN0YW50BApj | ||
cmFmdF9tb2RlCGNvbnN0YW50BAE6A2kycw5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfb3V0 | cmFmdF9tb2RlCGNvbnN0YW50BAE6A2kycw5nbG9iYWwuaW50LmdldAhjb25zdGFudAQMY3JhZnRfb3V0 | ||
cHV0Dmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29uc3RhbnQClAEAAAxnZW5l | cHV0Dmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BAxjcmFmdF9zdGF0dXMIY29uc3RhbnQClAEAAAxnZW5l | ||
− | + | cmljLnN0b3AGY29uY2F0BmNvbmNhdAZjb25jYXQIY29uc3RhbnQEBmNyYWZ0IANpMnMOZ2xvYmFsLmlu | |
+ | dC5nZXQIY29uc3RhbnQECmNyYWZ0X21vZGUIY29uc3RhbnQEAToDaTJzDmdsb2JhbC5pbnQuZ2V0CGNv | ||
+ | bnN0YW50BAxjcmFmdF9vdXRwdXQMZ2VuZXJpYy5nb3RvCGNvbnN0YW50AgQAAAA= | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 10:01, 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 |
|
|
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 | 4 |
| |||||
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 |
|