Пример #1
0
 void ZCR()
 {
     int[] factionList = new int[GameConfig.factions.children.size];
     for (int i = 0; i < GameWorld.zones.Length; i++)
     {
         ZoneData zoneData = GameWorld.zones[i];
         factionList[zoneData.zoneOwner]++;
     }
     MyPlayer.ModifyResource("gold", factionList[MyPlayer.factionID] * 10 * MyPlayer.talentPoints, true);
     MyPlayer.AwardXP(factionList[MyPlayer.factionID] * 2.5f * MyPlayer.talentPoints);
     UIGameChat.AddMisc("Faction Control Reward - Gold: " + (factionList[MyPlayer.factionID] * 10 * MyPlayer.talentPoints).ToString() + " XP: " + (factionList[MyPlayer.factionID] * 2.5f * MyPlayer.talentPoints).ToString(), Color.white);
 }
Пример #2
0
    void rgc(string text, ref bool handled)
    {
        if (text == "debugStats")
        {
            UIGameChat.AddMisc("MaxDamage" + MyPlayer.ship.maxDamage.ToString(), Color.white);
            UIGameChat.AddMisc("MaxSupport" + MyPlayer.ship.maxSupport.ToString(), Color.white);
            UIGameChat.AddMisc("Offensive Scale" + MyPlayer.ship.scaleOffense.ToString(), Color.white);
            UIGameChat.AddMisc("Defense Scale" + MyPlayer.ship.scaleDefense.ToString(), Color.white);
            UIGameChat.AddMisc("Support Scale" + MyPlayer.ship.scaleSupport.ToString(), Color.white);
            UIGameChat.AddMisc("Time Until next Tick" + (this.nextTick - Time.time).ToString(), Color.white);

            handled = true;
        }

        if (TNManager.isAdmin && text == "giveItems")
        {
            int level = MyPlayer.level;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(level, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(level));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }
        if (TNManager.isAdmin && text == "giveItems5")
        {
            int level = MyPlayer.level + 5;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(level, 20));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(level));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel12")
        {
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(12, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(12));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel16")
        {
            int itemlevel = 16;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(itemlevel, 5));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(itemlevel));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel20")
        {
            int itemlevel = 20;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(itemlevel));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel25")
        {
            int itemlevel = 25;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(itemlevel));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel30")
        {
            int itemlevel = 30;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(itemlevel));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemslevel300")
        {
            int itemlevel = 300;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(itemlevel, 500));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(itemlevel));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemsquality")
        {
            int level = MyPlayer.level;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(level));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }

        if (TNManager.isAdmin && text == "itemsquality2")
        {
            int level = MyPlayer.level + 5;
            MyPlayer.AddItem(GameConfig.GenerateRandomHull(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSails(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomAmmo(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCannons(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCaptain(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomCrew(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecialist(level, 5000));
            MyPlayer.AddItem(GameConfig.GenerateRandomSpecial(level));
            MyPlayer.syncNeeded = true;
            MyPlayer.Save();
            handled = true;
        }


        if (TNManager.isAdmin && text == "giveXP")
        {
            MyPlayer.AwardXP(10000f);
            handled = true;
        }
        if (TNManager.isAdmin && text == "giveSmallXP")
        {
            MyPlayer.AwardXP(1000f);
            handled = true;
        }

        if (TNManager.isAdmin && text == "kitStarter")
        {
            PlayerItem starterKit = new PlayerItem();
            starterKit.name = "Starter Kit";
            starterKit.info = "Comprised of all your families supplies before they were sent to gulag";
            starterKit.gold = 10000;
            starterKit.SetSalvage("gold", 7500);
            starterKit.SetSalvage("wood", 100);
            starterKit.SetSalvage("stone", 100);
            starterKit.SetSalvage("powder", 50);

            MyPlayer.AddItem(starterKit);
            handled = true;
        }

        if (TNManager.isAdmin && text == "kitGold")
        {
            PlayerItem kitGold = new PlayerItem();
            kitGold.name = "Gold Cache";
            kitGold.info = "A cache of gold, probably hidden treasure from a pirates plunder";
            kitGold.gold = 100000;
            kitGold.SetSalvage("gold", 10000);
            MyPlayer.AddItem(kitGold);
            handled = true;
        }

        if (TNManager.isAdmin && text == "kitXP")
        {
            PlayerItem kitXP = new PlayerItem();
            kitXP.name = "Books of Knowledge";
            kitXP.info = "A Cache of KNOWLEDGE, damn that's an old meme Arrrrgh!";
            kitXP.SetSalvage("xp", 5000);
            MyPlayer.AddItem(kitXP);
            handled = true;
        }

        if (TNManager.isAdmin && text == "tgm")
        {
            TGM();
            handled = true;
        }

        if (text == "downgrade")
        {
            DataNode inventory = MyPlayer.inventory;
            int      level     = MyPlayer.level;

            DataNode dataNode = MyPlayer.equipment;
            dataNode = MyPlayer.inventory;
            for (int j = 0; j < dataNode.children.size; j++)
            {
                PlayerItem playerItem2 = dataNode.children[j].Get <PlayerItem>();
                if (playerItem2 != null && playerItem2.level > level)
                {
                    playerItem2.MakeLevel(level);
                    UIGameChat.AddMisc("Item: " + playerItem2.name + " which is NOW level " + playerItem2.level, Color.white);
                }
            }

            handled = true;
        }
    }