#(whospostal) Combatlog
21 messages · Page 1 of 1 (latest)
(whospostal) Combatlog
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.
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
- if <context.damager.has_flag[is_in_combat]> || <context.victim.has_flag[is_in_combat]>:
Content of Server Log Paste #118869: Denizen Debug Logs From A World Where Towns War!... pasted 2023/12/23 19:38:08 UTC-08:00, Paste length: 2948 characters across 36 lines, Content: Java Version: 17.0.9Up-time: 3h 26m
!E entity damaged
Entity
<entity> damaged by <entity> <entity> damaged (by <cause>) <entity> damages <entity>
with:<item> to only process the event when the item used to cause damage (in the damager's hand) is a specified item.
type:<entity> to only run if the entity damaged matches the entity input.
block:<block-matcher> to only run if the damage came from a block that matches the given material or location matcher.
when an entity is damaged.
when the damager or damaged entity is a player. Cannot be both. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
when the damager or damaged entity is an NPC. Cannot be both.
<context.entity> returns the EntityTag that was damaged.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.damager_block> returns the LocationTag of a block that damaged the entity, if any.
<context.cause> returns an ElementTag of reason the entity was damaged - see !language damage cause for causes.
<context.damage> returns an ElementTag(Decimal) of the amount of damage dealt.
<context.final_damage> returns an ElementTag(Decimal) of the amount of damage dealt, after armor is calculated.
<context.projectile> returns a EntityTag of the projectile, if one caused the event.
<context.damage_type_map> returns a MapTag the damage dealt by a specific damage type with keys: B...
<context.was_critical> returns 'true' if the damage was a critical hit. (Warning: this value is ca...
ElementTag(Decimal) to set the amount of damage the entity receives.
"CLEAR_MODIFIERS" to zero out all damage modifiers other than "BASE", effectively making damage == final_damage.
True - this adds switches in:<area> + location_flagged:<flag name>.
Examples too long to display... Check the website for more examples
oh i saw this in this link https://meta.denizenscript.com/Docs/Search/context.victim
Search for 'context.victim'
at the bottom in the examples so i figured it was one would i just use entity isntead?
thank you i was just confused because of the example on that page
Every event has its own context tags
after attack:
- narrate "You attacked <context.victim.name> with a <context.level> enchantment!"
oh okay my fault i miss understood
thank yall for clearing that up