#Pickaxe

1 messages · Page 1 of 1 (latest)

forest bay
#

How do I make it so the player can hold any pickaxe for this to work?

#

on join:
    if {keylvl::%player's uuid%} is not set:
        set {keylvl::%player's uuid%} to 0
   
   
   
   
   
command /upgrade:
    permission: keylvl.use
    permission message: &cYou do not have permission to execute this command!
    cooldown: 20 seconds
    trigger:
        if player is holding```
jaunty haven
#

you already said it

#

"any pickaxe"

forest bay
#

omg

#

I'm so slow 😭

#

quickest thread ever

forest bay
jaunty haven
#

mhm?

forest bay
#

How would I format

jaunty haven
#

format what

forest bay
#
if {coins::%player's uuid%} is 50:```
#

is that correct?

jaunty haven
#

mhm, is and = are the same thing in skript

forest bay
#

ok

jaunty haven
#

though it only passes if it is exactly 50

forest bay
#

= 50

#

?

jaunty haven
#

sure, if you're checking for 50 or more coins

forest bay
#

sorry just trying to get every bit of info now

jaunty haven
#

mhm

#

its aight

#

that's what I'm here for

forest bay
#

🙂

#

so

#

if I were to lets say "buy" something for 50 coins. And have the level go up by one. Would the thing be like chance 50%: give player 5 gold chance 50% give player 6 gold??? Idk if that was even English

#

if I were to go up a level I would keep doing that?

jaunty haven
#

wdym?

#

like they get coins each level?

forest bay
#

the point is upgrading to get keys

#

instead of paying for it for usd

jaunty haven
#

mhm

forest bay
jaunty haven
#

well if you want a 100% of getting smth, two chances of 50% won't work, those chances are ran seperately

#

it would be chance of 50%: # code else: # code

#

or weighted random for more options

forest bay
#

ok let me make smth and then ill see

jaunty haven
#

cool, you can ping me whenever

forest bay
#

   
command /upgrade:
    permission: keylvl.use
    permission message: &cYou do not have permission to execute this command!
    cooldown: 20 seconds
    trigger:
        if player is holding any pickaxe:
            if {coins::%player's uuid%} is >=50:
                set {keylvl::%player's uuid%} to 0
                send "&aYou just upgraded your &dKey Level&a you will now have a greater chance to get keys when you mine!"```
#

oh shoot I forgot smth

jaunty haven
#

lel

forest bay
#

ik one thing might not be intented

#
command /upgrade:
    permission: keylvl.use
    permission message: &cYou do not have permission to execute this command!
    cooldown: 20 seconds
    trigger:
        if player is holding any pickaxe:
            if {keylvl::%player's uuid%} is 0:
                if {coins::%player's uuid%} is >=50:
                    set {keylvl::%player's uuid%} to 1
                    send "&aYou just upgraded your &dKey Level&a you will now have a greater chance to get keys when you mine!"
                    chance 50%:
                        execute console command "give 5 keys"
                    chance 50%:
                        execute console command "give 10 keys"
                        
            else if {keylvl::%player's uuid%} is 1:
                if {coins::%player's uuid%} is >=100:
                set {keylvl::player's uuid} to 2
                chance 70%:
                    execute console command "give 10 keys"
                chance 30%:
                    execute console command "give 200 keys"
                
                else:
                    send "&cYou need &6&l50 coins &cto upgrade!" to player```
#

ok maybe a few

jaunty haven
#

other than it not having 100% of giving keys, it looks good

#

I'd recommend doing it another way anyway

forest bay
jaunty haven
#

if the cost changes by a fixed amount each time, you can set a var to the cost, then just add 1 to the level each time, won't need to check each level seperately

jaunty haven
#

sure gimme a sec, on mobile

forest bay
jaunty haven
#
    if {costvar::%player's uuid%} is not set:
        set {costvar::%player's uuid%} to 50```
then for levelup
```if {coins::%player's uuid%} >= {costvar::%player's uuid%}:
    add 1 to {keylvl::%player's uuid%}
    set {costvar::%player's uuid%} to (2 * {costvar::%player's uuid%})```
jaunty haven
#

idk if you saw yet, @forest bay

jaunty haven
forest bay
#

Ima fix it in a bit

forest bay
jaunty haven
#

wdym?

forest bay
#

I only want 3

#

Levels of this Key Finder