Difference between revisions of "Getting Lua Scripts"

From The Powder Toy
Jump to: navigation, search
(Enter a short summary [b])
 
(tpt.getscript: added code and explanation)
Line 7: Line 7:
 
== tpt.getscript ==
 
== tpt.getscript ==
 
Gets a script from the server. This is required to get the second method: jacob1's script manager.
 
Gets a script from the server. This is required to get the second method: jacob1's script manager.
 +
 +
Here is what you type:
 +
<code>tpt.getscript(Number of script, "autorun.lua", 1)</code>
 +
Replace NUMBER OF SCRIPT with the.. well, number of script.
 +
The number says what script to get, the "autorun.lua" tells it what to save to, and 1 is the server id (Starcatcher)
  
 
== TPT Script Manager ==
 
== TPT Script Manager ==

Revision as of 13:06, 4 July 2021

This page needs improvment. If you can help, HELP!

There are two ways to get scripts.


tpt.getscript

Gets a script from the server. This is required to get the second method: jacob1's script manager.

Here is what you type: tpt.getscript(Number of script, "autorun.lua", 1) Replace NUMBER OF SCRIPT with the.. well, number of script. The number says what script to get, the "autorun.lua" tells it what to save to, and 1 is the server id (Starcatcher)

TPT Script Manager

A simple method to get and manage scripts. Click onlint, then click the box beside a script to select it, then click download to get it.

To get it, use this command:

tpt.getscript(1, "autorun.lua", 1)