public Skills(Client _c, GameServer _gs) { InitializeComponent(); c = _c; gs = _gs; condition.Items.Add("Always"); condition.Items.Add("HP"); condition.Items.Add("Distance"); compare.Items.Add("="); compare.Items.Add(">"); compare.Items.Add("<"); condition.SelectedIndex = 0; compare.SelectedIndex = 0; value.Text = "0"; //skill s = new skill(); //s.name = "f**k"; //s.id = 12203; //skill s1 = new skill(); //s1.name = "suck"; //s1.id = 12205; //skill s2 = new skill(); //s2.name = "duck"; //s2.id = 12204; //sl.Items.Add(s1); //sl.Items.Add(s2); //sl.Items.Add(s); }
public Fight(Client _c, GameServer _gs) { buffid = 0; c = _c; gs = _gs; InitializeComponent(); }
public ClientView(Client _c) { InitializeComponent(); c = _c; foreach (shots s in c.gs.shotlist) { shotbox.Items.Add(s); } }
public BuffForm(Client _c, GameServer _gs) { c = _c; gs = _gs; InitializeComponent(); c.doafterskill.Clear(); c.doonskill.Clear(); foreach (skillmap s in gs.skills.Values) { cbOn.Items.Add(s); cbAfter.Items.Add(s); } }
public BuffForm(Client _c, GameServer _gs) { c = _c; gs = _gs; InitializeComponent(); onbufflist = new ComboBox[4]; doonbufflist = new ComboBox[4]; afterbufflist = new ComboBox[4]; doafterbufflist = new ComboBox[4]; onbufflist[0] = comboBox1; onbufflist[1] = comboBox4; onbufflist[2] = comboBox6; onbufflist[3] = comboBox8; doonbufflist[0] = comboBox2; doonbufflist[1] = comboBox3; doonbufflist[2] = comboBox5; doonbufflist[3] = comboBox7; afterbufflist[0] = comboBox10; afterbufflist[1] = comboBox12; afterbufflist[2] = comboBox16; afterbufflist[3] = comboBox14; doafterbufflist[0] = comboBox9; doafterbufflist[1] = comboBox11; doafterbufflist[2] = comboBox15; doafterbufflist[3] = comboBox13; c.doafterskill.Clear(); c.doonskill.Clear(); foreach (ComboBox d in onbufflist) { foreach (string s in gs.skills.Values) d.Items.Add(s); } foreach (ComboBox d in afterbufflist) { foreach (string s in gs.skills.Values) d.Items.Add(s); } }
public Defense(Client _c, GameServer _gs) { InitializeComponent(); c = _c; gs = _gs; condition.Items.Add("Always"); condition.Items.Add("HP"); condition.Items.Add("Distance"); compare.Items.Add("="); compare.Items.Add(">"); compare.Items.Add("<"); Effects sleep, hold, medusa, poison; medusa = new Effects(); medusa.name = "Medusa"; medusa.id = 2048; sleep = new Effects(); sleep.name = "Sleep"; sleep.id = 128; hold = new Effects(); hold.name = "Root"; hold.id = 512; poison = new Effects(); poison.name = "Poison"; poison.id = 2; eff.Items.Add(medusa); eff.Items.Add(sleep); eff.Items.Add(hold); eff.Items.Add(poison); condition.SelectedIndex = 0; compare.SelectedIndex = 0; value.Text = "0"; eff.SelectedIndex = 0; tb_mp.Text = "1500"; }
public void startListen() { gsListen.Start(); while (true) { Socket newsocket = gsListen.AcceptSocket(); Client c = new Client(newsocket, this); clist.Add(c); } }
public GameServer(string _gsIP, int _gsPort, string _lip) { IPAddress localip = IPAddress.Parse(_lip); // Console.WriteLine(localip.ToString()); gsListen = new TcpListener(System.Net.IPAddress.Any, 7777); gsIP = _gsIP; gsPort = _gsPort; //initialize members clanlist = new Dictionary<uint, Clans>(); enemyclans = new Dictionary<uint, Clans>(); allplayerinfo = new Dictionary<uint, CharInfo>(); playerlist = new Dictionary<uint, CharInfo>(); attacklist = new Dictionary<uint, CharInfo>(); enemylist = new Dictionary<uint, CharInfo>(); deadlist = new Dictionary<uint, CharInfo>(); deletedenemies = new List<uint>(); enemynames = new List<string>(); distanceupdates = true; targetselection = new Thread(this.selectTarget); target = null; shotlist = new List<shots>(); { StreamReader sReader = new StreamReader(new FileStream("shotid.txt", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = sReader.ReadLine(); if (line == null) break; char[] sep = new char[4]; sep[0] = '='; sep[1] = '['; sep[2] = ']'; sep[3] = '\t'; string[] split = line.Split(sep, StringSplitOptions.RemoveEmptyEntries); //id = 2, name = 4 shots _s = new shots(); _s.id = Convert.ToUInt32(split[2]); _s.name = split[4]; shotlist.Add(_s); } } robeids = new List<uint>(); { StreamReader sReader = new StreamReader(new FileStream("robeid.txt", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = sReader.ReadLine(); if (line == null) break; char[] sep = new char[4]; sep[0] = '='; sep[1] = '['; sep[2] = ']'; sep[3] = '\t'; string[] split = line.Split(sep, StringSplitOptions.RemoveEmptyEntries); //id = 2, name = 4 uint id = Convert.ToUInt32(split[2]); robeids.Add(id); } } lightarmor = new List<uint>(); { StreamReader sReader = new StreamReader(new FileStream("lightamor.txt", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = sReader.ReadLine(); if (line == null) break; char[] sep = new char[4]; sep[0] = '='; sep[1] = '['; sep[2] = ']'; sep[3] = '\t'; string[] split = line.Split(sep, StringSplitOptions.RemoveEmptyEntries); //id = 2, name = 4 uint id = Convert.ToUInt32(split[2]); lightarmor.Add(id); } } skills = new Dictionary<uint, string>(); { StreamReader lReader = new StreamReader(new FileStream("uniquelist.txt", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = lReader.ReadLine(); if (line == null) break; char[] sep = new char[3]; char[] sep1 = new char[2]; sep[0] = ' '; sep[1] = '\t'; sep[2] = '='; sep1[0] = '['; sep1[1] = ']'; string[] splits = line.Split(sep, 6, StringSplitOptions.RemoveEmptyEntries); string[] split2 = splits[5].Split(sep1, 3, StringSplitOptions.RemoveEmptyEntries); skills.Add(Convert.ToUInt32(splits[2]), split2[1]); } System.Console.WriteLine("loaded skills"); } clist = new List<Client>(); leader = null; //start UI thread bwindow = new BotView(this); bwindow.Show(); }
public GameServer(string _gsIP, int _gsPort, string _lip) { IPAddress localip = IPAddress.Parse(_lip); // Console.WriteLine(localip.ToString()); gsListen = new TcpListener(System.Net.IPAddress.Any, 7777); gsIP = _gsIP; gsPort = _gsPort; commandlists = new List<string>(128); //initialize members clanlist = new Dictionary<uint, Clans>(); enemyclans = new Dictionary<uint, Clans>(); allplayerinfo = new Dictionary<uint, CharInfo>(); playerlist = new Dictionary<uint, CharInfo>(); attacklist = new Dictionary<uint, CharInfo>(); enemylist = new Dictionary<uint, CharInfo>(); deadlist = new Dictionary<uint, CharInfo>(); wlist = new Dictionary<uint, WatchedPlayers>(); deletedenemies = new List<uint>(); enemynames = new List<string>(); distanceupdates = true; targetselection = new Thread(this.selectTarget); target = null; npclist = new Dictionary<uint, Client.NPC>(); moblist = new Dictionary<uint, Client.NPC>(); shotlist = new List<shots>(); { StreamReader sReader = new StreamReader(new FileStream("shotid.txt", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = sReader.ReadLine(); if (line == null) break; char[] sep = new char[4]; sep[0] = '='; sep[1] = '['; sep[2] = ']'; sep[3] = '\t'; string[] split = line.Split(sep, StringSplitOptions.RemoveEmptyEntries); //id = 2, name = 4 shots _s = new shots(); _s.id = Convert.ToUInt32(split[2]); _s.name = split[4]; shotlist.Add(_s); } } robeids = new List<uint>(); lightarmor = new List<uint>(); { StreamReader lReader = new StreamReader(new FileStream("armor.sql", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = lReader.ReadLine(); if (line == null) break; if (line.Contains("--")) continue; if (line.Length < 6) continue; char[] sep = new char[4]; sep[0] = '('; sep[1] = ')'; sep[2] = ','; sep[3] = ';'; string[] splits = line.Split(sep, 6, StringSplitOptions.RemoveEmptyEntries); if (splits[4] == "\'magic\'") { robeids.Add(Convert.ToUInt32(splits[0])); } if (splits[4] == "\'light\'") { lightarmor.Add(Convert.ToUInt32(splits[0])); } } } Console.WriteLine("{0} in robe and {1} in light", robeids.Count, lightarmor.Count); itemlist = new Dictionary<uint, Items>(); { StreamReader lReader = new StreamReader(new FileStream("etcitem.sql", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = lReader.ReadLine(); if (line == null) break; if (line.Contains("--")) continue; if (line.Length < 6) continue; char[] sep = new char[4]; sep[0] = '('; sep[1] = ')'; sep[2] = ','; sep[3] = ';'; string[] splits = line.Split(sep, 6, StringSplitOptions.RemoveEmptyEntries); try { Items i = new Items(); i.id = Convert.ToUInt32(splits[0]); i.name = splits[1]; itemlist.Add(i.id, i); } catch { } } } Console.WriteLine("Item count = {0}", itemlist.Count); skills = new Dictionary<uint, skillmap>(); { StreamReader lReader = new StreamReader(new FileStream("skill_trees.sql", FileMode.Open, FileAccess.Read, FileShare.Read), Encoding.UTF8); while (true) { string line = lReader.ReadLine(); if (line == null) break; if (line.Contains("--")) continue; if (line.Length < 6) continue; char[] sep = new char[5]; sep[0] = '('; sep[1] = ')'; sep[2] = ','; sep[3] = '\''; sep[4] = ';'; string[] splits = line.Split(sep, 6, StringSplitOptions.RemoveEmptyEntries); uint skillid = Convert.ToUInt32(splits[1]); skillmap s = new skillmap(); s.id = skillid; s.name = splits[3]; if (!skills.ContainsKey(skillid)) skills.Add(skillid, s); } } clist = new List<Client>(); leader = null; //start UI thread bwindow = new BotView(this); bwindow.Show(); }
public ItemUseForm(Client _c, GameServer _gs) { InitializeComponent(); c = _c; _gs = gs; }