Page 10 of 25 FirstFirst ... 8910111220 ... LastLast
Results 136 to 150 of 368

Thread: Working SEQ alternative

  1. #136
    Moderator
    Join Date
    Jan 2003
    Posts
    426
    Riser: Probably on both suggestions, the mouse wheel being the most likely to get done first because it's a very good idea to do that when the map control is active.

    As a super helpful thing with bug reports that I just thought of, if it pops up an error box that has a Details button in the corner please press it and copy the supplied text in there and paste it into the message, it will help a lot in tracking the bug down.

  2. #137
    Registered User
    Join Date
    Mar 2002
    Posts
    139
    While you're taking suggestions...

    Would be nice to have the option of select mob on target (in game target, or con perhaps), if possible.

    Would also be nice to be able to click a mob on the map, and have that mob be selected in the list.

    Other then that, I'm very happy with this, excellent progress so far. I've had no problems, running server/game on XP and client on Windows 2000.

  3. #138
    Registered User
    Join Date
    Apr 2003
    Posts
    9

    Screenshots?

    Does anyone have any screenshots of myseq running that they won't mind sharing?

  4. #139
    Registered User
    Join Date
    Apr 2003
    Posts
    11

    *** - ?

    Just a quick question (P.S. Great work!)

    While scrolling through the list, i often see characters with *** before their names... Not NPCs, but normal PCs... I can refresh the list, Close client/server and restart, and they still have the *** in front of them.. why?

    Even their Corpses have *** in front of them....


    Thanks

  5. #140
    Registered User grimjack's Avatar
    Join Date
    Dec 2001
    Posts
    32

    Font of listbox1

    Here is a modification I did to add a font dialog and menu item for listbox1.
    Maybe somthing that could be incorperated to the main source.
    Sorry that it is so long I did not have anywhere to hoste the file.

    I only was able to test it without running EQ since I am at work. Let me know what you think.

    form1.cs
    Code:
    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.Runtime.InteropServices;
    using System.Net;
    using System.Net.Sockets;
    using System.Globalization;
    using System.Text;
    using System.IO;
    using System.Threading;
    
    //using MapCon;
    
    namespace myseq {	
    	[StructLayout(LayoutKind.Sequential, Pack=1)]
    	public class SPAWNINFO  {
    		public SPAWNINFO()  {
    
    		}
    
    
    		public void frombytes(byte []b)  {
    			Name = Encoding.ASCII.GetString(b, 0, 30);
    			Y = BitConverter.ToSingle(b, 32);
    			X = BitConverter.ToSingle(b, 36);
    			Z = BitConverter.ToSingle(b, 40);
    			Heading = BitConverter.ToSingle(b, 44);
    			SpeedRun = BitConverter.ToSingle(b, 48);
    			SpawnID = BitConverter.ToUInt32(b, 52);
    			GuildID = BitConverter.ToInt16(b, 56);
    			Type = b[58];
    			Class = b[59];
    			Race = BitConverter.ToUInt32(b, 60);
    			Level = b[64];
    			Hide = b[65];
    			Light = b[66];
    			VisType = b[67];
    			Lastname = Encoding.ASCII.GetString(b, 68, 22);
    
    			Deity = BitConverter.ToInt16(b, 90);
    			flags = BitConverter.ToInt32(b, 92);
    		}
    		
    		public string Name = "";
    		public float Y = 0;
    		public float X = 0;
    		public float Z = 0;
    		public float Heading = 0;
    		public float SpeedRun = 0;
    		public uint SpawnID = 0;
    		public short GuildID = 0;
    		public byte Type = 0;
    		public byte Class = 0;
    		public uint Race = 0;
    		public byte Gender = 0;
    		public byte Level = 0;
    		public byte Hide; 		
    		public byte Light = 0;
    		public byte VisType = 0;
    		public string Lastname = "";
    		public short Deity = 0;
    		public int gone = 0;
    		public int flags = 0;
    		public ListViewItem lvi = null;
    	}
    
    	[Serializable]
    	public class ListBoxComparer : IComparer {
    		//public ObjectComparer(params string[] fields) : this(fields, new bool[fields.Length]) {}
    
    		public int Compare(object a, object b)  {
    			ListViewItem sa = (ListViewItem)a;
    			ListViewItem sb = (ListViewItem)b;
    			int res = 0;
    
    			// Name
    			if (Column == 0)  {
    				res = string.Compare(sa.Text,sb.Text);
    			}
    				// Level
    			else if (Column == 1)  {
    				int ia = int.Parse(sa.SubItems[1].Text);
    				int ib = int.Parse(sb.SubItems[1].Text);
    				
    				if (ia < ib)
    					res = -1;
    				else if (ia > ib)
    					res = 1;
    				else
    					res = 0;
    
    			}	
    				// Class
    			else if (Column == 2)  {
    				res = string.Compare(sa.SubItems[2].Text, sb.SubItems[2].Text);
    			}
    				// Race
    			else if (Column == 3)  {
    				res = string.Compare(sa.SubItems[3].Text, sb.SubItems[3].Text);
    			}
    				// Last Name
    			else if (Column == 4)  {
    				res = string.Compare(sa.SubItems[4].Text, sb.SubItems[4].Text);
    			}
    				// Invis
    			else if (Column == 5)  {
    				res = string.Compare(sa.SubItems[5].Text, sb.SubItems[5].Text);
    			}
    				// Run Speed
    			else if (Column == 6)  {
    				float fa = float.Parse(sa.SubItems[6].Text);
    				float fb = float.Parse(sb.SubItems[6].Text);
    				
    				if (fa < fb)
    					res = -1;
    				else if (fa > fb)
    					res = 1;
    				else
    					res = 0;
    
    			}	
    				// SpawnID
    			else if (Column == 7)  {
    				int ia = int.Parse(sa.SubItems[7].Text);
    				int ib = int.Parse(sb.SubItems[7].Text);
    				
    				if (ia < ib)
    					res = -1;
    				else if (ia > ib)
    					res = 1;
    				else
    					res = 0;
    
    			}	
    			else if (Column == 8)  {
    				DateTime dta = DateTime.Parse(sa.SubItems[8].Text);
    				DateTime dtb = DateTime.Parse(sb.SubItems[8].Text);
    	
    				res = DateTime.Compare(dta, dtb);
    			}
    			
    
    			if (Descending)
    				res = -res;
    			return res;
    		}
    
    		public ListBoxComparer(ListView.ListViewItemCollection spawns, bool descending, int column) {
    			Spawns = spawns;
    			Descending = descending;
    			Column = column;
    		}
    
    		private ListView.ListViewItemCollection Spawns;
    		private bool Descending;
    		private int Column;
    	}
    		
    		
    	/// <summary>
    	/// Summary description for Form1.
    	/// </summary>
    	public class Form1 : System.Windows.Forms.Form  	{
    		[DllImport("kernel32.dll", ExactSpelling=true)]
    		internal static extern bool Beep(uint freq, uint dur);
    
    		const int ditchGone = 4;		// The number of ticks till the spawn gets ditched
    
    		private System.Windows.Forms.Button button1;
    		private System.ComponentModel.IContainer components;
    		private System.Windows.Forms.MainMenu mainMenu1;
    		private System.Windows.Forms.MenuItem menuItem1;
    		private System.Windows.Forms.MenuItem menuItem2;
    		private System.Windows.Forms.MenuItem menuItem3;
    		private System.Windows.Forms.MenuItem menuItem4;
    		private System.Windows.Forms.OpenFileDialog openFileDialog;
    		private myseq.MapCon mapCon1;
    		private System.Windows.Forms.NumericUpDown offsetx;
    		private System.Windows.Forms.NumericUpDown offsety;
    		public System.Windows.Forms.NumericUpDown scale;
    		private System.Windows.Forms.Label label3;
    		private System.Windows.Forms.Label label2;
    		private System.Windows.Forms.MenuItem menuItem5;
    		private System.Windows.Forms.MenuItem menuItem6;
    		public System.Windows.Forms.ListView listBox1;
    		private System.Windows.Forms.Timer timer1;
    		private System.Windows.Forms.MenuItem menuItem8;
    		private System.Windows.Forms.MenuItem menuItem9;
    		private System.Windows.Forms.MenuItem menuItem10;
    		private System.Windows.Forms.MenuItem menuItem11;
    		private System.Windows.Forms.Label label1;
    
    
    		public TcpClient tcpc = null;
    		public NetworkStream s = null;
    		public Thread myWorkerThread = null;
    		public object mutex = new object();
    		public ArrayList alerts = new ArrayList();
    		public bool test = false;
    		public string addr = "127.0.0.1";
    		public string curZone = "";
    		public int curColumn = 0;
    		public bool curDescend = false;
    		private System.Windows.Forms.FontDialog fontDialog1;
    		private System.Windows.Forms.MenuItem menuItem7;
    		public float rawScale = 1.0f;
    
    		//public ArrayList spawns = new ArrayList();
    
    		public Form1()  {
    			//
    			// Required for Windows Form Designer support
    			//
    			InitializeComponent();
    
    			
    			loadIP();
    
    			offsetx.Minimum = -100000;
    			offsetx.Maximum = 100000;
    			offsety.Minimum = -100000;
    			offsety.Maximum = 100000;
    			
    
    			scale.Minimum = 100;
    			scale.Maximum = 10000;
    			scale.Value = 100;
    			//scale.DecimalPlaces = 0;
    
    			scale.Increment = 10;
    			offsetx.Increment = 20;
    			offsety.Increment = 20;
    			
    
    			listBox1.View = View.Details;
    
    			listBox1.AllowColumnReorder = true;
    			listBox1.FullRowSelect = true;
    			listBox1.GridLines = true;
    			listBox1.MultiSelect = false;
    			
    
    			listBox1.Columns.Add("Name", 125, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Level", 40, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Class", 50, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Race", 50, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Last Name", 75, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Invis", 50, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Run Speed", 75, HorizontalAlignment.Left);
    			listBox1.Columns.Add("SpawnID", 50, HorizontalAlignment.Left);
    			listBox1.Columns.Add("Spawn Time", 100, HorizontalAlignment.Left);
    			lock(mapCon1.mobs)  
    				mapCon1.mobs.Clear();
    			lock(listBox1)  
    				listBox1.Items.Clear();
    
    			listBox1.ListViewItemSorter = new ListBoxComparer(listBox1.Items, false, 0);
    
    			loadAlerts("filters.conf");
    		}
    
    		/// <summary>
    		/// Clean up any resources being used.
    		/// </summary>
    		protected override void Dispose( bool disposing )  {
    
    			if( disposing )  {
    				if (components != null)  {
    					components.Dispose();
    				}
    			}
    			base.Dispose( disposing );
    		}
    
    		#region Windows Form Designer generated code
    		/// <summary>
    		/// Required method for Designer support - do not modify
    		/// the contents of this method with the code editor.
    		/// </summary>
    		private void InitializeComponent()
    		{
    			this.components = new System.ComponentModel.Container();
    			this.button1 = new System.Windows.Forms.Button();
    			this.mainMenu1 = new System.Windows.Forms.MainMenu();
    			this.menuItem1 = new System.Windows.Forms.MenuItem();
    			this.menuItem2 = new System.Windows.Forms.MenuItem();
    			this.menuItem3 = new System.Windows.Forms.MenuItem();
    			this.menuItem4 = new System.Windows.Forms.MenuItem();
    			this.menuItem5 = new System.Windows.Forms.MenuItem();
    			this.menuItem8 = new System.Windows.Forms.MenuItem();
    			this.menuItem9 = new System.Windows.Forms.MenuItem();
    			this.menuItem6 = new System.Windows.Forms.MenuItem();
    			this.menuItem10 = new System.Windows.Forms.MenuItem();
    			this.menuItem11 = new System.Windows.Forms.MenuItem();
    			this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    			this.mapCon1 = new myseq.MapCon();
    			this.offsetx = new System.Windows.Forms.NumericUpDown();
    			this.offsety = new System.Windows.Forms.NumericUpDown();
    			this.scale = new System.Windows.Forms.NumericUpDown();
    			this.label3 = new System.Windows.Forms.Label();
    			this.label2 = new System.Windows.Forms.Label();
    			this.label1 = new System.Windows.Forms.Label();
    			this.listBox1 = new System.Windows.Forms.ListView();
    			this.timer1 = new System.Windows.Forms.Timer(this.components);
    			this.fontDialog1 = new System.Windows.Forms.FontDialog();
    			this.menuItem7 = new System.Windows.Forms.MenuItem();
    			((System.ComponentModel.ISupportInitialize)(this.offsetx)).BeginInit();
    			((System.ComponentModel.ISupportInitialize)(this.offsety)).BeginInit();
    			((System.ComponentModel.ISupportInitialize)(this.scale)).BeginInit();
    			this.SuspendLayout();
    			// 
    			// button1
    			// 
    			this.button1.Location = new System.Drawing.Point(8, 416);
    			this.button1.Name = "button1";
    			this.button1.TabIndex = 0;
    			this.button1.Text = "GO";
    			this.button1.Click += new System.EventHandler(this.button1_Click);
    			// 
    			// mainMenu1
    			// 
    			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    																					  this.menuItem1,
    																					  this.menuItem4,
    																					  this.menuItem9});
    			// 
    			// menuItem1
    			// 
    			this.menuItem1.Index = 0;
    			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    																					  this.menuItem2,
    																					  this.menuItem3});
    			this.menuItem1.Text = "&File";
    			// 
    			// menuItem2
    			// 
    			this.menuItem2.Index = 0;
    			this.menuItem2.Text = "Open &Map";
    			this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
    			// 
    			// menuItem3
    			// 
    			this.menuItem3.Index = 1;
    			this.menuItem3.Text = "E&xit";
    			this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
    			// 
    			// menuItem4
    			// 
    			this.menuItem4.Index = 1;
    			this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    																					  this.menuItem5,
    																					  this.menuItem8,
    																					  this.menuItem7});
    			this.menuItem4.Text = "&Options";
    			// 
    			// menuItem5
    			// 
    			this.menuItem5.Index = 0;
    			this.menuItem5.Text = "Server Address";
    			this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
    			// 
    			// menuItem8
    			// 
    			this.menuItem8.Index = 1;
    			this.menuItem8.Shortcut = System.Windows.Forms.Shortcut.F2;
    			this.menuItem8.Text = "Reset Mobs";
    			this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
    			// 
    			// menuItem9
    			// 
    			this.menuItem9.Index = 2;
    			this.menuItem9.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    																					  this.menuItem6,
    																					  this.menuItem10,
    																					  this.menuItem11});
    			this.menuItem9.Text = "&Alerts";
    			// 
    			// menuItem6
    			// 
    			this.menuItem6.Index = 0;
    			this.menuItem6.Text = "Reload Alerts";
    			this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
    			// 
    			// menuItem10
    			// 
    			this.menuItem10.Index = 1;
    			this.menuItem10.Text = "&Add Alert";
    			this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
    			// 
    			// menuItem11
    			// 
    			this.menuItem11.Index = 2;
    			this.menuItem11.Text = "&Save Alerts";
    			this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click);
    			// 
    			// mapCon1
    			// 
    			this.mapCon1.AutoScroll = true;
    			this.mapCon1.BackColor = System.Drawing.SystemColors.Control;
    			this.mapCon1.Location = new System.Drawing.Point(272, 0);
    			this.mapCon1.Name = "mapCon1";
    			this.mapCon1.Size = new System.Drawing.Size(544, 392);
    			this.mapCon1.TabIndex = 3;
    			this.mapCon1.Load += new System.EventHandler(this.mapCon1_Load);
    			// 
    			// offsetx
    			// 
    			this.offsetx.Location = new System.Drawing.Point(144, 416);
    			this.offsetx.Name = "offsetx";
    			this.offsetx.Size = new System.Drawing.Size(56, 20);
    			this.offsetx.TabIndex = 12;
    			this.offsetx.ValueChanged += new System.EventHandler(this.offsetx_ValueChanged);
    			// 
    			// offsety
    			// 
    			this.offsety.Location = new System.Drawing.Point(264, 416);
    			this.offsety.Name = "offsety";
    			this.offsety.Size = new System.Drawing.Size(56, 20);
    			this.offsety.TabIndex = 11;
    			this.offsety.ValueChanged += new System.EventHandler(this.offsety_ValueChanged);
    			// 
    			// scale
    			// 
    			this.scale.Location = new System.Drawing.Point(376, 416);
    			this.scale.Name = "scale";
    			this.scale.Size = new System.Drawing.Size(48, 20);
    			this.scale.TabIndex = 10;
    			this.scale.Value = new System.Decimal(new int[] {
    																1,
    																0,
    																0,
    																0});
    			this.scale.ValueChanged += new System.EventHandler(this.scale_ValueChanged);
    			// 
    			// label3
    			// 
    			this.label3.ForeColor = System.Drawing.Color.White;
    			this.label3.Location = new System.Drawing.Point(336, 416);
    			this.label3.Name = "label3";
    			this.label3.Size = new System.Drawing.Size(56, 16);
    			this.label3.TabIndex = 9;
    			this.label3.Text = "Scale";
    			// 
    			// label2
    			// 
    			this.label2.ForeColor = System.Drawing.Color.White;
    			this.label2.Location = new System.Drawing.Point(216, 416);
    			this.label2.Name = "label2";
    			this.label2.Size = new System.Drawing.Size(48, 16);
    			this.label2.TabIndex = 8;
    			this.label2.Text = "Offset Y";
    			// 
    			// label1
    			// 
    			this.label1.ForeColor = System.Drawing.Color.White;
    			this.label1.Location = new System.Drawing.Point(96, 416);
    			this.label1.Name = "label1";
    			this.label1.Size = new System.Drawing.Size(48, 16);
    			this.label1.TabIndex = 7;
    			this.label1.Text = "Offset X";
    			// 
    			// listBox1
    			// 
    			this.listBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    			this.listBox1.FullRowSelect = true;
    			this.listBox1.GridLines = true;
    			this.listBox1.HideSelection = false;
    			this.listBox1.Location = new System.Drawing.Point(8, 0);
    			this.listBox1.Name = "listBox1";
    			this.listBox1.Size = new System.Drawing.Size(256, 392);
    			this.listBox1.TabIndex = 15;
    			this.listBox1.View = System.Windows.Forms.View.Details;
    			this.listBox1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listBox1_ColumnClick);
    			this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
    			// 
    			// timer1
    			// 
    			this.timer1.Tick += new System.EventHandler(this.timer1_Tick_1);
    			// 
    			// fontDialog1
    			// 
    			this.fontDialog1.Apply += new System.EventHandler(this.fontDialog1_Apply);
    			// 
    			// menuItem7
    			// 
    			this.menuItem7.Index = 2;
    			this.menuItem7.Text = "List font";
    			this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
    			// 
    			// Form1
    			// 
    			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    			this.ClientSize = new System.Drawing.Size(832, 441);
    			this.Controls.AddRange(new System.Windows.Forms.Control[] {
    																		  this.listBox1,
    																		  this.offsetx,
    																		  this.offsety,
    																		  this.scale,
    																		  this.label3,
    																		  this.label2,
    																		  this.label1,
    																		  this.mapCon1,
    																		  this.button1});
    			this.Menu = this.mainMenu1;
    			this.Name = "Form1";
    			this.Text = "MyShowEQ - ";
    			this.Resize += new System.EventHandler(this.Form1_Resize);
    			this.Load += new System.EventHandler(this.Form1_Load);
    			this.Closed += new System.EventHandler(this.form_Closing);
    			((System.ComponentModel.ISupportInitialize)(this.offsetx)).EndInit();
    			((System.ComponentModel.ISupportInitialize)(this.offsety)).EndInit();
    			((System.ComponentModel.ISupportInitialize)(this.scale)).EndInit();
    			this.ResumeLayout(false);
    
    		}
    		#endregion
    
    		/// <summary>
    		/// The main entry point for the application.
    		/// </summary>
    		[STAThread]
    		static void Main() {
    			try  {
    				Application.Run(new Form1());
    			}
    			catch  {
    				MessageBox.Show("Uncaught exception...\n");
    				Application.Exit();
    			}
    		}
    
    		private void form_Closing(object sender, System.EventArgs e)  {
    			if (myWorkerThread != null)
    				myWorkerThread.Abort();
    		}
    
    
    		private void button1_Click(object sender, System.EventArgs e)  {
    			//Byte[] read = new Byte[366];
    
    			if (button1.Text == "GO")  {
    				// Try to connect to the server
    				IPAddress ip = IPAddress.Parse(addr);
    				tcpc = new TcpClient();
    				tcpc.Connect(ip, 5558);
    
    
    				// Get the stream
    				try {
    					s = tcpc.GetStream();
    				} catch (InvalidOperationException) {
    					Console.WriteLine("Cannot connect to server: ");
    					return;
    				}
    
    				//button1.Enabled = false;
    
    				ThreadStart myThreadStart = new ThreadStart(this.NetThread);
    				myWorkerThread = new Thread(myThreadStart);
    
    				myWorkerThread.Start();
    				button1.Text = "Stop";
    			}
    			else  {
    				myWorkerThread.Abort();
    
    				s.Close();
    				tcpc.Close();
    
    				mapCon1.mobs.Clear();
    				listBox1.Items.Clear();
    			
    				button1.Text = "GO";
    			}
    
    		}
    
    		public void loadIP()  {
    			// Load the alerts
    			StreamReader sw;
    			try  {
    				sw = new StreamReader(File.Open("server", FileMode.Open));
    			}
    			catch (System.IO.FileNotFoundException)  {
    				Console.WriteLine("File not found");
    				return ;
    			}
    			catch (System.Exception)  {
    				Console.WriteLine("Unknown exception caught while opening source file");
    				return ;
    			}  
    			
    			addr = sw.ReadLine();
    			sw.Close();
    		}
    
    		public void saveIP()  {
    			// Now write the data to the new file
    			StreamWriter sw;
    
    			try  {
    				sw = new StreamWriter(File.Open("server", FileMode.Create));
    			}
    			catch (System.IO.FileNotFoundException)  {
    				MessageBox.Show("File not found", "Convert Error");
    				return;
    			}
    			catch (System.Exception)  {
    				MessageBox.Show("Unknown exception caught while opening source file", "Convert error");
    				return;
    			}  
    
    			sw.WriteLine(addr);
    
    			sw.Close();
    		}
    
    		public void saveAlerts(string filename)  {
    			// Load the alerts
    			StreamWriter sw;
    			try  {
    				sw = new StreamWriter(File.Open(filename, FileMode.Create));
    			}
    			catch (System.IO.FileNotFoundException)  {
    				Console.WriteLine("File not found");
    				return ;
    			}
    			catch (System.Exception)  {
    				Console.WriteLine("Unknown exception caught while opening source file");
    				return ;
    			}  
    
    			foreach (string s in alerts)  {
    				sw.WriteLine(s);
    			}
    
    			sw.Close();		
    
    		}
    
    		public void loadAlerts(string filename)  {
    			alerts.Clear();
    
    			// Load the alerts
    			StreamReader sw;
    			try  {
    				sw = new StreamReader(File.Open(filename, FileMode.Open));
    			}
    			catch (System.IO.FileNotFoundException)  {
    				Console.WriteLine("File not found");
    				return ;
    			}
    			catch (System.Exception)  {
    				Console.WriteLine("Unknown exception caught while opening source file");
    				return ;
    			}  
    
    			string inp = "";
    			while ((inp = sw.ReadLine()) != null)   {
    				alerts.Add(inp);
    			}			
    			sw.Close();
    			
    		}		
    
    		public bool isSubstring(string a, string b)  {			
    			int c;
    
    			for (c = 0; c < a.Length-b.Length; c++)  {
    				if (string.Compare(a, c, b, 0, b.Length, true) == 0)
    					return true;
    			}
    
    			return false;
    		}
    
    		public void loadmap(string filename)  {
    			if (!mapCon1.loadMap(filename))  {
    				string error = "Error loading map file: ";
    				error += filename;
    				MessageBox.Show(error, "Error");
    			}
    			this.Text = "MyShowEQ - " + mapCon1.longname;
    
    
    			lock(mapCon1.mobs)  
    				mapCon1.mobs.Clear();
    			lock(listBox1)  
    				listBox1.Items.Clear();
    
    			scale.Value = 100M;
    		}
    
    		private void menuItem3_Click(object sender, System.EventArgs e) {
    			Application.Exit();
    		}
    
    		private void menuItem2_Click(object sender, System.EventArgs e) {
    			openFileDialog.Filter = "Map Files (*.map)|*.map|All Files (*.*)|(*.*)";
    
    			if (openFileDialog.ShowDialog() == DialogResult.OK)  {	// Show the standard open file dialog
    				string filename = openFileDialog.FileName;			
    				loadmap(filename);
    			}
    		}
    
    
    		private void offsetx_ValueChanged(object sender, System.EventArgs e) {
    			mapCon1.offsetxg = -(int)offsetx.Value;
    			mapCon1.Invalidate();
    		}
    
    		private void offsety_ValueChanged(object sender, System.EventArgs e) {
    			mapCon1.offsetyg = -(int)offsety.Value;
    			mapCon1.Invalidate();
    		}
    
    		private void scale_ValueChanged(object sender, System.EventArgs e) {
    			mapCon1.scale = (float)(scale.Value)/100.0f;
    
    			int midx = (int)((mapCon1.maxx+mapCon1.minx)/2);
    			int midy = (int)((mapCon1.maxy+mapCon1.miny)/2);
    
    			//mapCon1.offsetx = (int)((mapCon1.Width/2)-(midx*(mapCon1.rawscale*mapCon1.scale)));
    			//mapCon1.offsety = (int)((mapCon1.Height/2)-(midy*(mapCon1.rawscale*mapCon1.scale)));
    			
    			mapCon1.Invalidate();
    		}
    
    		private void Form1_Resize(object sender, EventArgs e) {
    			Size s = mapCon1.Size;
    			Size t = Size;
    
    			s.Width = t.Width-296;
    			s.Height = t.Height-96;
    			mapCon1.Size = s;
    
    			Point v = offsetx.Location;
    			v.Y = Size.Height-72;
    			offsetx.Location = v;
    
    			v = offsety.Location;
    			v.Y = Size.Height-72;
    			offsety.Location = v;
    
    			v = scale.Location;
    			v.Y = Size.Height-72;
    			scale.Location = v;
    
    			v = label1.Location;
    			v.Y = Size.Height-72;
    			label1.Location = v;
    
    			v = label2.Location;
    			v.Y = Size.Height-72;
    			label2.Location = v;
    
    			v = label3.Location;
    			v.Y = Size.Height-72;
    			label3.Location = v;
    
    			v = button1.Location;
    			v.Y = Size.Height-72;
    			button1.Location = v;
    
    			Size lbs = listBox1.Size;
    			lbs.Height = t.Height-80;
    			listBox1.Size = lbs;
    
    			mapCon1.updateExtents();
    			mapCon1.onResize();
    			mapCon1.Invalidate();
    		}
    
    		public int strlen(string str) { 
    			int c = 0;
    
    			while (c < str.Length && str[c] != 0 )
    				c++;
    
    			return c;
    		}
    
    		private void mapCon1_Load(object sender, System.EventArgs e) {
    		
    		}
    
    		private void menuItem5_Click(object sender, System.EventArgs e) {
    			Form3 f3 = new Form3();
    			f3.textBox1.Text = addr;
    			f3.ShowDialog();
    			addr = f3.textBox1.Text;
    			saveIP();
    		}
    
    		private void menuItem6_Click(object sender, System.EventArgs e) {
    			loadAlerts("filters.conf");
    		}
    
    		public void NetThread()  {
    			Byte[] read = new Byte[96];
    			int c = 0;
    			bool found = false;
    			ArrayList newSpawns = new ArrayList();
    
    			while (true)  {
    
    				int bytes = s.Read(read, 0, read.Length);
    
    				if (bytes < 96)  {
    					int total = bytes;
    					while (total != 96)  {
    						bytes = s.Read(read, total, 96-total);
    						total += bytes;
    					}
    				}
    
    				SPAWNINFO si = new SPAWNINFO();
    						
    
    				si.frombytes(read);
    
    				// Check for my special packets...
    				// target
    				if (si.flags == 1)  {
    					mapCon1.curTarget = si.Name;
    				}
    				else if(si.flags == 2)  {
    					// Sequence start
    					newSpawns.Clear();
    				}
    				else if (si.flags == 3)  {
    					if (newSpawns.Count > 0)  {
    						ListViewItem[] items = new ListViewItem[newSpawns.Count];
    						int d = 0;
    						foreach(ListViewItem i in newSpawns)
    							items[d++] = i;
    						lock (listBox1)  {
    							listBox1.Items.AddRange(items);
    						}
    					}
    
    					checkMobs();
    					mapCon1.Invalidate();
    					Thread.Sleep(0);
    				}
    					// Zone name
    				else if (si.flags == 4)  {
    					if (si.Name != curZone)  {
    						string f = "./maps/";
    						string fn = new string(si.Name.ToCharArray(0, strlen(si.Name)));
    						f += fn;
    						f += ".map";
    
    						loadmap(f);
    						mapCon1.fillConColors();
    						curZone = si.Name;
    						//							listBox1.Items.Clear();
    					}					
    				}
    					// Player packet
    				else if (si.flags == 253)  {
    					mapCon1.playerinfo = si;
    					Size sz = mapCon1.Size;
    					mapCon1.offsetx = (int)((mapCon1.Width/2)+(si.Y*(mapCon1.rawscale*mapCon1.scale)));
    					mapCon1.offsety = (int)((mapCon1.Height/2)+(si.X*(mapCon1.rawscale*mapCon1.scale)));
    				}
    					// Normal spawn packet
    				else  {	
    					found = false;
    					lock(mapCon1.mobs)  {
    						// See if we've already got this one
    						for (c = 0; c < mapCon1.mobs.Count; c++)  {
    							if (si.SpawnID == ((SPAWNINFO)mapCon1.mobs[c]).SpawnID)  {
    //								mapCon1.mobs[c] = si;
    								((SPAWNINFO)mapCon1.mobs[c]).gone = 0;
    
    								// Check if the state has changed in any important way
    								if (si.Level != ((SPAWNINFO)mapCon1.mobs[c]).Level)  {
    									((SPAWNINFO)mapCon1.mobs[c]).Level = si.Level;
    									int abc = listBox1.Items.IndexOf(((SPAWNINFO)mapCon1.mobs[c]).lvi);
    									if (abc > 0)  {
    										listBox1.Items[abc].SubItems[1].Text = si.Level.ToString();
    											foreach(ListViewItem it in listBox1.Items)  
    												if (it.Text == si.Name)  
    													it.SubItems[1].Text = si.Level.ToString();
    									}																			
    								}
    								if (si.Hide != ((SPAWNINFO)mapCon1.mobs[c]).Hide)  {
    									((SPAWNINFO)mapCon1.mobs[c]).Hide = si.Hide;
    									foreach(ListViewItem it in listBox1.Items)  {
    										if (it.Text == si.Name)  {
    											if (si.Hide == 0)  
    												it.SubItems[5].Text = "";								
    											else if (si.Hide == 1)
    												it.SubItems[5].Text = "Hidden";
    											else if (si.Hide == 2)
    												it.SubItems[5].Text = "Invis";
    											else if (si.Hide == 3)
    												it.SubItems[5].Text = "IVU";
    											else if (si.Hide == 4)
    												it.SubItems[5].Text = "IVA";									
    										}
    									}
    								}
    								if (si.SpeedRun != ((SPAWNINFO)mapCon1.mobs[c]).SpeedRun)  {
    									((SPAWNINFO)mapCon1.mobs[c]).SpeedRun = si.SpeedRun;
    									foreach(ListViewItem it in listBox1.Items)  
    										if (it.Text == si.Name)  
    											it.SubItems[6].Text = si.SpeedRun.ToString();
    								}
    
    								mapCon1.mobs[c] = si;
    								found = true;
    								break;	
    							}
    						}
    					}
    
    					// if it's not in the list already add it
    					if (!found)  {
    						if (si.Type == 6)
    							si.Name = "DROP: " + si.Name;
    
    						if (si.Name != "")  {
    						//	si.X = si.X;
    						//	si.Y = si.Y;
    
    							string t = si.Name;
    							foreach (string str in alerts)  {
    								if (isSubstring(si.Name, str))  {// || si.Name[0] == '#')  {
    									t = "*** " + si.Name;
    									Beep(300, 100);
    									break;
    								}
    							}
    
    							ListViewItem item1 = new ListViewItem(t,0);
    
    							item1.SubItems.Add(si.Level.ToString());
    							item1.SubItems.Add(classNumToString(si.Class));		
    							item1.SubItems.Add(raceNumtoString(si.Race));  
    							item1.SubItems.Add(si.Lastname);		
    							if (si.Hide == 1)
    								item1.SubItems.Add("Hidden");
    							else if (si.Hide == 2)
    								item1.SubItems.Add("Invis");
    							else if (si.Hide == 3)
    								item1.SubItems.Add("IVU");
    							else if (si.Hide == 4)
    								item1.SubItems.Add("IVA");
    							else
    								item1.SubItems.Add("");
    							item1.SubItems.Add(si.SpeedRun.ToString());
    							item1.SubItems.Add(si.SpawnID.ToString());
    							DateTime dt = DateTime.Now;
    							item1.SubItems.Add(dt.ToLongTimeString());											
    
    							newSpawns.Add(item1);
    
    
    							si.lvi = item1;
    							si.gone = 0;
    							lock(mapCon1.mobs)  {
    								mapCon1.mobs.Add(si);
    							}
    						}
    					}
    				}
    			}
    		}
    
    		private void Form1_Load(object sender, System.EventArgs e) {
    		
    		}
    
    		public string classNumToString(int num)  {
    			if (num == 0)
    				return "Unknown";
    			else if (num == 1)
    				return "Warrior";
    			else if (num == 2)
    				return "Cleric";
    			else if (num == 3)
    				return "Paladin";
    			else if (num == 4)
    				return "Ranger";
    			else if (num == 5)
    				return "Shadow Knight";
    			else if (num == 6)
    				return "Druid";
    			else if (num == 7)
    				return "Monk";
    			else if (num == 8)
    				return "Bard";
    			else if (num == 9)
    				return "Rogue";
    			else if (num == 10)
    				return "Shaman";
    			else if (num == 11)
    				return "Necromancer";
    			else if (num == 12)
    				return "Wizard";
    			else if (num == 13)
    				return "Magician";
    			else if (num == 14)
    				return "Enchanter";
    			else if (num == 15)
    				return "Beastlord";
    			else if (num == 16)
    				return "Banker";
    			else if (num == 17)
    				return "Warrior GM";
    			else if (num == 18)
    				return "Cleric GM";
    			else if (num == 19)
    				return "Paladin GM";
    			else if (num == 20)
    				return "Ranger GM";
    			else if (num == 21)
    				return "Shandowknight GM";
    			else if (num == 22)
    				return "Druid GM";
    			else if (num == 23)
    				return "Monk GM";
    			else if (num == 24)
    				return "Bard GM";
    			else if (num == 25)
    				return "Rogue GM";
    			else if (num == 26)
    				return "Shaman GM";
    			else if (num == 27)
    				return "Necromancer GM";
    			else if (num == 28)
    				return "Wizard GM";
    			else if (num == 29)
    				return "Magician GM";
    			else if (num == 30)
    				return "Enchanter GM";
    			else if (num == 31)
    				return "Beastlord GM";
    			else if (num == 32)
    				return "Shopkeeper";
    			return "Unknown";
    		}
    
    		public string raceNumtoString(uint num)  {
    			if (num == 0)
    				return "Unknown";
    			else if (num == 1)
    				return "Human";
    			else if (num == 2)
    				return "Barbarian";
    			else if (num == 3)
    				return "Erudite";
    			else if (num == 4)
    				return"Wood Elf";
    			else if (num == 5)
    				return "High Elf";
    			else if (num == 6)
    				return "Dark Elf";
    			else if (num == 7)
    				return"Half Elf";
    			else if (num == 8)
    				return "Dwarf";
    			else if (num == 9)
    				return "Troll";
    			else if (num == 10)
    				return "Ogre";
    			else if (num == 11)
    				return "Halfling";
    			else if (num == 12)
    				return "Gnome";
    			else if (num == 13)
    				return"Aviak";
    			else if (num == 14)
    				return "Werewolf";
    			else if (num == 15)
    				return "Brownie";
    			else if (num == 16)
    				return "Centaur";
    			else if (num == 17)
    				return "Golem";
    			else if (num == 18)
    				return "Giant/Cyclops";
    			else if (num == 19)
    				return "Trakanon";
    			else if (num == 20)
    				return "Venril Sathir";
    			else if (num == 21)
    				return "Evil Eye";
    			else if (num == 22)
    				return "Beetle";
    			else if (num == 23)
    				return "Kerra";
    			else if (num == 24)
    				return "Fish";
    			else if (num == 25)
    				return "Fairy";
    			else if (num == 26)
    				return "Froglok";
    			else if (num == 27)
    				return "Froglok Ghoul";
    			else if (num == 28)
    				return "Fungusman";
    			else if (num == 29)
    				return "Gargoyle";
    			else if (num == 30)
    				return "Gasbag";
    			else if (num == 31)
    				return "Gel Cube";
    			else if (num == 32)
    				return "Ghost";
    			else if (num == 33)
    				return "Ghoul";
    			else if (num == 34)
    				return "Giant Bat";
    			else if (num == 35)
    				return "Giant Eel";
    			else if (num == 36)
    				return "Giant Rat";
    			else if (num == 37)
    				return "Giant Snake";
    			else if (num == 38)
    				return "Giant Spider";
    			else if (num == 39)
    				return "Gnoll";
    			else if (num == 40)
    				return "Goblin";
    			else if (num == 41)
    				return "Gorilla";
    			else if (num == 42)
    				return "Wolf";
    			else if (num == 43)
    				return "Bear";
    			else if (num == 44)
    				return "Freeport Guard";
    			else if (num == 45)
    				return "Demi Lich";
    			else if (num == 46)
    				return "Imp";
    			else if (num == 47)
    				return "Griffin";
    			else if (num == 48)
    				return "Kobold";
    			else if (num == 49)
    				return "Lava Dragon";
    			else if (num == 50)
    				return "Lion";
    			else if (num == 51)
    				return "Lizard Man";
    			else if (num == 52)
    				return "Mimic";
    			else if (num == 53)
    				return "Minotaur";
    			else if (num == 54)
    				return "Orc";
    			else if (num == 55)
    				return "Human Beggar";
    			else if (num == 56)
    				return "Pixie";
    			else if (num == 57)
    				return "Drachnid";
    			else if (num == 58)
    				return "Solusek Ro";
    			else if (num == 59)
    				return "Bloodgills";
    			else if (num == 60)
    				return "Skeleton";
    			else if (num == 61)
    				return "Shark";
    			else if (num == 62)
    				return "Tunare";
    			else if (num == 63)
    				return "Tiger";
    			else if (num == 64)
    				return "Treant";
    			else if (num == 65)
    				return "Vampire";
    			else if (num == 66)
    				return "Rallos Zek";
    			else if (num == 67)
    				return "Highpass Citizen";
    			else if (num == 68)
    				return "Tentacle";
    			else if (num == 69)
    				return "Will O' Wisp";
    			else if (num == 70)
    				return "Zombie";
    			else if (num == 71)
    				return "Qeynos Citizen";
    			else if (num == 72)
    				return "Ship";
    			else if (num == 73)
    				return "Launch";
    			else if (num == 74)
    				return "Piranha";
    			else if (num == 75)
    				return "Elemental";
    			else if (num == 76)
    				return "Puma";
    			else if (num == 77)
    				return "Neriak Citizen";
    			else if (num == 78)
    				return "Erudin Citizen";
    			else if (num == 79)
    				return "Bixie";
    			else if (num == 80)
    				return "Reanimated Hand";
    			else if (num == 81)
    				return "Rivervale Citizen";
    			else if (num == 82)
    				return "Scarecrow";
    			else if (num == 83)
    				return "Skunk";
    			else if (num == 84)
    				return "Snake Elemental";
    			else if (num == 85)
    				return "Spectre";
    			else if (num == 86)
    				return "Sphinx";
    			else if (num == 87)
    				return "Armadillo";
    			else if (num == 88)
    				return "Clockwork Gnome";
    			else if (num == 89)
    				return "Drake";
    			else if (num == 90)
    				return "Halas Citizen";
    			else if (num == 91)
    				return "Alligator";
    			else if (num == 92)
    				return "Grobb Citizen";
    			else if (num == 93)
    				return "Oggok Citizen";
    			else if (num == 94)
    				return "Kaladim Citizen";
    			else if (num == 95)
    				return "Cazic-Thule";
    			else if (num == 96)
    				return "Cockatrice";
    			else if (num == 97)
    				return "Daisy Man";
    			else if (num == 98)
    				return "Elf Vampire";
    			else if (num == 99)
    				return "Denizen";
    			else if (num == 100)
    				return "Dervish";
    			else if (num == 101)
    				return "Efreeti";
    			else if (num == 102)
    				return "Froglok Tadpole";
    			else if (num == 103)
    				return "Kedge";
    			else if (num == 104)
    				return "Leech";
    			else if (num == 105)
    				return "Swordfish";
    			else if (num == 106)
    				return "Felwithe Guard";
    			else if (num == 107)
    				return "Mammoth";
    			else if (num == 108)
    				return "Eye of Zomm";
    			else if (num == 109)
    				return "Wasp";
    			else if (num == 110)
    				return "Mermaid";
    			else if (num == 111)
    				return "Harpie";
    			else if (num == 112)
    				return "Faydark Guard";
    			else if (num == 113)
    				return "Drixie";
    			else if (num == 114)
    				return "Ghost Ship";
    			else if (num == 115)
    				return "Clam";
    			else if (num == 116)
    				return "Sea Horse";
    			else if (num == 117)
    				return "Dwarf Ghost";
    			else if (num == 118)
    				return "Erudite Ghost";
    			else if (num == 119)
    				return "Sabertooth Cat";
    			else if (num == 120)
    				return "Wolf Elemental";
    			else if (num == 121)
    				return "Gorgon";
    			else if (num == 122)
    				return "Dragon Skeleton";
    			else if (num == 123)
    				return "Innoruuk";
    			else if (num == 124)
    				return "Unicorn";
    			else if (num == 125)
    				return "Pegasus";
    			else if (num == 126)
    				return "Djinn";
    			else if (num == 127)
    				return "Invisible Man";
    			else if (num == 128)
    				return "Iksar";
    			else if (num == 129)
    				return "Scorpion";
    			else if (num == 130)
    				return "Vah Shir";
    			else if (num == 131)
    				return "Sarnak";
    			else if (num == 132)
    				return "Draglock";
    			else if (num == 133)
    				return "Drolvarg";
    			else if (num == 134)
    				return "Mosquito";
    			else if (num == 135)
    				return "Rhino";
    			else if (num == 136)
    				return "Xalgoz";
    			else if (num == 137)
    				return "Kunark Goblin";
    			else if (num == 138)
    				return "Yeti";
    			else if (num == 139)
    				return "Iksar Citizen";
    			else if (num == 140)
    				return "Forest Giant";
    			else if (num == 141)
    				return "Boat";
    			else if (num == 142)
    				return "Burynai";
    			else if (num == 143)
    				return "Unknown";
    			else if (num == 144)
    				return "Unknown";
    			else if (num == 145)
    				return "Goo";
    			else if (num == 146)
    				return "Spectral Sarnak";
    			else if (num == 147)
    				return "Spectral Iksar";
    			else if (num == 148)
    				return "Kunark Fish";
    			else if (num == 149)
    				return "Iksar Scorpion";
    			else if (num == 150)
    				return "Erollisi";
    			else if (num == 151)
    				return "Tribunal";
    			else if (num == 152)
    				return "Bertoxxulous";
    			else if (num == 153)
    				return "Bristlebane";
    			else if (num == 154)
    				return "Fay Drake";
    			else if (num == 155)
    				return "Sarnak Skeleton";
    			else if (num == 156)
    				return "Ratman";
    			else if (num == 157)
    				return "Wyvern";
    			else if (num == 158)
    				return "Wurm";
    			else if (num == 159)
    				return "Devourer";
    			else if (num == 160)
    				return "Iksar Golem";
    			else if (num == 161)
    				return "Iksar Skeleton";
    			else if (num == 162)
    				return "Man Eating Plant";
    			else if (num == 163)
    				return "Raptor";
    			else if (num == 164)
    				return "Sarnak Golem";
    			else if (num == 165)
    				return "Water Dragon";
    			else if (num == 166)
    				return "Iksar Hand";
    			else if (num == 167)
    				return "Succulent";
    			else if (num == 168)
    				return "Flying Monkey";
    			else if (num == 169)
    				return "Brontotherium";
    			else if (num == 170)
    				return "Snow Dervish";
    			else if (num == 171)
    				return "Dire Wolf";
    			else if (num == 172)
    				return "Manticore";
    			else if (num == 173)
    				return "Totem";
    			else if (num == 174)
    				return "Cold Spectre";
    			else if (num == 175)
    				return "Enchanted Armor";
    			else if (num == 176)
    				return "Snow Bunny";
    			else if (num == 177)
    				return "Walrus";
    			else if (num == 178)
    				return "Rock-Gem Men";
    			else if (num == 179)
    				return "Unknown";
    			else if (num == 180)
    				return "Unknown";
    			else if (num == 181)
    				return "Yak Man";
    			else if (num == 182)
    				return "Faun";
    			else if (num == 183)
    				return "Coldain";
    			else if (num == 184)
    				return "Velious Dragon";
    			else if (num == 185)
    				return "Hag";
    			else if (num == 186)
    				return "Hippogriff";
    			else if (num == 187)
    				return "Siren";
    			else if (num == 188)
    				return "Frost Giant";
    			else if (num == 189)
    				return "Storm Giant";
    			else if (num == 190)
    				return "Ottermen";
    			else if (num == 191)
    				return "Walrus Man";
    			else if (num == 192)
    				return "Clockwork Dragon";
    			else if (num == 193)
    				return "Abhorent";
    			else if (num == 194)
    				return "Sea Turtle";
    			else if (num == 195)
    				return "B&W Dragon";
    			else if (num == 196)
    				return "Ghost Dragon";
    			else if (num == 197)
    				return "Ronnie Test";
    			else if (num == 198)
    				return "Prismatic Dragon";
    			else if (num == 199)
    				return "ShikNar";
    			else if (num == 200)
    				return "Rockhopper";
    			else if (num == 201)
    				return "Underbulk";
    			else if (num == 202)
    				return "Grimling";
    			else if (num == 203)
    				return "Vacuum Worm";
    			else if (num == 204)
    				return "Evan Test";
    			else if (num == 205)
    				return "Kahli Shah";
    			else if (num == 206)
    				return "Owlbear";
    			else if (num == 207)
    				return "Rhino Beetle";
    			else if (num == 208)
    				return "Vampyre";
    			else if (num == 209)
    				return "Earth Elemental";
    			else if (num == 210)
    				return "Air Elemental";
    			else if (num == 211)
    				return "Water Elemental";
    			else if (num == 212)
    				return "Fire Elemental";
    			else if (num == 213)
    				return "Wetfang Minnow";
    			else if (num == 214)
    				return "Thought Horror";
    			else if (num == 215)
    				return "Tegi";
    			else if (num == 216)
    				return "Horse";
    			else if (num == 217)
    				return "Shissar";
    			else if (num == 218)
    				return "Fungal Fiend";
    			else if (num == 219)
    				return "Vampire Volatalis";
    			else if (num == 220)
    				return "StoneGrabber";
    			else if (num == 221)
    				return "Scarlet Cheetah";
    			else if (num == 222)
    				return "Zelniak";
    			else if (num == 223)
    				return "Lightcrawler";
    			else if (num == 224)
    				return "Shade";
    			else if (num == 225)
    				return "Sunflower";
    			else if (num == 226)
    				return "Sun Revenant";
    			else if (num == 227)
    				return "Shrieker";
    			else if (num == 228)
    				return "Galorian";
    			else if (num == 229)
    				return "Netherbian";
    			else if (num == 230)
    				return "Akheva";
    			else if (num == 231)
    				return "Spire Spirit";
    			else if (num == 232)
    				return "Sonic Wolf";
    			else if (num == 233)
    				return "Teleport Man";
    			else if (num == 234)
    				return "Vah Shir Skeleton";
    			else if (num == 235)
    				return "Mutant Humanoid";
    			else if (num == 236)
    				return "Seru";
    			else if (num == 237)
    				return "Recuso";
    			else if (num == 238)
    				return "Vah Shir King";
    			else if (num == 239)
    				return "Vah Shir Guard";
    			else if (num == 240)
    				return "Teleport Man";
    			else if (num == 241)
    				return "Lujein";
    			else if (num == 242)
    				return "Naiad";
    			else if (num == 243)
    				return "Nymph";
    			else if (num == 244)
    				return "Ent";
    			else if (num == 245)
    				return "Wrinnfly";
    			else if (num == 246)
    				return "Tarew Marr";
    			else if (num == 247)
    				return "Solusek Ro";
    			else if (num == 248)
    				return "Clockwork Golem";
    			else if (num == 249)
    				return "Clockwork Brain";
    			else if (num == 250)
    				return "Spectral Banshee";
    			else if (num == 251)
    				return "Guard of Justice";
    			else if (num == 252)
    				return "PoM Castle";
    			else if (num == 253)
    				return "Disease Boss";
    			else if (num == 254)
    				return "Solusek Ro Guard";
    			else if (num == 255)
    				return "Bertoxxulous";
    			else if (num == 256)
    				return "New Tribunal";
    			else if (num == 257)
    				return "Terris Thule";
    			else if (num == 258)
    				return "Vegerog";
    			else if (num == 259)
    				return "Crocodile";
    			else if (num == 260)
    				return "Bat";
    			else if (num == 261)
    				return "Slarghilug";
    			else if (num == 262)
    				return "Tranquilion";
    			else if (num == 263)
    				return "Tin Soldier";
    			else if (num == 264)
    				return "Nightmare Wraith";
    			else if (num == 265)
    				return "Malarian";
    			else if (num == 266)
    				return "Knight of Pestilence";
    			else if (num == 267)
    				return "Lepertoloth";
    			else if (num == 268)
    				return "Bubonian Boss";
    			else if (num == 269)
    				return "Bubonian Underling";
    			else if (num == 270)
    				return "Pusling";
    			else if (num == 271)
    				return "Water Mephit";
    			else if (num == 272)
    				return "Stormrider";
    			else if (num == 273)
    				return "Junk Beast";
    			else if (num == 274)
    				return "Broken Clockwork";
    			else if (num == 275)
    				return "Giant Clockwork";
    			else if (num == 276)
    				return "Clockwork Beetle";
    			else if (num == 277)
    				return "Nightmare Goblin";
    			else if (num == 278)
    				return "Karana";
    			else if (num == 279)
    				return "Blood Raven";
    			else if (num == 280)
    				return "Nightmare Gargoyle";
    			else if (num == 281)
    				return "Mouths of Insanity";
    			else if (num == 282)
    				return "Skeletal Horse";
    			else if (num == 283)
    				return "Saryn";
    			else if (num == 284)
    				return "Fennin Ro";
    			else if (num == 285)
    				return "Tormentor";
    			else if (num == 286)
    				return "Necromancer Priest";
    			else if (num == 287)
    				return "Nightmare";
    			else if (num == 288)
    				return "New Rallos Zek";
    			else if (num == 289)
    				return "Vallon Zek";
    			else if (num == 290)
    				return "Tallon Zek";
    			else if (num == 291)
    				return "Air Mephit";
    			else if (num == 292)
    				return "Earth Mephit";
    			else if (num == 293)
    				return "Fire Mephit";
    			else if (num == 294)
    				return "Nightmare Mephit";
    			else if (num == 295)
    				return "Zebukoruk";
    			else if (num == 296)
    				return "Mithaniel Marr";
    			else if (num == 297)
    				return "Knightmare";
    			else if (num == 298)
    				return "The Rathe";
    			else if (num == 299)
    				return "Xegony";
    			else if (num == 300)
    				return "Balrog";
    			else if (num == 301)
    				return "Unknown";
    			else if (num == 302)
    				return "Lobster Monster";
    			else if (num == 303)
    				return "Pheonix";
    			else if (num == 304)
    				return "Tiamat";
    			else if (num == 305)
    				return "Bear PoP";
    			else if (num == 306)
    				return "Earth Golem";
    			else if (num == 307)
    				return "Iron Golem";
    			else if (num == 308)
    				return "Storm Golem";
    			else if (num == 309)
    				return "Air Golem";
    			else if (num == 310)
    				return "Wood Golem";
    			else if (num == 311)
    				return "Fire Golem";
    			else if (num == 312)
    				return "Water Golem";
    			else if (num == 313)
    				return "Veiled Gargoyle";
    			else if (num == 314)
    				return "Lynx";
    			else if (num == 315)
    				return "Squid";
    			else if (num == 316)
    				return "Frog";
    			else if (num == 317)
    				return "Flying Serpent";
    			else if (num == 318)
    				return "War Soldier";
    			else if (num == 319)
    				return "Armored Boar";
    			else if (num == 320)
    				return "Djinni";
    			else if (num == 321)
    				return "Boar";
    			else if (num == 322)
    				return "Armor Knight";
    			else if (num == 323)
    				return "Ghost Armor";
    			else if (num == 324)
    				return "Death Knight";
    			else if (num == 325)
    				return "Zek Ogre";
    			else if (num == 326)
    				return "Nightmare Spider";
    			else if (num == 327)
    				return "Crystal Spider";
    			else if (num == 328)
    				return "A Tower";
    			else if (num == 320)
    				return "Froglok";
    			return "Unknown";
    		}
    
    		private void checkMobs()  {
    			bool done = false;
    
    			lock(mapCon1.mobs)  {
    				foreach(SPAWNINFO sp in mapCon1.mobs)  {
    					if (sp.gone != ditchGone)
    						sp.gone++;
    					else if (sp.Name == "" || sp.Level == 0 || sp.Race == 0 || classNumToString(sp.Class) == "Unknown" || this.raceNumtoString(sp.Race) == "Unknown")
    						sp.gone = ditchGone;
    				}			
    		
    				while (!done)  {
    					int c;
    					for (c = 0; c < mapCon1.mobs.Count; c++)  {
    						SPAWNINFO sp = (SPAWNINFO)mapCon1.mobs[c];
    						if (sp.gone == ditchGone)  {
    							lock(listBox1)  {
    								listBox1.Items.Remove(sp.lvi);
    							}
    							//mapCon1.mobs.RemoveAt(c);
    							mapCon1.mobs.Remove(sp);
    							break;
    						}
    					}
    					
    					if (c == mapCon1.mobs.Count)
    						done = true;
    				}
    			}
    		}
    
    		private void timer1_Tick_1(object sender, System.EventArgs e) {
    		}
    
    
    		private void listBox1_SelectedIndexChanged(object sender, System.EventArgs e) {
    			ListView.SelectedIndexCollection sel = listBox1.SelectedIndices;
    
    			if (sel.Count > 0) {
    				lock(listBox1)
    					mapCon1.selectedID = int.Parse(listBox1.Items[sel[0]].SubItems[7].Text);
    				mapCon1.Invalidate();
    			}
    
    		}
    
    		private void menuItem8_Click(object sender, System.EventArgs e) {
    			lock(mapCon1.mobs)  {
    				lock(listBox1)  {
    					mapCon1.mobs.Clear();
    					listBox1.Items.Clear();
    				}
    			}
    		}
    
    		private void menuItem11_Click(object sender, System.EventArgs e) {
    			saveAlerts("filters.conf");
    		}
    
    		private void menuItem10_Click(object sender, System.EventArgs e) {
    			Form4 f4 = new Form4();
    
    			f4.ShowDialog();
    
    			if (!f4.cancelled) 
    				alerts.Add(f4.textBox1.Text);
    		}
    
    		private void listBox1_ColumnClick(object sender, ColumnClickEventArgs e)  {
    			// Put it in descending order if the column was already the one that was being sorted			
    			if (curColumn == e.Column)  {
    				if (curDescend)
    					curDescend = false;
    				else 
    					curDescend = true;
    			}
    			else
    				curDescend = false;
    
    			curColumn = e.Column;	
    			listBox1.ListViewItemSorter = new ListBoxComparer(listBox1.Items, curDescend, e.Column);
    
    		}
    
    		private void fontDialog1_Apply(object sender, System.EventArgs e)
    		{
    			listBox1.Font = fontDialog1.Font;
    		}
    
    		private void menuItem7_Click(object sender, System.EventArgs e)
    		{
    			fontDialog1.ShowApply = true;
    			if(fontDialog1.ShowDialog() != DialogResult.Cancel )
    			{
    				listBox1.Font = fontDialog1.Font ;
    			}
    
    
    			
    		}
    
    	}
    }
    Last edited by grimjack; 04-10-2003 at 05:34 AM.

  6. #141
    Registered User
    Join Date
    Sep 2002
    Posts
    16
    Nice job

    Suggestions:

    - Make scale be able to go below 100. You might want to look at the entire map and not just the close vicinity, especially if you are trying to figure out where a named is.

    - Make +/- on the numeric keypad zoom in/out.

    Bug?:

    - Sometimes it does not seem to register that I zoned. For instance if I zone into PoFire the only way I can get a moblisting, is to restart both the server and the client. Whereas if I zone from PoFire to PoTranq it usually picks up I have zoned.

  7. #142
    Registered User
    Join Date
    Oct 2002
    Posts
    62
    just glanced at the code above.. owwww!
    what's wrong with an array for the num->string conversions?
    and for the smaller switches, does C not use switch anymore? (hmm.. it's probably cash - i mean C# - but surely there *must* be a switch statement? please tell me there is.. please)

    tam

  8. #143
    Registered User
    Join Date
    Dec 2002
    Posts
    22
    --- From a few posts above grimjack wrote ---

    else if (num == 319)
    return "Armored Boar";
    else if (num == 320)
    return "Djinni";
    else if (num == 321)
    return "Boar";
    else if (num == 322)
    return "Armor Knight";
    else if (num == 323)
    return "Ghost Armor";
    else if (num == 324)
    return "Death Knight";
    else if (num == 325)
    return "Zek Ogre";
    else if (num == 326)
    return "Nightmare Spider";
    else if (num == 327)
    return "Crystal Spider";
    else if (num == 328)
    return "A Tower";
    else if (num == 320)
    return "Froglok";
    return "Unknown";



    Notice a Froglok and Armored Boar = 320 this cant be right can it, Just though i would point it out.

  9. #144
    Registered User
    Join Date
    Dec 2001
    Posts
    24

    Exclamation Unknown Bytes...

    Hm, i am no skilled programmer, more a copy&paste programmer who gets some code and changes it for own purpose.

    Who can write a short programm that gets SPAWNINFO like MySEQsrv but write it like hexdump into a file....

    Spawn1: 000 - 00 00 00 .....
    Spawn2: ....
    One start while EQ is running windowed, dump for all mobs in zone, then end..

    typedef struct _SPAWNINFO {
    BYTE Unknown0000[0028]; // 0000 - 0027
    CHAR Name[0030]; // 0028 - 0057
    BYTE Unknown0058[0034]; // 0058 - 0091
    DWORD Zone; // 0092 - 0095
    BYTE Unknown0096[0006]; // 0096 - 0101
    BYTE Type; // 0102
    BYTE Class; // 0103
    DWORD Race; // 0104 - 0107
    BYTE Unknown0108; // 0108
    BYTE Level; // 0109
    BYTE Unknown0110[0010]; // 0110 - 0119
    FLOAT Speed; // 0120 - 0123
    FLOAT Heading; // 0124 - 0127
    FLOAT Y; // 0128 - 0131
    BYTE Unknown0132[0008]; // 0132 - 0139
    FLOAT Z; // 0140 - 0143
    FLOAT X; // 0144 - 0147
    BYTE Unknown0148[0024]; // 0148 - 0171
    DWORD SpawnID; // 0172 - 0175
    BYTE Unknown0176[0008]; // 0176 - 0183
    WORD GuildID; // 0184 - 0185
    BYTE VisType; // 0224
    BYTE Unknown0225[0011] // 0225 - 0235
    struct _SPAWNINFO *pNext; // 0236 - 0239
    BYTE Unknown0240[0024]; // 0240 - 0263
    CHAR Lastname[0022]; // 0264 - 0285
    int flags; // 0286
    } SPAWNINFO, *PSPAWNINFO;

  10. #145
    Registered User grimjack's Avatar
    Join Date
    Dec 2001
    Posts
    32

    Other code.

    All I added to that code was the functions for the font dialog. I have not really got into the rest of it. I did see a min scale and max scale value but I have not looked at it much. If I don't go to bed right away I may look at a few of the other things mentioned.

  11. #146
    Registered User
    Join Date
    Jan 2003
    Posts
    25
    nm
    Last edited by Gilson; 04-10-2003 at 07:43 AM.

  12. #147
    Registered User
    Join Date
    Apr 2002
    Posts
    33
    Originally posted by Midnight
    has anyone taken the time to sift through the code to make sure this is legit? people are downloading the executables and running this without doing any kind of background work? no offense to caveman.. we appreciate your skillful hand, but making a windows non compile only app completely open to the public will not exactly allow sony to 'sit tight and watch it all happen'. if you continue to develop this app and make it as easy as it is to use, can we not see thousands and thousands of people beginning to use it within the month? seq was made to be difficult to install for a reason. and in a strange way, sony respects that.

    and what do the seq devs have to say about all this?
    To quote what Ratt so eloquently said back in November....
    "Cry 'Havoc,' and let slip the dogs of war"

    Though I absolutely hate the fact that a windows version is out, Sony is in no position to 'get all fussy' anymore. Sony respects nothing but the almighty dollar... not the players, not the game... nothing! Do I really need to break open the evidence locker on this...."Legends, Server moves, name change service, etc...".

    As has been stated and rehashed over and over, the "social contract" was broken, then stomped into the ground with gold cleats. I'm sure many people, including myself, would have rather seen work done to fix the Linux SEQ. Obviously someone was tired or waiting and had the knowledge to create an alternative. Bravo!
    IMHO, neither side can really complain at this point. The 'contract' was broken and a SEQ fix still hasn't come, so "Cry Havoc!".

    As for using an already compiled app.... have you ever downloaded shareware or 'freeware' and used it? Just wondering....
    Just say no to sigs

  13. #148
    Registered User grimjack's Avatar
    Join Date
    Dec 2001
    Posts
    32

    Scale

    Just modify:

    scale.Minimum = 100;



    I made mine 50

    Currently he has it in increments of 10 for adjustments on scale.

    scale.Increment = 10;

    And 20 for adjustments of X,Y

    offsetx.Increment = 20;
    offsety.Increment = 20;
    Thanks
    Back to work.

  14. #149
    Registered User
    Join Date
    Dec 2002
    Posts
    38
    Originally posted by EnvyEyes
    As for using an already compiled app.... have you ever downloaded shareware or 'freeware' and used it? Just wondering....
    Yes but no shareware/freeware proggie I've ever DL'd has had the means to ban me from my favorite game.

    Few suggestions for MSEQ

    a. Color coat the levels according to how they con to you (similar to SEQ)
    b. Give the option to not list all the extra shtuff the program gives (run speed, etc)
    c. Make the spawn list sizeable. Some of us work in 1280/1024 or other large resoultions and would love to be able to widen the left side and make the map side smaller.

  15. #150
    Moderator
    Join Date
    Jan 2003
    Posts
    426
    I'll put font dialog and change the zoom and pan things in, though I'm still not entirely happy with the way it works and look at color coding the list, it shouldn't be a problem though. The resizable list is coming and since this seems to be a popular request I'll do it soon. Removing columns at runtime is also a good idea I don't know a good way to do this yet. In the mean time you can just rearrange the columns though the positions will not be saved yet.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On