Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Bitmap resizeicon(int index)
- {
- Bitmap result;
- using (WebResponse response = WebRequest.Create("http://www.margonem.pl/obrazki/postacie/" + this.staty[index][8]).GetResponse())
- {
- using (Stream responseStream = response.GetResponseStream())
- {
- Image image = Image.FromStream(responseStream);
- result = new Bitmap(image, Convert.ToInt32((double)image.Width * 1.5), Convert.ToInt32((double)image.Height * 1.5));
- }
- }
- return result;
- }
- // Token: 0x06000038 RID: 56 RVA: 0x00003B3C File Offset: 0x00001D3C
- public static string Mucka()
- {
- return new Random().ToString();
- }
- // Token: 0x06000039 RID: 57 RVA: 0x00003B48 File Offset: 0x00001D48
- public void relog()
- {
- try
- {
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.data][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.data][0]));
- HttpResponseMessage result = httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.data][3],
- ".margonem.pl/engine?t=init&initlvl=1&mucka=",
- this.mucka,
- "&mobile=1"
- })).Result;
- }
- catch (Exception)
- {
- this.relog();
- }
- }
- // Token: 0x0600003A RID: 58 RVA: 0x00003C68 File Offset: 0x00001E68
- public async void relog2()
- {
- int num = 0;
- try
- {
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.expchar][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.expchar][0]));
- HttpResponseMessage result = httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.expchar][3],
- ".margonem.pl/engine?t=init&initlvl=1&mucka=",
- this.savemucka[this.expchar][0],
- "&mobile=1"
- })).Result;
- this.Request();
- }
- catch (Exception)
- {
- num = 1;
- }
- if (num == 1)
- {
- await Task.Delay(1000);
- this.relog1();
- }
- }
- // Token: 0x0600003B RID: 59 RVA: 0x00003CA4 File Offset: 0x00001EA4
- public async void getnormalmaps()
- {
- int num = 0;
- try
- {
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.data][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- this.mucka = GMargonem.Mucka();
- this.savemucka[this.data].Add(this.mucka);
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.data][0]));
- JObject jobject = JObject.Parse(httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.data][3],
- ".margonem.pl/engine?t=init&initlvl=1&mucka=",
- this.mucka,
- "&mobile=1"
- })).Result.Content.ReadAsStringAsync().Result);
- this.tokenmap = jobject["mobile_token"].ToString();
- string result = httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.data][3],
- ".margonem.pl/engine?t=init&initlvl=2&mucka=",
- this.mucka,
- "&mobile=1&mobile_token=",
- GMargonem.Md5(this.tokenmap, "humantorch-")
- })).Result.Content.ReadAsStringAsync().Result;
- JObject json = JObject.Parse(result);
- if (json.ToString().Contains("Przerwa"))
- {
- this.logintexte.Text = "Technical Break. Please try again later.";
- this.przerwa = true;
- await Task.Delay(4000);
- Application.Exit();
- }
- else if (json.ToString().Contains("zalogowany"))
- {
- this.logintexte.Text = "User is not logged in! Exiting.";
- this.przerwa = true;
- await Task.Delay(2000);
- Application.Exit();
- }
- else if (json.ToString().Contains("wait_for") || json.ToString().Contains("stop"))
- {
- this.getnormalmaps();
- }
- else
- {
- this.nmaps[this.data] = new List<string>();
- bool flag = true;
- for (int j = 0; j < this.mapynormal.Length; j++)
- {
- if (flag)
- {
- this.nmaps[this.data].Add(json["mobile_maps"][this.mapynormal[j]]["name"].ToString());
- this.nmaps[this.data].Add(this.mapynormal[j]);
- }
- flag = Extensions.Value<bool>(json["mobile_maps"][this.mapynormal[j]]["done"]);
- }
- }
- json = null;
- }
- catch (Exception)
- {
- num = 1;
- }
- if (num == 1)
- {
- await Task.Delay(1500);
- this.getnormalmaps();
- }
- }
- // Token: 0x0600003C RID: 60 RVA: 0x00003CE0 File Offset: 0x00001EE0
- private void addedchars_SelectedIndexChanged(object sender, EventArgs e)
- {
- this.poz = this.addedchars.SelectedIndex;
- this.normalmaps.Items.Clear();
- int num = 0;
- int count = this.nmaps[this.poz].Count;
- for (int i = 0; i < count / 2; i++)
- {
- this.normalmaps.Items.Add(this.nmaps[this.poz][num]);
- num += 2;
- }
- if (this.dodano[this.poz].Contains("true"))
- {
- this.normalmaps.SelectedIndex = int.Parse(this.mapsid[this.poz][1]);
- }
- this.getsettings();
- this.arrowclass();
- }
- // Token: 0x0600003D RID: 61 RVA: 0x00003DA4 File Offset: 0x00001FA4
- private void gettoken()
- {
- try
- {
- this.dead = false;
- this.deadtime = 0;
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.expchar][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.expchar][0]));
- JObject jobject = JObject.Parse(httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.expchar][3],
- ".margonem.pl/engine?t=init&initlvl=1&mucka=",
- this.savemucka[this.expchar][0],
- "&mobile=1"
- })).Result.Content.ReadAsStringAsync().Result);
- if (jobject.ToString().Contains("stop"))
- {
- this.relogbool = true;
- }
- else if (jobject.ToString().Contains("dead"))
- {
- this.dead = true;
- this.deadtime = (int.Parse(jobject["dead"].ToString()) + 50) / 60;
- }
- else
- {
- this.token1 = jobject["mobile_token"].ToString();
- }
- }
- catch (Exception)
- {
- this.relogbool = true;
- }
- }
- // Token: 0x0600003E RID: 62 RVA: 0x00003F74 File Offset: 0x00002174
- private void getitems()
- {
- try
- {
- this.iloscpotek = 0;
- this.potvalue = 0;
- this.arrvalue = 0;
- this.ilearrowz = 0;
- this.blesstimeleft = 0;
- this.ammovalue = 0;
- this.usedbless = false;
- this.healz.Clear();
- this.arrowz.Clear();
- this.expbon.Clear();
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.expchar][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.expchar][0]));
- JObject jobject = JObject.Parse(httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.expchar][3],
- ".margonem.pl/engine?t=init&initlvl=3&mucka=",
- this.savemucka[this.expchar][0],
- "&mobile=1&mobile_token=",
- GMargonem.Md5(this.token1, "humantorch-")
- })).Result.Content.ReadAsStringAsync().Result);
- if (jobject.ToString().Contains("leczy") || jobject.ToString().Contains("ammo") || jobject.ToString().Contains("npc_expbon"))
- {
- object arg = JsonConvert.DeserializeObject<GMargonem.Inventory>(jobject.ToString());
- if (GMargonem.<>o__133.<>p__1 == null)
- {
- GMargonem.<>o__133.<>p__1 = CallSite<Func<CallSite, object, IEnumerable>>.Create(Binder.Convert(CSharpBinderFlags.None, typeof(IEnumerable), typeof(GMargonem)));
- }
- Func<CallSite, object, IEnumerable> target = GMargonem.<>o__133.<>p__1.Target;
- CallSite <>p__ = GMargonem.<>o__133.<>p__1;
- if (GMargonem.<>o__133.<>p__0 == null)
- {
- GMargonem.<>o__133.<>p__0 = CallSite<Func<CallSite, object, object>>.Create(Binder.GetMember(CSharpBinderFlags.None, "Item", typeof(GMargonem), new CSharpArgumentInfo[]
- {
- CSharpArgumentInfo.Create(CSharpArgumentInfoFlags.None, null)
- }));
- }
- using (IEnumerator enumerator = target(<>p__, GMargonem.<>o__133.<>p__0.Target(GMargonem.<>o__133.<>p__0, arg)).GetEnumerator())
- {
- while (enumerator.MoveNext())
- {
- if (GMargonem.<>o__133.<>p__2 == null)
- {
- GMargonem.<>o__133.<>p__2 = CallSite<Func<CallSite, object, KeyValuePair<string, GMargonem.Itemz>>>.Create(Binder.Convert(CSharpBinderFlags.ConvertExplicit, typeof(KeyValuePair<string, GMargonem.Itemz>), typeof(GMargonem)));
- }
- KeyValuePair<string, GMargonem.Itemz> keyValuePair = GMargonem.<>o__133.<>p__2.Target(GMargonem.<>o__133.<>p__2, enumerator.Current);
- if (this.staty[this.expchar][9] == "h" || this.staty[this.expchar][9] == "t")
- {
- Match match = Regex.Match(keyValuePair.Value.stat, "ammo=(.*?);");
- Match match2 = Regex.Match(keyValuePair.Value.stat, "lvl=(.*?);");
- if (keyValuePair.Value.st > 0 && match.Success)
- {
- this.czymastrzaly = true;
- }
- if (match.Success && keyValuePair.Value.st == 0)
- {
- this.ammovalue += int.Parse(match.Groups[1].Value);
- if (match2.Success)
- {
- if (int.Parse(match2.Groups[1].Value) <= int.Parse(this.staty[this.expchar][2]))
- {
- GMargonem.arrowitem item = new GMargonem.arrowitem
- {
- id = int.Parse(keyValuePair.Key),
- val = int.Parse(match.Groups[1].Value)
- };
- this.arrowz.Add(item);
- this.ilearrowz++;
- }
- }
- else
- {
- GMargonem.arrowitem item2 = new GMargonem.arrowitem
- {
- id = int.Parse(keyValuePair.Key),
- val = int.Parse(match.Groups[1].Value)
- };
- this.arrowz.Add(item2);
- this.ilearrowz++;
- }
- }
- this.arrowsleft.Text = this.ammovalue.ToString();
- }
- else
- {
- this.arrowsleft.Text = "-";
- }
- Match match3 = Regex.Match(keyValuePair.Value.stat, "leczy=(.*?);");
- Match match4 = Regex.Match(keyValuePair.Value.stat, "amount=(.*?);");
- Match match5 = Regex.Match(keyValuePair.Value.stat, "leczy=(.*)");
- if (match4.Success)
- {
- this.potsamount += int.Parse(match4.Groups[1].Value);
- }
- if (match3.Success && match4.Success)
- {
- GMargonem.healitem item3 = new GMargonem.healitem
- {
- amount = int.Parse(match4.Groups[1].Value),
- heal = int.Parse(match3.Groups[1].Value),
- id = int.Parse(keyValuePair.Key)
- };
- this.healz.Add(item3);
- this.iloscpotek++;
- }
- else if (match5.Success && match4.Success)
- {
- GMargonem.healitem item4 = new GMargonem.healitem
- {
- amount = int.Parse(match4.Groups[1].Value),
- heal = int.Parse(match5.Groups[1].Value),
- id = int.Parse(keyValuePair.Key)
- };
- this.healz.Add(item4);
- this.iloscpotek++;
- }
- Match match6 = Regex.Match(keyValuePair.Value.stat, "npc_expbon=(.*?);");
- Match match7 = Regex.Match(keyValuePair.Value.stat, "ttl=(.*)");
- Match match8 = Regex.Match(keyValuePair.Value.stat, "amount=(.*?);");
- if (match6.Success && match7.Success && match8.Success && keyValuePair.Value.st == 0 && this.ustawienia[this.expchar][5])
- {
- GMargonem.expbless item5 = new GMargonem.expbless
- {
- exppercent = int.Parse(match6.Groups[1].Value),
- amount = int.Parse(match8.Groups[1].Value),
- czas = int.Parse(match7.Groups[1].Value),
- id = int.Parse(keyValuePair.Key)
- };
- this.expbon.Add(item5);
- }
- else if (match6.Success && match7.Success && match8.Success && keyValuePair.Value.st != 0 && this.ustawienia[this.expchar][5])
- {
- this.usedbless = true;
- this.blesstimeleft = int.Parse(match7.Groups[1].Value);
- }
- }
- goto IL_7B1;
- }
- }
- if (jobject.ToString().Contains("stop"))
- {
- this.relogbool = true;
- }
- IL_7B1:;
- }
- catch (Exception)
- {
- this.relogbool = true;
- }
- }
- // Token: 0x0600003F RID: 63 RVA: 0x00004774 File Offset: 0x00002974
- private void getevent()
- {
- try
- {
- CookieContainer cookieContainer = new CookieContainer();
- HttpClient httpClient = new HttpClient(new HttpClientHandler
- {
- CookieContainer = cookieContainer
- });
- httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", "Dalvik/1.6.0 (Linux; U; Android 4.4.2; GT-I9500 Build/KOT49H)");
- Uri uri = new Uri("http://" + this.staty[this.expchar][3] + ".margonem.pl");
- for (int i = 0; i < this.cvalue.Length; i++)
- {
- cookieContainer.Add(uri, new Cookie(this.cname[i], this.cvalue[i]));
- }
- cookieContainer.Add(uri, new Cookie("mchar_id", this.staty[this.expchar][0]));
- JObject jobject = JObject.Parse(httpClient.GetAsync(string.Concat(new string[]
- {
- "http://",
- this.staty[this.expchar][3],
- ".margonem.pl/engine?t=init&initlvl=4&mucka=",
- this.savemucka[this.expchar][0],
- "&mobile=1&mobile_token=",
- GMargonem.Md5(this.token1, "humantorch-")
- })).Result.Content.ReadAsStringAsync().Result);
- if (jobject.ToString().Contains("stop"))
- {
- this.relogbool = true;
- }
- else
- {
- this.ev = jobject["ev"].ToString();
- }
- }
- catch (Exception)
- {
- this.relogbool = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement