Difference between revisions of "User:Troylaurin"

From The Perfect Tower II
Jump to navigation Jump to search
(sprite table)
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
Just testing something, nothing much to see here
+
I like scripting!
 +
 
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
!Click to copy (tamperscript)
 +
|-
 +
|<syntaxhighlight lang="javascript">
 +
// ==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">&lt;/&gt;</span>'));
 +
 
 +
    new ClipboardJS('.copy-btn', {
 +
        text: function(trigger) {
 +
            return $(trigger.nextElementSibling).text();
 +
        }
 +
    })
 +
        .on('success',function (e) {
 +
        $(e.trigger).html("&lt;copied/&gt;")
 +
        setTimeout(function() {
 +
            $(e.trigger).html("&lt;/&gt;");
 +
        }, 3000);
 +
    })
 +
        .on('error',function (e) {
 +
        $(e.trigger).html("Error!")
 +
        setTimeout(function() {
 +
            $(e.trigger).html("&lt;/&gt;");
 +
        }, 3000);
 +
    });
 +
})();
 +
 
 +
</syntaxhighlight>
 +
|}
 +
 
 +
Factory scripts: https://www.perfecttower2.com/wiki/AI_Craftapalooza
 +
 
 +
 
 +
 
 
<br />
 
<br />
 
