public override void OnResponse(NetState sender, RelayInfo info) { if (m_Ticket.Deleted) { return; } var number = 0; Item item = null; Item item2 = null; switch (info.ButtonID) { case 1: { item = new Sextant(); number = 1010494; break; // A sextant has been placed in your backpack. } case 2: { item = new HairRestylingDeed(); number = 501933; break; // A coupon for a free hair restyling has been placed in your backpack. } case 3: { item = new Spellbook(0xFFFFFFFF); number = 1010495; break; // A spellbook with all 1st to 4th circle spells has been placed in your backpack. } case 4: { item = new FireworksWand(); number = 501935; break; // A wand of fireworks has been placed in your backpack. } case 5: { item = new Spyglass(); number = 501936; break; // A spyglass has been placed in your backpack. } case 6: { item = new DyeTub(); item2 = new Dyes(); number = 501937; break; // The dyes and dye tub have been placed in your backpack. } } if (item != null) { m_Ticket.Delete(); m_From.SendLocalizedMessage(number); m_From.AddToBackpack(item); if (item2 != null) { m_From.AddToBackpack(item2); } } }
public override void OnResponse(NetState sender, RelayInfo info) { int count = m_Count; Mobile m = sender.Mobile; for (int i = 0; i < 6 && count > 0; i++) { Item item = null; if (!m_Old && i >= 3) { break; } if (!info.IsSwitched(i + 100)) { continue; } count--; switch (i) { case 0: if (m_Abyss) { m.AddToBackpack(new BankCheck(5000)); } else { m.AddToBackpack(new FireworksWand()); } break; case 1: if (m_Abyss) { m.AddToBackpack(new BagOfReagents(100)); } else { m.AddToBackpack(item = new Spyglass()); item.LootType = LootType.Newbied; } break; case 2: m.AddToBackpack(new HairRestylingDeed()); break; case 3: switch (Utility.Random(5)) { case 0: item = new RangerArms(); break; case 1: item = new RangerChest(); break; case 2: item = new RangerGloves(); break; case 3: item = new RangerGorget(); break; case 4: item = new RangerLegs(); break; } if (item != null) { m.AddToBackpack(item); } break; case 4: if (m_Abyss) { item = new BaseItem(Utility.Random(6) + 0xEf4); item.Name = "I survived the Abyss!"; item.LootType = LootType.Newbied; m.AddToBackpack(item); } else { m.AddToBackpack(new ClothingBlessDeed()); } break; case 5: if (m_Abyss) { m.AddToBackpack(new Server.Multis.SmallDragonBoatDeed()); } else { m.AddToBackpack(new StrongBoxDeed()); } break; } } m.SendAsciiMessage("Enjoy!"); if (count > 0) { ((Account)m.Account).SetTag("Rewards", count.ToString()); m.SendAsciiMessage("You have {0} reward{1} left.", count, count == 1 ? "" : "s"); } else { ((Account)m.Account).RemoveTag("Rewards"); ((Account)m.Account).RemoveTag("GoodRewards"); } }