#(beamxr) event for player using an item

1 messages · Page 1 of 1 (latest)

slow olive
#

I'm trying to level restrict the use of certain weapons (if statement checking if the players level flag is above or equal to a certain value) and was wondering what event I should use to put said if statement in? I want to prevent all interaction when that item is held IF they don't meet the level requirement. I didnt see any events for like... use or anything. What events would you recommend I use?

fickle rootBOT
#

(beamxr) event for player using an 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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

slow olive
#

I had also tried player right clicks block player left clicks block, player right click entity which gets mostly everything except for players actually attacking, but didnt see anything for player right click entity

smoky fiber
#

you mention right click in both the areas of what dies and does not work.
if you meant left clikcing not finding info on

#

!e player damages entity

void wharfBOT
smoky fiber
#

!e entity damaged by entity

void wharfBOT
# smoky fiber !e entity damaged by entity
Group

Entity

Event Lines

<entity> damaged by <entity> <entity> damaged (by <cause>) <entity> damages <entity>

Switches

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.

Triggers

when an entity is damaged.

Has Player

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.

Has NPC

when the damager or damaged entity is an NPC. Cannot be both.

Context

<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...

Determine

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.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Examples

Examples too long to display... Check the website for more examples

smoky fiber
#

use that directly dor attacks ^

#

but to answer your inital question.. ya you kinda just need to go through and disable all events if level not met. no real simpler way

#

ie there is no single event for this

slow olive
# smoky fiber use that directly dor attacks ^
        - narrate test1
        on player left clicks block:
        - narrate test2
        player damages entity:
        - narrate test3
        player right clicks entity:
        - narrate test4```
heres what I have but it still isnt triggering when i actually attack stuff
#

like when i attack blocks and stuff it does, but when I actually hit a mob it doesnt

plush cypress
#

Same for the right clicks entity

slow olive