{| class="wikitable"
 
{| class="wikitable"
|+
+
|+Fun sprites
!Script
+
!'''#'''
!Info
+
!
!Source
+
!
 +
!'''#'''
 +
!
 +
!
 +
!
 +
!
 +
!
 +
!'''#'''
 +
!
 +
!
 +
!'''#'''
 +
!
 +
!
 +
!'''#'''
 +
!
 +
|-
 +
|'''1'''
 +
|gems
 +
|
 +
|'''21'''
 +
|''white pyramid''
 +
|
 +
|'''41'''
 +
|
 +
|
 +
|'''61'''
 +
|''memory outline''
 +
|
 +
|'''81'''
 +
|star
 +
|
 +
|'''101'''
 +
|''grey module''
 +
|-
 +
|'''2'''
 +
|hypercube
 +
|
 +
|'''22'''
 +
|''tree logo''
 +
|
 +
|'''42'''
 +
|
 +
|
 +
|'''62'''
 +
|''memory''
 +
|
 +
|
 +
|
 +
|
 +
|'''102'''
 +
|''right click''
 +
|-
 +
|'''3'''
 +
|cogs
 +
|
 +
|'''23'''
 +
|white infinity
 +
|
 +
|'''43'''
 +
|white pencil
 +
|
 +
|'''63'''
 +
|''cpu outline''
 +
|
 +
|
 +
|
 +
|
 +
|'''103'''
 +
|''world''
 +
|-
 +
|'''4'''
 +
|white xp
 +
|
 +
|'''24'''
 +
|hourglass
 +
|
 +
|'''44'''
 +
|''space bar''
 +
|
 +
|'''64'''
 +
|''cpu''
 +
|
 +
|
 +
|
 +
|
 +
|'''104'''
 +
|''white warning''
 +
|-
 +
|'''5'''
 +
|exotic gems
 +
|
 +
|'''25'''
 +
|unlock
 +
|
 +
|'''45'''
 +
|''white 6-pt star''
 +
|
 +
|'''65'''
 +
|''server''
 +
|
 +
|
 +
|
 +
|
 +
|'''105'''
 +
|''grid mode''
 +
|-
 +
|'''6'''
 +
|white help
 +
|
 +
|'''26'''
 +
|white convert shard
 +
|
 +
|'''46'''
 +
|white plus
 +
|
 +
|'''66'''
 +
|''graph / statistics''
 +
|
 +
|
 +
|
 +
|
 +
|'''106'''
 +
|''list mode''
 +
|-
 +
|'''7'''
 +
|blue module
 +
|
 +
|'''27'''
 +
|white mine nothing
 +
|
 +
|'''47'''
 +
|''white blurry circle''
 +
|
 +
|'''67'''
 +
|blue shield
 +
|
 +
|
 +
|
 +
|
 +
|'''107'''
 +
|''save icon''
 
|-
 
|-
|craft init
+
|'''8'''
|1 impulse
+
|white circle
0 conditions
+
|
 
+
|'''28'''
9 actions
+
|white shard per time
 +
|
 +
|'''48'''
 +
|''to craft grid''
 +
|
 +
|'''68'''
 +
|grey shield
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|'''9'''
 +
|white cube
 +
|
 +
|'''29'''
 +
|white redo arrow
 +
|
 +
|'''49'''
 +
|''from craft grid''
 +
|
 +
|'''69'''
 +
|drill
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|'''10'''
 +
|''white target''
 +
|
 +
|'''30'''
 +
|
 +
|
 +
|'''50'''
 +
|cloud
 +
|
 +
|'''70'''
 +
|''trashcan''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|'''11'''
 +
|Dr Cubos
 +
|
 +
|'''31'''
 +
|
 +
|
 +
|'''51'''
 +
|yellow module
 +
|
 +
|'''71'''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|'''12'''
 +
|white tick
 +
|
 +
|'''32'''
 +
|
 +
|
 +
|'''52'''
 +
|red module
 +
|
 +
|'''72'''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|-
 +
|'''13'''
 +
|lock
 +
|
 +
|'''33'''
 +
|
 +
|
 +
|'''53'''
 +
|purple module
 +
|
 +
|'''73'''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''14'''
wakeup()
+
|white shard
 
+
|
global.int.set("craft_busy", 0)
+
|'''34'''
global.int.set("craft_status", 200)
+
|
global.int.set("craft_require_tier", 0)
+
|
global.double.set("craft_require_count", 0.0)
+
|'''54'''
global.int.set("craft_tier", 1)
+
|''bomb''
global.int.set("craft_mode", 1)
+
|
global.int.set("craft_output", 1)
+
|'''74'''
global.double.set("craft_count", 1.0)
+
|
global.double.set("craft_inventory", 1.0)
+
|
</syntaxhighlight>
+
|'''94'''
 +
|''checkbox''
 +
|
 +
|
 +
|
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''15'''
CmNyYWZ0IGluaXQBAAAABndha2V1cAAAAAAJAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BApjcmFm
+
|white skull
dF9idXN5CGNvbnN0YW50AgAAAAAOZ2xvYmFsLmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhj
+
|
b25zdGFudALIAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBJjcmFmdF9yZXF1aXJlX3RpZXIIY29u
+
|'''35'''
c3RhbnQCAAAAABFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQTY3JhZnRfcmVxdWlyZV9jb3VudAhj
+
|
b25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQKY3JhZnRfdGllcghjb25zdGFu
+
|
dAIBAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BApjcmFmdF9tb2RlCGNvbnN0YW50AgEAAAAOZ2xv
+
|'''55'''
YmFsLmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dAhjb25zdGFudAIBAAAAEWdsb2JhbC5kb3Vi
+
|''flag / impulse''
bGUuc2V0CGNvbnN0YW50BAtjcmFmdF9jb3VudAhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91Ymxl
+
|
LnNldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0YW50AwAAAAAAAPA/
+
|'''75'''
</syntaxhighlight>
+
|
 +
|
 +
|'''95'''
 +
|red gem?!
 +
|
 +
|
 +
|
 
|-
 
|-
 +
|'''16'''
 +
|''white square''
 +
|
 +
|'''36'''
 +
|
 +
|
 +
|'''56'''
 +
|''equals / condition''
 +
|
 +
|'''76'''
 +
|fuel can
 +
|
 +
|
 +
|
 +
|
 +
|
 
|
 
|
|}
 
 
|-
 
|-
|craft tier up
+
|'''17'''
|1 impulse
+
|white cross
 
+
|
1 condition
+
|'''37'''
 
+
|white arrow right
1 action
+
|
 +
|'''57'''
 +
|''function / action''
 +
|
 +
|'''77'''
 +
|
 +
|
 +
|'''97'''
 +
|''museum stones''
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
|+
 
!
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''18'''
:global int craft_tier
+
|health logo
 
+
|
key.1()
+
|'''38'''
(global.int.get("craft_busy") == 0)
+
|''firesword logo''
 
+
|
craft_tier = (craft_tier % 10) + 1
+
|'''58'''
</syntaxhighlight>
+
|''left click''
 +
|
 +
|'''78'''
 +
|
 +
|
 +
|'''98'''
 +
|''white stairs''
 +
|
 +
|
 +
|
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''19'''
DWNyYWZ0IHRpZXIgdXABAAAABWtleS4xAQAAAA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhj
+
|damage logo
b25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0IY29uc3RhbnQCAAAAAAEAAAAOZ2xvYmFsLmlu
+
|
dC5zZXQIY29uc3RhbnQECmNyYWZ0X3RpZXIOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQOZ2xv
+
|'''39'''
YmFsLmludC5nZXQIY29uc3RhbnQECmNyYWZ0X3RpZXIIY29uc3RhbnQEA21vZAhjb25zdGFudAIKAAAA
+
|kreds
CGNvbnN0YW50BAErCGNvbnN0YW50AgEAAAA=
+
|
</syntaxhighlight>
+
|'''59'''
|}
+
|''ship''
 +
