Difference between revisions of "Running Lua Scripts"
(Fixed some typos; Added reference to the Autorun Manager.) |
(update info on script manager) |
||
Line 10: | Line 10: | ||
* Type in ''dofile("filename")'' of course replacing ''filename'' with the one you memorized | * Type in ''dofile("filename")'' of course replacing ''filename'' with the one you memorized | ||
− | If it says ''could not find file'' - maybe you entered | + | If it says ''could not find file'' - maybe you entered the wrong filename. |
==== Autorun ==== | ==== Autorun ==== | ||
Line 16: | Line 16: | ||
* Download script to TPT folder. | * Download script to TPT folder. | ||
* Change it's name to ''autorun.lua'' | * Change it's name to ''autorun.lua'' | ||
− | * Make sure you set extension | + | * Make sure you set the extension correctly, so it isn't ''autorun.lua.txt'' or something |
* Run TPT | * Run TPT | ||
− | ==== | + | ==== Using the script manager ==== |
− | + | Ultimate solution, allows you to start and stop multiple scripts from within TPT without having to edit the files each time. It also allows you to download moderator-approved scripts from a script server in a few clicks. | |
− | + | * Download cracker64's script from [http://tpt.io/:19400 here]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Ultimate solution, allows you to start and stop multiple scripts from within TPT without having to edit the files each time | ||
− | * Download cracker64's script from [http:// | ||
* Follow the instruction inside the forum post | * Follow the instruction inside the forum post | ||
Revision as of 05:02, 29 October 2014
This is a guide to successfully run a Lua script published by community. There are several ways of doing that.
Dofile
- Download the script to your TPT folder. (The folder with powder.exe and such)
- Memorize the name of file.
- Make sure you also know the file extension, it is considered a part of the name.
- Open your TPT console
- Type in dofile("filename") of course replacing filename with the one you memorized
If it says could not find file - maybe you entered the wrong filename.
Autorun
If you want some script be loaded everytime you run TPT, you can do the following. Although you might not be able to have several scripts on autorun.
- Download script to TPT folder.
- Change it's name to autorun.lua
- Make sure you set the extension correctly, so it isn't autorun.lua.txt or something
- Run TPT
Using the script manager
Ultimate solution, allows you to start and stop multiple scripts from within TPT without having to edit the files each time. It also allows you to download moderator-approved scripts from a script server in a few clicks.
- Download cracker64's script from here.
- Follow the instruction inside the forum post
If you get any errors from scripts, you should report them to the script contributor. Make sure to copy the error from the console.