Drop money from player - Bug
sqweelow opened this issue · 26 comments
Hello!
I have a small problem there.
When player killed by another player its working fine and he drops Bag of Gold. But when killed player's have no money (balance=0) its still drops gold from him, but i setted rob_from_victim = true. Any suggestions?! Thanks!
Please provide me with debug information. Enable debug "/mh debug" and kill a player with 0 in balance and let me see the output from the console.
There is no any errors i think...
[10:13:33 INFO]: [MobHunting][Debug] Gamix died - Killstreak ended
[10:13:33 INFO]: [MobHunting][Debug] Gamix was killed by a DonMugad
[10:13:33 INFO]: [MobHunting][Debug] ======================== New kill ==========================
[10:13:33 INFO]: [MobHunting][Debug] DonMugad killed a PvpPlayer (Minecraft)@(world:-1832,76,-709)
[10:13:33 INFO]: [MobHunting][Debug] Basic Prize=100 for killing a PvpPlayer
[10:13:33 INFO]: [MobHunting][Debug] Grinding detection is disabled in config.yml
[10:13:33 INFO]: [MobHunting][Debug] DonMugad has no Rank Multiplier
[10:13:33 INFO]: [MobHunting][Debug] Killstreak=0, level=0, multiplier=1.0
[10:13:33 INFO]: [MobHunting][Debug] This was a PVP kill (killed=Gamix), number of bounties=0
[10:13:33 INFO]: [MobHunting][Debug] There is no Bounty on Gamix
[10:13:33 INFO]: [MobHunting][Debug] [AchievementBlocked] Achievements is disabled in world:world
[10:13:33 INFO]: [MobHunting][Debug] [AchievementBlocked] Achievements is disabled in world:world
[10:13:33 INFO]: [MobHunting][Debug] RecordKill: DonMugad killed a PvpPlayer (Minecraft) Cash=100
[10:13:33 INFO]: [MobHunting][Debug] Description to be send:<!> Вы убили игрока Gamix
[10:13:33 INFO]: [MobHunting][Debug] PVP kill reward is '100'
[10:13:33 INFO]: [MobHunting][Debug] Gamix lost 100
[10:13:33 INFO]: [MobHunting][Debug] 100 was dropped on the ground as item SKULL (# of rewards=2)
[10:13:33 INFO]: [MobHunting][Debug] The command did not run because random number (0.05265741846702232) was bigger than chance (0.0)
[10:13:33 INFO]: [MobHunting][Debug] Did not drop a head: random(0.855356779668332)>chance(0.3)
[10:13:33 INFO]: [MobHunting][Debug] ======================= kill ended (37)=====================
[10:13:33 INFO]: Gamix died
No but you have set the reward to be 100
[10:13:33 INFO]: [MobHunting][Debug] Basic Prize=100 for killing a PvpPlayer
But I setted rob_from_victim to true? It should take money from killed player balance!?
I think it’s working like that:
If killed player have money he drops 100 after his death
If his balance >100 it’s doesn’t drop money
No, the 100 you have set, is exactly like when you kill a mob. Its the same.
Set it to 0 and rob from victim will work. You will get x% of the balance when you kill another player
My config:
pvp_allowed: true
rob_from_victim: true
money:
amount: '100'
chance: 1.0
But i found this one:
-# The kill prize can be a number to steal x dollars from the killed player,
-# or it can be a cut in percent of his balance. Rob from victiom is about where the money comes from. -# If FALSE the money comes from from the server, if TRUE the money comes from the dead player.
-# If you dont want the player to get any money for PVP kills, you MUST set pvp_kill_prize: 0
Should i paste this pvp_kill_prize: 0 to config?
Thank you a lot! But I want 100$ not a percent! And there is no string called pvp_kill_prize :(
-# ########################################################################
-# Pvp rewards
-# ########################################################################
-# Pvp configuration. Set pvp_allowed = true if you want give the players a reward when they kill eachother.
-# You can alsp run a console command when this happens to give the player a reward or punish him.
-# You can you the following variables {player},{world},{killed_player}.
-# An example could be to give the player permission to fly
-# for 1 hour or use give command to the player items.
-# You can also specify the message send to the player.
-# You can run many console commands on each line, each command
-# must be separated by |
pvp:
player:
# Set pvpAllowed=false to disable rewards on killing other players.
pvp_allowed: true
# Set rob_from_victim=true to steal from the victim or
# rob_from_victim=false to get the reward money from the server.
rob_from_victim: true
# Write the message to the killer, describing the reward / console commands
message: §7§l<§c§l!§7§l> §7Вы убили игрока §4§l{killed_player}
# The kill prize can be a number to steal x dollars from the killed player,
# or it can be a cut in percent of his balance. Rob from victiom is about where the money comes from.
# If FALSE the money comes from from the server, if TRUE the money comes from the dead player.
# If you dont want the player to get any money for PVP kills, you MUST set pvp_kill_prize: 0
money:
amount: '100'
chance: 1.0
# One or more console commands to be run when a player kills another player.
commands:
- chance: '0.0'
cmd: ''
# Drop a head of the killed player
head:
drophead: true
# The Head price if you want playerheads to have a value like the bag of gold.
value: ''
chance: 0.3
message: §7§l<§c§l!§7§l> §7И вам выпала его голова.
What should i change there? To let dead players drop 100$ if they have this amount and nothing if they dont :/
Like I said this plugin is awesome, thank you for a nice job and support, but its looks not right, when player that doesn’t have this amount of money can drop it!
Its 10:50 pm in Denmark, I think you are going to sleep, so thank you and have a great night!
Sorry I have been very busy at work.
Please check if this build works better for you.
https://fractal.lindegaard.one:8181/job/MobHunting/710/
The PVP reward cant be bigger than the killed players balance, if rob_from_victim is enabled.
If the player has 68 gold, and you have written 100 gold in config.yml, then the reward will only be 68.
Let me know the result. So I can close the ticket.