MobHunting

MobHunting

114k Downloads

Feature request: Change to money award tracking

SlimeDog opened this issue ยท 13 comments

commented

My server requires that the player pick up the bag of gold to earn the coins, thereby being exposed to more attacks from other mobs. In fact, the resultant bags of gold could be picked up by another player. So I don't care about the coins "earned" by killing the mobs. I really need a variable that is the amount of money picked up. I guess that isn't tracked presently in MH. (Any bag of gold picked up is added into the player's money balance, although other transactions can change the balance, so it isn't a good track over time.)

Please consider a configuration option that tracks money earned only if the bag of gold is picked up. By default, it could operate as it does now.

commented

What if I added a "Killer UUID" to the bag and only counted "picked up money" if "Killer UUID" is the same as the player UUID (who picked up the bag).

I a player or admin drop a bag the "Killer uuid" will be null and this way can be picked up by anyone.

This could also be used to deny other players to pick up the money. Not that I like that myself.

What do you think?

commented

That could work. I would not deny anyone to pick up the money. That's really part of the fun. But I suppose some might like it.

commented

@Rocologo Why don't you also add a timer to set how long the bag of gold is only allowed to be picked up by the killer? That way, if the bag isn't picked up, it isn't stuck on the ground for eternity.

commented

add a timer to set how long the bag of gold is only allowed to be picked up

I like that idea. Bag can be picked up by anyone, of course (configurable).

commented

The bag despawns like all other minecraft items

commented

I think @bennyman123abc was suggesting that they despawn sooner than "default".

commented

Unfortunately this is not possible, there is no ownership of the dropped bag, so when a player picks up a bag, I cant tell if the bag was dropped from a mob killed by the same player.

No matter if I counted dropped bags or picked up bags, it is a problem. And because of the structure of the programming, I cant handle both situations, the code would be too complex. :-(

This is not fist time I think about this problem, I have though about it serval times!

commented

OK, thanks. Perhaps just to count picked-up bags and cash values? That would tell me how many bags/cash were missed, when compared to total kills/cash.

commented

I still think about this one.... I changed the code so I counted the amount of BagOfGold picked up it would have one draw back.

The is no ownership of the dropped bags, so if two player kills one mob each and the one player pickup both bags his cash counter will be added with both bags. Would this be okay?

commented

hmm... there is another problem....

since there is no owner ship I cant see if it is a player or a mob who droppes the bag, which means that if the player drops a bag and pick it up, over and over, the counter wil go up and up .... :-(

I dont like counting dropped money, but counting pickuped seems to give more problems...

I still dont know how to solve this....

commented

Yes, I can appreciate the issues. I don't have a good solution, without storing more data. Perhaps a data element or two in the bag could track the necessary bits.

Obviously, it's OK (in some configurations) for a player to drop a bag (I don't do this). That really complicates the counter. Not counting pickup of a bag dropped by you (which would require storing those data) would still allow two (or more) players to collude.

Perhaps counting only the first time a bag is picked up by a player (which again, would require storing those data).

commented

No, I'm suggesting that after a certain amount of time, other players would be able to pick up the bag.

commented

OK. That's good.