#prestige

1 messages · Page 1 of 1 (latest)

wild quartz
#

so this is my skript: command /prestige:
trigger:
set metadata tag "headGUI" of player to chest inventory with 3 rows named "&6sigma"
set slot 13 of metadata tag "headGUI" of player to echo shard named "&6&lPrestige Shard" with lore "&7Use this shard at the prestige shard shop"
open (metadata tag "headGUI" of player) to player

on inventory click:
if event-inventory = (metadata tag "headGUI" of player):
cancel event
if index of event-slot is 13:
give 1 of echo shard named "&6&lPrestige Shard" to player

which works fine, but since im new to skript, can someone help me add requirements to click the prestige button? i want to make it so you have to have 50k blocks mined

jade fable
#

you forgot to indent after the if statement

#

(both of them)

#

.
you can add 1 to a counter every time a player mines a block (variable)
then you can check that in the click event

wild quartz
#

i now see why if you click one of the guis that doesnt have the prestige shard, it still gives

#

so thank you for that

jade fable
#

use a variable to store how many blocks have been mined

wild quartz
#

whats a variable..

jade fable
#

a thing you can store data in

wild quartz
#

so like nbt

jade fable
#

uhh

#

more like the metadata you have there

#

storing the GUI

#

a variable can store things too

wild quartz
#

so like

#

how could i do that

#

like make it so its stored in the gui

near gazelleBOT
wild quartz
#

ok also when i click on any part of my inv, it gives me a prestige shard

#

actully only when i try to move a block

wild quartz
#

ill read rhis to see if it helps

#

something like this?

#

this probably

#

this guy was using money as his main thing, im using blocks broken so i need to know how to change that from that

jade fable
#

add 1 to a player's variable when they break a block

wild quartz
jade fable
#

show me your line of code

wild quartz
#

command /prestige:
trigger:
set metadata tag "headGUI" of player to chest inventory with 3 rows named "&6sigma"
set slot 13 of metadata tag "headGUI" of player to echo shard named "&6&lPrestige Shard" with lore "&7Use this shard at the prestige shard shop"
open (metadata tag "headGUI" of player) to player

on inventory click:
if event-inventory = (metadata tag "headGUI" of player):
cancel event
if index of event-slot is 13:
give 1 of echo shard named "&6&lPrestige Shard" to player

#

thats all i have so far

jade fable
#

I meant show me the line with your variable

#

also,

wild quartz
#

i dont have one

near gazelleBOT
#

x8ight suggests that you read this embed

Formatting Code In Discord
Why?

Code blocks make it easier for helpers to identify potential errors -- help them help you!

The Format

```vb
on chat:
broadcast "This is how you format code!"
```

How It Looks
on chat:
    broadcast "This is how you format code!"
Extra Info

On US keyboards, the grave character (`) is located above the tab key on the top left of the keyboard

jade fable
wild quartz
#

okay i will

#

how do i start with requirement tho

jade fable
#

one thing at a time

wild quartz
#

command /prestige:
trigger:
set metadata tag "headGUI" of player to chest inventory with 3 rows named "&6sigma"
set slot 13 of metadata tag "headGUI" of player to echo shard named "&6&lPrestige Shard" with lore "&7Use this shard at the prestige shard shop","&a&lʀᴇǫᴜɪʀᴇᴍᴇɴᴛꜱ:", "", "&cʙʟᴏᴄᴋꜱ ᴍɪɴᴇᴅ: &7%{_required_blocks_mined::%player%}%
open (metadata tag "headGUI" of player) to player

on inventory click:
if event-inventory = (metadata tag "headGUI" of player):
cancel event
if index of event-slot is 13:
give 1 of echo shard named "&6&lPrestige Shard" to player

#

this is my try

#

and it says some errors in chat

#

ok thats pretty small but ye

#

ok so i cought the "

#

caught

wild quartz
#

on mine:
add 1 to &7%{_required_blocks_mined::%player%}%
does that look right

#

does this look right?

jade fable
#

some parts of it. Why do you have colour codes and % around the variable?

#

thats also a local variable, which you dont want

wild quartz
#

i read your article and dont understand the difference

#

wait

#

on mine:
add 1 to {mined::%player%}

#

?

jade fable
#

better, but still a local variabel

wild quartz
#

any chance u would turn it into global for me

jade fable
#

remoev the _

wild quartz
#

and in my script do i put 50000 anywhere so it knows what it needs

jade fable
#

probably in an if statement somewhere, yes

wild quartz
#

like

#

if player reaches 50000 {mined::%player%}

jade fable
#

not exactly

wild quartz
#

how can i do?