Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

Player Head Drops #366

Open ghost opened 9 years ago

ghost commented 9 years ago

I was looking around to see if it was possible to have players drop their own head and not just a Steve head on a death. Though I only found this quote by @Zarius which was from 2012. I'm hoping maybe something was implemented and I just haven't found it yet :)

"Yes, drop: SKULL_ITEM@0 or SKULL_ITEM@1 (or 2, 3, 4) works. (0 = skeleton, 1, = wither, 2 = zombie, 3 = player, 4 = creeper)."

CultistO commented 9 years ago

It's been a long time, but this used to work at least:

PLAYER:
  - tool: PLAYER
    drop: [SKULL@THIS, DEFAULT]
    message: ["You've hewn %v's head from their body!"]
    message.victim: ["You've lost your head to %p!"]

remember the default is important, or their inventory will be deleted rather than dropping.

It's also possible to drop specific player heads:

CREATURE_SKELETON: 
    - tool: PLAYER
      drop: [SKULL_ITEM@Cultist_O] 

though it used to be that names with underscores (such as mine) would not work

EDIT: I accidentally put the following as the previous. What it actually does is make some skeletons spawn with that player head.

CREATURE_SKELETON@NORMAL: 
    - trigger: MOBSPAWN 
      spawnedby: NATURAL 
      drop: [DENY, "SKELETON@eq:head:SKULL_ITEM@Cultist_O"] 
ghost commented 9 years ago

Thanks a bunch @CultistO That's really useful! :)

For the first one..

PLAYER:
  - tool: PLAYER
    drop: [SKULL@THIS, DEFAULT]

Would that apply to a player dying under any circumstances or only if they were killed by another player? *Also, is it possible to make it only a small chance? Sorry, I'm a little new to the plugin. I have chances set up for some other drops, but not for player heads :)

CultistO commented 9 years ago

oops, I accidentally put a config to makeskeletons spawn WEARING my head, instead of DROPPING my head. Fixed in my previous post.

tool: PLAYER means it only happens if a player is doing the killing. You can make something happen 85% of the time if you add:

    chance: 0.85

A large portion of the configuration stuff can be found here: http://dev.bukkit.org/bukkit-plugins/otherdrops/pages/parameters/ though I understand that some things are missing/hard to understand also there is some more stuff in the other "pages" (centre tab at the top of that page)

ghost commented 9 years ago

Thanks a bunch @CultistO ! And the skeleton head wearing thing is actually pretty funny :) I may use it some day