Jump to content

Why is this needed in any gen skript?


_U4R1A_

Recommended Posts

I was looking through some gen skripts to try and either take inspiration or learn something, and I noticed they all had the line:                     

set {gens::%location of event-block%} to uuid of player

As in

on place of hay block:
    set {gens::%location of event-block%} to uuid of player
    if {gens::%player's uuid%} < 10:
        add 1 to {gens::%player's uuid%}
        while event-block is hay block:
            wait 80 ticks
            drop 1 wheat above location of event-block

Why is that there?

I also see

set {genlocation::%location of event-block%} to uuid of player

sometimes and im guessing its the same as the other.

Finally, how would I use them?

Edited by _U4R1A_
Link to comment
Share on other sites

This is essentially a way for the skript to save the location of the generator that is specific to the person who has placed it. Since there are multiple players [more than 1] and each player has multiple generators, there needs to be something that holds all of the values of who placed which gen at what location, and set {gens::%location of event-block%} to uuid of player just happened to be one of the simplest ways to do it for people understanding it and for the skripters themselves. Hope this helps you understand a bit more!

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

1 hour ago, BanditEagle said:

This is essentially a way for the skript to save the location of the generator that is specific to the person who has placed it. Since there are multiple players [more than 1] and each player has multiple generators, there needs to be something that holds all of the values of who placed which gen at what location, and set {gens::%location of event-block%} to uuid of player just happened to be one of the simplest ways to do it for people understanding it and for the skripters themselves. Hope this helps you understand a bit more!

I actually have been having a problem with others being able to upgrade player's gens. How can i use this though?

Link to comment
Share on other sites

You don't need to bump every few hours. just be patient till someone comes and answers it. 

To actually drops tuff at those location variables you set, just loop it and drop it at the loop value like

loop {gens::*}:
	drop stick at loop-value

 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

If you dont understand your own skript i suggest altering it to your level to advance then grow to that not dive straight into the deep end you could also do

            while event-block is (your gen block):
                wait 35 seconds
                if event-block is (your gen block):
                    drop (gen item) at event-block
#Add your place variables and what not on top

lushy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...