Exemplo n.º 1
0
 public override void PreSaveAndQuit()
 {
     RPControl.presence.details        = string.Format("In Main Menu");
     RPControl.presence.state          = null;
     RPControl.presence.largeImageKey  = string.Format("menu");
     RPControl.presence.largeImageText = string.Format("Menu");
     RPControl.presence.smallImageKey  = null;
     RPControl.presence.smallImageText = null;
     RPControl.Update();
     UpdaterUnload();
     startup.done = false;
 }
Exemplo n.º 2
0
        public override void Load()
        {
            RPControl.Enable();
            RPControl.presence.details        = string.Format("In Main Menu");
            RPControl.presence.largeImageKey  = string.Format("menu");
            RPControl.presence.largeImageText = string.Format("Menu");

            DateTime date    = DateTime.Now;
            DateTime epoch   = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
            long     timenow = Convert.ToInt64((date.ToUniversalTime() - epoch).TotalSeconds);

            RPControl.presence.startTimestamp = timenow;

            RPControl.Update();
        }
Exemplo n.º 3
0
        public static void Update()
        {
            life     = player.statLife;
            lifeM    = player.statLifeMax + player.statLifeMax2;
            mana     = player.statMana;
            manaM    = player.statManaMax + player.statManaMax2;
            def      = player.statDefense;
            minions  = player.slotsMinions;
            minionsM = player.maxMinions;


            string expert;
            string HardMode;

            if (Main.expertMode)
            {
                expert = "Expert";
            }
            else
            {
                expert = "Normal";
            }

            if (Main.hardMode)
            {
                HardMode = "Hardmode";
            }
            else
            {
                HardMode = "Pre-Hardmode";
            }

            Timer += 1;

            if (Timer / 1.5 >= 3)
            {
                Presence1 = false;
            }
            if (Timer / 1.5 >= 6)
            {
                Presence1 = true;
                Timer     = 0;
            }

            zone1 = player.zone1;
            zone2 = player.zone2;
            zone3 = player.zone3;

            item = player.HeldItem;

            if (!dead)
            {
                if (!Presence1)
                {
                    RPControl.presence.state = string.Format("HP: {0}/{1} MP: {2}/{3} DEF: {4} (Debug {10})", life, lifeM, mana, manaM, def, minions, minionsM, player.position.X, player.position.Y, Class, (Timer / 1.5));
                }
                else
                {
                    RPControl.presence.state = string.Format("Minions: {5}/{6} Class: {9} (Debug {10})", life, lifeM, mana, manaM, def, minions, minionsM, player.position.X, player.position.Y, Class, (Timer / 1.5));
                }
            }
            else
            {
                RPControl.presence.state = string.Format("Dead, Class: {0}", Class);
            }

            GetItemStat();

            //bossNPC = Main.npc.Take(200).Where(npc => npc.active && (bossID.Contains(npc.type) || npc.boss)).LastOrDefault();

            GetBiome();

            //if (bossNPC == null)
            //	GetBiome();
            //else
            //	GetBoss();

            RPControl.Update();
        }
Exemplo n.º 4
0
 public override void Unload()
 {
     RPControl.Disable();
 }