So what I want to try to do is add a custom item drop when killing mobs, it would still keep the original drop the mob is supposed to give, however, will just drop another item that I specify. Then on pickup of that custom item it gives anywhere from 1-20 in game currency.... I'm not sure what I would use to do this, can someone guide me through on what I would require
#(person0z) Custom Mob Drops
26 messages · Page 1 of 1 (latest)
(person0z) Custom Mob Drops
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.
!e entity killed
Group
Entity
**WARNING**
This event may mis-fire in some cases, particularly with plugins or scripts modify the damage from scripts. If you need reliable death tracking, the entity death event may be better.
Event Lines
<entity> killed (by <cause>) <entity> killed (by <entity>) <entity> kills <entity>
Triggers
when an entity is killed.
Has Player
when the killer or entity that was killed is a player. Cannot be both. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
Has NPC
when the killer or entity that was killed is an NPC. Cannot be both.
Context
<context.entity> returns the EntityTag that was killed.
<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.damager> returns the EntityTag damaging the other entity.
<context.projectile> returns a EntityTag of the projectile shot by the damager, if any.
<context.damage_type_map> returns a MapTag the damage dealt by a specific damage type with keys: B...
Determine
ElementTag(Decimal) to set the amount of damage the entity receives, instead of dying.
Has Known Location
True - this adds switches in:<area> + location_flagged:<flag name>.
Cancellable
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
!e entity death
Group
Entity
Event Lines
<entity> dies|death
Switches
by:<entity> to only process the event if the killer is known and matches the specified entity matcher.
cause:<cause> to only process the event if it was caused by a specific damage cause.
Triggers
when an entity dies. Note that this fires *after* the entity dies, and thus some data may be lost from the entity.
The death can only be cancelled on Paper.
Has Player
when the entity that died is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
Has NPC
when the entity that died is an NPC.
Context
<context.entity> returns the EntityTag that died.
<context.damager> returns the EntityTag damaging the other entity, if any.
<context.projectile> returns the EntityTag of a projectile used to kill the entity, if one was used.
<context.message> returns an ElementTag of a player's death message.
<context.cause> returns an ElementTag of the cause of the death. See !language damage cause...
<context.drops> returns a ListTag of all pending item drops.
<context.xp> returns an ElementTag of the amount of experience to be dropped.
<context.keep_inventory> returns true if the player dying is set to keep their inventory, false if...
Determine
ElementTag to change the death message.
"NO_DROPS" to specify that any drops should be removed.
"NO_XP" to specify that any XP orbs should be removed.
ListTag(ItemTag) to specify new items to be dropped.
ElementTag(Number) to specify the new amount of XP to be dropped.
"KEEP_INV" to specify (if a player death) that the inventory should be kept.
"KEEP_LEVEL" to specify (if a player death) that the XP level should be kept.
"NO_MESSAGE" to hide a player death message.
Has Known Location
True - this adds switches in:<area> + location_flagged:<flag name>.
this one
Determine ListTag(ItemTag) to specify new items to be dropped. &
<context.drops> returns a ListTag of all pending item drops. relevant
When an entity dies, determine the drops including you custom drop item
for the pickup
!e entity picks up item
Group
Player
Event Lines
<entity> picks up <item> <entity> takes <item>
Triggers
when an entity picks up an item.
Has Player
when the entity picking up the item is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
Has NPC
when the entity picking up the item is an npc.
Context
<context.item> returns an ItemTag of the item being picked up.
<context.entity> returns an EntityTag of the item entity being picked up.
<context.pickup_entity> returns an EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.
Determine
"ITEM:<ItemTag>" to change the item being picked up.
Has Known Location
True - this adds switches in:<area> + location_flagged:<flag name>.
Cancellable
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Required Plugins or Platforms
Vault
Group
player
Syntax
money [give/take/set] (quantity:<#.#>) (players:<player>|...)
Short Description
Manage a player's money.
Description
Give money to, take money from, and set the balance of a player.
If no quantity is specified it defaults to '1'.
You can specify a list of players to give to or take from. If no player(s) are specified, defaults to the attached player.
NOTE: This requires an economy plugin or script, and Vault. May work for offline players depending on economy plugin.
Returns a random integer number between the 2 specified integer numbers, inclusive.
Returns
ElementTag(Number)
Examples
# Will narrate '1', '2', or '3'
- narrate <util.random.int[1].to[3]>
for random moneyz
There's also a chance:x global event switch if you don't want the custom item to drop every time
!lang script event switch
Modern script events support the concept of 'switches'.
A switch is a specification of additional requirements in an event line other than what's in the event label it.
A switch consists of a name and a value input, and are can be added anywhere in an event line as "name:<value>".
For example, "on delta time secondly every:5:" is a valid event, where "delta time secondly" is the event itself, and "every:<#>" is a switch available to the event.
A traditional Denizen event might look like "on <entity> damaged",
where "<entity>" can be filled with "entity" or any entity type (like "player").
A switch-using event would instead take the format "on entity damaged" with switch "type:<entity type>"
meaning you can do "on entity damaged" for any entity, or "on entity damaged type:player:" for pla...
Group
Script Events
Figuring it out still*
How would I make it so it seems if the player "picks it up" it runs the commands and gets rid of the item so it can't be picked up... if that makes sense