當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.hasPaidAgilityArena方法代碼示例

本文整理匯總了C#中RS2.Server.player.Player.hasPaidAgilityArena方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.hasPaidAgilityArena方法的具體用法?C# Player.hasPaidAgilityArena怎麽用?C# Player.hasPaidAgilityArena使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RS2.Server.player.Player的用法示例。


在下文中一共展示了Player.hasPaidAgilityArena方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: enterArena

 public static void enterArena(Player p, int objectX, int objectY)
 {
     CoordinateEvent enterArenaCoordinateEvent = new CoordinateEvent(p, new Location(2809, 3193, 0));
     enterArenaCoordinateEvent.setAction(() =>
     {
         if (!p.hasPaidAgilityArena())
         {
             p.getPackets().sendMessage("You must pay Cap'n Izzy the entrance fee before you can enter the Agility Arena.");
             return;
         }
         p.setLastAnimation(new Animation(827));
         Event teleportArenaEvent = new Event(1000);
         teleportArenaEvent.setAction(() =>
         {
             p.setPaidAgilityArena(false);
             p.teleport(new Location(2805, 9589, 3));
             teleportArenaEvent.stop();
         });
         Server.registerEvent(teleportArenaEvent);
     });
     Server.registerCoordinateEvent(enterArenaCoordinateEvent);
 }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:22,代碼來源:AgilityArena.cs

示例2: doDialogue


//.........這裏部分代碼省略.........
                    p.getPackets().sendChatboxInterface2(242);
                    newStatus = 22;
                    break;

                case 22:
                    p.getPackets().sendNPCHead(437, 241, 2);
                    p.getPackets().modifyText("Cap'n Izzy No-Beard", 241, 3);
                    p.getPackets().modifyText("Thanks me hearty!", 241, 4);
                    p.getPackets().animateInterface(9827, 241, 2);
                    p.getPackets().sendChatboxInterface2(241);
                    newStatus = 23;
                    break;

                case 23:
                    p.getPackets().sendPlayerHead(64, 2);
                    p.getPackets().modifyText(p.getLoginDetails().getUsername(), 64, 3);
                    p.getPackets().modifyText("Thanks!", 64, 4);
                    p.getPackets().animateInterface(9827, 64, 2);
                    p.getPackets().sendChatboxInterface2(64);
                    newStatus = 6;
                    break;

                case 24:
                    p.getPackets().sendPlayerHead(64, 2);
                    p.getPackets().modifyText(p.getLoginDetails().getUsername(), 64, 3);
                    p.getPackets().modifyText("I'd like to use the Agility Arena, please.", 64, 4);
                    p.getPackets().animateInterface(9827, 64, 2);
                    p.getPackets().sendChatboxInterface2(64);
                    newStatus = 25;
                    break;

                case 25:
                    string message = "";
                    if (p.hasPaidAgilityArena())
                    {
                        message = "Ye've already paid, so down ye goes...";
                    }
                    else
                    {
                        message = "Aye, Entrance be " + AGILITY_ARENA_PRICE.ToString("#,##0") + " coins.";
                        newStatus = 26;
                    }
                    p.getPackets().sendNPCHead(437, 241, 2);
                    p.getPackets().modifyText("Cap'n Izzy No-Beard", 241, 3);
                    p.getPackets().modifyText(message, 241, 4);
                    p.getPackets().animateInterface(9827, 241, 2);
                    p.getPackets().sendChatboxInterface2(241);
                    break;

                case 26:
                    p.getPackets().sendNPCHead(4535, 241, 1);
                    p.getPackets().modifyText("Parrot", 241, 3);
                    p.getPackets().modifyText("Pieces of eight!", 241, 4);
                    p.getPackets().animateInterface(9827, 241, 1);
                    p.getPackets().sendChatboxInterface2(241);
                    newStatus = 27;
                    break;

                case 27:
                    p.getPackets().sendNPCHead(437, 242, 2);
                    p.getPackets().modifyText("Cap'n Izzy No-Beard", 242, 3);
                    p.getPackets().modifyText("A word of warning me hearty! There are dangerous", 242, 4);
                    p.getPackets().modifyText("traps down there!", 242, 5);
                    p.getPackets().animateInterface(9827, 242, 2);
                    p.getPackets().sendChatboxInterface2(242);
                    newStatus = 28;
開發者ID:ramatronics,項目名稱:rsps,代碼行數:67,代碼來源:AgilityArena.cs


注:本文中的RS2.Server.player.Player.hasPaidAgilityArena方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。