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


C# Player.setPaidAgilityArena方法代码示例

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


在下文中一共展示了Player.setPaidAgilityArena方法的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:slapglif,项目名称:runescape-server-csharp,代码行数:18,代码来源:AgilityArena.cs

示例2: doDialogue


//.........这里部分代码省略.........
				    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;
				    break;
				
			    case 28:
				    if (!p.getInventory().hasItemAmount(995, AGILITY_ARENA_PRICE)) {
					    p.getPackets().sendPlayerHead(64, 2);
                        p.getPackets().modifyText(p.getLoginDetails().getUsername(), 64, 3);
					    p.getPackets().modifyText("I don't have enough money on me at the moment..", 64, 4);
					    p.getPackets().animateInterface(9827, 64, 2);
					    p.getPackets().sendChatboxInterface2(64);
					    newStatus = 31;
					    break;
				    }
                    p.getPackets().modifyText("Ok, here's " + AGILITY_ARENA_PRICE.ToString("#,##0") + " coins.", 228, 2);
				    p.getPackets().modifyText("Never mind.", 228, 3);
				    p.getPackets().sendChatboxInterface(228);
				    newStatus = 29;
				    break;
				
			    case 29:
				    if (p.getInventory().deleteItem(995, AGILITY_ARENA_PRICE)) {
					    p.setPaidAgilityArena(true);
				    }
				    p.getPackets().sendPlayerHead(64, 2);
                    p.getPackets().modifyText(p.getLoginDetails().getUsername(), 64, 3);
                    p.getPackets().modifyText("Ok, here's " + AGILITY_ARENA_PRICE.ToString("#,##0") + " coins.", 64, 4);
				    p.getPackets().animateInterface(9827, 64, 2);
				    p.getPackets().sendChatboxInterface2(64);
				    newStatus = 30;
				    break;
				
			    case 30:
                    p.getPackets().sendMessage("You pay Cap'n Izzy " + AGILITY_ARENA_PRICE.ToString("#,##0") + " coins.");
				    p.getPackets().sendNPCHead(437, 241, 2);
				    p.getPackets().modifyText("Cap'n Izzy No-Beard", 241, 3);
				    p.getPackets().modifyText("May the wind be in ye sails!", 241, 4);
				    p.getPackets().animateInterface(9827, 241, 2);
				    p.getPackets().sendChatboxInterface2(241);
				    break;
				
			    case 31:
				    p.getPackets().sendNPCHead(4535, 241, 1);
				    p.getPackets().modifyText("Parrot", 241, 3);
				    p.getPackets().modifyText("*Squawk*", 241, 4);
				    p.getPackets().animateInterface(9827, 241, 1);
				    p.getPackets().sendChatboxInterface2(241);
				    newStatus = 32;
				    break;
				
			    case 32:
				    p.getPackets().sendNPCHead(437, 241, 2);
				    p.getPackets().modifyText("Cap'n Izzy No-Beard", 241, 3);
				    p.getPackets().modifyText("No coins, no entrance!", 241, 4);
				    p.getPackets().animateInterface(9827, 241, 2);
开发者ID:slapglif,项目名称:runescape-server-csharp,代码行数:67,代码来源:AgilityArena.cs


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