#(podjazd) I have a question
77 messages · Page 1 of 1 (latest)
(podjazd) I have a question
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.
hello i have a question im just downloaded Denizen and have a question is it possible to Make a sword, and when you hit someone, there's a 10% chance that you'll poison the player. If the player gets poisoned, they won't be able to be poisoned again for the next 30 seconds. and is it possible to make a visual cooldown like this?
Most of those are possible yes. Visual cooldown is a little more tricky.
You can use minecrafts vanilla cooldown system but it only affects it on a material basis.
but its possbible the visual cooldown yes?
if i want make a visual cooldown on diamond_sword
When denizen fully supports item components it can do cooldowns on individual items, but right now you can only tell it the material to have a cooldown. So all existences of diamond swords would have the cooldown.
okay thanks for helping and last question is it hard to teach denizen cuz i really need this feature
to my server
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
It's got a learning curve, but shouldn't be too difficult.
The discord exists to ask for help too.
okay
I'd recommend rolling through the guide first before accomplishing anything major.
okay
and if i can ask you can you give me like a simple template how what would it look like more or less?
if you can
On what looks?
I won't write out your scripts, only reference what you need. We try not to write complete scripts for others when they can learn.
To start off ....
!t util.random_chance
Returns a random boolean (true or false) with the given percent chance (from 0 to 100).
ElementTag(Boolean)
- if <util.random_chance[25]>:
- narrate "This happens 25% of the time"
- else:
- narrate "This happens 75% of the time"
!c cast
entity
cast [<effect>] (remove) (duration:<value>) (amplifier:<#>) (<entity>|...) (no_ambient) (hide_particles) (no_icon) (no_clear)
Casts a potion effect to a list of entities.
Casts or removes a potion effect to or from a list of entities.
The effect type must be from https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html.
If you don't specify a duration, it defaults to 60 seconds.
An infinite duration will apply an infinite duration potion effect, refer to !objecttype DurationTag for more details.
The amplifier is how many levels to *add* over the normal level 1.
If you don't specify an amplifier level, it defaults to 1...
!e entity potion effects modified
Entity
<entity> potion effects modified <entity> potion effects <change_action>
cause:<cause> to only process the event when it came from a specified cause.
effect:<effect type> to only process the event when a specified potion effect is applied.
when an entity's potion effects change.
when the entity that has changed is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
when the entity that has changed is an NPC.
<context.entity> returns the EntityTag.
<context.cause> returns the cause of the effect change, based on <@link url https://hub.spigotmc.o...
<context.action> returns the action of the effect changed, which can be 'added', 'changed', 'cleared', or 'removed'
<context.override> returns whether the new potion effect will override the old.
<context.new_effect_data> returns the new potion effect (in the same format as <@link tag EntityTag.effects_data>) (if any).
<context.old_effect_data> returns the old potion effect (in the same format as <@link tag EntityTag.effects_data>) (if any).
<context.effect_type> returns the name of the modified potion effect type.
"OVERRIDE:<ElementTag(Boolean)>" to set whether the new potion effect should override.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
If I see more or less what it is supposed to look like and see this structure, I will understand it better
It's why I recommend going through the guide.

It does roll over a lot of things, including events and such.
so there is no way you could give me such a mini template so that I could understand more or less what and how
When you've understood the guide and gone through the motions, then you'll be able to understand the meta links that I've provided.
okay ;d
Especially when it explains all of the context of what some things mean, and when some things should be in place.
This is covered in the guide.
!t title
!help
help shows help output
hello shows a source code link
update [project ...] shows an update link for the named project(s)
github [project ...] shows a GitHub link for the named project(s)
issues [project ...] shows an issue posting link for the named project(s)
info <name ...> shows a prewritten informational notice reply
rule [rule ...] shows the identified rule
quote [quote] shows a random quote that matches the search (if any)
logcheck <link> gathers information from a server log paste
versioncheck <version text> checks whether a project version is current
script <link> checks a linked script for basic syntax validity
command [name] [usage/tags] to search commands
mechanism [name] to search mechanisms
tag [name] to search tags
objecttype [name] to search object types
event [name] to search world script events
action [name] to search NPC assignment actions
language [name] to search language docs
guide [name] to search the beginner's guide pages
search [keyword] to search all meta docs
!event
!event all
Find all Events at https://meta.denizenscript.com/Docs/Events/
!t countdown
Did you mean to search for mythicspawnertag.cooldown?
!t cooldown
Multiple possible tags: <MythicSpawnerTag.cooldown>, <ScriptTag.cooldown[(<player>)]>, <PlayerTag.item_cooldown[<material>]>, <MythicMobsMobTag.global_cooldown>, <PlayerTag.skillapi.skill_cooldown[<skill>]>, <EntityTag.attack_cooldown_percent>, <EntityTag.attack_cooldown_duration>, <PlayerTag.skillapi.skill_on_cooldown[<skill>]>, <EntityTag.attack_cooldown_max_duration>.
!c cooldown
core
cooldown [<duration>] (global) (script:<script>)
Temporarily disables an interact script for the linked player.
Temporarily disables an interact script for the linked player.
Cooldown requires a type (player or global), a script, and a duration.
It also requires a valid link to a PlayerTag if using a non-global cooldown.
To cooldown non-interact scripts automatically, consider !command ratelimit.
Cooldown periods are persistent through a server restart as they are saved in the 'saves.yml'.
player
itemcooldown [<material>|...] (duration:<duration>)
Places a cooldown on a material in a player's inventory.
Places a cooldown on a material in a player's inventory.
i have it sorry for not answer
Well it seems you've opened another thread, so if all of your questions are answered then...
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@hot horizon