MobHunting shares the wrong values
fjeddy opened this issue · 4 comments
Hello,
When two players kill the ender dragon, then both players will get a message saying that they earned "xx" for helping to kill the ender dragon and the message saying they earned "xx" for killing the ender dragon.
Both players get both messages; but only one get money for helping and the other get the money for killing it; but, it's often the wrong person that gets the money, the person who killed the dragon gets the reward for helping, while the person that helped gets the value for killing it.
Secondly; When another player kills another player, I have the settings set to
amount: 10.0%
chance: 1.0
but the killer, will only get 50% of what the victim lost. So if A kills B and B loses 100,000, then A only get's 50,000, not 100,000.
-
Killing dragons does not work diffently from killing other mobs.
-
If you think something is wrong with this part of the code I need the debug information. Enable debug information using "/mh debug" and show the debug information to me. This way Im able to see the the two player did, and I should be able to see why the get the rewards they did.
-
Again I need the debug information to see whats going on?
The calculation of the reward is VERY complex. You have a player, one or more assisters and might even have a MyPet. From the above information I not able to see whats going on.
Here is an example... The debug
[21:52:47 INFO]: [MobHunting] [Debug] ======================== New kill ==========================
[21:52:47 INFO]: [MobHunting] [Debug] Anhaneman killed a TropicalFish (Minecraft)@(world:76,45,3882)
[21:52:47 INFO]: [MobHunting] [Debug] KillAllowed: Mob killed by Anhaneman was allowed by WorldGuard
[21:52:47 INFO]: [MobHunting] [Debug] Permission 'mobhunting.mobs.*' or 'mobhunting.mobs.TROPICAL_FISH' not set, defaulting to True.
[21:52:47 INFO]: [MobHunting] [Debug] Basic Prize=$ 1240 EC for killing a TropicalFish
[21:52:47 INFO]: [MobHunting] [Debug] Anhaneman used a weapon: IRON_SWORD
[21:52:47 INFO]: [MobHunting] [Debug] Kill not within 15.0 blocks from previous kill. Dampened Kills reset to 0
[21:52:47 INFO]: [MobHunting] [Debug] Anhaneman is not Speed Grinding.
[21:52:47 INFO]: [MobHunting] [Debug] Anhaneman has killed 6 TropicalFish in 114 seconds. Avg.kill time 19 must greater than 12.0 when 10 mobs is killed.
[21:52:47 INFO]: [MobHunting] [Debug] Killstreak=8, level=1, multiplier=1.1
[21:52:47 INFO]: [MobHunting] [Debug] Reward rounded to 1364.0
[21:52:47 INFO]: [MobHunting] [Debug] [AchievementBlocked] Achievements is disabled in world:world
[21:52:47 INFO]: [MobHunting] [Debug] [AchievementBlocked] Achievements is disabled in world:world
[21:52:47 INFO]: [MobHunting] [Debug] RecordKill: Anhaneman killed a TropicalFish (Minecraft) Cash=$ 1364 EC
[21:52:47 INFO]: [MobHunting] [Debug] Message to be send to player:You caught a Tropical Fish
[21:52:47 INFO]: [MobHunting] [Debug] Anhaneman got a reward ($ 1364 EC)
[21:53:19 INFO]: [MobHunting] [Debug] ======================== New kill ==========================
[21:53:19 INFO]: [MobHunting] [Debug] Anhaneman killed a TropicalFish (Minecraft)@(world:87,42,3883)
[21:53:19 INFO]: [MobHunting] [Debug] KillAllowed: Mob killed by Anhaneman was allowed by WorldGuard
[21:53:19 INFO]: [MobHunting] [Debug] Permission 'mobhunting.mobs.*' or 'mobhunting.mobs.TROPICAL_FISH' not set, defaulting to True.
[21:53:19 INFO]: [MobHunting] [Debug] Basic Prize=$ 1240 EC for killing a TropicalFish
[21:53:19 INFO]: [MobHunting] [Debug] Anhaneman used a weapon: IRON_SWORD
[21:53:19 INFO]: [MobHunting] [Debug] Kill not within 15.0 blocks from previous kill. Dampened Kills reset to 0
[21:53:19 INFO]: [MobHunting] [Debug] Anhaneman has killed 7 TropicalFish in 113 seconds. Avg.kill time 16 must greater than 12.0 when 10 mobs is killed.
[21:53:19 INFO]: [MobHunting] [Debug] Anhaneman is not Speed Grinding.
[21:53:19 INFO]: [MobHunting] [Debug] Killstreak=11, level=2, multiplier=1.3
[21:53:19 INFO]: [MobHunting] [Debug] Reward rounded to 1612.0
[21:53:19 INFO]: [MobHunting] [Debug] [AchievementBlocked] Achievements is disabled in world:world
[21:53:19 INFO]: [MobHunting] [Debug] [AchievementBlocked] Achievements is disabled in world:world
[21:53:19 INFO]: [MobHunting] [Debug] RecordKill: Anhaneman killed a TropicalFish (Minecraft) Cash=$ 1612 EC
[21:53:19 INFO]: [MobHunting] [Debug] Message to be send to player:You caught a Tropical Fish
[21:53:19 INFO]: [MobHunting] [Debug] Anhaneman got a reward ($ 1612 EC)
[21:53:19 INFO]: [MobHunting] [Debug] ======================= kill ended (38)=====================
The config
tropical_fish:
enabled: true
message: You caught a §1{killed}
money:
amount: 20:40
chance: 1.0
commands: []
head:
drophead: false
value: 0
chance: 0
message: §aThe §1{killed} §adropped a Aquarium in the water
The basic price, which it uses in the debug message 1240
is no where to be found in the config, that number is not mentioned anywhere, so where on earth is it taken from?
The config is also a mess, why are some amounts integers while others are strings?
endermite:
enabled: true
money:
amount: '10'
chance: 1.0
commands:
- chance: '0.10'
cmd: give {player} iron_ingot 1
head:
drophead: true
value: '1'
chance: 0.1
message: §aThe §1{killed} §adropped a skull on the ground
# ### Ghast settings ###
ghast:
enabled: true
message: You killed a §1{killed}
money:
amount: 40:80
chance: 1.0
commands:
- chance: '0.10'
cmd: give {player} iron_ingot 1
head:
drophead: true
value: '0'
chance: 0.1
message: §aThe §1{killed} §adropped a skull on the ground
This is from the default config, where amount
is a string for endermite and an integer for ghast?