public static void SR_Reset_OnCommand(CommandEventArgs e) { Mobile mob = e.Mobile; SR_Utilities.NewRuneAcc(SR_Utilities.FetchInfo(mob.Account)); mob.SendMessage("Your staff runebook has been reset to default."); }
public static void SR_OnCommand(CommandEventArgs e) { Mobile mob = e.Mobile; SR_Gump.Send(mob, SR_Utilities.FetchInfo(mob.Account)); }
public override void OnResponse(NetState sender, RelayInfo info) { int button = info.ButtonID; Mobile mob = sender.Mobile; switch (button) { case 0: break; case 1: mob.SendMessage("Enter a description:"); mob.Prompt = new SR_NewRunePrompt(this.RuneAcc, mob.Location, mob.Map); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 2: mob.SendMessage("Target a location to mark:"); mob.Target = new SR_NewRuneTarget(this.RuneAcc); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 3: mob.SendMessage("Enter a description:"); mob.Prompt = new SR_NewRunePrompt(this.RuneAcc); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 4: this.RuneAcc.RemoveRune(this.RuneAcc.PageIndex, true); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 5: this.RuneAcc.ResetPageIndex(); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 6: this.RuneAcc.ChildRune.ParentRune.RemoveRune(this.RuneAcc.ChildRune.ParentRune.PageIndex, true); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; case 7: this.RuneAcc.ChildRune.ParentRune.ResetPageIndex(); Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; default: bool moongate = false; button -= 10; if (button >= 60000) { if (this.RuneAcc.ChildRune == null) { this.RuneAcc.RemoveRune(button - 60000); } else { this.RuneAcc.ChildRune.RemoveRune(button - 60000); } Send(mob, SR_Utilities.FetchInfo(mob.Account)); break; } if (button >= 30000) { button -= 30000; moongate = true; } SR_Rune rune = null; if (this.RuneAcc.ChildRune == null) { rune = this.RuneAcc.Runes[button]; } else { rune = this.RuneAcc.ChildRune.Runes[button]; } if (rune.IsRunebook) { if (this.RuneAcc.ChildRune == null) { this.RuneAcc.PageIndex = button; } else { this.RuneAcc.ChildRune.PageIndex = button; } Send(mob, SR_Utilities.FetchInfo(mob.Account)); } else { if (mob.Location == rune.TargetLoc && mob.Map == rune.TargetMap) { mob.SendMessage("You are already there."); } else if (!moongate) { mob.PlaySound(0x1FC); mob.MoveToWorld(rune.TargetLoc, rune.TargetMap); mob.PlaySound(0x1FC); } else { if (SR_Utilities.FindItem(typeof(Moongate), mob.Location, mob.Map)) { mob.SendMessage("You are standing on top of a moongate, please move."); } else if (SR_Utilities.FindItem(typeof(Moongate), rune.TargetLoc, rune.TargetMap)) { mob.SendMessage("There is already a moongate there, sorry."); } else { mob.SendLocalizedMessage(501024); // You open a magical gate to another location Effects.PlaySound(mob.Location, mob.Map, 0x20E); SR_RuneGate firstGate = new SR_RuneGate(rune.TargetLoc, rune.TargetMap); firstGate.MoveToWorld(mob.Location, mob.Map); Effects.PlaySound(rune.TargetLoc, rune.TargetMap, 0x20E); SR_RuneGate secondGate = new SR_RuneGate(mob.Location, mob.Map); secondGate.MoveToWorld(rune.TargetLoc, rune.TargetMap); } } } break; } }