public static void verbo_tax(GameObject attachee, GameObject triggerer)
    {
        if ((GetGlobalFlag(549) && !GetGlobalFlag(826) && !GetGlobalFlag(260)))
        {
            if ((PartyLeader.GetMoney() >= 20000))
            {
                PartyLeader.AdjustMoney(-20000);
                Sound(4178, 1);
                PartyLeader.FloatMesFileLine("mes/float.mes", 4);
            }
            else
            {
                SetGlobalVar(567, GetGlobalVar(567) + 1);
            }
        }

        SetGlobalFlag(260, false);
        return;
    }
 public bool CheckPrecondition(GameObject npc, GameObject pc, int lineNumber, out string originalScript)
 {
     switch (lineNumber)
     {
         case 2:
         case 3:
         case 4:
             originalScript = "not npc.has_met( pc )";
             return !npc.HasMet(pc);
         case 5:
         case 8:
             originalScript = "npc.has_met( pc )";
             return npc.HasMet(pc);
         case 6:
         case 7:
             originalScript = "check_skole(npc) == 1";
             return check_skole(npc) == 1;
         case 15:
         case 16:
         case 22:
         case 23:
             originalScript = "game.quests[42].state >= qs_mentioned";
             return GetQuestState(42) >= QuestState.Mentioned;
         case 17:
         case 121:
             originalScript = "game.global_flags[97] == 1";
             return GetGlobalFlag(97);
         case 67:
         case 68:
             originalScript = "pc.skill_level_get(npc, skill_diplomacy) >= 9";
             return pc.GetSkillLevel(npc, SkillId.diplomacy) >= 9;
         case 81:
         case 82:
         case 106:
         case 107:
         case 135:
         case 261:
         case 262:
             originalScript = "game.quests[42].state == qs_accepted";
             return GetQuestState(42) == QuestState.Accepted;
         case 83:
         case 84:
         case 241:
             originalScript = "anyone( pc.group_list(), \"has_item\", 5804 )";
             return pc.GetPartyMembers().Any(o => o.HasItemByName(5804));
         case 85:
         case 86:
             originalScript = "game.quests[42].state == qs_mentioned";
             return GetQuestState(42) == QuestState.Mentioned;
         case 103:
         case 104:
             originalScript = "game.quests[42].state == qs_mentioned or game.quests[42].state == qs_accepted";
             return GetQuestState(42) == QuestState.Mentioned || GetQuestState(42) == QuestState.Accepted;
         case 122:
         case 123:
             originalScript = "pc.skill_level_get(npc, skill_diplomacy) >= 11";
             return pc.GetSkillLevel(npc, SkillId.diplomacy) >= 11;
         case 181:
         case 191:
             originalScript = "pc.skill_level_get(npc, skill_sense_motive) >= 10";
             return pc.GetSkillLevel(npc, SkillId.sense_motive) >= 10;
         case 301:
         case 302:
             originalScript = "game.global_flags[102] == 1";
             return GetGlobalFlag(102);
         case 303:
         case 304:
             originalScript = "game.global_flags[102] == 0";
             return !GetGlobalFlag(102);
         case 352:
         case 354:
             originalScript = "game.party[0].money_get() > 1000";
             return PartyLeader.GetMoney() > 1000;
         default:
             originalScript = null;
             return true;
     }
 }
    public static void money_script()
    {
        // money script by Agetian
        // strip all money
        SetGlobalFlag(500, true);
        // added by Gaear - denotes you are playing NC
        if ((SelectedPartyLeader.GetMoney() >= 50000))
        {
            PartyLeader.AdjustMoney(-PartyLeader.GetMoney());
            // add 200-300 gold pocket money
            PartyLeader.AdjustMoney(RandomRange(20000, 30000));
        }

        foreach (var pc in GameSystems.Party.PartyMembers)
        {
            var lsw = pc.FindItemByProto(4036);
            var scm = pc.FindItemByProto(4045);
            // get rid of an extra longsword (4036) and scimitar(4045)
            for (var pp = 0; pp < 24; pp++)
            {
                var invItem = pc.GetInventoryItem(pp);
                if ((invItem.ProtoId == 4036 && invItem != lsw))
                {
                    invItem.Destroy();
                }

                if ((invItem.ProtoId == 4045 && invItem != scm))
                {
                    invItem.Destroy();
                }
            }

            // give money per PHB (for each class)
            if ((pc.GetStat(Stat.level_barbarian) > 0))
            {
                pc.AdjustMoney(RandomRange(4000, 16000));
            }

            if ((pc.GetStat(Stat.level_bard) > 0))
            {
                pc.AdjustMoney(RandomRange(4000, 16000));
            }

            if ((pc.GetStat(Stat.level_cleric) > 0))
            {
                pc.AdjustMoney(RandomRange(5000, 20000));
            }

            if ((pc.GetStat(Stat.level_druid) > 0))
            {
                pc.AdjustMoney(RandomRange(2000, 8000));
            }

            if ((pc.GetStat(Stat.level_fighter) > 0))
            {
                pc.AdjustMoney(RandomRange(6000, 24000));
            }

            if ((pc.GetStat(Stat.level_monk) > 0))
            {
                pc.AdjustMoney(RandomRange(5000, 20000));
            }

            if ((pc.GetStat(Stat.level_paladin) > 0))
            {
                pc.AdjustMoney(RandomRange(6000, 24000));
            }

            if ((pc.GetStat(Stat.level_ranger) > 0))
            {
                pc.AdjustMoney(RandomRange(6000, 24000));
            }

            if ((pc.GetStat(Stat.level_rogue) > 0))
            {
                pc.AdjustMoney(RandomRange(5000, 20000));
            }

            if ((pc.GetStat(Stat.level_sorcerer) > 0))
            {
                pc.AdjustMoney(RandomRange(3000, 12000));
            }

            if ((pc.GetStat(Stat.level_wizard) > 0))
            {
                pc.AdjustMoney(RandomRange(3000, 12000));
            }
        }

        return;
    }