How to make the lottery machine like in Farmchain (🟧)

Ok, so there is a lottery machine in Farmchain. I didn’t find a guide so here goes.

First

So let’s have a history lesson here. In Farmchain, the more time goes on, the more money you get. So obviously, we want that too. Well, i hope so at least. For this guide, you will need the following:
1 vending machine
1 repeater*
1 counter
1 item grater
1 property
2 lifecycles

*- I will be using a repeater for the pictures in the guide. But 2 trigger clocks will work just fine. Possibly a wire repeater clock too, i think. Don’t know much about that one. But feel free to use a trigger clock. If you don’t know what I am talking about, go to this guide by @WhoAmI Short Guide: A guide to your types of repeaters ( 🟩)

Second

Let’s configure the vending machine. Look at the screenshot below:



This was done so a broadcast would get to our item granter. Now you can do a different icon. Like icons/Multiply Cash or icons/Add Cash.

Third

Now let’s configure the item granter. Like so:


Now we need to do something that might be a little difficult for newer gims. If that is you, then hopefully you’ll learn something along the way. Look at these blocks:

Don’t freak out! Lets go over this together. We have a property, which i named lotteryproperty. The if/else if blocks are just seeing what that property is equal to. If you don’t know where to find it, go to the logic tab and click the gear icon to add the else if/else blocks. The grant custom amount item blocks are in the for this device section. They are giving the cash that comes out of the vending machine. Well, actually behind the scenes it is the item granter, but your friends won’t even know. The random interger and numbers are found in the math section. this just chooses how much money to give you, randomized between the two intergers. Make sense now? Good. Also, you can find the get property block under the essentials tab.

Fourth

Let’s configure the property device now.


image
There is a reason for all of this. Make sure it is a number. I will explain the reason for it being player scope later. Let’s move on.

Fifth

Let’s configure the counter now.



image
This will all be used when our repeater runs its task. The player scope is mandatory.

Sixth

Let’s configure the repeaters now.


Now copy that repeater. You can do this by hovering over your existing repeater and pressing C. Make another trigger clock if you are doing that. Now edit it by clicking on it and changing the ‘start repeater when receiving’ to something like latejoin.

Seventh

Time to configure our lifecycles. Like this:


And one like this:

This is to start the repeaters.

Eight

Now for the easy part. Wires! (Or channels but newer gims should use wires.) Wire the repeaters to the counter. Both should have this setting:

Now this should all work! Probably an easier and better way!

What Difficulty Should This Guide Be?
  • 0/10 or :white_large_square:
  • 1/10 or :blue_square:
  • 2/10 or :green_square:
  • 3/10 or :green_square:
  • 4/10 or :yellow_square:
  • 5/10 or :yellow_square:
  • 6/10 or :orange_square:
  • 7/10 or :orange_square:
  • 8/10 or :red_square:
  • 9/10 or :red_square:
  • 10/10 or :purple_square:
  • 11/10 or :black_large_square:/:skull:

0 voters

As always, this is @Here_to_help, Happy Gimkitting!

10 Likes

Great guide, I can tell you put a lot of work into it!

3 Likes

thx so much

2 Likes

Nice guide! However, I remember @Zypheir saying something about being able to concatenate greater than blocks like this.

3 Likes

Not really? People are just coming in here and acting like concatenation is some godsend or something that can just solve all your problems with block code! :rofl: Concat is just a string function that combines two strings together, and although, yes, it maybe helpful using properties since you can have multiple of a property with the same name and a number at the end, this only uses one property. This is how randomness and weight tables has worked and will always work unless someone posts something that states otherwise! Also, I can be similar to the AI

Excuse me, but nobody has said anything about concatenation being some godsend.

Every single Community-Made-Guide about concatenation was made for the purpose and ONLY the purpose to help other people simplify block code.

@ClicClac was simply trying to state a way to optimize the blocks in the guide, not treat concatenation as some great thing.

Concatenation can definitely NOT solve all your problems with block code. In fact, it can’t solve most. It’s a useful tool though, and nobody here has treated it like some genius strategy.

5 Likes

Ok but like-

It’s really useful.

It’s not gonna solve all your problems, but when you know about it, you find ways you can optimize or save memory. It’s the same with AUO and recursion. It’s not something that can solve all your problems, but often they are useful tools to know how to use.

Although I might not be the best person to weigh in on this cuz I work mainly with technical gimkit rather than regular.

5 Likes

Yeah sure… but try to put a bit of research into it and then comment a suggestion…? Not trying to argue against anyone here.

Yeah, which I’m not saying is wrong though…

I’m not trying to start arguments or be rude, but do you have evidence that people are calling this a godsend? I haven’t seen anyone mention that and I would like to see your source. I’m not saying this in a rude tone and I’m just curious.

2 Likes

Bro I can’t even go to bed without stuff happening on the forums

3 Likes

@Zypheir did actually give a method to concatenate even greater or equal/less or equal blocks.

3 Likes

Where is that?

1 Like
3 Likes

I mean, you can’t use concatenation here though…

2 Likes

Yeah which wasn’t what I said…

2 Likes

why do i come back with people arguing about concatenation?

1 Like

Wait so were you saying that comment about research as a general fact or pointing out how ClicClac should not have suggested that before researching? I’m kind of confused.

1 Like

You should mostly research the post and facts surrounding the post to determine whether those facts can apply to the post, not really ClicClac not suggesting it but how including more information about it than just stating that you think…

2 Likes

Fair enough. Thanks for clearing that up.

2 Likes