Custom Generator Help

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Arcaviose

Member
Apr 15, 2020
1
0
0
19
I'm currently trying to create a generator that when placed, will start generating a value and whenever a player right clicks it, they will be given 10 * the amount that has been generated. The gen will run every 5 seconds. I can't find out how to allow multiple gens placed at once and for it to stop running once broken.



Full Code:

on place:
if event-block is red stained glass:
set {go} to true

every 5 seconds:
if {go} is true:
add 1 top {drop}
broadcast "Added 1 to get."

on right click:
if event-block is red stained glass:
if {drop} is equal to 0:
send "No iron in generator." to player
else:
give player {drop} of iron ingot named "Test"
send "Player recieved %{drop}% iron." to player
set {drop} to 0
 
Status
Not open for further replies.