Search found 4617 matches

by Bearbear76
Mon Jun 22, 2020 11:05
Forum: Plug-In Discussion
Topic: pls translate -Player
Replies: 6
Views: 919

Re: pls translate -Player

Morse code --> text AFTER PHILIPPINE INDEPENDENCE PROJECTS SOMETHING FLYING IN THEOTOWN. THIS IS AFTER THE BIG ONE.HI#####EIGHT HUNDRED TWENTY MILLION TWO HUNDRED ONE THOUSAND SIX HUNDRED NINETEEN# #TWO HUNDRED THIRTY-TWO THOUSAND THREE HUNDRED TWENTY-THREE#ONE MILLION THREE HUNDRED FIFTEEN THOUSAN...
by Bearbear76
Mon Jun 22, 2020 11:01
Forum: Smalltalk
Topic: Welcome to Dreamhouse Apartments!
Replies: 19
Views: 2638

Re: Welcome to Dreamhouse Apartments!

Too dense for me I want a garden.
by Bearbear76
Sun Jun 21, 2020 23:27
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10902
Views: 659426

Re: TheoTown Forum Chatbox

CommanderABab wrote:
Sun Jun 21, 2020 15:53
You should review your video of the takeapart.
Took a photo before taking it apart, but I can't find anywhere that is not screwed :?
by Bearbear76
Sun Jun 21, 2020 15:54
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

Hmm a lot of misplaced local s. Local variables are local to their block no one can access them outside. These are the basic blocks: if condition then -- If block end for i = 1, 100 do -- For block end while condition do -- While block end function foo() -- Function block end For example: local a = ...
by Bearbear76
Sun Jun 21, 2020 15:34
Forum: Smalltalk
Topic: TheoTown Forum Chatbox
Replies: 10902
Views: 659426

Re: TheoTown Forum Chatbox

I took apart my PC to see if there was any loose cables and I couldnt find any but now I have a different problem I have 4 screws left... :?
by Bearbear76
Sun Jun 21, 2020 12:56
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

distian wrote:
Sun Jun 21, 2020 12:49
Wait, what the rank and new lua functions is available on older version than 1884? :bt
yes, If I understood correctly.
by Bearbear76
Sun Jun 21, 2020 12:52
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

So if i don't include "_," thing, my variables turns to global variable? Anything that doesn't have local in front of it is a global value in Lua. _ is just a variable name like rank since Lua allows alphanumeric and _ for variable names (cannot start with a number though) _ in Lua is a common plac...
by Bearbear76
Sun Jun 21, 2020 12:12
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

Still not work @Ølsken Is the flag an animation or static? If static you forgot getFrame([ number ]) . So flag1 = Draft.getDraft("Aosflag4"):getFrame(1) -- or Drawing.drawImage(flag1:getFrame(1), x, y) An animation it works well if i exclude the rank condition but i dont want it to be like that Ah ...
by Bearbear76
Sun Jun 21, 2020 12:02
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

rjroldan1 wrote:
Sun Jun 21, 2020 11:46
Still not work @Ølsken
Is the flag an animated or static?
If static you forgotgetFrame([number]).

So

Code: Select all

flag1 = Draft.getDraft("Aosflag4"):getFrame(1)
-- or
Drawing.drawImage(flag1:getFrame(1), x, y)
by Bearbear76
Fri Jun 19, 2020 11:46
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

Lua metatables: Lua tables have more functionality than just storing values. they can also be modified via metatables. For example: let's say you want to count the number of elements in a table. local foo = {1, 2, 3, 4, 5} print(#foo) --- Outputs: 5 You can get the number of elements using the leng...
by Bearbear76
Fri Jun 19, 2020 11:35
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

What's the function of "." ? "." would mean find the following inside the table for example: local foo = {"Olsken", x = 12, hello = function(t) print("x value of this table is: "..t.x) end} Inside foo we have 3 elements, a string a value and a function, we can access the values which have a key: (k...
by Bearbear76
Fri Jun 19, 2020 11:07
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

Is this works in theory ?Screenshot_20200619-165330.png <!> match1 = string.match(..cname, "^Aos") <-- "..cname" would give you an error, you don't need the ".." part I would also recommend using ":" instead of "." cname:match("^Aos") -- Is the same as string.match(cname, "^Aos") Basically the ":" ...
by Bearbear76
Fri Jun 19, 2020 10:18
Forum: Plug-In Discussion
Topic: How can I make a notification recommend a building to a player in Lua?
Replies: 12
Views: 1767

Re: How can I make a notification recommend a building to a player in Lua?

rjroldan1 wrote:
Fri Jun 19, 2020 10:17
Ølsken wrote:
Fri Jun 19, 2020 10:16
rjroldan1 wrote:
Fri Jun 19, 2020 10:09
Is these are same as json "meta"{} ?
Classes?
I mean meta tags?
Ah metatables?

I'll explain in the chatbox
by Bearbear76
Fri Jun 19, 2020 10:16
Forum: Plug-In Discussion
Topic: How can I make a notification recommend a building to a player in Lua?
Replies: 12
Views: 1767

Re: How can I make a notification recommend a building to a player in Lua?

rjroldan1 wrote:
Fri Jun 19, 2020 10:09
Is these are same as json "meta"{} ?
Classes?
by Bearbear76
Fri Jun 19, 2020 10:15
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

The usage of script:event() is bit wrong so I'll explain it. Lua ( example_script.lua ): function script:event(x, y, level, event) if event == Script.EVENT_PLACED then <...> end end First you need to use event == [ event ] :P I see on your script (image) in luacheck linting post https://forum.theot...
by Bearbear76
Fri Jun 19, 2020 10:07
Forum: Smalltalk
Topic: plugin creators
Replies: 8
Views: 1155

Re: plugin creators

Apparently no one uses the PCW
by Bearbear76
Fri Jun 19, 2020 10:04
Forum: Plug-In Discussion
Topic: How can I make a notification recommend a building to a player in Lua?
Replies: 12
Views: 1767

Re: How can I make a notification recommend a building to a player in Lua?

foo , bar are usually used to replace "something" in examples. Meaning it can be anything it's just a placeholder. Class example in Lua. local foo = {} function foo.new() local self = setmetatable({}, {__index = foo}) self.bar = 12 return self end function foo:print_bar() print(self.bar) end return...
by Bearbear76
Fri Jun 19, 2020 9:55
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

The usage of script:event() is bit wrong so I'll explain it. Lua ( example_script.lua ): function script:event(x, y, level, event) if event == Script.EVENT_PLACED then <...> end end First you need to use event == [ event ] :P Also you can only use events to drafts that are attached to the script. JS...
by Bearbear76
Thu Jun 18, 2020 15:18
Forum: Plug-In Discussion
Topic: How to make the background of a picture to be transparent?
Replies: 6
Views: 793

Re: How to make the background of a picture to be transparent?

I create a picture for plugin using drawing on windows 10. But if I download the picture,its background is black. I want it to be transparent. Is there anyway I can do it? Or I should change to another software to draw? ps:how to post picture and files on this forum? How to upload images: https://f...
by Bearbear76
Thu Jun 18, 2020 13:41
Forum: Lua Scripting
Topic: Lua chatbox
Replies: 168
Views: 11320

Re: Lua chatbox

How to use City.earnMoney(amount, x, y, showOverlay, budgetItem) In order to use City.earnMoney() in the first place your script would need to be privileged JSON : "id": "$script", "type": "script", "script": "example.lua", "privileged": [privilege key] // <-- You need this to use this function Note...

Go to advanced search