Difference between revisions of "User:Troylaurin"

From The Perfect Tower II
Jump to navigation Jump to search
(sprite table)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
A bunch of scripts to craft stuff.
+
I like scripting!
  
 
IN DEVELOPMENT.  USE AT YOUR OWN RISK.<br />
 
 
== General scripts ==
 
{| class="wikitable"
 
!Script
 
!Info
 
!Source
 
|-
 
|craft init
 
|1 impulse
 
 
*on wake
 
 
9 actions
 
|
 
 
{| class="wikitable mw-collapsible mw-collapsed"
 
{| class="wikitable mw-collapsible mw-collapsed"
!
+
!Click to copy (tamperscript)
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|<syntaxhighlight lang="javascript">
wakeup()
+
// ==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==
  
global.int.set("craft_busy", 0)
+
(function() {
global.int.set("craft_status", 200)
+
    'use strict';
global.int.set("craft_require_tier", 0)
 
global.double.set("craft_require_count", 0.0)
 
global.int.set("craft_tier", 1)
 
global.int.set("craft_mode", 1)
 
global.int.set("craft_output", 1)
 
global.double.set("craft_count", 1.0)
 
global.double.set("craft_inventory", 1.0)
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
CmNyYWZ0IGluaXQBAAAABndha2V1cAAAAAAJAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BApjcmFm
 
dF9idXN5CGNvbnN0YW50AgAAAAAOZ2xvYmFsLmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X3N0YXR1cwhj
 
b25zdGFudALIAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BBJjcmFmdF9yZXF1aXJlX3RpZXIIY29u
 
c3RhbnQCAAAAABFnbG9iYWwuZG91YmxlLnNldAhjb25zdGFudAQTY3JhZnRfcmVxdWlyZV9jb3VudAhj
 
b25zdGFudAMAAAAAAAAAAA5nbG9iYWwuaW50LnNldAhjb25zdGFudAQKY3JhZnRfdGllcghjb25zdGFu
 
dAIBAAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BApjcmFmdF9tb2RlCGNvbnN0YW50AgEAAAAOZ2xv
 
YmFsLmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dAhjb25zdGFudAIBAAAAEWdsb2JhbC5kb3Vi
 
bGUuc2V0CGNvbnN0YW50BAtjcmFmdF9jb3VudAhjb25zdGFudAMAAAAAAADwPxFnbG9iYWwuZG91Ymxl
 
LnNldAhjb25zdGFudAQPY3JhZnRfaW52ZW50b3J5CGNvbnN0YW50AwAAAAAAAPA/
 
</syntaxhighlight>
 
|}
 
|-
 
|craft GO
 
|
 
|
 
|-
 
|craft tier up
 
|1 impulse
 
 
 
*key 1
 
 
 
1 condition
 
  
* not busy crafting
+
    // ------------------------------------------
 +
    // 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% } \
 +
");
  
1 action
+
    $('pre').wrap('<div class="precontainer"></div>');
|
+
    $('pre').before($('<span class="copy-btn">&lt;/&gt;</span>'));
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
:global int craft_tier
 
  
key.1()
+
    new ClipboardJS('.copy-btn', {
(global.int.get("craft_busy") == 0)
+
        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);
 +
    });
 +
})();
  
craft_tier = (craft_tier % 10) + 1
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
DWNyYWZ0IHRpZXIgdXABAAAABWtleS4xAQAAAA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhj
 
b25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0IY29uc3RhbnQCAAAAAAEAAAAOZ2xvYmFsLmlu
 
dC5zZXQIY29uc3RhbnQECmNyYWZ0X3RpZXIOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQOZ2xv
 
YmFsLmludC5nZXQIY29uc3RhbnQECmNyYWZ0X3RpZXIIY29uc3RhbnQEA21vZAhjb25zdGFudAIKAAAA
 
CGNvbnN0YW50BAErCGNvbnN0YW50AgEAAAA=
 
 
</syntaxhighlight>
 
</syntaxhighlight>
 
|}
 
|}
|-
 
|craft mode up
 
|1 impulse
 
  
* key 2
+
Factory scripts: https://www.perfecttower2.com/wiki/AI_Craftapalooza
  
1 condition
 
  
* not busy crafting
 
  
2 actions
+
<br />
|
+
{| class="wikitable"
{| class="wikitable mw-collapsible mw-collapsed"
+
|+Fun sprites
 +
!'''#'''
 +
!
 +
!
 +
!'''#'''
 +
!
 +
!
 +
!
 +
!
 +
!
 +
!'''#'''
 +
!
 +
!
 +
!'''#'''
 +
!
 +
!
 +
!'''#'''
 
!
 
!
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''1'''
:global int craft_mode
+
|gems
:global int craft_output
+
|
 
+
|'''21'''
key.2()
+
|''white pyramid''
(global.int.get("craft_busy") == 0)
+
|
 
+
|'''41'''
craft_mode = (craft_mode % 3) + 1
+
|
craft_output = 1
+
|
</syntaxhighlight>
+
|'''61'''
 +
|''memory outline''
 +
|
 +
|'''81'''
 +
|star
 +
|
 +
|'''101'''
 +
|''grey module''
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''2'''
DWNyYWZ0IG1vZGUgdXABAAAABWtleS4yAQAAAA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhj
+
|hypercube
b25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0IY29uc3RhbnQCAAAAAAIAAAAOZ2xvYmFsLmlu
+
|
dC5zZXQIY29uc3RhbnQECmNyYWZ0X21vZGUOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQOZ2xv
+
|'''22'''
YmFsLmludC5nZXQIY29uc3RhbnQECmNyYWZ0X21vZGUIY29uc3RhbnQEA21vZAhjb25zdGFudAIDAAAA
+
|''tree logo''
CGNvbnN0YW50BAErCGNvbnN0YW50AgEAAAAOZ2xvYmFsLmludC5zZXQIY29uc3RhbnQEDGNyYWZ0X291
+
|
dHB1dAhjb25zdGFudAIBAAAA
+
|'''42'''
</syntaxhighlight>
+
|
|}
+
|
 +
|'''62'''
 +
|''memory''
 +
|
 +
|
 +
|
 +
|
 +
|'''102'''
 +
|''right click''
 
|-
 
|-
|craft output up
+
|'''3'''
|1 impulse
+
|cogs
 
+
|
* key 3
+
|'''23'''
 
+
|white infinity
1 condition
+
|
 
+
|'''43'''
* not busy crafting
+
|white pencil
 
+
|
2 actions
+
|'''63'''
 +
|''cpu outline''
 +
|
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
+
|'''103'''
!
+
|''world''
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''4'''
:global int craft_mode
+
|white xp
:global int craft_output
+
|
:local int max
+
|'''24'''
 
+
|hourglass
key.3()
+
|
(global.int.get("craft_busy") == 0)
+
|'''44'''
 
+
|''space bar''
max = (13101300 / (100 ^ craft_mode)) % 100
+
|
craft_output = (craft_output % max) + 1
+
|'''64'''
</syntaxhighlight>
+
|''cpu''
 +
|
 +
|
 +
|
 +
|
 +
|'''104'''
 +
|''white warning''
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''5'''
D2NyYWZ0IG91dHB1dCB1cAEAAAAFa2V5LjMBAAAADmNvbXBhcmlzb24uaW50Dmdsb2JhbC5pbnQuZ2V0
+
|exotic gems
CGNvbnN0YW50BApjcmFmdF9idXN5CGNvbnN0YW50BAI9PQhjb25zdGFudAIAAAAAAgAAAA1sb2NhbC5p
+
|
bnQuc2V0CGNvbnN0YW50BANtYXgOYXJpdGhtZXRpYy5pbnQOYXJpdGhtZXRpYy5pbnQIY29uc3RhbnQC
+
|'''25'''
9OjHAAhjb25zdGFudAQBLw5hcml0aG1ldGljLmludAhjb25zdGFudAJkAAAACGNvbnN0YW50BANwb3cO
+
|unlock
Z2xvYmFsLmludC5nZXQIY29uc3RhbnQECmNyYWZ0X21vZGUIY29uc3RhbnQEA21vZAhjb25zdGFudAJk
+
|
AAAADmdsb2JhbC5pbnQuc2V0CGNvbnN0YW50BAxjcmFmdF9vdXRwdXQOYXJpdGhtZXRpYy5pbnQOYXJp
+
|'''45'''
dGhtZXRpYy5pbnQOZ2xvYmFsLmludC5nZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dAhjb25zdGFudAQD
+
|''white 6-pt star''
bW9kDWxvY2FsLmludC5nZXQIY29uc3RhbnQEA21heAhjb25zdGFudAQBKwhjb25zdGFudAIBAAAA
+
|
</syntaxhighlight>
+
|'''65'''
|}
+
|''server''
 +
|
 +
|
 +
|
 +
|
 +
|'''105'''
 +
|''grid mode''
 
|-
 
|-
|craft count up
+
|'''6'''
|1 impulse
+
|white help
 
+
|
* key 9
+
|'''26'''
 
+
|white convert shard
1 condition
+
|
 
+
|'''46'''
* not busy crafting
+
|white plus
 
+
|
5 actions
+
|'''66'''
 +
|''graph / statistics''
 +
|
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
+
|'''106'''
!
+
|''list mode''
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''7'''
:global double craft_count
+
|blue module
:local double pow
+
|
:local double inc
+
|'''27'''
 
+
|white mine nothing
key.9()
+
|
(global.int.get("craft_busy") == 0)
+
|'''47'''
 
+
|''white blurry circle''
  gotoif(99, craft_count > 900000.0)
+
|
  gotoif(a, craft_count < 1.0)
+
|'''67'''
  pow = double.floor(0.01 + (craft_count // 10.0))
+
|blue shield
a: inc = 10.0 ^ pow
+
|
  craft_count = craft_count + inc
+
|
</syntaxhighlight>
+
|
 +
|
 +
|'''107'''
 +
|''save icon''
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''8'''
DmNyYWZ0IGNvdW50IHVwAQAAAAVrZXkuOQEAAAAOY29tcGFyaXNvbi5pbnQOZ2xvYmFsLmludC5nZXQI
+
|white circle
Y29uc3RhbnQECmNyYWZ0X2J1c3kIY29uc3RhbnQEAj09CGNvbnN0YW50AgAAAAAFAAAADmdlbmVyaWMu
+
|
Z290b2lmCGNvbnN0YW50AmMAAAARY29tcGFyaXNvbi5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29u
+
|'''28'''
c3RhbnQEC2NyYWZ0X2NvdW50CGNvbnN0YW50BAE+CGNvbnN0YW50AwAAAABAdytBDmdlbmVyaWMuZ290
+
|white shard per time
b2lmCGNvbnN0YW50AgQAAAARY29tcGFyaXNvbi5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3Rh
+
|
bnQEC2NyYWZ0X2NvdW50CGNvbnN0YW50BAE8CGNvbnN0YW50AwAAAAAAAPA/EGxvY2FsLmRvdWJsZS5z
+
|'''48'''
ZXQIY29uc3RhbnQEA3Bvdwxkb3VibGUuZmxvb3IRYXJpdGhtZXRpYy5kb3VibGUIY29uc3RhbnQDexSu
+
|''to craft grid''
R+F6hD8IY29uc3RhbnQEASsRYXJpdGhtZXRpYy5kb3VibGURZ2xvYmFsLmRvdWJsZS5nZXQIY29uc3Rh
+
|
bnQEC2NyYWZ0X2NvdW50CGNvbnN0YW50BANsb2cIY29uc3RhbnQDAAAAAAAAJEAQbG9jYWwuZG91Ymxl
+
|'''68'''
LnNldAhjb25zdGFudAQDaW5jEWFyaXRobWV0aWMuZG91YmxlCGNvbnN0YW50AwAAAAAAACRACGNvbnN0
+
|grey shield
YW50BANwb3cQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQDcG93EWdsb2JhbC5kb3VibGUuc2V0CGNv
+
|
bnN0YW50BAtjcmFmdF9jb3VudBFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhjb25z
+
|
dGFudAQLY3JhZnRfY291bnQIY29uc3RhbnQEASsQbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQDaW5j
+
|
</syntaxhighlight>
+
|
|}
+
|
 +
|
 
|-
 
|-
|craft count down
+
|'''9'''
|1 impulse
+
|white cube
 
+
|
* key 8
+
|'''29'''
 
+
|white redo arrow
1 condition
+
|
 
+
|'''49'''
* not busy crafting
+
|''from craft grid''
 
+
|
5 actions
+
|'''69'''
 +
|drill
 +
|
 +
|
 +
|
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''10'''
:global double craft_count
+
|''white target''
:local double pow
+
|
:local double inc
+
|'''30'''
 
+
|
key.8()
+
|
(global.int.get("craft_busy") == 0)
+
|'''50'''
 
+
|cloud
  gotoif(a, craft_count < 1.0)
+
|
  pow = double.floor(-0.01 + (craft_count // 10.0))
+
|'''70'''
a: inc = 10.0 ^ pow
+
|''trashcan''
  gotoif(99, craft_count - inc < 1.0)
+
|
  craft_count = craft_count - inc
+
|
</syntaxhighlight>
+
|
 +
|
 +
|
 +
|
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''11'''
EGNyYWZ0IGNvdW50IGRvd24BAAAABWtleS44AQAAAA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50Lmdl
+
|Dr Cubos
dAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0IY29uc3RhbnQCAAAAAAUAAAAOZ2VuZXJp
+
|
Yy5nb3RvaWYIY29uc3RhbnQCAwAAABFjb21wYXJpc29uLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhj
+
|'''31'''
b25zdGFudAQLY3JhZnRfY291bnQIY29uc3RhbnQEATwIY29uc3RhbnQDAAAAAAAA8D8QbG9jYWwuZG91
+
|
YmxlLnNldAhjb25zdGFudAQDcG93DGRvdWJsZS5mbG9vchFhcml0aG1ldGljLmRvdWJsZQhjb25zdGFu
+
|
dAN7FK5H4XqEvwhjb25zdGFudAQBKxFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhj
+
|'''51'''
b25zdGFudAQLY3JhZnRfY291bnQIY29uc3RhbnQEA2xvZwhjb25zdGFudAMAAAAAAAAkQBBsb2NhbC5k
+
|yellow module
b3VibGUuc2V0CGNvbnN0YW50BANpbmMRYXJpdGhtZXRpYy5kb3VibGUIY29uc3RhbnQDAAAAAAAAJEAI
+
|
Y29uc3RhbnQEA3BvdxBsb2NhbC5kb3VibGUuZ2V0CGNvbnN0YW50BANwb3cOZ2VuZXJpYy5nb3RvaWYI
+
|'''71'''
Y29uc3RhbnQCYwAAABFjb21wYXJpc29uLmRvdWJsZRFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91
+
|
YmxlLmdldAhjb25zdGFudAQLY3JhZnRfY291bnQIY29uc3RhbnQEAS0QbG9jYWwuZG91YmxlLmdldAhj
+
|
b25zdGFudAQDaW5jCGNvbnN0YW50BAE8CGNvbnN0YW50AwAAAAAAAPA/EWdsb2JhbC5kb3VibGUuc2V0
+
|
CGNvbnN0YW50BAtjcmFmdF9jb3VudBFhcml0aG1ldGljLmRvdWJsZRFnbG9iYWwuZG91YmxlLmdldAhj
+
|
b25zdGFudAQLY3JhZnRfY291bnQIY29uc3RhbnQEAS0QbG9jYWwuZG91YmxlLmdldAhjb25zdGFudAQD
+
|
aW5j
+
|
</syntaxhighlight>
+
|
|}
 
 
|-
 
|-
|craft inventory use
+
|'''12'''
|1 impulse
+
|white tick
 
+
|
* key 5
+
|'''32'''
 
+
|
1 condition
+
|
 
+
|'''52'''
* not busy crafting
+
|red module
 
+
|
1 action
+
|'''72'''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''13'''
:global double craft_inventory
+
|lock
 
+
|
key.5()
+
|'''33'''
(global.int.get("craft_busy") == 0)
+
|
 
+
|
craft_inventory = 1.0 - craft_inventory
+
|'''53'''
</syntaxhighlight>
+
|purple module
 +
|
 +
|'''73'''
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 +
|
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''14'''
E2NyYWZ0IGludmVudG9yeSB1c2UBAAAABWtleS41AQAAAA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50
+
|white shard
LmdldAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0IY29uc3RhbnQCAAAAAAEAAAARZ2xv
+
|
YmFsLmRvdWJsZS5zZXQIY29uc3RhbnQED2NyYWZ0X2ludmVudG9yeRFhcml0aG1ldGljLmRvdWJsZQhj
+
|'''34'''
b25zdGFudAMAAAAAAADwPwhjb25zdGFudAQBLRFnbG9iYWwuZG91YmxlLmdldAhjb25zdGFudAQPY3Jh
+
|
ZnRfaW52ZW50b3J5
+
|
</syntaxhighlight>
+
|'''54'''
|}
+
|''bomb''
 +
|
 +
|'''74'''
 +
|
 +
|
 +
|'''94'''
 +
|''checkbox''
 +
|
 +
|
 +
|
 
|-
 
|-
|craft script check
+
|'''15'''
|TODO
+
|white skull
 +
|
 +
|'''35'''
 +
|
 +
|
 +
|'''55'''
 +
|''flag / impulse''
 +
|
 +
|'''75'''
 +
|
 +
|
 +
|'''95'''
 +
|red gem?!
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
 
|-
 
|-
 +
|'''16'''
 +
|''white square''
 +
|
 +
|'''36'''
 +
|
 +
|
 +
|'''56'''
 +
|''equals / condition''
 +
|
 +
|'''76'''
 +
|fuel can
 +
|
 +
|
 +
|
 +
|
 +
|
 
|
 
|
 
|-
 
|-
 +
|'''17'''
 +
|white cross
 +
|
 +
|'''37'''
 +
|white arrow right
 +
|
 +
|'''57'''
 +
|''function / action''
 +
|
 +
|'''77'''
 +
|
 +
|
 +
|'''97'''
 +
|''museum stones''
 +
|
 +
|
 
|
 
|
|}
 
 
|-
 
|-
|craft producer set (pg1)
+
|'''18'''
|1 impulse
+
|health logo
 
+
|
* key 4
+
|'''38'''
 
+
|''firesword logo''
1 condition
+
|
 
+
|'''58'''
* not busy crafting & crafting producers
+
|''left click''
 
+
|
14 actions
+
|'''78'''
 +
|
 +
|
 +
|'''98'''
 +
|''white stairs''
 +
|
 +
|
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
 
|-
 
|-
|<syntaxhighlight lang="actionscript">
+
|'''19'''
:global int craft_output
+
|damage logo
 
+
|
key.4()
+
|'''39'''
(global.int.get("craft_busy") == 0 & global.int.get("craft_mode") == 1)
+
|kreds
 
+
|
craft_output = 1
+
|'''59'''
gotoif(a, isopen("powerplant"))
+
|''ship''
gotoif(b, isopen("mine"))
+
|
gotoif(c, isopen("factory"))
+
|'''79'''
gotoif(d, isopen("headquarters"))
+
|
gotoif(e, isopen("arcade"))
+
|
gotoif(f, isopen("laboratory"))
+
|'''99'''
goto(99)
+
|''shipping box''
f: craft_output = craft_output + 1
+
|
e: craft_output = craft_output + 1
+
|
d: craft_output = craft_output + 1
+
|
c: craft_output = craft_output + 1
 
