Jump to content

Fix this (Simple skript) (PLease)


DragnB

Recommended Posts

on break of first stone:

 broadcast "&8[&b&lACHIEVEMENT&8]&3 >>&f&l You have gained &e[STONE] Achievement"

 

# i want custom achievements that people can get

# so what im doing here is like when you break your first stone block out of the whole game it gives a achievement called that with skript.

# it would be really cool for that and that idea.

Link to comment
Share on other sites

You can try something like this:

on break:
	event-block is stone
	{advancement::stone::*} doesn't contain player's uuid
	add player's uuid to {advancement::stone::*}
	send "&cACHIEVEMENT &8≫ &c%player% gained the acievement &cSTONE" to all players

command /achievements <offline player=%player%>:
	trigger:
		set {_gui} to chest inventory with 1 row named "Achievements"
		set slot 0 of {_gui} to iron bar named "&cLocked Achievement" with lore "&a%size of {advancement::stone::*}% &fpeople have completed this."
		{advancement::stone::*} contains player's uuid:
			set slot 0 of {_gui} to stone named "&cSTONE" with lore "&aMine some stone." and "&a%size of {advancement::stone::*}% &fpeople have completed this."
		set metadata tag "gui.advancements" of player to {_gui}
		open {_gui} to player

on inventory click:
	metadata tag "gui.advancements" of player = event-inventory
	cancel event

I've included a GUI to show what advancements you've collected.

NOTE:
the gamerule announceAdvancements must be set to false.
You can do this a couple ways:

  1. console command /gamerule announceAdvancements false
  2. the minehut panel settings tab

If you end up using this please like (💙) the comment. It encourages me to help out more on the forums.

Edited by itskegnh
Fixed GUI bug where you could remove items.

Minecraft Ranks
[DEFAULT] - 9th October 2020
[PRO] - 21st November 2020
[PATRON] - 27th October 2021

Proficiency
Python - 8 Years
C/C++ - 5 Years
Skript - 4 Years
Javascript - 3 Year
Java - 1 Year

Links
Discord - kegnh#1234

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