protected override void OnTarget(Mobile from, object targeted) { if (from is PlayerMobile && targeted is PlayerMobile) { Mobile m = (Mobile)targeted; JailSystem.macroTest(from, m); } }
public override void OnClick() { if (js == null) { JailSystem.macroTest(m_gm, m_player); } else if (!js.jailed) { JailSystem.macroTest(m_gm, m_player); } else { m_gm.SendMessage("They are already in jail."); } }
public override void OnResponse(NetState sender, RelayInfo info) { Mobile from = sender.Mobile; switch (info.ButtonID) { case 20: //previous button m_id--; if (m_id < 0) { m_id = m_warn.Count - 1; } from.SendGump(new JailWarnGump(from, badBoy, info.GetTextEntry(0).Text, m_id, m_warn)); break; case 21: //next button m_id++; if (m_id >= m_warn.Count) { m_id = 0; } from.SendGump(new JailWarnGump(from, badBoy, info.GetTextEntry(0).Text, m_id, m_warn)); break; //reason buttons case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: from.SendGump(new JailWarnGump(from, badBoy, JailGump.reasons[info.ButtonID - 3], m_id, m_warn)); break; case 1: //warn them from.CloseGump(typeof(JailWarnGump)); if (m_reason == JailGump.reasons[0]) { //they are macroing JailSystem.macroTest(from, badBoy); } else { //not Unattended macroing badBoy.SendGump(new JailWarningGump(from, badBoy, m_reason)); } break; case 2: //jail them from.CloseGump(typeof(JailWarnGump)); from.SendGump(new JailGump(JailSystem.lockup(badBoy), from, badBoy, 0, "", m_reason, "0", "0", "1", "0", "0", true)); break; default: break; } }