Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Execute Indicator Plugin by MTO
- // v1.0.1
- // Shows an icon on minimap and world map for mobs that meet the threshold to be executed by you or any member in your party
- // Threshold is 18% for Early Grave, 15% for Unruned Frailty or Grim Scythe: Cursed Scythe, or 10% for Executioner
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.MTO
- {
- public class LowHealthmonstersCircleplugin : BasePlugin, IInGameWorldPainter {
- public WorldDecoratorCollection LowHealthDecorator { get; set; }
- public WorldDecoratorCollection LowHealthDecoratorFifteen { get; set; }
- public WorldDecoratorCollection LowHealthDecoratorTen { get; set; }
- public float LowHealthDecoratorRadius { get; set; }
- public LowHealthmonstersCircleplugin () {
- Enabled = true;
- }
- public override void Load (IController hud) {
- base.Load (hud);
- LowHealthDecoratorRadius = 1.25f;
- LowHealthDecorator = new WorldDecoratorCollection (
- new GroundLabelDecorator (Hud) {
- TextFont = Hud.Render.CreateFont ("tahoma", 7, 255, 255, 255, 255, true, false, false)
- },
- new MapLabelDecorator (Hud) {
- LabelFont = Hud.Render.CreateFont ("tahoma", 7, 255, 255, 255, 255, true, false, false),
- },
- new GroundCircleDecorator (Hud) {
- Brush = Hud.Render.CreateBrush (255, 175, 0, 0, -12.5f),
- Radius = .1f
- }
- );
- }
- public void PaintWorld (WorldLayer layer) {
- var executeType = "";
- var monsters = Hud.Game.AliveMonsters;
- foreach (var p in Hud.Game.Players) {
- var skills = p.Powers.CurrentSkills;
- foreach (var s in skills) {
- if (s.SnoPower.NameEnglish == "Frailty") {
- if (s.RuneNameEnglish == "Early Grave") {
- executeType = "FrailtyEarlyGrave";
- } else if (s.RuneNameEnglish != "Early Grave" && !executeType.Contains ("EarlyGrave")) {
- executeType = "Frailty";
- }
- }
- if (s.RuneNameEnglish == "Cursed Scythe" && !executeType.Contains ("Frailty")) {
- executeType = "Frailty";
- }
- }
- if (p.Powers.BuffIsActive (483516) && !executeType.Contains ("Frailty")) {
- executeType = "Executioner";
- }
- };
- if (executeType != "") {
- foreach (var monster in monsters) {
- var threshold = 0;
- switch (executeType) {
- case "Executioner":
- threshold = 10;
- break;
- case "Frailty":
- threshold = 15;
- break;
- case "FrailtyEarlyGrave":
- threshold = 18;
- break;
- }
- if (monster.CurHealth / monster.MaxHealth * 100 <= threshold) {
- LowHealthDecorator.Paint (layer, monster, monster.FloorCoordinate, "💀");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement