Difference between revisions of "AI Script Repository"

From The Perfect Tower II
Jump to navigation Jump to search
(Created the page, including auto-skills and auto-miner (nearly))
 
m (Marking as Historical.)
 
Line 1: Line 1:
 +
{{Historical}}
 +
 
== Overview ==
 
== Overview ==
 
This is a collection of AI scripts that you can use to enhance your game.
 
This is a collection of AI scripts that you can use to enhance your game.

Latest revision as of 19:14, 24 August 2023

Necronomicon icon.png This page is obsolete. It is being retained for archival purposes.
It may document information that are no longer current, or features that are obsolete and/or no longer supported. Do not rely on any information on this page.


Overview

This is a collection of AI scripts that you can use to enhance your game.

After importing each script, you will probably have to add an impulse to be able to trigger it.

Early game

Simple scripts to automate or enhance regular game functions.

Tower Testing

A very simple loop to use the tower's active skills in combat. Note that the AI cannot active a targeted skill by clicking, so modules such as Firestorm will not be activated by this script. You can add or delete rows as necessary depending on how many active skill modules you have equipped.
Name Code
tower auto-use skills

(8 lines)

FXRvd2VyIGF1dG8tdXNlIHNraWxscwAAAAAAAAAACAAAABd0b3dlci5tb2R1bGUudXNlaW5zdGFudAhj
b25zdGFudAIBAAAAF3Rvd2VyLm1vZHVsZS51c2VpbnN0YW50CGNvbnN0YW50AgIAAAAXdG93ZXIubW9k
dWxlLnVzZWluc3RhbnQIY29uc3RhbnQCAwAAABd0b3dlci5tb2R1bGUudXNlaW5zdGFudAhjb25zdGFu
dAIEAAAAF3Rvd2VyLm1vZHVsZS51c2VpbnN0YW50CGNvbnN0YW50AgUAAAAXdG93ZXIubW9kdWxlLnVz
ZWluc3RhbnQIY29uc3RhbnQCBgAAABd0b3dlci5tb2R1bGUudXNlaW5zdGFudAhjb25zdGFudAIHAAAA
DGdlbmVyaWMuZ290bwhjb25zdGFudAIBAAAA
loop: useinstant(1)
  useinstant(2)
  useinstant(3)
  useinstant(4)
  useinstant(5)
  useinstant(6)
  useinstant(7)
  goto(loop)

Mine


The canonical auto-miner. By default it triggers on impulse '0' when the mine screen is open. This version of the script is resolution-independent and should not require any editing.
Name Code
ATR_MINER

(11 lines)

TODO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pc29uLmludA5nbG9iYWwuaW50LmdldAhjb25zdGFudAQJYXRyX2xheWVy
CGNvbnN0YW50BAE+CGNvbnN0YW50AgAAAAAMZ2VuZXJpYy5nb3RvCGNvbnN0YW50AgcAAAA=
:global int atr_layer
:global int atr_index
:local int index

  index = atr_index
  atr_index = atr_index + 1
  gotoif(7, atr_index == 17)
  execute("auto_tiler_recursive")
5: dig(index % 4, index / 4)
  goto(5)
7: waituntil(atr_layer > 0)
8: newlayer()
  atr_layer = atr_layer - 1
  gotoif(8, atr_layer > 0)
  goto(7)

Factory

Craft chips

Dust tiering

Laboratory

Nature experiment

Electricity experiment

Museum

Auto-combine gems



More advanced scripts

These scripts should generally be considered game-changing in some way.

Contributing