#(podjazd) Hello how can i make visual cooldown on nbt item
171 messages · Page 1 of 1 (latest)
(podjazd) Hello how can i make visual cooldown on nbt item
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
someone know bc if i use a cooldown for a sword then another sword have cooldown also
could use flags
?
gotta wait for components
can you give me a example?
on player damages player with:mieczzatrucia:
- flag <context.damager> mieczzatrucia_last_hit:<context.entity>
- if <util.random_chance[10]>:
- if !<player.has_flag[mieczcooldownzatrucia]>:
- define countdown_time2 60
- flag <player> mieczcooldownzatrucia expire:<[countdown_time2]>s
- itemcooldown netherite_sword d:<[countdown_time2]>s
- inject skill_mieczzatrucia
- repeat <[countdown_time2]>:
- actionbar "<&color[#08FB71]><bold>MIECZ ZATRUCIA <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>)" targets:<player>
- define countdown_time2 <[countdown_time2].sub[1]>
- wait d:1s
- actionbar "<&color[#08FB71]><bold>MIECZ ZATRUCIA <dark_gray>» (<gray>Odnowi się za: <white>TERAZ!<dark_gray>)" targets:<player>
for this
flag doesnt work
?
you mean this ? - flag <context.damager> mieczzatrucia_last_hit:<context.entity>
its working
itemcooldown applies a cooldown to a material type not an item
so flagging an item wont help
is it possible to make a visual cooldown for specific item
yes, with components
can you help me with that?
no, components havent been implemented yet
they will be tho
they are new in 1.21.3 i think
yes but not guranteed to be next update
right
uh
but if i have 1.20.4 and denizen go update
it work for me also or on 1.21.3
only
components only work 1.21.3 and above
why another server dont have 1.21.3 and they have this feature
because - itemcooldownapplies a cooldown to a material type
yea for visual you would need to wait
this and this
they dont
are you talking ab wynncraft?
but other than that you could just use flags yea
no anarchia.gg
custom server resource pack?
yes
my bad the itemcooldown component has been added in 24w34a
so its 1.21.2+ not 1.21.3+
no, material. its netherite_sword
okat you right
- flag <player> mieczcooldownzatrucia expire:<[countdown_time2]>s you mean this?
that wont help with the visual cooldown problem
you fr gottawait for components to be added to denizen
like fr
ik but for the normal cooldown
or i mean you could do the same thing as they do
drjoenh can u help u with that
can you help me with that?
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
this please ^
Content of Denizen Script Paste #127933: Unnamed Denizen Script Paste... pasted 2024/11/09 11:59:51 UTC-08:00, Paste length: 2417 characters across 66 lines, Content: ###### MIECZE #######
hmmmm everything looks like, is it not working properly?
ok nvm it work but i have another question maybe you know how can i make if the 2 actionbar active at the same time then he they will changed to 1 actionbar like - actionbar "<fisrtactionbar> && <secondactionbar>
you know what i mean?
bc rn if 2 cooldown active the actionbar are stacking
you just have to do that manually
can just have a flag on the player that is a list of things their actionbar should show
wouldn't overload that, though
- repeat <[countdown_time]>:
- if <player.has_flag[mieczcooldownzatrucia]>:
- actionbar " " targets:<player>
- stop
- else:
- actionbar "<&color[#9F08FB]><bold>MIECZ ENDERMANA <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time]>s<dark_gray>)" targets:<player>
- define countdown_time <[countdown_time].sub[1]>
- wait d:1s
i do like this
and when the <player.has_flag[mieczcooldownzatrucia]>
is active still the actionbar below working idk why
okay i fix that
but i have another problem
- actionbar "<&color[#9F08FB]><bold>MIECZ ENDERMANA <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>) | <&color[#08FB71]><bold>MIECZ ZATRUCIA <dark_gray>» (<gray>Odnowi się za: <white><[countdown_time2]>s<dark_gray>)"
how can i get the countdown value from the 1 event
One event?
I see you're flagging the player.
You can pull the players flag expiration.
!t flaggableobject.flag_expiration
Returns a TimeTag indicating when the specified flag will expire.
See !language flag system.
TimeTag
Returns the DurationTag between this time object and the real current system time.
The value will always be positive.
This is equivalent to the absolute value of ".duration_since[<util.time_now>]", and exists primarily as a convenience tag.
For example, a TimeTag for Tuesday will return a DurationTag of '1d' when the tag is used on a Monday.
A TimeTag for Sunday will also return a DurationTag of '1d' when used on a Monday.
If positive/negative differences are required, consider instead using !tag TimeTag.duration_since.
DurationTag
Returns the value of the duration in an easily readable format like 2h 30m,
where minutes are only shown if there is less than a day left and seconds are only shown if there are less than 10 minutes left.
Will show seconds, minutes, hours, days, and/or years.
ElementTag
Tag parse results for <duration[54s].formatted>: https://paste.denizenscript.com/View/127941
54s
Or.
Tag parse results for <duration[54s].formatted_words>: https://paste.denizenscript.com/View/127942
54 seconds
That’s not what he meant. What he means is that when he uses the 'enderman sword,' it shows 58s on the action bar, for example, and then when he uses the 'poison sword,' the action bar shows: 'ENDERMAN SWORD: 60s | POISON SWORD 60s,' but he can use the enderman sword earlier. I’m not sure if you understood me.
Is that correct?
No
the thing is that if I use the enderman sword and after 20 seconds I use the poison sword, the action bar will show that the enderman sword will cool down in 40 seconds and the poison power will cool down in 60 seconds
Define the element before narrating. Check if the player has both flags?
- define S "Countdown: 10"
- if <player.has_flag[test_countdown]>:
- define S "Countdown: 10 | Alt Countdown: 20"
Etc.
dont uderstand
You want the message to change depending on the cooldowns right?
in this event
Help us help you by pasting your script to https://paste.denizenscript.com/New/Script and linking it back here.
Content of Denizen Script Paste #128015: Unnamed Denizen Script Paste... pasted 2024/11/10 13:13:41 UTC-08:00, Paste length: 4935 characters across 100 lines, Content: ###### MIECZE #######
in this event area
are
two on player damages player with:mieczzatrucia:
and the issue is
if player use a specialitem
then he gets cooldown and the visual cooldown on the action bar like <specialtiem> cooldown: <value>
and if i use the second special item then
yes
I don't think you wanna do the action bar here.
I think you wanna do it..
!e delta time
Core
delta time hourly|minutely|secondly
every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).
every <count> seconds, minutes, or hours of game calculation time. Default repetitions count of 1.
This is specifically based on the rate of time advancement in the game server,
which is not necessarily equivalent to the real passage of time (for example, this event may fire slower if the server is lagging).
For real time, see !event system time.
<context.second> returns the exact delta time since system start.
but i want to do
if second item will activate
then
the first actionbar stop
and make one action bar but it will be show 2 cooldown
you know what i mean?
Yes. As said, do a delta time event to check for flags to change the message.
You can action bar once to show it updated in your swing, and then let the delta time do it's thing.
Although some may suggest a task is a better idea as long as the player is online, but a delta time may be better right now.
idk how can i do that i started in denizen yesterday
Weirdly there is no example usage for delta time event.
I pulled up the meta for it though.
so i must to change the repeat to delta ?
on delta time secondly:
- narrate "Running every second"
You can do something every second that passes with a delta time event.
!t server.online_players
queue
foreach [stop/next/<object>|...] (as:<name>) (key:<name>) [<commands>]
Loops through a ListTag, running a set of commands for each item.
Loops through a ListTag of any type. For each item in the ListTag, the specified commands will be ran for that list entry.
Alternately, specify a map tag to loop over the set of key/value pairs in the map, where the key will be <[key]> and the value will be <[value]>.
Specify "key:<name>" to set the key definition name (if unset, will be "key").
Specify "as:<name>" to set the value definition name (if unset, will be "value").
Use "as:__player" to change the queue's player link, or "as:__npc" t...
Maybe someone else has a better method?
Bc right now if player use the first SpecialSword then he get cooldown 60 seconds and 60 seconds countdown on the actionbar and if then i will use the second SpecialSword then the sword gets cooldown 60s also the first SpecialSword actionbar go stop and creates a new Actionbar like "<specialword1> >> <value1> | <specialsword2> <value2>" but th issue is that i can't get the value of the cooldown from the first specialsword idk why if i try <[countdown_time2]> then plugin say that its not define and i want to only get the value of the second or first value(event)
and i can do that in this what you send me?
You can pull the flags as long as you loop through the players.
The foreach meta page shows you how to loop through every online player and do things with them.
the loop is working but i can't use the value
the define to put it on the second actionbar
Because it's not defined in that event.
You have to define it yourself.
Defines are localized to the event or script that you're working in.
(Script being task, procedure, etc.)
okay
someone know is it possible in fakeequip that if player get the fakeequip armor effect will changes also?
Effects?
You mean like if the item has changes to the player like speed and health?
i mean bc default when player get the fakeequip
then still he gets the armor from the another amor equipment
and i dont want this
Fake equipping seems like just a visual thing, but I'm not fluent enough to know if this is the case.
But judging from the name of fakeequip I'd like to say that the armor is still on the player, but visually it's changed.
yes thats why im asking is it possible to do smth like this but the armor will effects be changed
vague