public void SetSkill(int level, SkillToLvl skill) { skills[level] = skill; if (sa) { save(); } }
public void SetSkill(int level, SkillToLvl skill) { _skills[level] = skill; if (_sa) { Save(); } }
public SkillLevelUp(SkillToLvl[] skills, CheckBox enabled, int delay = 0) { this.enabled = enabled; enabled.OnValueChange += enabled_OnValueChange; this.skills = skills; Core.DelayAction(() => OnLvLUp(ObjectManager.Player.Level), delay * 1000 + RandGen.r.Next(minTime, maxTime)); //Obj_AI_Base.OnLevelUp += Player_OnLevelUp;TODO waiting for devs to fix onlvlup... Game.OnTick += Game_OnTick; }
private ChampSkilltoLvl getSequence(string[] nameGuide) { SkillToLvl[] seq = new SkillToLvl[18]; for (int i = 0; i < 18; i++) { seq[i] = SkillToLvl.NotSet; } string resp = ("http://www.mobafire.com" + nameGuide[1]).GetResponseText(); string q; q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-q.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); MatchCollection matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.Q; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-w.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.W; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-e.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.E; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-r.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.R; } return(new ChampSkilltoLvl { champ = cn.OrderByDescending(it => it.name.Match(nameGuide[0])).First().champ, s = seq }); }
private int CountSkillLvl(SkillToLvl s, int level) { var lvl = 0; for (var i = 0; i < level; i++) { if (skills[i] == s) { lvl++; } } return(lvl); }
public bool canLvl(SkillToLvl s, int level) { var q = CountSkillLvl(s, 18); if (s == SkillToLvl.R) { if (q >= 3) { return(false); } if (level < 5) { return(CountSkillLvl(s, 5) < 0); } if (level < 10) { return(CountSkillLvl(s, 10) < 1); } if (level < 15) { return(CountSkillLvl(s, 15) < 2); } return(q < 3); } if (q >= 5) { return(false); } if (level < 2) { return(CountSkillLvl(s, 2) < 1); } if (level < 4) { return(CountSkillLvl(s, 4) < 2); } if (level < 6) { return(CountSkillLvl(s, 6) < 3); } if (level < 8) { return(CountSkillLvl(s, 8) < 4); } return(q < 5); }
public void SetSkill(int level, SkillToLvl skill) { skills[level] = skill; if (sa) save(); }
public bool canLvl(SkillToLvl s, int level) { int q = CountSkillLvl(s, 18); if (s == SkillToLvl.R) { if (q >= 3) return false; if (level < 5) return CountSkillLvl(s, 5) < 0; if (level < 10) return CountSkillLvl(s, 10) < 1; if (level < 15) return CountSkillLvl(s, 15) < 2; return q < 3; } if (q >= 5) return false; if (level < 2) return CountSkillLvl(s, 2) < 1; if (level < 4) return CountSkillLvl(s, 4) < 2; if (level < 6) return CountSkillLvl(s, 6) < 3; if (level < 8) return CountSkillLvl(s, 8) < 4; return q < 5; }
private int CountSkillLvl(SkillToLvl s, int level) { int lvl = 0; for (int i = 0; i < level; i++) { if (skills[i] == s) lvl++; } return lvl; }
private ChampSkilltoLvl getSequence(string[] nameGuide) { SkillToLvl[] seq = new SkillToLvl[18]; for (int i = 0; i < 18; i++) { seq[i] = SkillToLvl.NotSet; } string resp = ("http://www.mobafire.com" + nameGuide[1]).GetResponseText(); string q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-q.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); MatchCollection matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.Q; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-w.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.W; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-e.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.E; } q = resp.Substring( resp.IndexOf("<div class=\"float-right\" style=\"margin-left:7px;\"><img src=\"/images/key-r.png\"") - 2000, 2000); q = q.Substring(q.LastIndexOf("<div class=\"float-left\" style=\"margin-left:7px;\">") + 62); matches = Regex.Matches(q, "[0-9]+"); foreach (Match match in matches) { seq[int.Parse(match.ToString()) - 1] = SkillToLvl.R; } return new ChampSkilltoLvl { champ = cn.OrderByDescending(it => it.name.Match(nameGuide[0])).First().champ, s = seq }; }