Jump to content

Hello - I need Gens skript


iZinko

Recommended Posts

  • 4 weeks later...
while 1 is 1:
	loop all players in world:
		on place of diamond block:
			set {_genone} to {blockplace::%event-location%}
		drop diamond at {_genone}

Try this, idk what will happen if you restart the server. Let me know if there are any errors.

 

[VIP] C0mplexity 12/6/2020

reaction plz

Link to comment
Share on other sites

On 11/16/2020 at 2:25 PM, C0mplexity said:

while 1 is 1:
	loop all players in world:
		on place of diamond block:
			set {_genone} to {blockplace::%event-location%}
		drop diamond at {_genone}

Try this, idk what will happen if you restart the server. Let me know if there are any errors.

What...?

 

 

The one and only.

 

 

 

Link to comment
Share on other sites

on place:
	event-block is hay bale:
		add 1 to {gens::%player%::count}
		add location of event-block to {gens::%player%::locations}
		set {gen::%event-block%::owner} to player

every 3 seconds:
	loop all blocks in world "Plots":
		loop-block is hay bale:
			{gen::%loop-block%::owner} is online:
				drop 1 wheat with no velocity at location above loop-block

on block damage:
	event-block is hay bale:
		{gen::%event-block%::owner} is player:
			remove location of event-block from {gens::%player%::locations}
			remove 1 from {gens::%player%::count}
			set block to air
			give player event-block named "&e`&6Wheat Gen&e` &7(Right Click)" lored " ||&7Place somewhere to|| &7start generating wheat!|| "
			play sound "entity.block.pickup" with volume 1 and pitch 1 to player
			send action bar "&7Picked up | &6Wheat Gen" to player
		else:
			play sound "entity.villager.no" with volume 1 and pitch 1 to player
			send action bar "&eThis is not your generator!" to player

You could also make the picking up and placing into a function for having more than 1 generator on your server. Also I didn't add upgrading because I'm too lazy 😛 The upgrading should be fairly simple though. Message me on discord conner#3253 if you need any more help.

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...