-
Forum
-
- It is currently 12 Nov 2026, 12:24
- All times are UTC
The Lua scripting language allows you to give your plugin more advanced features.
-
Lobby
- Inhabitant of a Supercluster
- Reactions:
- Posts: 3756
- Joined: 26 Oct 2008, 10:34
- Plugins: Showcase Store
-
Post
by Lobby » 17 Jan 2019, 16:32
Lua scripting is supported for several months now. It basically allows you to do more interactive plugins similar to fun.
The documentation contains both, some general information about Lua scripting as well a detailed description for all scripting libraries.
Lua Documentation
It's not finished yet, but I'm working on
The current state should allow you to already get started.
-
Mg3094066
- Inhabitant of a Supercluster
- Reactions:
- Posts: 3217
- Joined: 27 May 2017, 23:50
- Location: Venezuelan Republic of Mexico
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Mg3094066 » 20 Jan 2019, 23:21
this allows you to modify the game? like adding new options and that things?

I threw my dignity to trash and downloaded Free Fire... But someway i liked it ":'D
But i think it was too early to celebrate... my internet runs at 8kb...
Just wait another month...
-
Imran M
- Inhabitant of a Country
- Reactions:
- Posts: 832
- Joined: 24 Oct 2018, 11:41
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Imran M » 23 Jan 2019, 20:46
Mg3094066 wrote: 20 Jan 2019, 23:21
this allows you to modify the game? like adding new options and that things?
Maybe. It's basically more complex json that has more advanced options and doesn't describe buildings. You can use it to make a toast (basically a text that pops up, but isn't like ingame notifications). I'm kind of getting mixed up with fun functionality, so you should talk to someone else.
Edit: This has hardly any info... so you should probably just skip this. But you could read it if you want to.
I just love the DOPE-amine you get after completing a plugin!
-
JustAnyone
- Honorary Contributor
- Reactions:
- Posts: 3664
- Joined: 23 Jul 2017, 10:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Post
by JustAnyone » 23 Jan 2019, 20:52
You can create cool stuff like planets with this!
-
Lobby
- Inhabitant of a Supercluster
- Reactions:
- Posts: 3756
- Joined: 26 Oct 2008, 10:34
- Plugins: Showcase Store
-
Post
by Lobby » 22 Dec 2019, 13:43
No, because for that a compiler would be needed; it would be overkill to do that for scripting functionality.
In addition, it would be much harder to prevent Java programs from doing malicious things.
-
Hadestia
- Inhabitant of a Megalopolis
- Reactions:
- Posts: 721
- Joined: 17 Jul 2017, 14:16
- Location: Philippines
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Hadestia » 22 Dec 2019, 15:08
Lobby wrote: 22 Dec 2019, 13:43
No, because for that a compiler would be needed; it would be overkill to do that for scripting functionality.
In addition, it would be much harder to prevent Java programs from doing malicious things.
Oh okay i get it
-
Bearbear76
- Inhabitant of a Multiverse
- Reactions:
- Posts: 5701
- Joined: 10 Feb 2017, 12:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Bearbear76 » 23 Dec 2019, 00:12
Trust me Lua can do 99% of the stuff you want to do.
You could also make some malicious plugin by using l o o p s.

Just my opinion
retired
-
Bearbear76
- Inhabitant of a Multiverse
- Reactions:
- Posts: 5701
- Joined: 10 Feb 2017, 12:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Bearbear76 » 23 Dec 2019, 03:44
rjroldan1 wrote: 23 Dec 2019, 02:29
If all lua's definition or maybe tags ? and attribute is applicable?
uhh, using all of the functions of Lua? then, yeah probably.
I know what tags and attributes are in html but not in Lua.
Just my opinion
retired
-
ian`
- Metropolitan
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 15:36
- Location: 日本
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by ian` » 07 Jun 2020, 11:49
Why do some functions not show changes? i used the road condition, then built the road deco, so i use isRoadDeco, but it didn't get any changes. other cases, i put some numbers in x and y, but that didn't happen any actions.
-
Bearbear76
- Inhabitant of a Multiverse
- Reactions:
- Posts: 5701
- Joined: 10 Feb 2017, 12:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Post
by Bearbear76 » 07 Jun 2020, 14:06
distian wrote: 07 Jun 2020, 11:49
Why do some functions not show changes? i used the road condition, then built the road deco, so i use isRoadDeco, but it didn't get any changes. other cases, i put some numbers in x and y, but that didn't happen any actions.
isRoadDeco() will return a boolean (
true/
false) value. It won't change anything is the program it's more of a "checking function". Post the code here and I can give you some advice.

Just my opinion
retired
-
ian`
- Metropolitan
- Reactions:
- Posts: 117
- Joined: 04 Apr 2020, 15:36
- Location: 日本
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by ian` » 07 Jun 2020, 14:17
Ølsken wrote: 07 Jun 2020, 14:06
isRoadDeco() will return a boolean (
true/
false) value. It won't change anything is the program it's more of a "checking function". Post the code here and I can give you some advice.
Yes, i have seen all values or return of function in doc website. Boolean, number, or string.
Code: Select all
function script:click(x,y)
if Tile.isRoadDeco == true and Tile.getTraffic >= 0.3 then
stuff
end
When i'm just use getTraffic condition, the script is work, but when i put the road deco, isn't work. What should i do when road deco in my road, then just use getTraffic, lua can't detection anything.

-
JustAnyone
- Honorary Contributor
- Reactions:
- Posts: 3664
- Joined: 23 Jul 2017, 10:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Post
by JustAnyone » 07 Jun 2020, 15:32
You need to provide it with x, y and level arguments
-
Wepf
- Inhabitant of a Megacity
- Reactions:
- Posts: 256
- Joined: 14 Oct 2021, 08:19
- Location: Your lucid dream
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Post
by Wepf » 23 Nov 2021, 03:18
You do not have the required permissions to view the files attached to this post.
I play music and create theotown plugin (rarely)
Btw I'm from

and I'm 13