|
 +
|'''79'''
 +
|
 +
|
 +
|'''99'''
 +
|''shipping box''
 +
|
 +
|
 +
|
 
|-
 
|-
 +
|'''20'''
 +
|wave logo
 +
|
 +
|'''40'''
 +
|
 +
|
 +
|'''60'''
 +
|''circle/orb''
 +
|
 +
|'''80'''
 +
|
 +
|
 +
|'''100'''
 +
|save icon
 
|
 
|
 
|
 
|
 
|
 
|
 
|}
 
|}

Latest revision as of 09:04, 31 January 2021

I like scripting!

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">&lt;/&gt;</span>'));

    new ClipboardJS('.copy-btn', {
        text: function(trigger) {
            return $(trigger.nextElementSibling).text();
        }
    })
        .on('success',function (e) {
        $(e.trigger).html("&lt;copied/&gt;")
        setTimeout(function() {
            $(e.trigger).html("&lt;/&gt;");
        }, 3000);
    })
        .on('error',function (e) {
        $(e.trigger).html("Error!")
        setTimeout(function() {
            $(e.trigger).html("&lt;/&gt;");
        }, 3000);
    });
})();

Factory scripts: https://www.perfecttower2.com/wiki/AI_Craftapalooza



Fun sprites
# # # # #
1 gems 21 white pyramid 41 61 memory outline 81 star 101 grey module
2 hypercube 22 tree logo 42 62 memory 102 right click
3 cogs 23 white infinity 43 white pencil 63 cpu outline 103 world
4 white xp 24 hourglass 44 space bar 64 cpu 104 white warning
5 exotic gems 25 unlock 45 white 6-pt star 65 server 105 grid mode
6 white help 26 white convert shard 46 white plus 66 graph / statistics 106 list mode
7 blue module 27 white mine nothing 47 white blurry circle 67 blue shield 107 save icon
8 white circle 28 white shard per time 48 to craft grid 68 grey shield
9 white cube 29 white redo arrow 49 from craft grid 69 drill
10 white target 30 50 cloud 70 trashcan
11 Dr Cubos 31 51 yellow module 71
12 white tick 32 52 red module 72
13 lock 33 53 purple module 73
14 white shard 34 54 bomb 74 94 checkbox
15 white skull 35 55 flag / impulse 75 95 red gem?!
16 white square 36 56 equals / condition 76 fuel can
17 white cross 37 white arrow right 57 function / action 77 97 museum stones
18 health logo 38 firesword logo 58 left click 78 98 white stairs
19 damage logo 39 kreds 59 ship 79 99 shipping box
20 wave logo 40 60 circle/orb 80 100 save icon