Jump to content

Skill Jumps from 17 to M1


Recommended Posts

  • 6 months later...
  • 2 years later...
  • 3 years later...
  • 1 year later...

from marty:
To have something cleaner, look in source game char_skill.cpp

At the beginning you hit after the last #include

#define ENABLE_FORCE2MASTERSKILL

then you search: 

			case SKILL_NORMAL:

you replace:

		switch (GetSkillMasterType(pkSk->dwVnum))
		{
		case SKILL_NORMAL:
			if (GetSkillLevel(pkSk->dwVnum) >= 17)
			{
				if (GetQuestFlag("reset_scroll.force_to_master_skill") > 0)
				{
					SetSkillLevel(pkSk->dwVnum, 20);
					SetQuestFlag("reset_scroll.force_to_master_skill", 0);
				}
				else
				{
					if (number(1, 21 - MIN(20, GetSkillLevel(pkSk->dwVnum))) == 1)
						SetSkillLevel(pkSk->dwVnum, 20);
				}
			}
			break;

For this:

		switch (GetSkillMasterType(pkSk->dwVnum))
		{
			case SKILL_NORMAL:

				if (GetSkillLevel(pkSk->dwVnum) >= 17)
				{
#ifdef ENABLE_FORCE2MASTERSKILL
					SetSkillLevel(pkSk->dwVnum, 20);
#else
					if (GetQuestFlag("reset_scroll.force_to_master_skill") > 0)
					{
						SetSkillLevel(pkSk->dwVnum, 20);
						SetQuestFlag("reset_scroll.force_to_master_skill", 0);
					}
					else
					{
						if (number(1, 21 - MIN(20, GetSkillLevel(pkSk->dwVnum))) == 1)
							SetSkillLevel(pkSk->dwVnum, 20);
					}
#endif
				}
				break;

you compile and that's it, all your skills increase m1 with 17 points

If you want the define, put it in your commondefines or service.h to have more control over the changes

Captura-de-pantalla-2024-03-20-112804.pn

 

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.