本文整理匯總了C#中RS2.Server.player.Player.setPaidAgilityArena方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.setPaidAgilityArena方法的具體用法?C# Player.setPaidAgilityArena怎麽用?C# Player.setPaidAgilityArena使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RS2.Server.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);
}
示例2: doDialogue
//.........這裏部分代碼省略.........
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);