private void a(MySpell A_0, int A_1, bool A_2, bool A_3, ChatTextInterceptEventArgs A_4) { if ((A_1 == this.a) && (A_1 != 0)) { this.i(); if (!A_0.HitsMultipleTargets) { if (A_2) { this.b(0); } else { foreach (ei.a a in k) { if (A_4.get_Color() == a.b) { int num; Match match = a.a.Match(A_4.get_Text()); if (match.Success && int.TryParse(match.Groups[1].Value, out num)) { this.a((int)(this.b - num)); this.c = num; break; } } } } } } }
private void a(object A_0, ChatTextInterceptEventArgs A_1) { try { if ((A_1.get_Color() == 0) && this.b.IsMatch(A_1.get_Text())) { this.c.Clear(); PluginCore.cq.n.a("Mana Stone use detected.", e8.e); } } catch (Exception exception) { ad.a(exception); } }
private static void a(object A_0, ChatTextInterceptEventArgs A_1) { try { if (((PluginCore.cq != null) && PluginCore.cq.n.b) && er.j("EnableMeta")) { a2.a item = new a2.a { b = A_1.get_Color(), c = A_1.get_Target(), a = A_1.get_Text() }; a.Add(item); } } catch (Exception exception) { ad.a(exception); } }
private void a(object A_0, ChatTextInterceptEventArgs A_1) { try { int num; switch (this.h) { case dv.d.a: return; case dv.d.b: if (((A_1.get_Text().Length >= 9) && (A_1.get_Text().Substring(0, 9).CompareTo("You say, ") == 0)) && (A_1.get_Color() == 0x11)) { string str = this.g.Match(A_1.get_Text()).Value.Substring(1); str = str.Substring(0, str.Length - 1).ToLowerInvariant().Replace(" ", ""); if (!(this.k.e.b(this.f.Id).Saying == str)) { break; } this.a(dv.d.c); } return; case dv.d.c: if ((A_1.get_Color() != 0) || !this.f.CanKill) { goto Label_0231; } num = 0; goto Label_0216; default: return; } this.a(dv.d.a); return; Label_0101: if (this.k.f.c[num].Match(A_1.get_Text()).Success) { A_1.set_Eat(true); if (!this.f.HitsMultipleTargets) { if (this.a != null) { this.a(this.f, this.e, true, true, A_1); } if (this.b != null) { this.b(this.f, this.e, true, true); } } else { if (this.a != null) { this.a(this.f, this.e, false, true, A_1); } if (this.b != null) { this.b(this.f, this.e, false, true); } } PluginCore.cq.n.a("SpellCaster: Spell kill reset (" + A_1.get_Text() + ")", e8.i); this.a(dv.d.a); PluginCore.cq.am.a(this.e); return; } num++; Label_0216: if (num < this.k.f.c.Count) { goto Label_0101; } Label_0231: if (A_1.get_Color() == 7) { for (int i = 0; i < this.k.f.a.Count; i++) { if (this.k.f.a[i].Match(A_1.get_Text()).Success) { PluginCore.cq.n.a("SpellCaster: Spell fail reset (" + A_1.get_Text() + ")", e8.i); this.a(dv.d.a); return; } } for (int j = 0; j < this.k.f.b.Count; j++) { Match match = this.k.f.b[j].Match(A_1.get_Text()); if (match.Success) { Group group = match.Groups["spellname"]; if (!group.Success || this.f.Name.Equals(group.Value, StringComparison.Ordinal)) { Group group2 = match.Groups["targetname"]; if ((!group2.Success || string.IsNullOrEmpty(this.d)) || this.d.Equals(group2.Value, StringComparison.OrdinalIgnoreCase)) { PluginCore.cq.n.a("SpellCaster: Spell success reset (" + A_1.get_Text() + ")", e8.i); if (this.a != null) { this.a(this.f, this.e, false, false, A_1); } if (this.b != null) { this.b(this.f, this.e, false, false); } this.a(dv.d.a); PluginCore.cq.am.a(this.e); return; } } } } } } catch (Exception exception) { ad.a(exception); } }
private void a(object A_0, ChatTextInterceptEventArgs A_1) { try { string str; string str2; string str10; string str11; y.b b; int e; if ((PluginCore.cq.n.b && er.j("AutoFellowManagement")) && ((A_1.get_Color() == 3) && this.f.c())) { Match match = this.x.Match(A_1.get_Text()); if (match.Success) { str = match.Groups["name"].Value; str2 = match.Groups["msg"].Value; if (string.Compare(str2, "xp", true) == 0) { if (!this.a(str)) { foreach (KeyValuePair <int, ar.a> pair in this.f.a) { if (pair.Value.b == str) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] You are already in the fellowship. -v-"); return; } } if (this.j.Contains(str.ToLowerInvariant())) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Sorry, but you have been banned from this fellowship. -v-"); } else if (!this.l && !this.f.d()) { string str3 = "????"; if (this.f.a.ContainsKey(this.f.b())) { str3 = this.f.a[this.f.b()].b; } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] I'm sorry, but the fellowship is closed and I am not the leader. The leader is currently: " + str3 + " -v-"); } else if (this.l) { if (this.k.Contains(str)) { if (this.m) { if (this.u.ContainsKey(str)) { if (!this.p.Contains(str)) { this.p.Add(str); } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Please wait nearby. I will try to recruit you in a moment. -v-"); } else { int num = this.k.IndexOf(str) + 1; PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] You are already number " + num.ToString() + " of " + this.k.Count.ToString() + " on the waiting list. -v-"); } } else { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Please wait nearby. I will try to recruit you in a moment. -v-"); } } else if (this.m) { this.k.Add(str); PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] The fellow is full, and I am the leader. I am adding you to the waiting list at position " + this.k.Count.ToString() + " -v-"); } else { this.k.Add(str); PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] I will recruit you in a moment. Please stand close to me. -v-"); } } else if ((!this.l && this.f.d()) && !this.a()) { if (!this.k.Contains(str)) { this.k.Add(str); } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Please wait nearby. I will try to recruit you in a moment. -v-"); } else if ((!this.l && this.f.d()) && this.a()) { string str4 = "????"; if (this.f.a.ContainsKey(this.f.b())) { str4 = this.f.a[this.f.b()].b; } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] I'm sorry, but the fellowship is full. The leader is currently: " + str4 + " -v-"); } } } else if (((string.Compare(str2, "line", true) == 0) || (string.Compare(str2, "list", true) == 0)) || (string.Compare(str2, "status", true) == 0)) { if (!this.a(str)) { if (this.l) { if (!this.m) { string[] strArray7 = new string[] { "/t ", str, ", [VT Fellow Manager] There is no waiting list. The fellowship has ", (this.f.a.Count + 1).ToString(), " members. -v-" }; PluginCore.cq.ah.b(string.Concat(strArray7)); } else if (this.k.Contains(str)) { int num2 = this.k.IndexOf(str) + 1; PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] You are number " + num2.ToString() + " of " + this.k.Count.ToString() + " on the waiting list. -v-"); } else { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] The waiting list contains " + this.k.Count.ToString() + " players. You are not on it. -v-"); } } else { string str5; if (this.f.d()) { str5 = "open"; } else { str5 = "closed"; } string str6 = "????"; if (this.f.a.ContainsKey(this.f.b())) { str6 = this.f.a[this.f.b()].b; } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] The leader is currently: " + str6 + ". The fellowship is " + str5 + ". -v-"); } } } else if (string.Compare(str2, "remove", true) == 0) { if (!this.a(str)) { string item = str; if (this.k.Contains(item)) { this.k.Remove(item); } if (this.p.Contains(item)) { this.p.Remove(item); } if (this.u.ContainsKey(item)) { this.u.Remove(item); } this.b(); PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] You have been removed from the list. -v-"); } } else if (string.Compare(str2, "leader", true) == 0) { if (!this.a(str)) { string str8; if (this.f.d()) { str8 = "open"; } else { str8 = "closed"; } if (this.l) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] I am the fellowship leader. The fellowship is " + str8 + ". -v-"); } else { string str9 = "????"; if (this.f.a.ContainsKey(this.f.b())) { str9 = this.f.a[this.f.b()].b; } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] The leader is currently: " + str9 + ". The fellowship is " + str8 + ". -v-"); } } } else if (string.Compare(str2, "help", true) == 0) { if (!this.a(str)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Available commands: xp, line, remove, leader, startvote, vote, location, help -v-"); } } else if (string.Compare(str2, "help startvote", true) == 0) { if (!this.a(str)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Usage: startvote [votetype] [parameter]. Possible vote types: kick, ban, giveleader, setopen. -v-"); } } else if (string.Compare(str2, "help vote", true) == 0) { if (!this.a(str)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Usage: vote [vote id] [yes/no] -v-"); } } else { if (!str2.StartsWith("startvote ")) { goto Label_1027; } if ((!this.a(str) && this.b(str)) && !this.j.Contains(str.ToLowerInvariant())) { if (this.q.ContainsKey(str) && (this.q[str] > DateTimeOffset.Now)) { string[] strArray13 = new string[] { "/t ", str, ", [VT Fellow Manager] You have initiated a vote too recently (wait another ", (this.q[str] - DateTimeOffset.Now).ToString(), "). -v-" }; PluginCore.cq.ah.b(string.Concat(strArray13)); } else { string[] strArray = str2.Split(new char[] { ' ' }); if (strArray.Length < 3) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Not enough parameters to startvote command. Tell me 'help startvote' for more information. -v-"); } else { str10 = strArray[1]; StringBuilder builder = new StringBuilder(); for (int i = 2; i < strArray.Length; i++) { if (i > 2) { builder.Append(" "); } builder.Append(strArray[i]); } str11 = builder.ToString(); b = new y.b { b = str11.ToLowerInvariant() }; if (string.Compare(str10, "kick", true) == 0) { if (!this.b(str11)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Cannot vote to kick " + str11 + ", that player is not in the fellow. -v-"); return; } b.a = y.a.a; goto Label_0CE0; } if (string.Compare(str10, "ban", true) == 0) { if (!this.b(str11)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Cannot vote to ban " + str11 + ", that player is not in the fellow. -v-"); return; } b.a = y.a.b; goto Label_0CE0; } if (string.Compare(str10, "giveleader", true) == 0) { if (!this.b(str11)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Cannot vote to give leader to " + str11 + ", that player is not in the fellow. -v-"); return; } b.a = y.a.c; goto Label_0CE0; } if (string.Compare(str10, "setopen", true) == 0) { if ((str11 != "true") && (str11 != "false")) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] A setopen vote call must be followed by 'true' or 'false'. -v-"); return; } b.a = y.a.d; goto Label_0CE0; } PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Unknown vote type. Tell me 'help startvote' for more information. -v-"); } } } } } } return; Label_0CE0: e = 0; foreach (KeyValuePair <y.b, List <MyPair <string, bool> > > pair2 in this.r) { if (pair2.Key.a(b) == 0) { e = pair2.Key.e; break; } } if (e != 0) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] An identical vote is already in progress! (Vote ID " + e.ToString() + ") -v-"); } else { b.c = DateTimeOffset.Now + TimeSpan.FromMinutes(2.0); string[] strArray3 = new string[] { "/f [VT Fellow Manager] ", str, " has called a new vote: ", str10.ToLowerInvariant(), " ", str11, "! To vote, either tell me 'vote ", b.e.ToString(), " yes' or 'vote ", b.e.ToString(), " no'. You have ", 2.0.ToString(), " minutes. -v-" }; PluginCore.cq.ah.b(string.Concat(strArray3)); this.r.Add(b, new List <MyPair <string, bool> >()); MyPair <string, bool> pair3 = new MyPair <string, bool> { a = str, b = true }; this.r[b].Add(pair3); this.q[str] = DateTimeOffset.Now + TimeSpan.FromMinutes(4.0); PluginCore.cq.ah.b("/f [VT Fellow Manager] Vote total for '" + str10.ToLowerInvariant() + " " + str11 + "' (ID " + b.e.ToString() + "): 1/0 -v-"); PluginCore.e("Vote called by " + str + ": " + b.ToString() + ". [" + a.a("Vote Yes", new string[] { "fvote", b.e.ToString(), "yes" }) + "] [" + a.a("Vote No", new string[] { "fvote", b.e.ToString(), "no" }) + "] [" + a.a("Abort Vote", new string[] { "fvote", b.e.ToString(), "abort" }) + "]"); } return; Label_1027: if (str2.StartsWith("vote ")) { if ((!this.a(str) && this.b(str)) && !this.j.Contains(str.ToLowerInvariant())) { int num5; string[] strArray2 = str2.Split(new char[] { ' ' }); if ((strArray2.Length != 3) || !int.TryParse(strArray2[1], out num5)) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Invalid vote command. Votes should look like: vote idnumber yes, or: vote idnumber no -v-"); return; } bool flag = false; if (string.Compare(strArray2[2], "yes", true) == 0) { flag = true; } else if (string.Compare(strArray2[2], "no", true) == 0) { flag = false; } else { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Invalid vote command. Votes should look like: vote idnumber yes, or: vote idnumber no -v-"); return; } y.b key = null; List <MyPair <string, bool> > list = null; foreach (KeyValuePair <y.b, List <MyPair <string, bool> > > pair4 in this.r) { if (pair4.Key.e == num5) { key = pair4.Key; list = pair4.Value; break; } } if (key == null) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Invalid vote ID number. Votes should look like: vote idnumber yes, or: vote idnumber no -v-"); return; } bool flag2 = false; foreach (MyPair <string, bool> pair5 in list) { if (pair5.a == str) { flag2 = true; pair5.b = flag; break; } } if (!flag2) { MyPair <string, bool> pair6 = new MyPair <string, bool> { a = str, b = flag }; list.Add(pair6); } int num6 = 0; int num7 = 0; foreach (MyPair <string, bool> pair7 in list) { if (pair7.b) { num6++; } else { num7++; } } PluginCore.cq.ah.b("/f [VT Fellow Manager] Vote total for " + key.ToString() + ": " + num6.ToString() + "/" + num7.ToString() + " -v-"); } } else { if ((string.Compare(str2, "location", true) != 0) || this.a(str)) { return; } bool flag3 = false; foreach (KeyValuePair <int, ar.a> pair8 in this.f.a) { if (pair8.Value.b == str) { flag3 = true; break; } } if (flag3) { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] I am currently located in landcell: " + PluginCore.cq.p.d(PluginCore.cg).w.d().ToString("X8") + " -v-"); } else { PluginCore.cq.ah.b("/t " + str + ", [VT Fellow Manager] Sorry, I can only send my location to members of the fellowship. -v-"); } } } catch (Exception exception) { ad.a(exception); } }
private void a(object A_0, ChatTextInterceptEventArgs A_1) { try { string str; string str2; if ((this.a() == s.b.d) || (this.a() == s.b.e)) { if (A_1.get_Color() != 7) { goto Label_0152; } Match match = this.q.Match(A_1.get_Text()); Match match2 = this.p.Match(A_1.get_Text()); str = ""; str2 = ""; if (match.Success) { str = match.Groups[1].Value; str2 = match.Groups[2].Value; goto Label_00B2; } if (match2.Success) { str = match2.Groups[1].Value; str2 = match2.Groups[2].Value; goto Label_00B2; } } return; Label_00B2: if (str == this.i.Name) { WorldObject obj2 = CoreManager.get_Current().get_WorldFilter().get_Item(this.h); if ((obj2 == null) || (str2 == obj2.get_Name())) { PluginCore.cq.n.a("WandCaster: Spell success reset (" + A_1.get_Text() + ")", e8.i); this.a(s.b.a); if (this.a != null) { this.a(this.i, this.h, false, false); } } } return; Label_0152: if (A_1.get_Color() == 0) { for (int i = 0; i < PluginCore.cq.f.c.Count; i++) { if (PluginCore.cq.f.c[i].Match(A_1.get_Text()).Success) { PluginCore.cq.n.a("WandCaster: Spell success reset (" + A_1.get_Text() + ")", e8.i); this.a(s.b.a); if (this.a != null) { this.a(this.i, this.h, true, !this.i.HitsMultipleTargets); } return; } } } } catch (Exception exception) { ad.a(exception); } }
private void a(object A_0, ChatTextInterceptEventArgs A_1) { try { if (!this.j) { TimeSpan span = (TimeSpan)(DateTimeOffset.Now - this.g); if (span.TotalSeconds > 2.0) { return; } } if (!this.j || (PluginCore.cq.ax.get_Actions().get_CurrentSelection() == this.e)) { if ((this.n != null) && (A_1.get_Color() == 7)) { Match match = this.b.Match(A_1.get_Text()); if (!match.Success) { return; } if (match.Groups["spellname"].Value == this.n.Name) { PluginCore.cq.i.a(this.n, this.e); } } if (A_1.get_Color() == 0) { if (A_1.get_Text().Trim().Equals("Your missile attack hit the environment.")) { PluginCore.cq.am.b(this.e); } } else if ((A_1.get_Color() == 0x16) && this.c.IsMatch(A_1.get_Text())) { PluginCore.cq.am.a(this.e); } if (A_1.get_Color() == 0) { for (int i = 0; i < PluginCore.cq.f.c.Count; i++) { Match match2 = PluginCore.cq.f.c[i].Match(A_1.get_Text()); if (match2.Success) { A_1.set_Eat(true); if (er.j("EnableLooting")) { PluginCore.cq.n.n.a(ActionLockType.Navigation, TimeSpan.FromSeconds(3.0)); } l.f(); Group group = match2.Groups["targetname"]; if ((((((group == null) || !group.Success) || string.Equals(this.f, group.Value, StringComparison.Ordinal)) && (!dh.a(PluginCore.cq.av.d()) || (PluginCore.cq.n.d(PluginCore.cq.av.d()).k <= 1))) && ((!dh.a(PluginCore.cq.av.e()) || (PluginCore.cq.p.d(PluginCore.cq.av.e()).c() != ObjectClass.MeleeWeapon)) || (PluginCore.cq.n.d(PluginCore.cq.av.d()).k <= 1))) && PluginCore.cq.n.f.ContainsKey(this.e)) { PluginCore.cq.n.f[this.e].a = true; PluginCore.PC.f(this.e); } return; } } } } } catch (Exception exception) { ad.a(exception); } }