Esempio n. 1
0
 public static void smith_refund(int cur_money)
 {
     SelectedPartyLeader.AdjustMoney(cur_money - SelectedPartyLeader.GetMoney());
 }
    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;
    }