public ReplyNPCGump(int page, int x, int y, ArrayList triggerList, ReplyNPC owner) : base(x, y) { this.m_Page = page; this.m_TriggerList = new ArrayList(); // We want to clone each TriggerWord so that when someone cancels, the values do not save for (int i = 0; i < triggerList.Count; i++) { this.m_TriggerList.Add((TriggerWord)(((TriggerWord)triggerList[i]).Clone())); } this.m_Owner = owner; this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 400, 400, 9380); if (m_Page > 0) { this.AddLabel(60, 375, 1149, @"Prev page"); this.AddButton(40, 380, 9706, 9707, (int)Buttons.Previous, GumpButtonType.Reply, 0); } if (m_TriggerList.Count > m_Page * 10 + 10) { this.AddLabel(270, 375, 1149, @"Next page"); this.AddButton(330, 380, 9702, 9703, (int)Buttons.Next, GumpButtonType.Reply, 0); } this.AddLabel(40, 40, 1259, @"Reply NPC Configure Gump"); this.AddLabel(100, 60, 1259, @"Add New Entry:"); this.AddButton(220, 60, 4014, 4015, (int)Buttons.Add, GumpButtonType.Reply, 0); this.AddLabel(40, 80, 1259, @"Trigger Word:"); this.AddLabel(140, 80, 1259, @"Test:"); this.AddLabel(200, 80, 1259, @"Delete:"); this.AddLabel(260, 80, 1259, @"Case Sensitive:"); int j = 0; for (int i = m_Page * 10; i < m_TriggerList.Count && j < 10; i++) { this.AddLabel(40, 100 + j * 20, 1149, @"" + ((TriggerWord)m_TriggerList[i]).Word); this.AddButton(140, 100 + j * 20, 4011, 4012, 10 + i, GumpButtonType.Reply, 0); this.AddButton(200, 100 + j * 20, 4017, 4018, (10 + i) * -1, GumpButtonType.Reply, 0); this.AddCheck(290, 100 + j * 20, 0xD2, 0xD3, ((TriggerWord)m_TriggerList[i]).CaseSensitive, i); j++; } this.AddButton(120, 340, 247, 248, (int)Buttons.OK, GumpButtonType.Reply, 0); this.AddButton(220, 340, 241, 242, (int)Buttons.Cancel, GumpButtonType.Reply, 0); }
public TriggerWordPrompt(ArrayList triggerList, ReplyNPC owner) { this.m_TriggerList = triggerList; this.m_Owner = owner; }
public ResponsePrompt(ArrayList triggerList, ReplyNPC owner, string word) { this.m_TriggerList = triggerList; this.m_Owner = owner; this.m_Word = word; }
public SpamTimer(ReplyNPC owner) : base(TimeSpan.FromSeconds(owner.MinimumSpamDelay), TimeSpan.FromSeconds(owner.MaximumSpamDelay)) { this.m_Owner = owner; }
public ReplyNPCGump(int page, int x, int y, ArrayList triggerList, ReplyNPC owner) : base( x, y ) { this.m_Page = page; this.m_TriggerList = new ArrayList(); // We want to clone each TriggerWord so that when someone cancels, the values do not save for(int i = 0; i < triggerList.Count; i++) { this.m_TriggerList.Add((TriggerWord)(((TriggerWord)triggerList[i]).Clone())); } this.m_Owner = owner; this.Closable = true; this.Disposable = true; this.Dragable = true; this.Resizable = false; this.AddPage(0); this.AddBackground(0, 0, 400, 400, 9380); if (m_Page > 0) { this.AddLabel(60, 375, 1149, @"Prev page"); this.AddButton(40, 380, 9706, 9707, (int)Buttons.Previous, GumpButtonType.Reply, 0); } if (m_TriggerList.Count > m_Page * 10 + 10) { this.AddLabel(270, 375, 1149, @"Next page"); this.AddButton(330, 380, 9702, 9703, (int)Buttons.Next, GumpButtonType.Reply, 0); } this.AddLabel(40, 40, 1259, @"Reply NPC Configure Gump"); this.AddLabel(100, 60, 1259, @"Add New Entry:"); this.AddButton(220, 60, 4014, 4015, (int)Buttons.Add, GumpButtonType.Reply, 0); this.AddLabel(40, 80, 1259, @"Trigger Word:"); this.AddLabel(140, 80, 1259, @"Test:"); this.AddLabel(200, 80, 1259, @"Delete:"); this.AddLabel(260, 80, 1259, @"Case Sensitive:"); int j = 0; for (int i = m_Page * 10; i < m_TriggerList.Count && j < 10; i++) { this.AddLabel(40, 100 + j * 20, 1149, @"" + ((TriggerWord)m_TriggerList[i]).Word); this.AddButton(140, 100 + j * 20, 4011, 4012, 10 + i, GumpButtonType.Reply, 0); this.AddButton(200, 100 + j * 20, 4017, 4018, (10 + i)*-1, GumpButtonType.Reply, 0); this.AddCheck(290, 100 + j * 20, 0xD2, 0xD3, ((TriggerWord)m_TriggerList[i]).CaseSensitive, i); j++; } this.AddButton(120, 340, 247, 248, (int)Buttons.OK, GumpButtonType.Reply, 0); this.AddButton(220, 340, 241, 242, (int)Buttons.Cancel, GumpButtonType.Reply, 0); }
public SpamTimer(ReplyNPC owner) : base( TimeSpan.FromSeconds( owner.MinimumSpamDelay ), TimeSpan.FromSeconds( owner.MaximumSpamDelay ) ) { this.m_Owner = owner; }