Project MMO

Project MMO

10M Downloads

Milestone set to [0] will trigger when the player dies and respawns

deadlymango opened this issue ยท 1 comments

commented

Describe the bug
I have a skill named "barbarian". There are perks associated with it that will run commands when the player reaches certain milestones, such as milestones = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]. The commands run are like pmmo admin @s set combat level 50.

There is another perk that runs the command pmmo admin @s set combat level 0 at milestones = [0]. This is meant to trigger when /pmmo admin @s set barbarian level 0 is run by the server admin (me). I verify that this works as intended: I type this command, Barbarian level is set to 0, and Combat drops to 0, too.

When the player dies in game (either normal gameplay or by /kill command), I find that the perk with the milestones = [0] entry triggers. This resets the player's Combat level to 0, even though the player's Barbarian level was not apparently set to 0.

Options relating to losing XP and levels on death are disabled.

I noticed this bug in a personal modpack. I took out every mod except for PMMO. The bug still occurred.

Bug occured while running on a dedicated server. I have not tested on integrated server. EDIT: I just tested on integrated server; bug is also present there.

Expected behavior
When the player dies, and server options to lose XP and levels on death are disabled, I expected to not have the perk with milestone = [0] be triggered.

To Reproduce

  1. Use the Perks entries listed below
  2. Add some levels into Barbarian skill (e.g. 10) to activate the perks that give the player Combat 50.
  3. Die
  4. See that the perk with the milestone entry for 0 triggered upon respawn.

Screenshots
See video:

pmmo_bug.mp4

errr, not sure why it's embedding like that. Here is another link for the video: https://files.catbox.moe/s0rn7e.mp4

Versions:

  • Minecraft: 1.20.1
  • Loader: Forge-47.3.0
  • PMMO: 1.20.1-1.4.24

Additional context
pmmo-server file attached
pmmo-Perks.txt
pmmo-server.txt

Here is my pmmo-Perks.toml file contents:

`
#These settings define which perks are used and the settings which govern them.
[Perks]

[Perks.For_Event]
		
	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set combat level 0"
		milestones = [0]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set combat level 10"
		milestones = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set combat level 100"
		milestones = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set combat level 150"
		milestones = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set agility level 10"
		milestones = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set agility level 100"
		milestones = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set agility level 150"
		milestones = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set agility level 0"
		milestones = [1]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set fishing level 10"
		milestones = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set fishing level 100"
		milestones = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set fishing level 150"
		milestones = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39]

	[[Perks.For_Event.SKILL_UP]]
		skill = "barbarian"
		perk = "pmmo:command"
		command = "pmmo admin @s set fishing level 0"
		milestones = [0]

`

commented

This is amazingly thorough. I'll work on this right away.