Tailean

Member
So, I am not sure the Syntax to use to check and make sure that the player cannot use the Mythic Token unless they are at a cretin overall skill total....does anyone know a fix? I think I would need to add the code here:

Code:
 private bool CanTrainSkill(int skillId)
            {
                // Disable Spellweaving if they haven't trained it.
                // (if it's >= 90, code below will handle that)
                if (skillId == 1044114 && _Mobile.Skills.Spellweaving.Base == 0) return false;

                // Gargoyles cannot learn Archery
                if (_Mobile.Race == Race.Gargoyle && skillId == 1044091) return false;

                // Non-Gargoyles cannot learn Throwing
                if (_Mobile.Race != Race.Gargoyle && skillId == 1044117) return false;

                // If the skill is >= 90, disable.
                var name = _SkillMap[skillId];
                var internalSkillId = 0;

                foreach (var skillName in SkillInfo.Table)
                {
                    if (skillName.Name != name) continue;

                    internalSkillId = skillName.SkillID;
                    break;
                }

                if (_Mobile.Skills[internalSkillId].Base >= 90) return false;

                return true;
            }
 
Code:
                if (_Mobile.SkillsTotal >= _Mobile.SkillsCap)
                    return false;
[doublepost=1526751915][/doublepost]also I think you should add to check the possibility of result how much will SkillsTotal + "MythicTokenBonus" >= SkillsCup
 
So this still isn't working for me..the player keeps getting over 1000.0 skill points using a mythic token. Can anyone help>?
 
because you not checking sum of addition
also I think you should add to check the possibility of result how much will SkillsTotal + "MythicTokenBonus" >= SkillsCup
You can post Mythic Token script?
[doublepost=1526995885][/doublepost]You should check the sum of your skills + taking into account the selected at the time of clicking on the Confirm button.
Code:
                    case _ContinueButtonId:

                        int sumOfSelectedSkills = _Mobile.SkillsTotal + (_SelectedSkills.Count * 900);

                        if ( sumOfSelectedSkills > _Mobile.SkillsCap)
                        {
                            _Mobile.SendMessage("The chosen number of skills exceeds your cap: [{0}/{1}]. Try again!", sumOfSelectedSkills, _Mobile.SkillsCap);
                            return;
                        }

                        // Set Stats
                        _Mobile.RawStr = _Strength;
.....
 
The Mythic token comes stock with the newest ServUO repo.

Have you tried using that one?
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back