Loc-attacker: parameter
Steelsouls opened this issue ยท 4 comments
I see there is a loc-offset and loc-randomize for drops. I would love to have a loc-attacker so I can prevent people from losing drops. Mostly I would use it for my "Longshot" drop, which drops some gold nuggets if you land an arrow from over 30 blocks. I would, however, also like to make ghast tears drop at the killer's feet.
Thanks for considering this and thanks again for all your intensive work on this plugin.
loc-attacker would be useless as it sounds. (Or you've just selected a poor name for what you have in mind.) The name "loc-attacker" implies that the location of the attacker is used as a condition, meaning... the attacker has to be in an exact specific location for it to trigger. More useful would be a distance condition, don't you think? (That's probably what you had in mind anyway.)
I understand where your confusion comes from, as the current parameters page contains both conditions and results. The bottom half of the parameters page (below Results:) are things that take effect after conditions have been met. Loc-offset: is already a parameter, and offsets the location of the dropped item. There is also already a distance condition, which I already use for my "Longshot" drop mentioned above.
The effect would be as follows, where #,#,# is the x,y,z offset from the location of the attacker.
PLAYER:
- tool: ANY
attackrange: ">30"
drop: GOLD_NUGGET/1-3
effect: CLICK1
loc-attacker: [0,0,0]
message: ["&cLongshot!"]
message.victim: ["&4%p &7just shot you from over 30 blocks away!"]
Ooh, I see what you mean now. You want the drops to occur not at the location of the killed mob but rather at the location of the attacker. I still think "loc-attacker" isn't the best name for this, but I also can't think of a better name... oh well.