Search found 4575 matches

by Bearbear76
Fri Jul 03, 2020 23:39
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10074
Views: 399148

Re: TheoTown Forum Chatbox

Any link from commander is expected to be a rick roll
by Bearbear76
Fri Jul 03, 2020 23:37
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

Think of Drafts as an JSON object. { "id": "$example", "type": "decoration", "width": 1, "height": 1, ... } So think of Tile.getBuildingDraft() as getting the code above. Now can you see why it's not the same as the id? Now if you want to match ids you would have to add :getId() to get the Id of the...
by Bearbear76
Fri Jul 03, 2020 13:55
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

Try putting the Draft.getDraft("Id") in script:init()
by Bearbear76
Tue Jun 30, 2020 23:36
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10074
Views: 399148

Re: TheoTown Forum Chatbox

Exquisite, magnificent. Truly one of the most profound artwork ever to be seen by man. This piece should not belong on earth, it should be in heaven!
by Bearbear76
Tue Jun 30, 2020 0:04
Forum: Game Discussion
Topic: ~Fail.~
Replies: 9
Views: 771

Re: ~Fail.~

Sad no cat...
by Bearbear76
Mon Jun 29, 2020 23:39
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

Ah I should of made it with %d . local function seperate(value) local result = "" value = tostring(value):reverse() for set in value:gmatch("%d%d?%d?") do result = result..set.."," end result = result:sub(1, -2):reverse() return result end print(seperate(1234567890)) Fixed the code to work because L...
by Bearbear76
Mon Jun 29, 2020 16:02
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

is there a function to separate thousands or millions with ","? like 1,000,000 Might be a better way but this is what I came up with. local function seperate(value) local result = "" value = tostring(value):reverse() for set in value:gmatch("..?.?") do result = result..set.."," end result = result:...
by Bearbear76
Sun Jun 28, 2020 7:25
Forum: Other
Topic: In-Game Clock
Replies: 12
Views: 205

Re: In-Game Clock

KINGTUT10101 wrote:
Sun Jun 28, 2020 4:36
I have no idea how to do console stuff yet. I'll just release an alternate version for now until someone makes a tutorial about this.
I wrote a tutorial about it: viewtopic.php?p=161478#p161478

I guess it's a bit tricky to find hmm
by Bearbear76
Sun Jun 28, 2020 7:23
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10074
Views: 399148

Re: TheoTown Forum Chatbox

images (45).jpeg
by Bearbear76
Sun Jun 28, 2020 4:02
Forum: Plug-In Discussion
Topic: Can I detect a building upgrade through Lua?
Replies: 6
Views: 326

Re: Can I detect a building upgrade through Lua?

KINGTUT10101 wrote:
Thu Jun 25, 2020 16:20
So I don't need to provide values for them?
Yes, I wrote something about functions if you want to take a look: viewtopic.php?p=161342#p161342
by Bearbear76
Sun Jun 28, 2020 3:57
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10074
Views: 399148

Re: TheoTown Forum Chatbox

CommanderABab wrote:
Sat Jun 27, 2020 17:06
TheFennekin wrote:
Sat Jun 27, 2020 5:59
Why? I want to know :)
There were no posts, no topics, no user registrations. :/

2012 in stats
I'm not authorised :(
by Bearbear76
Sun Jun 28, 2020 3:55
Forum: Other
Topic: In-Game Clock
Replies: 12
Views: 205

Re: In-Game Clock

I also made something like that before which tells you how long you have opened TheoTown.
Screenshot_20200628-105226_TheoTown.jpg
JohnSallow wrote: Nice work, but can you make a 24-hours clock mode? (Instead of 1:00pm, it would be 13:00hs) :)
Maybe add a console command like

Code: Select all

clock 12
clock 24
by Bearbear76
Sat Jun 27, 2020 12:30
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

Also, is it possible to make console command require arguments? I tried TheoTown.registerCommand("testt", function(arg)) but this seems doesn't work how I expected I don't think there are any arguments. What do you want to do? I just wanted to make a command, which would set radius and zone around ...
by Bearbear76
Sat Jun 27, 2020 6:36
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

Temgamer wrote:
Sat Jun 27, 2020 0:53
Also, is it possible to make console command require arguments? I tried TheoTown.registerCommand("testt", function(arg)) but this seems doesn't work how I expected
I don't think there are any arguments. What do you want to do?
by Bearbear76
Sat Jun 27, 2020 0:15
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 87
Views: 918

Re: Lua chatbox

How to set a console command with TheoTow.registerCommand()? I've tried putting it in script:init() and it doesn't work Use TheoTown.registerCommand( string , function ) If you return a value from the function that would be displayed on the console. TheoTown.registerCommand("hello!", function() loc...
by Bearbear76
Thu Jun 25, 2020 13:30
Forum: Plug-In Discussion
Topic: Can I detect a building upgrade through Lua?
Replies: 6
Views: 326

Re: Can I detect a building upgrade through Lua?

The x y values in script:event(x, y, level, event) would be the location of the building.
by Bearbear76
Thu Jun 25, 2020 10:48
Forum: Lua Scripting
Topic: Drawing basics
Replies: 21
Views: 650

Re: Drawing basics

The building info box isn't what I need, unfortunately. Thanks for the help though. You probably use fixed values such as Drawing.drawText("Hello Lua!", 20, 70) This won't accommodate for resolution changes. Now, first we have to understand that x = 0 is the left edge of the screen and y = 0 is the...
by Bearbear76
Thu Jun 25, 2020 0:28
Forum: Problems
Topic: [Resolved]script:click() doesn't work
Replies: 11
Views: 215

Re: script:click() doesn't work

Ah you're getting a little bit confused with how TheoTown uses functions. You don't put values in script:click(x, y, level) instead you put in variables like x, y, level (a variable is a word that can have a mutateable (changeable) value). The general rule would be when you declare functions (using ...
by Bearbear76
Wed Jun 24, 2020 23:40
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10074
Views: 399148

Re: TheoTown Forum Chatbox

Maybe it's the resurgence era of the theotown forum
by Bearbear76
Wed Jun 24, 2020 23:38
Forum: Smalltalk
Topic: Welcome to Dreamhouse Apartments!
Replies: 16
Views: 485

Re: Welcome to Dreamhouse Apartments!

I want to live in block B bldg 4 5th floor room 12

Go to advanced search