当前位置: 首页>>代码示例>>C#>>正文


C# PlayerMobile.Emote方法代码示例

本文整理汇总了C#中Server.Mobiles.PlayerMobile.Emote方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.Emote方法的具体用法?C# PlayerMobile.Emote怎么用?C# PlayerMobile.Emote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Mobiles.PlayerMobile的用法示例。


在下文中一共展示了PlayerMobile.Emote方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AnnounceAFK

        private static void AnnounceAFK(PlayerMobile pm)
        {
            if (!isAFK(pm))
                return;

            if (pm.Location.ToString() != GetAFKLocation(pm) || pm.NetState == null || pm.Deleted)
            {
                SetBack(pm);
                return;
            }

            TimeSpan ts = GetAFKTimeSpan(pm);

            pm.Emote("*{0}*", GetAFKMessage(pm));

            if (ts.Hours != 0)
            {
                pm.Emote("*AFK for {0} hour{1} and {2} minute{3}*", ts.Hours.ToString(), (ts.Hours > 1 ? "s" : ""), ts.Minutes.ToString(), (ts.Minutes > 1 ? "s" : ""));
            }
            else if (ts.Minutes != 0)
            {
                pm.Emote("*AFK for {0} minute{1}*", ts.Minutes.ToString(), (ts.Minutes > 1 ? "s" : ""));
            }
            else if (ts.Seconds != 0)
            {
                pm.Emote("*AFK for {0} seconds*", ts.Seconds.ToString());
            }

            Timer.DelayCall(TimeSpan.FromSeconds(10), delegate { AnnounceAFK(pm); });
        }
开发者ID:Vorpalstar,项目名称:runuo-custom-scripts,代码行数:30,代码来源:AFK.cs

示例2: HandleShapeshift

        public static void HandleShapeshift( PlayerMobile m, string choice )
        {
            if( choice == "human" )
            {
                if( m.BodyValue == 400 || m.BodyValue == 401 )
                    m.SendMessage( "You are already in human form." );

                else
                {
                    if( m.Female )
                        m.BodyValue = 401;

                    else
                        m.BodyValue = 400;

                    m.Emote( "*turns back into human form*" );
                    m.HueMod = -1;
                    m.NameMod = null;
                    m.InvalidateProperties();
                }
            }

            else if( choice == "wolf" || choice == "bat" || choice == "rat" || choice == "cat" )
            {
                int cost = 10;

                if( m.Feats.GetFeatLevel( FeatList.Shapeshift ) > 2 )
                    cost = 1;

                else if( m.Feats.GetFeatLevel( FeatList.Shapeshift ) == 2 )
                    cost = 5;

                if( m.BPs < cost )
                    m.SendMessage( "You lack enough blood points to use that ability." );

                else
                {

                    m.Emote( "*turns into a " + choice + "*" );
                    m.HueMod = 2881;
                    m.NameMod = "a black " + choice;

                    int body = 225;

                    if( choice == "cat" )
                        body = 201;
                    else if( choice == "rat" )
                        body = 238;
                    else if( choice == "bat" )
                        body = 317;

                    m.BodyValue = body;
                    m.BPs -= cost;
                    m.InvalidateProperties();
                }
            }

            else
                m.SendMessage( "Invalid option." );
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:60,代码来源:Shapeshift.cs

示例3: EndChew

        public static void EndChew(PlayerMobile m)
        {
            Timer t = (Timer)m_Table[m];

            if (t != null)
                t.Stop();

            m_Table.Remove(m);
            m.SendMessage("You spit the chew out.");
            m.Emote("*spits!*");

            if (m.Female)
            {
                m.PlaySound(820);
            }
            else
            {
                m.PlaySound(1094);
            }
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:20,代码来源:BaseChewable.cs

示例4: SetBack

 private static void SetBack(PlayerMobile pm)
 {
     ProTag.Del(pm, "AFK Message");
     ProTag.Del(pm, "AFK Location");
     ProTag.Del(pm, "AFK Time");
     pm.Emote("*Returns to the game*");
 }
开发者ID:Vorpalstar,项目名称:runuo-custom-scripts,代码行数:7,代码来源:AFK.cs

示例5: SetAFK

 private static void SetAFK(PlayerMobile pm, string message)
 {
     ProTag.Set(pm, "AFK Message", message);
     ProTag.Set(pm, "AFK Location", pm.Location.ToString());
     ProTag.Set(pm, "AFK Time", DateTime.Now.ToString());
     pm.Emote("*Is now AFK*");
 }
开发者ID:Vorpalstar,项目名称:runuo-custom-scripts,代码行数:7,代码来源:AFK.cs

示例6: DoExplode

        public void DoExplode(PlayerMobile pm)
        {
            pm.Emote("*The gaze of the asylum guardian melts the flesh from your bones and causes your organs to explode.*");
            int range = Utility.RandomMinMax(5, 7);
            int zOffset = pm.Mounted ? 20 : 10;

            Point3D src = pm.Location.Clone3D(0, 0, zOffset);
            Point3D[] points = src.GetAllPointsInRange(pm.Map, 0, range);

            Effects.PlaySound(pm.Location, pm.Map, 0x19C);

            pm.FixedParticles(0x36BD, 20, 10, 5044, 137, 0, EffectLayer.Head);
            pm.PlaySound(0x307);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    int i = 0;
                    int place = 0;
                    int[] BodyPartArray = {7584, 7583, 7586, 7585, 7588, 7587};
                    foreach (Point3D trg in points)
                    {
                        i++;
                        int bodypartID = Utility.RandomMinMax(4650, 4655);

                        if (Utility.RandomDouble() <= 0.1 && place < BodyPartArray.Count())
                        {
                            bodypartID = BodyPartArray[place];
                            place++;
                        }
                        new MovingEffectInfo(src, trg.Clone3D(0, 0, 2), pm.Map, bodypartID).MovingImpact(
                            info =>
                            {
                                Item bodypart;
                                if (bodypartID <= 4655 && bodypartID >= 4650)
                                {
                                    bodypart = new Blood
                                    {
                                        ItemID = bodypartID
                                    };
                                    bodypart.MoveToWorld(info.Target.Location, info.Map);
                                }

                                switch (bodypartID)
                                {
                                    case 7584:
                                        bodypart = new Head();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7583:
                                        bodypart = new Torso();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7586:
                                        bodypart = new RightArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7585:
                                        bodypart = new LeftArm();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7588:
                                        bodypart = new RightLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;

                                    case 7587:
                                        bodypart = new LeftLeg();
                                        bodypart.MoveToWorld(info.Target.Location, info.Map);
                                        break;
                                }

                                Effects.PlaySound(info.Target, info.Map, 0x028);
                            });
                    }
                });

            pm.Damage(pm.Hits + 5);

            Timer.DelayCall(
                TimeSpan.FromMilliseconds(100),
                () =>
                {
                    var corpse = pm.Corpse as Corpse;

                    if (corpse != null && !corpse.Deleted)
                    {
                        corpse.TurnToBones();
                    }
                });
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:96,代码来源:AsylumStatue.cs


注:本文中的Server.Mobiles.PlayerMobile.Emote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。