Script Function: Q5TJ

From Ultima Online: The Second Age
Revision as of 16:45, 19 October 2018 by Grimoric (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q5TJ(obj this, obj speaker, string arg)
 {
   if (!Q4J8(this, speaker, arg))
   {
     return (0x01);
   }
   list Q619;
   split(Q619, arg);
   int Q4QI = 0x00;
   if (isInList(Q619, "train"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "training"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "teach"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "teaching"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "learn"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "learning"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "practice"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "practicing"))
   {
     Q4QI = 0x01;
   }
   if (!Q4QI)
   {
     return (0x01);
   }
   if (isGuard(this))
   {
     bark(this, "I am too busy to teach thee.");
     return (0x01);
   }
   if (hasObjListVar(this, "myBoss"))
   {
     bark(this, "I do not train whilst I am working.");
     return (0x01);
   }
   int Q4QQ = 0x00;
   list Q5TH = "parrying", "parry", "battle", "defense", "first", "aid", "heal", "healing", "medicine", "hide", "hiding", "steal", "stealing", "alchemy", "anatomy", "animal", "lore", "appraising", "identifying", "appraise", "item", "identification", "identify", "armslore", "arms", "beg", "begging", "blacksmith", "smith", "blacksmithy", "smithing", "blacksmithing", "bowyer", "bow", "arrow", "fletcher", "bowcraft", "fletching", "calm", "peace", "peacemaking", "camp", "camping", "carpentry", "woodwork", "woodworking", "cartography", "map", "mapmaking", "cooking", "cook", "detect", "hidden", "entice", "enticement", "enticing", "evaluate", "intelligence", "evaluating", "fish", "fishing", "incite", "provoke", "provoking", "provocation", "lockpicking", "lock", "pick", "picking", "locks", "magic", "magery", "sorcery", "wizardry", "mage", "resist", "resisting", "spells", "battle", "tactic", "tactics", "fight", "fighting", "peek", "peeking", "snoop", "snooping", "play", "instrument", "playing", "musician", "musicianship", "poisoning", "poison", "ranged", "missile", "missiles", "shoot", "shooting", "archery", "archer", "spirit", "ghost", "seance", "spiritualism", "tailoring", "tailor", "clothier", "tame", "taming", "taste", "tasting", "tinker", "tinkering", "vet", "veterinarian", "forensic", "forensics", "herd", "herding", "tracking", "track", "hunt", "hunting", "inscribe", "scroll", "inscribing", "inscription", "sword", "swords", "blade", "blades", "swordsman", "swordsmanship", "club", "clubs", "mace", "maces", "dagger", "daggers", "fence", "fencing", "hand", "wrestle", "wrestling" "lumberjack", "lumberjacking", "woodcutting", "mining", "mine", "smelt";
   string Q5Z4;
   string Q60Z;
   for(int i = 0x00; i < numInList(Q5TH); i++)
   {
     Q5Z4 = Q5TH[i];
     if (isInList(Q619, Q5Z4))
     {
       Q4QQ = 0x01;
       Q60Z = Q5Z4;
     }
   }
   if (!Q4QQ)
   {
     list Q56X;
     Q56X = "If thy desire is to learn, thou must say what thou wishest to learn.", "I cannot teach thee if thou dost not name what to learn!", "Without the name of a skill, 'tis difficult for me to teach thee.", "If thou namest a skill or ability, perhaps I can aid thee.", "If thou art desirous of practice in a craft or skill, name it when thou askest for aid.";
     if (getIntelligence(this) > 0x46)
     {
       Q56X = "'Tis a noble endeavor to seek to improve thyself. Perhaps if thou couldst name the particular skill thou seekest to improve?", "If thou failest to name what thou desirest me to teach, I cannot fulfill thy desire!", "'Tis a difficult task to instruct thee in mine arts, if thou dost not specify which of said arts thou seekest to master.", "If thou wouldst name the skill when thou askest, I could, perchance, aid thee.", "I presume that thou art on a quest to locate teachers of some ability. If this is indeed thy desire, name the skill as part of thy inquiry.";
     }
     if (getIntelligence(this) < 0x23)
     {
       Q56X = "I dunno what thou wishest to learn.", "If thou dost not tell me what thou'rt wantin' to learn, well...", "'Tis hard to teach thee without the name of the skill.", "I mebbe could help thee, methinks, if thou namest what thou'rt wishin' to learn.", "If thou wantest to learn a skill, thou needest name it when thou'rt askin'.";
     }
     string Q60K = Q56X[random(0x00, 0x04)];
     bark(this, Q60K);
     Q4J9(this);
     list Q5TC;
     list Q5TA;
     int Q5E9 = 0x00;
     string Q59Z = "I can teach thee of ";
     if (0x00)
     {
       bark(this, "All known skill slots...");
     }
     for(int Q65G = 0x00; Q65G < (0x2E - 0x01); Q65G++)
     {
       if (0x00)
       {
         string Q49A = Q65G;
         if (getSkillLevelNoStat(this, Q65G) > 0x01)
         {
           bark(this, "Have slot #" + Q49A);
         }
       }
       int Q59Y = getSkillLevelNoStat(this, Q65G);
       if (Q59Y > (getSkillLevelNoStat(speaker, Q65G) * 0x03))
       {
         if (Q5E9 < 0x05)
         {
           appendToList(Q5TC, Q65G);
           appendToList(Q5TA, Q59Y);
           Q5E9++;
         }
         else
         {
           int Q543 = 0x00;
           for(int Q5TB = 0x01; Q5TB < 0x05; Q5TB++)
           {
             if ((Q5TA[Q5TB]) < (Q5TA[Q543]))
             {
               Q543 = Q5TB;
             }
           }
           if ((Q5TA[Q543]) < Q59Y)
           {
             setItem(Q5TC, Q65G, Q543);
             setItem(Q5TA, Q59Y, Q543);
           }
         }
       }
     }
     if (Q5E9 == 0x00)
     {
       bark(this, "Alas, I cannot teach thee anything.");
       Q4J9(this);
       return (0x00);
     }
     for(Q65G = 0x00; Q65G < Q5E9; Q65G++)
     {
       if (Q65G != 0x00)
       {
         Q59Z = Q59Z + ", ";
       }
       if (Q65G == (Q5E9 - 0x01))
       {
         Q59Z = Q59Z + "and ";
       }
       switch (Q5TC[Q65G])
       {
       case 0x00
         Q59Z = Q59Z + "alchemy";
         break;
       case 0x01
         Q59Z = Q59Z + "anatomy";
         break;
       case 0x02
         Q59Z = Q59Z + "animal lore";
         break;
       case 0x03
         Q59Z = Q59Z + "appraising and identifying items";
         break;
       case 0x04
         Q59Z = Q59Z + "arms lore";
         break;
       case 0x05
         Q59Z = Q59Z + "parrying attacks";
         break;
       case 0x06
         Q59Z = Q59Z + "begging";
         break;
       case 0x07
         Q59Z = Q59Z + "blacksmithing";
         break;
       case 0x08
         Q59Z = Q59Z + "the making of bows and fletching of arrows";
         break;
       case 0x09
         Q59Z = Q59Z + "peacemaking";
         break;
       case 0x0A
         Q59Z = Q59Z + "camping in the wilderness";
         break;
       case 0x0B
         Q59Z = Q59Z + "carpentry";
         break;
       case 0x0C
         Q59Z = Q59Z + "cartography and the making of maps";
         break;
       case 0x0D
         Q59Z = Q59Z + "cooking";
         break;
       case 0x0E
         Q59Z = Q59Z + "detecting hidden people";
         break;
       case 0x0F
         Q59Z = Q59Z + "enticing folk with music";
         break;
       case 0x10
         Q59Z = Q59Z + "evaluating people's intelligence";
         break;
       case 0x11
         Q59Z = Q59Z + "basic healing";
         break;
       case 0x12
         Q59Z = Q59Z + "fishing";
         break;
       case 0x13
         Q59Z = Q59Z + "forensic evaluation";
         break;
       case 0x14
         Q59Z = Q59Z + "herding animals";
         break;
       case 0x15
         Q59Z = Q59Z + "hiding in plain sight";
         break;
       case 0x16
         Q59Z = Q59Z + "provoking anger and causing fights";
         break;
       case 0x17
         Q59Z = Q59Z + "inscribing scrolls and books";
         break;
       case 0x18
         Q59Z = Q59Z + "picking locks";
         break;
       case 0x19
         Q59Z = Q59Z + "magery";
         break;
       case 0x1A
         Q59Z = Q59Z + "resisting magic spells";
         break;
       case 0x1B
         Q59Z = Q59Z + "battle tactics";
         break;
       case 0x1C
         Q59Z = Q59Z + "snooping in backpacks";
         break;
       case 0x1D
         Q59Z = Q59Z + "musicianship";
         break;
       case 0x1E
         Q59Z = Q59Z + "the deadly art of poisoning";
         break;
       case 0x1F
         Q59Z = Q59Z + "archery";
         break;
       case 0x20
         Q59Z = Q59Z + "spirit talking";
         break;
       case 0x21
         Q59Z = Q59Z + "stealing";
         break;
       case 0x22
         Q59Z = Q59Z + "tailoring";
         break;
       case 0x23
         Q59Z = Q59Z + "taming wild animals";
         break;
       case 0x24
         Q59Z = Q59Z + "food tasting";
         break;
       case 0x25
         Q59Z = Q59Z + "tinkering";
         break;
       case 0x26
         Q59Z = Q59Z + "tracking";
         break;
       case 0x27
         Q59Z = Q59Z + "veterinary healing";
         break;
       case 0x28
         Q59Z = Q59Z + "swordsmanship";
         break;
       case 0x29
         Q59Z = Q59Z + "clubs and maces";
         break;
       case 0x2A
         Q59Z = Q59Z + "fencing and daggers";
         break;
       case 0x2B
         Q59Z = Q59Z + "hand to hand combat and wrestling";
         break;
       case 0x2C
         Q59Z = Q59Z + "lumberjacking";
         break;
       case 0x2D
         Q59Z = Q59Z + "mining";
         break;
       default
         Q59Z = Q59Z + "idle chattering";
         break;
       }
     }
     Q59Z = Q59Z + ".";
     bark(this, Q59Z);
     return (0x00);
   }
   int Q5TI = 0xFF;
   if (Q60Z == "battle")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "defense")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "parry")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "parrying")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "first")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "aid")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "heal")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "healing")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "medicine")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "hide")
   {
     Q5TI = 0x15;
   }
   if (Q60Z == "hiding")
   {
     Q5TI = 0x15;
   }
   if (Q60Z == "steal")
   {
     Q5TI = 0x21;
   }
   if (Q60Z == "stealing")
   {
     Q5TI = 0x21;
   }
   if (Q60Z == "alchemy")
   {
     Q5TI = 0x00;
   }
   if (Q60Z == "anatomy")
   {
     Q5TI = 0x01;
   }
   if (Q60Z == "animal")
   {
     Q5TI = 0x02;
   }
   if (Q60Z == "lore")
   {
     Q5TI = 0x02;
   }
   if (Q60Z == "appraising")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "identifying")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "appraise")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "identify")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "identification")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "item")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "armslore")
   {
     Q5TI = 0x04;
   }
   if (Q60Z == "arms")
   {
     Q5TI = 0x04;
   }
   if (Q60Z == "beg")
   {
     Q5TI = 0x06;
   }
   if (Q60Z == "begging")
   {
     Q5TI = 0x06;
   }
   if (Q60Z == "blacksmith")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "blacksmithy")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "blacksmithing")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "smith")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "smithing")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "bowyer")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "bowcraft")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "bow")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "arrow")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "fletcher")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "fletching")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "calm")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "peace")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "peacemaking")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "camp")
   {
     Q5TI = 0x0A;
   }
   if (Q60Z == "camping")
   {
     Q5TI = 0x0A;
   }
   if (Q60Z == "carpentry")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "woodwork")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "woodworking")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "cartography")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "map")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "mapmaking")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "cooking")
   {
     Q5TI = 0x0D;
   }
   if (Q60Z == "cook")
   {
     Q5TI = 0x0D;
   }
   if (Q60Z == "detect")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "detecting")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "hidden")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "entice")
   {
     Q5TI = 0x0F;
   }
   if (Q60Z == "enticement")
   {
     Q5TI = 0x0F;
   }
   if (Q60Z == "evaluate")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "evaluating")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "intelligence")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "fish")
   {
     Q5TI = 0x12;
   }
   if (Q60Z == "fishing")
   {
     Q5TI = 0x12;
   }
   if (Q60Z == "incite")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provoke")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provoking")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provocation")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "lockpicking")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "lock")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "pick")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "picking")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "locks")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "magic")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "magery")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "mage")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "sorcery")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "wizardry")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "resist")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "resisting")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "spells")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "battle")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "tactic")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "tactics")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "fighting")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "fight")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "peek")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "peeking")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "snooping")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "snoop")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "play")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "playing")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "instrument")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "musician")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "musicianship")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "poisoning")
   {
     Q5TI = 0x1E;
   }
   if (Q60Z == "poison")
   {
     Q5TI = 0x1E;
   }
   if (Q60Z == "ranged")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "missile")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "missiles")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "shoot")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "shooting")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "archery")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "archer")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "spirit")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "ghost")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "ghosts")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "seance")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "spiritualism")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "spiritualism")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "tailoring")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "tailor")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "clothier")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "tame")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "taming")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "taste")
   {
     Q5TI = 0x24;
   }
   if (Q60Z == "tasting")
   {
     Q5TI = 0x24;
   }
   if (Q60Z == "tinker")
   {
     Q5TI = 0x25;
   }
   if (Q60Z == "tinkering")
   {
     Q5TI = 0x25;
   }
   if (Q60Z == "vet")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "veterinarian")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "veterinary")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "forensic")
   {
     Q5TI = 0x13;
   }
   if (Q60Z == "forensics")
   {
     Q5TI = 0x13;
   }
   if (Q60Z == "herd")
   {
     Q5TI = 0x14;
   }
   if (Q60Z == "herding")
   {
     Q5TI = 0x14;
   }
   if (Q60Z == "track")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "tracking")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "hunt")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "hunting")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "inscribe")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "scroll")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "inscribing")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "inscription")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "sword")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swords")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "blade")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "blades")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swordsman")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swordsmanship")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "club")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "clubs")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "mace")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "maces")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "dagger")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "daggers")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "fence")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "fencing")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "hand")
   {
     Q5TI = 0x2B;
   }
   if (Q60Z == "wrestle")
   {
     Q5TI = 0x2B;
   }
   if (Q60Z == "wrestling")
   {
     Q5TI = 0x2B;
   }
   if (Q60Z == "lumberjack")
   {
     Q5TI = 0x2C;
   }
   if (Q60Z == "lumberjacking")
   {
     Q5TI = 0x2C;
   }
   if (Q60Z == "woodcutting")
   {
     Q5TI = 0x2C;
   }
   if (Q60Z == "mining")
   {
     Q5TI = 0x2D;
   }
   if (Q60Z == "mine")
   {
     Q5TI = 0x2D;
   }
   if (Q60Z == "smelt")
   {
     Q5TI = 0x2D;
   }
   if (Q5TI == 0xFF)
   {
     if (0x00)
     {
       bark(this, "Somehow I recognized a skill keyword but didn't see it the second time I checked...");
     }
     return (0x00);
   }
   if (getSkillLevelNoStat(this, Q5TI) < 0x64)
   {
     if (0x00)
     {
       bark(this, Q60Z);
     }
     bark(this, "'Tis not something I can teach thee of.");
     Q4J9(this);
     return (0x00);
   }
   if (getSkillLevelNoStat(this, Q5TI) < getSkillLevelNoStat(speaker, Q5TI))
   {
     bark(this, "I cannot teach thee, for thou knowest more than I!");
     Q4J9(this);
     return (0x00);
   }
   int Q463 = (getSkillLevelNoStat(this, Q5TI) / 0x03) - getSkillLevelNoStat(speaker, Q5TI);
   if (Q463 < 0x0B)
   {
     bark(this, "I cannot teach thee, for thou knowest all I can teach!");
     Q4J9(this);
     return (0x00);
   }
   string Q5ZZ = Q463;
   string Q44N = "I can teach thee, for a fee. For " + Q5ZZ + " gold coins, I can teach thee all I know. For less, I shall teach thee less.";
   bark(this, Q44N);
   Q4J9(this);
   setObjVar(this, "trainerSkillToTeach", Q5TI);
   setObjVar(speaker, "trainingSkillToLearn", Q5TI);
   return (0x00);
 }
 function int Q5TJ(obj this, obj speaker, string arg)
 {
   if (!Q4J8(this, speaker, arg))
   {
     return (0x01);
   }
   list Q619;
   split(Q619, arg);
   int Q4QI = 0x00;
   if (isInList(Q619, "train"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "training"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "teach"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "teaching"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "learn"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "learning"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "practice"))
   {
     Q4QI = 0x01;
   }
   if (isInList(Q619, "practicing"))
   {
     Q4QI = 0x01;
   }
   if (!Q4QI)
   {
     return (0x01);
   }
   int Q4QQ = 0x00;
   list Q5TH = "parrying", "parry", "battle", "defense", "first", "aid", "heal", "healing", "medicine", "hide", "hiding", "steal", "stealing", "alchemy", "anatomy", "animal", "lore", "appraise", "item", "identification", "identify", "armslore", "arms", "beg", "begging", "blacksmith", "smith", "blacksmithy", "smithing", "blacksmithing", "bowyer", "bow", "arrow", "fletcher", "bowcraft", "fletching", "calm", "peace", "peacemaking", "camp", "camping", "carpentry", "woodwork", "woodworking", "cartography", "map", "mapmaking", "cooking", "cook", "detect", "hidden", "entice", "enticement", "enticing", "evaluate", "intelligence", "evaluating", "fish", "fishing", "incite", "provoke", "provoking", "provocation", "lockpicking", "lock", "pick", "picking", "locks", "magic", "magery", "sorcery", "wizardry", "mage", "resist", "resisting", "spells", "battle", "tactic", "tactics", "fight", "fighting", "peek", "peeking", "snoop", "snooping", "play", "instrument", "playing", "musician", "musicianship", "poisoning", "poison", "ranged", "missile", "missiles", "shoot", "shooting", "archery", "archer", "spirit", "ghost", "seance", "spiritualism", "tailoring", "tailor", "clothier", "tame", "animal", "animals", "taming", "taste", "tasting", "tinker", "tinkering", "vet", "veterinarian", "forensic", "forensics", "herd", "herding", "tracking", "track", "hunt", "hunting", "inscribe", "scroll", "inscribing", "inscription", "sword", "swords", "blade", "blades", "swordsman", "swordsmanship", "club", "clubs", "mace", "maces", "dagger", "daggers", "fence", "fencing", "hand", "wrestle", "wrestling";
   string Q5Z4;
   string Q60Z;
   for(int i = 0x00; i < numInList(Q5TH); i++)
   {
     Q5Z4 = Q5TH[i];
     if (isInList(Q619, Q5Z4))
     {
       Q4QQ = 0x01;
       Q60Z = Q5Z4;
     }
   }
   if (!Q4QQ)
   {
     list Q56X;
     Q56X = "If thy desire is to learn, thou must say what thou wishest to learn.", "I cannot teach thee if thou dost not name what to learn!", "Without the name of a skill, 'tis difficult for me to teach thee.", "If thou namest a skill or ability, perhaps I can aid thee.", "If thou art desirous of practice in a craft or skill, name it when thou askest for aid.";
     if (getIntelligence(this) > 0x46)
     {
       Q56X = "'Tis a noble endeavor to seek to improve thyself. Perhaps if thou couldst name the particular skill thou seekest to improve?", "If thou failest to name what thou desirest me to teach, I cannot fulfill thy desire!", "'Tis a difficult task to instruct thee in mine arts, if thou dost not specify which of said arts thou seekest to master.", "If thou wouldst name the skill when thou askest, I could, perchance, aid thee.", "I presume that thou art on a quest to locate teachers of some ability. If this is indeed thy desire, name the skill as part of thy inquiry.";
     }
     if (getIntelligence(this) < 0x23)
     {
       Q56X = "I dunno what thou wishest to learn.", "If thou dost not tell me what thou'rt wantin' to learn, well...", "'Tis hard to teach thee without the name of the skill.", "I mebbe could help thee, methinks, if thou namest what thou'rt wishin' to learn.", "If thou wantest to learn a skill, thou needest name it when thou'rt askin'.";
     }
     string Q60K = Q56X[random(0x00, 0x04)];
     bark(this, Q60K);
     Q4J9(this);
     list Q5TC;
     string Q59Z = "I can teach thee of ";
     if (0x00)
     {
       bark(this, "All known skill slots...");
     }
     for(int Q65G = 0x00; Q65G < (0x2E - 0x01); Q65G++)
     {
       if (0x00)
       {
         string Q49A = Q65G;
         if (getSkillLevel(this, Q65G) > 0x01)
         {
           bark(this, "Have slot #" + Q49A);
         }
       }
       else
       {
         if (getSkillLevel(this, Q65G) > getSkillLevel(speaker, Q65G))
         {
           appendToList(Q5TC, Q65G);
         }
       }
     }
     if (numInList(Q5TC) == 0x00)
     {
       bark(this, "Alas, I cannot teach thee anything.");
       Q4J9(this);
       return (0x00);
     }
     for(Q65G = 0x00; Q65G < numInList(Q5TC); Q65G++)
     {
       if (Q65G != 0x00)
       {
         Q59Z = Q59Z + ", ";
       }
       if (Q65G == (numInList(Q5TC) - 0x01))
       {
         Q59Z = Q59Z + "and ";
       }
       switch (Q5TC[Q65G])
       {
       case 0x00
         Q59Z = Q59Z + "alchemy";
         break;
       case 0x01
         Q59Z = Q59Z + "anatomy";
         break;
       case 0x02
         Q59Z = Q59Z + "animal lore";
         break;
       case 0x03
         Q59Z = Q59Z + "appraising and identifying items";
         break;
       case 0x04
         Q59Z = Q59Z + "arms lore";
         break;
       case 0x05
         Q59Z = Q59Z + "parrying attacks";
         break;
       case 0x06
         Q59Z = Q59Z + "begging";
         break;
       case 0x07
         Q59Z = Q59Z + "blacksmithing";
         break;
       case 0x08
         Q59Z = Q59Z + "the making of bows and fletching of arrows";
         break;
       case 0x09
         Q59Z = Q59Z + "peacemaking";
         break;
       case 0x0A
         Q59Z = Q59Z + "camping in the wilderness";
         break;
       case 0x0B
         Q59Z = Q59Z + "carpentry";
         break;
       case 0x0C
         Q59Z = Q59Z + "cartography and the making of maps";
         break;
       case 0x0D
         Q59Z = Q59Z + "cooking";
         break;
       case 0x0E
         Q59Z = Q59Z + "detecting hidden people";
         break;
       case 0x0F
         Q59Z = Q59Z + "enticing folk with music";
         break;
       case 0x10
         Q59Z = Q59Z + "evaluating people's intelligence";
         break;
       case 0x11
         Q59Z = Q59Z + "basic healing";
         break;
       case 0x12
         Q59Z = Q59Z + "fishing";
         break;
       case 0x13
         Q59Z = Q59Z + "forensic evaluation";
         break;
       case 0x14
         Q59Z = Q59Z + "herding animals";
         break;
       case 0x15
         Q59Z = Q59Z + "hiding in plain sight";
         break;
       case 0x16
         Q59Z = Q59Z + "provoking anger and causing fights";
         break;
       case 0x17
         Q59Z = Q59Z + "inscribing scrolls and books";
         break;
       case 0x18
         Q59Z = Q59Z + "picking locks";
         break;
       case 0x19
         Q59Z = Q59Z + "magery";
         break;
       case 0x1A
         Q59Z = Q59Z + "resisting magic spells";
         break;
       case 0x1B
         Q59Z = Q59Z + "battle tactics";
         break;
       case 0x1C
         Q59Z = Q59Z + "snooping in backpacks";
         break;
       case 0x1D
         Q59Z = Q59Z + "musicianship";
         break;
       case 0x1E
         Q59Z = Q59Z + "the deadly art of poisoning";
         break;
       case 0x1F
         Q59Z = Q59Z + "archery";
         break;
       case 0x20
         Q59Z = Q59Z + "spirit talking";
         break;
       case 0x21
         Q59Z = Q59Z + "stealing";
         break;
       case 0x22
         Q59Z = Q59Z + "tailoring";
         break;
       case 0x23
         Q59Z = Q59Z + "taming wild animals";
         break;
       case 0x24
         Q59Z = Q59Z + "food tasting";
         break;
       case 0x25
         Q59Z = Q59Z + "tinkering";
         break;
       case 0x26
         Q59Z = Q59Z + "tracking";
         break;
       case 0x27
         Q59Z = Q59Z + "veterinary healing";
         break;
       case 0x28
         Q59Z = Q59Z + "swordsmanship";
         break;
       case 0x29
         Q59Z = Q59Z + "clubs and maces";
         break;
       case 0x2A
         Q59Z = Q59Z + "fencing and daggers";
         break;
       case 0x2B
         Q59Z = Q59Z + "hand to hand combat and wrestling";
         break;
       default
         Q59Z = Q59Z + "idle chattering";
         break;
       }
     }
     Q59Z = Q59Z + ".";
     bark(this, Q59Z);
     return (0x00);
   }
   int Q5TI = 0xFF;
   if (Q60Z == "battle")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "defense")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "parry")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "parrying")
   {
     Q5TI = 0x05;
   }
   if (Q60Z == "first")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "aid")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "heal")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "healing")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "medicine")
   {
     Q5TI = 0x11;
   }
   if (Q60Z == "hide")
   {
     Q5TI = 0x15;
   }
   if (Q60Z == "hiding")
   {
     Q5TI = 0x15;
   }
   if (Q60Z == "steal")
   {
     Q5TI = 0x21;
   }
   if (Q60Z == "stealing")
   {
     Q5TI = 0x21;
   }
   if (Q60Z == "alchemy")
   {
     Q5TI = 0x00;
   }
   if (Q60Z == "anatomy")
   {
     Q5TI = 0x01;
   }
   if (Q60Z == "animal")
   {
     Q5TI = 0x02;
   }
   if (Q60Z == "lore")
   {
     Q5TI = 0x02;
   }
   if (Q60Z == "appraise")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "identify")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "identification")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "item")
   {
     Q5TI = 0x03;
   }
   if (Q60Z == "armslore")
   {
     Q5TI = 0x04;
   }
   if (Q60Z == "arms")
   {
     Q5TI = 0x04;
   }
   if (Q60Z == "beg")
   {
     Q5TI = 0x06;
   }
   if (Q60Z == "begging")
   {
     Q5TI = 0x06;
   }
   if (Q60Z == "blacksmith")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "blacksmithy")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "blacksmithing")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "smith")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "smithing")
   {
     Q5TI = 0x07;
   }
   if (Q60Z == "bowyer")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "bowcraft")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "bow")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "arrow")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "fletcher")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "fletching")
   {
     Q5TI = 0x08;
   }
   if (Q60Z == "calm")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "peace")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "peacemaking")
   {
     Q5TI = 0x09;
   }
   if (Q60Z == "camp")
   {
     Q5TI = 0x0A;
   }
   if (Q60Z == "camping")
   {
     Q5TI = 0x0A;
   }
   if (Q60Z == "carpentry")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "woodwork")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "woodworking")
   {
     Q5TI = 0x0B;
   }
   if (Q60Z == "cartography")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "map")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "mapmaking")
   {
     Q5TI = 0x0C;
   }
   if (Q60Z == "cooking")
   {
     Q5TI = 0x0D;
   }
   if (Q60Z == "cook")
   {
     Q5TI = 0x0D;
   }
   if (Q60Z == "detect")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "detecting")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "hidden")
   {
     Q5TI = 0x0E;
   }
   if (Q60Z == "entice")
   {
     Q5TI = 0x0F;
   }
   if (Q60Z == "enticement")
   {
     Q5TI = 0x0F;
   }
   if (Q60Z == "evaluate")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "evaluating")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "intelligence")
   {
     Q5TI = 0x10;
   }
   if (Q60Z == "fish")
   {
     Q5TI = 0x12;
   }
   if (Q60Z == "fishing")
   {
     Q5TI = 0x12;
   }
   if (Q60Z == "incite")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provoke")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provoking")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "provocation")
   {
     Q5TI = 0x16;
   }
   if (Q60Z == "lockpicking")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "lock")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "pick")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "picking")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "locks")
   {
     Q5TI = 0x18;
   }
   if (Q60Z == "magic")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "magery")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "mage")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "sorcery")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "wizardry")
   {
     Q5TI = 0x19;
   }
   if (Q60Z == "resist")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "resisting")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "spells")
   {
     Q5TI = 0x1A;
   }
   if (Q60Z == "battle")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "tactic")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "tactics")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "fighting")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "fight")
   {
     Q5TI = 0x1B;
   }
   if (Q60Z == "peek")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "peeking")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "snooping")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "snoop")
   {
     Q5TI = 0x1C;
   }
   if (Q60Z == "play")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "playing")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "instrument")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "musician")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "musicianship")
   {
     Q5TI = 0x1D;
   }
   if (Q60Z == "poisoning")
   {
     Q5TI = 0x1E;
   }
   if (Q60Z == "poison")
   {
     Q5TI = 0x1E;
   }
   if (Q60Z == "ranged")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "missile")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "missiles")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "shoot")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "shooting")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "archery")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "archer")
   {
     Q5TI = 0x1F;
   }
   if (Q60Z == "spirit")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "ghost")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "ghosts")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "seance")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "spiritualism")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "spiritualism")
   {
     Q5TI = 0x20;
   }
   if (Q60Z == "tailoring")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "tailor")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "clothier")
   {
     Q5TI = 0x22;
   }
   if (Q60Z == "tame")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "taming")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "animal")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "animals")
   {
     Q5TI = 0x23;
   }
   if (Q60Z == "taste")
   {
     Q5TI = 0x24;
   }
   if (Q60Z == "tasting")
   {
     Q5TI = 0x24;
   }
   if (Q60Z == "tinker")
   {
     Q5TI = 0x25;
   }
   if (Q60Z == "tinkering")
   {
     Q5TI = 0x25;
   }
   if (Q60Z == "vet")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "veterinarian")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "veterinary")
   {
     Q5TI = 0x27;
   }
   if (Q60Z == "forensic")
   {
     Q5TI = 0x13;
   }
   if (Q60Z == "forensics")
   {
     Q5TI = 0x13;
   }
   if (Q60Z == "herd")
   {
     Q5TI = 0x14;
   }
   if (Q60Z == "herding")
   {
     Q5TI = 0x14;
   }
   if (Q60Z == "track")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "tracking")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "hunt")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "hunting")
   {
     Q5TI = 0x26;
   }
   if (Q60Z == "inscribe")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "scroll")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "inscribing")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "inscription")
   {
     Q5TI = 0x17;
   }
   if (Q60Z == "sword")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swords")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "blade")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "blades")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swordsman")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "swordsmanship")
   {
     Q5TI = 0x28;
   }
   if (Q60Z == "club")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "clubs")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "mace")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "maces")
   {
     Q5TI = 0x29;
   }
   if (Q60Z == "dagger")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "daggers")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "fence")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "fencing")
   {
     Q5TI = 0x2A;
   }
   if (Q60Z == "hand")
   {
     Q5TI = 0x2B;
   }
   if (Q60Z == "wrestle")
   {
     Q5TI = 0x2B;
   }
   if (Q60Z == "wrestling")
   {
     Q5TI = 0x2B;
   }
   if (Q5TI == 0xFF)
   {
     if (0x00)
     {
       bark(this, "Somehow I recognized a skill keyword but didn't see it the second time I checked...");
     }
     return (0x00);
   }
   if (getSkillLevel(this, Q5TI) < 0x0A)
   {
     if (0x00)
     {
       bark(this, Q60Z);
     }
     bark(this, "'Tis not something I can teach thee of.");
     Q4J9(this);
     return (0x00);
   }
   if (getSkillLevel(this, Q5TI) < getSkillLevel(speaker, Q5TI))
   {
     bark(this, "I cannot teach thee, for thou knowest more than I!");
     Q4J9(this);
     return (0x00);
   }
   int Q463 = (getSkillLevel(this, Q5TI) - getSkillLevel(speaker, Q5TI));
   if (Q463 < 0x01)
   {
     bark(this, "I cannot teach thee, for thou knowest all I can teach!");
     Q4J9(this);
     return (0x00);
   }
   Q463 = Q463 * 0x0A;
   string Q5ZZ = Q463;
   string Q44N = "I can teach thee, for a fee. For " + Q5ZZ + " gold coins, I can teach thee all I know. For less, I shall teach thee less.";
   bark(this, Q44N);
   Q4J9(this);
   setObjVar(this, "trainerSkillToTeach", Q5TI);
   setObjVar(speaker, "trainingSkillToLearn", Q5TI);
   return (0x00);
 }