Joew

Member
Good!

Just one question. I notice that when you train skills from NPCs, they gives you very random values. I see about 20% of skill, sometimes more than 30% and sometimes 40% and so on...

How could i change it to ALWAYS TRAIN the skill to exactly 30% of skill, please?


Thank you very much!
 
IIRC the skill you get from the NPC is based on the skill the NPC has.
Thank you!

I changed the file: Scripts\Mobiles\AI\BaseAI.cs

Find:
Code:
if (skill != null && theirSkill != null && skill.Base >= 60.0 && m_Mobile.CheckTeach(skill.SkillName, e.Mobile))
               {
                 double toTeach = skill.Base / 3.0;
   
  if (toTeach > 42.0)
                 {
                   toTeach = 42.0;
                 }

Change to:
Code:
if (skill != null && theirSkill != null && skill.Base >= 60.0 && m_Mobile.CheckTeach(skill.SkillName, e.Mobile))
               {
                 double toTeach = skill.Base / 3.0;

  toTeach = 30.0; // CUSTOM - NPC TRAIN SKILLS RATE (30%)
   
  /* if (toTeach > 42.0)
                 {
                   toTeach = 42.0;
                 } */
 
After some tests i figured out that it isn't working as intendeed. =(

Sometimes it trains above 30% =P

Could anyone help me, please?

What am i missing, please?

Thank you!
 
Sry for necro but i had the same question and i found the answer (i think) so i might as well answer it if anyone else wants to know.

BaseAI.cs
if (skill != null && theirSkill != null && skill.Base >= 60.0 && m_Mobile.CheckTeach(skill.SkillName, e.Mobile))
{
double toTeach = skill.Base / 3.0;

if (toTeach > 42.0)
{
toTeach = 42.0;
}
So this makes it so that the skill the NPC has and can teach is divided by 3.

The way to make an NPC to teach more is just to change the skill that npc has.

TinkerGuildmaster.cs
[Constructable]
public TinkerGuildmaster()
: base("tinker")
{
SetSkill(SkillName.Lockpicking, 65.0, 88.0);
SetSkill(SkillName.Tinkering, 120.0);
SetSkill(SkillName.RemoveTrap, 85.0, 100.0);

Tinkering 120/3 = 40

It worked for me anyway.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back