b: craft_output = craft_output + 1
 
a: craft_output = craft_output + 1
 
</syntaxhighlight>
 
 
|-
 
|-
|<syntaxhighlight lang="text">
+
|'''20'''
GGNyYWZ0IHByb2R1Y2VyIHNldCAocGcxKQEAAAAFa2V5LjQBAAAAD2NvbXBhcmlzb24uYm9vbA5jb21w
+
|wave logo
YXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0I
+
|
Y29uc3RhbnQCAAAAAAhjb25zdGFudAQBJg5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25z
+
|'''40'''
dGFudAQKY3JhZnRfbW9kZQhjb25zdGFudAQCPT0IY29uc3RhbnQCAQAAAA4AAAAOZ2xvYmFsLmludC5z
+
|
ZXQIY29uc3RhbnQEDGNyYWZ0X291dHB1dAhjb25zdGFudAIBAAAADmdlbmVyaWMuZ290b2lmCGNvbnN0
+
|
YW50Ag4AAAASdG93bi53aW5kb3cuaXNvcGVuCGNvbnN0YW50BApwb3dlcnBsYW50DmdlbmVyaWMuZ290
+
|'''60'''
b2lmCGNvbnN0YW50Ag0AAAASdG93bi53aW5kb3cuaXNvcGVuCGNvbnN0YW50BARtaW5lDmdlbmVyaWMu
+
|''circle/orb''
Z290b2lmCGNvbnN0YW50AgwAAAASdG93bi53aW5kb3cuaXNvcGVuCGNvbnN0YW50BAdmYWN0b3J5Dmdl
+
|
bmVyaWMuZ290b2lmCGNvbnN0YW50AgsAAAASdG93bi53aW5kb3cuaXNvcGVuCGNvbnN0YW50BAxoZWFk
+
|'''80'''
cXVhcnRlcnMOZ2VuZXJpYy5nb3RvaWYIY29uc3RhbnQCCgAAABJ0b3duLndpbmRvdy5pc29wZW4IY29u
+
|
c3RhbnQEBmFyY2FkZQ5nZW5lcmljLmdvdG9pZghjb25z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29uc3RhbnQCAQAAAA==
 
</syntaxhighlight>
 
|}
 
|-
 
|craft producer set (pg2)
 
|1 impulse
 
 
 
* key 4
 
 
 
1 condition
 
 
 
* not busy crafting & crafting producers
 
 
 
13 actions
 
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
:global int craft_output
 
 
key.4()
 
(global.int.get("craft_busy") == 0 & global.int.get("craft_mode") == 1)
 
 
 
gotoif(a, isopen("shipyard"))
 
gotoif(b, isopen("tradingpost"))
 
gotoif(c, isopen("workshop"))
 
gotoif(d, isopen("museum"))
 
gotoif(e, isopen("constructionfirm"))
 
gotoif(f, isopen("statueofcubos"))
 
goto(99)
 
f: craft_output = craft_output + 1
 
e: craft_output = craft_output + 1
 
d: craft_output = craft_output + 1
 
c: craft_output = craft_output + 1
 
b: craft_output = craft_output + 1
 
a: craft_output = craft_output + 7
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
GGNyYWZ0IHByb2R1Y2VyIHNldCAocGcyKQEAAAAFa2V5LjQBAAAAD2NvbXBhcmlzb24uYm9vbA5jb21w
 
YXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25zdGFudAQCPT0I
 
Y29uc3RhbnQCAAAAAAhjb25zdGFudAQBJg5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25z
 
dGFudAQKY3JhZnRfbW9kZQhjb25zdGFudAQCPT0IY29uc3RhbnQCAQAAAA0AAAAOZ2VuZXJpYy5nb3Rv
 
aWYIY29uc3RhbnQCDQAAABJ0b3duLndpbmRvdy5pc29wZW4IY29uc3RhbnQECHNoaXB5YXJkDmdlbmVy
 
aWMuZ290b2lmCGNvbnN0YW50AgwAAAASdG93bi53aW5kb3cuaXNvcGVuCGNvbnN0YW50BAt0cmFkaW5n
 
cG9zdA5nZW5lcmljLmdvdG9pZghjb25zdGFudAILAAAAEnRvd24ud2luZ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50Dmdsb2JhbC5p
 
bnQuZ2V0CGNvbnN0YW50BAxjcmFmdF9vdXRwdXQIY29uc3RhbnQEASsIY29uc3RhbnQCAQAAAA5nbG9i
 
YWwuaW50LnNldAhjb25zdGFudAQMY3JhZnRfb3V0cHV0DmFyaXRobWV0aWMuaW50Dmdsb2JhbC5pbnQu
 
Z2V0CGNvbnN0YW50BAxjcmFmdF9vdXRwdXQIY29uc3RhbnQEASsIY29uc3RhbnQCBwAAAA==
 
</syntaxhighlight>
 
|}
 
|-
 
|craft machine set
 
|1 impulse
 
 
* key 4
 
 
1 condition
 
 
* not busy crafting & crafting machines
 
 
4 actions
 
 
|
 
|
{| class="wikitable mw-collapsible mw-collapsed"
 
!
 
|-
 
|<syntaxhighlight lang="actionscript">
 
:global int craft_output
 
:global int y
 
:global int x
 
 
key.4()
 
(global.int.get("craft_busy") == 0 & global.int.get("craft_mode") == 2 & isopen("factory"))
 
 
x = d2i(floor(((x(position()) / i2d(width()) - 0.41) / 0.10) + 1.0))
 
y = d2i(floor(((0.80 - y(position()) / i2d(height())) / 0.214)))
 
 
gotoif(99, x<1 | x>5 | y<0 | y>1)
 
craft_output = x + y*5
 
</syntaxhighlight>
 
|-
 
|<syntaxhighlight lang="text">
 
EWNyYWZ0IG1hY2hpbmUgc2V0AQAAAAVrZXkuNAEAAAAPY29tcGFyaXNvbi5ib29sD2NvbXBhcmlzb24u
 
Ym9vbA5jb21wYXJpc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQKY3JhZnRfYnVzeQhjb25z
 
dGFudAQCPT0IY29uc3RhbnQCAAAAAAhjb25zdGFudAQBJg5jb21wYXJpc29uLmludA5nbG9iYWwuaW50
 
LmdldAhjb25zdGFudAQKY3JhZnRfbW9kZQhjb25zdGFudAQCPT0IY29uc3RhbnQCAgAAAAhjb25zdGFu
 
dAQBJhJ0b3duLndpbmRvdy5pc29wZW4IY29uc3RhbnQEB2ZhY3RvcnkEAAAADmdsb2JhbC5pbnQuc2V0
 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aW50LmdldAhjb25zdGFudAQBeQhjb25zdGFudAQBPghjb25zdGFudAIBAAAADmds
 
b2JhbC5pbnQuc2V0CGNvbnN0YW50BAxjcmFmdF9vdXRwdXQOYXJpdGhtZXRpYy5pbnQOZ2xvYmFsLmlu
 
dC5nZXQIY29uc3RhbnQEAXgIY29uc3RhbnQEASsOYXJpdGhtZXRpYy5pbnQOZ2xvYmFsLmludC5nZXQI
 
Y29uc3RhbnQEAXkIY29uc3RhbnQEASoIY29uc3RhbnQCBQAAAA==
 
</syntaxhighlight>
 
 
|}
 
|}
|}
 
 
== Parts scripts ==
 
<br />
 
 
== Producer scripts ==
 
<br />
 
 
== Machine scripts ==
 

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