Esempio n. 1
0
    public static void gearup(int o_ride, bool cheat_items = true)
    {
        var        s_rogue_items    = new List <GameObject>();
        var        s_tank_weapons_2 = new List <GameObject>();
        var        s_tank_armor_2   = new List <GameObject>();
        GameObject figh_pc          = null;
        GameObject barb_pc          = null;
        GameObject bard_pc          = null;
        GameObject rogu_pc          = null;
        GameObject cler_pc          = null;
        GameObject drui_pc          = null;
        GameObject monk_pc          = null;
        GameObject sorc_pc          = null;
        GameObject wiza_pc          = null;

        foreach (var pc in GameSystems.Party.PartyMembers)
        {
            if (which_class(pc) == "fighter")
            {
                figh_pc = pc;
            }

            if (which_class(pc) == "barbarian")
            {
                barb_pc = pc;
            }

            if (which_class(pc) == "bard")
            {
                bard_pc = pc;
            }

            if (which_class(pc) == "rogue")
            {
                rogu_pc = pc;
            }

            if (which_class(pc) == "cleric")
            {
                cler_pc = pc;
            }

            if (which_class(pc) == "druid")
            {
                drui_pc = pc;
            }

            if (which_class(pc) == "monk")
            {
                monk_pc = pc;
            }

            if (which_class(pc) == "sorcerer")
            {
                sorc_pc = pc;
            }

            if (which_class(pc) == "wizard")
            {
                wiza_pc = pc;
            }

            var brown_farmer_garb = pc.FindItemByProto(6142);
            if (brown_farmer_garb != null)
            {
                brown_farmer_garb.Destroy();
            }
        }

        if (StoryState == 2)
        {
            var dummy = 1;
        }

        GameObject lastPc = null;

        foreach (var pc in GameSystems.Party.PartyMembers)
        {
            if (StoryState <= 1 || pc.GetMap() == 5107 || o_ride == 0)
            {
                if (which_class(pc) == "fighter")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4010); // Greatsword
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6093); // Chain Shirt
                    }
                }

                if (which_class(pc) == "barbarian")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4064); // Greataxe
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6055); // Barbarian Armor
                    }
                }

                if (which_class(pc) == "cleric")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4070); // Morningstar
                    }

                    ScriptDaemon.giv(pc, 6070); // Large Wooden Shield
                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6153); // Fine Scalemail
                    }

                    if (cheat_items)
                    {
                        ScriptDaemon.giv(pc, 12231); // Wand of Holy Smite
                        ScriptDaemon.giv(pc, 12178); // Wand of Flame Strike
                    }
                }

                if (which_class(pc) == "druid")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4045); // Scimitar
                    }

                    ScriptDaemon.giv(pc, 6070); // Large Wooden Shield
                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6009); // Druid Hide
                    }

                    if (cheat_items)
                    {
                        ScriptDaemon.giv(pc, 12178); // Wand of Flame Strike
                    }
                }

                if (which_class(pc) == "monk")
                {
                    ScriptDaemon.giv(pc, 4243); // Quarterstaff
                }

                if (which_class(pc) == "bard")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4060); // Dagger
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6013); // Brown Leather Armor
                    }

                    ScriptDaemon.giv(pc, 12564);       // Mandolin
                    ScriptDaemon.giv(pc, 12677, true); // Spyglass
                }

                if (which_class(pc) == "sorcerer")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4243); // Quarterstaff
                    }

                    if (cheat_items)
                    {
                        ScriptDaemon.giv(pc, 12620); // Wand of Fireball (10th)
                        ScriptDaemon.giv(pc, 12262); // Wand of Knock
                    }
                }

                if (which_class(pc) == "rogue")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4060); // Dagger
                    }

                    ScriptDaemon.giv(pc, 6031); // Eyeglasses
                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6042); // Black Leather Armor
                    }

                    ScriptDaemon.giv(pc, 12012);       // Thieves Tools
                    ScriptDaemon.giv(pc, 12767);       // Lockslip Grease
                    ScriptDaemon.giv(pc, 12677, true); // Spyglass
                }

                if (which_class(pc) == "wizard")
                {
                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6151); // Red Mystic Garb
                    }

                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4243); // Quarterstaff
                    }

                    ScriptDaemon.giv(pc, 9229);  // Grease Scroll
                    ScriptDaemon.giv(pc, 12848); // Scholar's kit
                    if (cheat_items == true)
                    {
                        ScriptDaemon.giv(pc, 12620); // Wand of Fireball (10th)
                        ScriptDaemon.giv(pc, 12262); // Wand of Knock
                    }
                }
            }

            if (StoryState == 2 || o_ride == 2)
            {
                // End of Moathouse - Tackling Nulb and HB
                // Scrolls: Stinking Cloud, Knock, Ray of Enfeeb, Animate Dead, Magic Missile, Color Spray, Obscuring Mist, Cause Fear, Sleep
                // Wooden Elvish Chain 6073
                // Shield + 1
                // Silver Banded Mail 6120
                // Lareth's Breastplate 6097
                // Lareth's Staff 4120
                // Lareth's Plate Boots 6098
                // Lareth's Ring 6099
                // Fungus Figurine 12024
                // Shortsword +1 4126
                // MW Xbow 4177
                // Cloak of Elvenkind x2 6058
                // ~10k GP before spending
                // Shopping:
                // MW Scimitar 400GP - 4048
                // MW Greataxe 400GP  - 4065
                // MW Greatsword 400GP  - 4012
                // Prot from arrows 180GP - 9367
                // Resist Energy 180GP - 9400
                // Web 180 GP- 9531
                // Summon Mon 1 30GP - 9467
                // if pc.money_get() < 10000 * 100:
                // pc.money_adj(10000 * 100 - pc.money_get())
                if (which_class(pc) == "fighter")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4010); // Greatsword
                    }
                }

                if (which_class(pc) == "barbarian")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4064); // Greataxe
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6055); // Barbarian Armor
                    }
                }

                if (which_class(pc) == "cleric")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4070); // Morningstar
                    }

                    if (!ScriptDaemon.giv(pc, 6073, true))
                    {
                        ScriptDaemon.giv(pc, 6070); // Large Wooden Shield
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6153); // Fine Scalemail
                    }
                }

                if (which_class(pc) == "druid")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4045); // Scimitar
                    }

                    if (!ScriptDaemon.giv(pc, 6073, true))
                    {
                        ScriptDaemon.giv(pc, 6070); // Large Wooden Shield
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6009); // Druid Hide
                    }
                }

                if (which_class(pc) == "monk")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4243); // Quarterstaff
                    }
                }

                if (which_class(pc) == "bard")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4060); // Dagger
                    }

                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6013); // Brown Leather Armor
                    }

                    ScriptDaemon.giv(pc, 12564);       // Mandolin
                    ScriptDaemon.giv(pc, 6031, true);  // Eyeglasses
                    ScriptDaemon.giv(pc, 12675, true); // Merchant's Scale
                }

                if (which_class(pc) == "sorcerer")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4243); // Quarterstaff
                    }
                }

                if (which_class(pc) == "rogue")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4060); // Dagger
                    }

                    ScriptDaemon.giv(pc, 6031, true);  // Eyeglasses
                    ScriptDaemon.giv(pc, 12675, true); // Merchant's Scale
                    if (pc.ItemWornAt(EquipSlot.Armor) == null)
                    {
                        ScriptDaemon.giv(pc, 6042); // Black Leather Armor
                    }

                    ScriptDaemon.giv(pc, 12012); // Thieves Tools
                    ScriptDaemon.giv(pc, 12767); // Lockslip Grease
                }

                if (which_class(pc) == "wizard")
                {
                    if (pc.ItemWornAt(EquipSlot.WeaponPrimary) == null)
                    {
                        ScriptDaemon.giv(pc, 4243); // Quarterstaff
                    }

                    ScriptDaemon.giv(pc, 9229);        // Grease Scroll
                    ScriptDaemon.giv(pc, 12848);       // Scholar's kit
                    ScriptDaemon.giv(pc, 6031, true);  // Eyeglasses
                    ScriptDaemon.giv(pc, 12675, true); // Merchant's Scale
                }
            }

            pc.IdentifyAll();
            pc.WieldBestInAllSlots();
            lastPc = pc;
        }

        if (lastPc != null)
        {
            ScriptDaemon.giv(lastPc, 6031, true);  // Eyeglasses
            ScriptDaemon.giv(lastPc, 12675, true); // Merchant's Scale
            ScriptDaemon.giv(lastPc, 12012, true); // Thieves Tools
            ScriptDaemon.giv(lastPc, 12767, true); // Lockslip Grease
        }
    }