#Action bar

1 messages · Page 1 of 1 (latest)

fluid cipher
#

so i wanna have an action bar that every time you break a log it says "+(amount)/(amount needed)" and the amount needed is if {Woodexp::%player%} >= 10 * {Woodlevel::%player%}:and i want this part in the amount needed and im not sure how to do that can anyone help?

strange rain
#

send action bar "%string%" to player

fluid cipher
#

i havent learnt what string means yet

delicate beacon
#

a sequence of characters used to represent text

#

So basicly just text

fluid cipher
#

so how would i implement that do i just add the "%string%"?

topaz belfry
#

he means u put what u want in the ""

#

if its a variable ofc use %%

fluid cipher
#

send action bar "&3+2/%{Woodexp::%player%} >= 10 * {Woodlevel::%player%}%" to playerlike this?

#

cause ive tried this and it didnt work

topaz belfry
#

error?

#

if not try to put some text just to test it out

fluid cipher
fluid cipher
#

any help for these errors?

topaz belfry
#

try putting the 10 * {wood...} in ()

#

@fluid cipher

gaunt charm
#

‘’’’send action bar “%{Woodexp::%player%}%/%{total::%player%}%” to player’’’ if you have a total exp needed for the level

strange rain
#

figured it out yet or no?

fluid cipher
fluid cipher
loud canyon
#

bro's trying to send a condition

#

lol

loud canyon
molten mural
dire socket
fluid cipher
topaz belfry
#

wait can you show me where you are now, and explain what you want again.

fluid cipher
#

So {Woodexp::%player%} >= 10 * {Woodlevel::%player%} is the total needed and i want that to send in an action bar like send action bar "&3+2/(total needed) to player

topaz belfry
#

so what you want to do is to display the the amount of xp remaining out of the total needed in the action bar correct?

fluid cipher
#

I want to display what you just gained out of the total needed and the xp you just got is the first part &3+2/

topaz belfry
#

I suggest doing something like this
send action bar "&3<xp gained> <currentxp>/<neededxp>" to player

fluid cipher
#

Whats the <> for?

topaz belfry
#

you can ignore those, just so it will be more clear where everything is

fluid cipher
#

im still confused on how to get the needed xp to show {Woodexp::%player%} >= 10 * {Woodlevel::%player%}

delicate beacon
#

What are you trying to do?😅

round crown
#

hmm

#

if {Woodexp::%player%} >= (10 * {Woodlevel::%player%}):
send action bar "&3<xp gained> <currentxp>/<neededxp>" to player

#

should be working

fluid cipher
#

now im getting no action bar

#

i think the if breaks it

topaz belfry
#

is it set to something or is it <none>

#

the woodxp and woodlvl

fluid cipher
#

woodxp is when u break a block you get xp for it and with other chances and woodlvl is just the level from getting a specific amount of woodxp

topaz belfry
#

but why do u need the if?

fluid cipher
#

or i find a way to get this number {Woodexp::%player%} >= 10 * {Woodlevel::%player%} and put it into like {WoodReq::%player%} or something like that

topaz belfry
#

no need

#

is what you are trying to do only to display how much you gained and how much is left until next level?

fluid cipher
#

yes

topaz belfry
#

send action bar "&3<xp gained> <currentxp>/<neededxp>" to player

#

there

fluid cipher
#

i am thinking i am dumb

topaz belfry
#

yea

#

u need to put the variables there...

fluid cipher
#

oh in the <>

topaz belfry
#

yes...

#

not in it, but instead of it

fluid cipher
#

am i still dumb?

#

cause i think i am

topaz belfry
#

show me the code

fluid cipher
#

now im here

topaz belfry
#

code

fluid cipher
#
    if event-block is oak wood or birch log or spruce log or jungle log or acacia log or dark oak log:
        if {NoBlockDrop::%player%} = true:
            chance of {WoodChance::%player%}%:
                cancel drops of items
                give 2 of event-block to player
                send action bar "&3+2 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 2 to {Woodexp::%player%}
            chance of {TripWoodChance::%player%}:
                cancel drops of items
                give 3 of event-block to player
                send action bar "&3+3 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 3 to {Woodexp::%player%}
            else:
                give 1 of event-block to player
                send action bar "&3+1 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 1 to {Woodexp::%player%}
        else:
            chance of {WoodChance::%player%}%:
                cancel drops of items
                drop 2 of event-block
                send action bar "&3+2 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 2 to {Woodexp::%player%}
            chance of {TripWoodChance::%player%}:
                cancel drops of items
                drop 3 of event-block
                send action bar "&3+3 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 3 to {Woodexp::%player%}
            else:
                cancel drops of items
                drop 1 of event-block
                send action bar "&3+1 %{Woodexp::%player%}/{Woodlevel::%player%}%" to player
                add 1 to {Woodexp::%player%}```
topaz belfry
#

you are dividing the xp with the level

fluid cipher
#

how do i make it the number of {Woodexp::%player%} >= 10 * {Woodlevel::%player%}

#

cause thats the req xp for next level

topaz belfry
fluid cipher
#

i also have thison join: while player is online: if {Woodexp::%player%} >= 10 * {Woodlevel::%player%}: add 1 to {Woodlevel::%player%} add 2 to {WoodChance::%player%} play sound "entity.player.levelup" at volume 1 and pitch 1 to player send "&3&l━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" to player send "<tooltip:&eClick to view your WoodCutting progress!><run command:/Woodstats>&b&lSKILL LEVEL UP &3Woodcutting &8%{Woodlevel::%player%}-1%&l➜&3%{Woodlevel::%player%}%<reset>" to player send "" to player send "&a&lREWARDS" send " &eWoodCutting %{Woodlevel::%player%}%" to player send " &8%{WoodChance::%player%}-2%%%&l➜&a%{WoodChance::%player%}%%% &fChance for double logs" to player send " &8+&b5XP" to player send "&3&l━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" to player add 5 to {exp::%player%} set {Woodexp::%player%} to 0 wait 1 second

topaz belfry
#

listen this is all suppose to be really simple, this is just understanding how strings work and simple math

gaunt charm
#

where are you storing xp needed

fluid cipher
#

It isnt stored cause idk how to cause this is the requirements for next lvl {Woodexp::%player%} >= 10 * {Woodlevel::%player%}

gaunt charm
#

you should do like

#

increase {totalvar} by 10% when they level

#

and

#

if {xpvar} => {totalvar}:
#level up