[INTERNATIONAL] GR Pylon Marker & Chance menu

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34
  1. #16
    iThinkiWin's Avatar Active Member
    Reputation
    28
    Join Date
    Oct 2018
    Posts
    104
    Thanks G/R
    25/25
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ArnesMeyer View Post
    Not working,but is ok


    change level to whatever you wish it to be @ private string message_floor { get; set; } = "Level";

    Code:
    using System;
    using System.Globalization;
    using System.Collections.Generic;
    using System.Linq;
    using Turbo.Plugins.Default;
    
    namespace Turbo.Plugins.DAV
    {
    	public class DAV_GRPylonPlugin : BasePlugin, IInGameWorldPainter {
    		public IFont Font_Used { get; set; }
    		public IFont Font_SameLvl { get; set; }
    		public IFont Font_DiffLvl { get; set; }
    		public DAV_PylonInfo[] grPylon { get; set; } = new DAV_PylonInfo[5];
    		public double pylonChanceLow { get; set; } = 30d;
    		public double pylonChanceHigh { get; set; } = 60d;
    		public WorldDecoratorCollection PossiblePylonDecorator_low { get; set; }
    		public WorldDecoratorCollection PossiblePylonDecorator_middle { get; set; }
    		public WorldDecoratorCollection PossiblePylonDecorator_high { get; set; }
    		public double chanceMultiplier { get; set; } = 2d;
    		public string PossiblePylonMessage { get; set; } = "pylon?";
    		public string message_percent { get; set; } = "Last Pylon";
    		public string message_pylonChance { get; set; } = "Chance";
    		private string message_floor { get; set; } = "Level";
    
    		private bool inGR { get; set; } = false;
    		private int PylonNum { get; set; } = 0;
    		private double preProgress { get; set; } = 0;
    		private float py { get; set; }
    
    		public DAV_GRPylonPlugin() {
    			Enabled = true;
    		}
    
    		public override void Load(IController hud) {
    			base.Load(hud);
    
    			py = Hud.Window.Size.Height / 31;
    			Font_Used = Hud.Render.CreateFont("arial", 7, 255, 170, 170, 170, false, false, 160, 0, 0, 0, true);
    			Font_SameLvl = Hud.Render.CreateFont("arial", 7, 255, 250, 150, 250, false, false, 160, 0, 0, 0, true);
    			Font_DiffLvl = Hud.Render.CreateFont("arial", 7, 255, 255, 51, 51, false, false, 160, 0, 0, 0, true);
    
    			grPylon[0] = new DAV_PylonInfo("力量", Hud.Texture.GetTexture(2350065673), Hud.Sno.SnoPowers.Generic_PagesBuffDamage.Sno); // Power
    			grPylon[1] = new DAV_PylonInfo("速度", Hud.Texture.GetTexture(1927801803), Hud.Sno.SnoPowers.Generic_PagesBuffRunSpeed.Sno); // Speed
    			grPylon[2] = new DAV_PylonInfo("護盾", Hud.Texture.GetTexture(455040081) , Hud.Sno.SnoPowers.Generic_PagesBuffInvulnerable.Sno); // Shield
    			grPylon[3] = new DAV_PylonInfo("引能", Hud.Texture.GetTexture(3254056115), Hud.Sno.SnoPowers.Generic_PagesBuffInfiniteCasting.Sno); // Channeling
    			grPylon[4] = new DAV_PylonInfo("幻雷", Hud.Texture.GetTexture(1751750314), Hud.Sno.SnoPowers.Generic_PagesBuffElectrifiedTieredRift.Sno); // Condit
    
    			PossiblePylonDecorator_low = new WorldDecoratorCollection(
    				new MapShapeDecorator(Hud) {
    					Brush = Hud.Render.CreateBrush(192, 255, 55, 55, 3),
    					ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
    					Radius = 5.0f,
    					ShapePainter = new CircleShapePainter(Hud),
    				},
    				new MapLabelDecorator(Hud) {
    					LabelFont = Hud.Render.CreateFont("tahoma", 6f, 192, 255, 55, 55, false, false, 128, 0, 0, 0, true),
    					RadiusOffset = 5.0f,
    				}
    			);
    			
    			PossiblePylonDecorator_middle = new WorldDecoratorCollection(
    				new MapShapeDecorator(Hud) {
    					Brush = Hud.Render.CreateBrush(192, 255, 255, 55, 3),
    					ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
    					Radius = 5.0f,
    					ShapePainter = new CircleShapePainter(Hud),
    				},
    				new MapLabelDecorator(Hud) {
    					LabelFont = Hud.Render.CreateFont("tahoma", 6f, 192, 255, 255, 55, false, false, 128, 0, 0, 0, true),
    					RadiusOffset = 5.0f,
    				}
    			);
    			
    			PossiblePylonDecorator_high = new WorldDecoratorCollection(
    				new MapShapeDecorator(Hud) {
    					Brush = Hud.Render.CreateBrush(192, 55, 255, 55, 3),
    					ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
    					Radius = 5.0f,
    					ShapePainter = new CircleShapePainter(Hud),
    				},
    				new MapLabelDecorator(Hud) {
    					LabelFont = Hud.Render.CreateFont("tahoma", 6f, 192, 55, 255, 55, false, false, 128, 0, 0, 0, true),
    					RadiusOffset = 5.0f,
    				}
    			);
    		}
    
    		public void PaintWorld(WorldLayer layer) {
    			if (Hud.Game.SpecialArea != SpecialArea.GreaterRift) return;
    
    			var percent = Hud.Game.RiftPercentage;
    			if (percent <= 0) {
    				if (!inGR) {
    					PylonClear();
    					inGR = true;
    					return;
    				}
    			}
    			else inGR = false;
    
    			var ui = Hud.Render.GreaterRiftBarUiElement;
    			if (!ui.Visible) return;
    
    			foreach (var actor in Hud.Game.Shrines) {
    				var powerRank = -1;
    				switch (actor.SnoActor.Sno) {
    					case ActorSnoEnum._x1_lr_shrine_damage : powerRank = 0; break;
    					case ActorSnoEnum._x1_lr_shrine_run_speed : powerRank = 1; break;
    					case ActorSnoEnum._x1_lr_shrine_invulnerable : powerRank = 2; break;
    					case ActorSnoEnum._x1_lr_shrine_infinite_casting : powerRank = 3; break;
    					case ActorSnoEnum._x1_lr_shrine_electrified_tieredrift : powerRank = 4; break;
    				}
    				if (powerRank == -1) continue;
    
    				if (actor.IsDisabled || actor.IsOperated) {
    					if (grPylon[powerRank].Used(string.IsNullOrEmpty(message_floor) ? Hud.Game.Me.SnoArea.NameEnglish : Hud.Game.Me.SnoArea.NameEnglish.Replace("Rift Level", message_floor), percent, PylonNum, preProgress))
    						PylonAdd(percent);
    				}
    				else if (grPylon[powerRank].Add(string.IsNullOrEmpty(message_floor) ? Hud.Game.Me.SnoArea.NameEnglish : Hud.Game.Me.SnoArea.NameEnglish.Replace("Rift Level", message_floor), percent, PylonNum, preProgress))
    					PylonAdd(percent);
    			}
    
    			for (var i = 0; i < 5; i++) {
    				if (grPylon[i].state == 2) continue;
    				if (Hud.Game.Players.Any(y => y.Powers.BuffIsActive(grPylon[i].sno, 0)))
    					if (grPylon[i].Used(string.IsNullOrEmpty(message_floor) ? Hud.Game.Me.SnoArea.NameEnglish : Hud.Game.Me.SnoArea.NameEnglish.Replace("Rift Level", message_floor), percent, PylonNum, preProgress))
    						PylonAdd(percent);
    			}
    
    			var uiRect = ui.Rectangle;
    			for (var j = 0; j < 5; j++) {
    				if (grPylon[j].state == 0) continue;
    
    				var pylonFont = grPylon[j].state == 2 ? Font_Used : (grPylon[j].area == Hud.Game.Me.SnoArea.NameEnglish ? Font_SameLvl : Font_DiffLvl);
    				var layout = pylonFont.GetTextLayout(grPylon[j].getInfo());
    				var size = layout.Metrics.Height;
    				var yref = uiRect.Bottom + py + grPylon[j].rank*size;
    				grPylon[j].buffIcon.Draw(uiRect.Left, yref, size, size);
    				pylonFont.DrawText(layout, uiRect.Left + 1.5f * size, yref);
    
    				size = uiRect.Height / 2;
    				var xref = uiRect.Left + (float)(grPylon[j].progress1) * uiRect.Width / 100;
    				if (grPylon[j].rank == 1 || grPylon[j].rank == 3)
    					yref = uiRect.Top + size;
    				else yref = uiRect.Top;
    				grPylon[j].buffIcon.Draw(xref - size, yref, size, size);
    			}
    
    			if (PylonNum < 4 && percent < 100) {
    				var pylonChance = Math.Min((percent - preProgress) * chanceMultiplier, 100d);
    				var layout = Font_SameLvl.GetTextLayout(message_percent + " : " + (percent - preProgress).ToString("F1") + "% (" + message_pylonChance + " : " + pylonChance.ToString("F1") + "%)");
    				Font_SameLvl.DrawText(layout, uiRect.Left + (uiRect.Width - layout.Metrics.Width) / 2 , uiRect.Bottom + uiRect.Height * 0.2f);
    
    				var PossibleRiftPylonDecorator = pylonChance < pylonChanceLow ? PossiblePylonDecorator_low : (pylonChance < pylonChanceHigh ? PossiblePylonDecorator_middle : PossiblePylonDecorator_high);
    				var riftPylonSpawnPoints = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._markerlocation_tieredriftpylon);
    				foreach (var actor in riftPylonSpawnPoints)
    					PossibleRiftPylonDecorator.Paint(layer, actor, actor.FloorCoordinate, PossiblePylonMessage);
    			}
    		}
    
    		public void PylonClear() {
    			PylonNum = 0;
    			preProgress = 0;
    			for (var i = 0; i < 5; i++)
    				grPylon[i].Clear();
    		}
    
    		public void PylonAdd(double curProgress) {
    			PylonNum++;
    			preProgress = curProgress;
    		}
    	}
    
    	public class DAV_PylonInfo {
    		public string name { get; set; }
    		public uint sno { get; set; }
    		public int state { get; set; } // 0 no pylon, 1 not used, 2 used
    		public int rank { get; set; }
    		public string area { get; set; }
    		public double progress1 { get; set; }
    		public double progress2 { get; set; }
    		public ITexture buffIcon { get; set; }
    
    		public DAV_PylonInfo(string desc, ITexture Icon, uint actorSno) {
    			name = desc;
    			sno = actorSno;
    			buffIcon = Icon;
    			state = 0;
    		}
    
    		public bool Add(string grLvl, double curProgress, int numPylon, double lastProgress) {
    			area = grLvl;
    			if (state > 0) return false;
    
    			state = 1;
    			rank = numPylon;
    			progress1 = curProgress;
    			progress2 = lastProgress;
    			return true;
    		}
    
    		public bool Used(string grLvl, double curProgress, int numPylon, double lastProgress) {
    			if (state == 2) return false;
    
    			area = grLvl;
    			if (state == 0) {
    				rank = numPylon;
    
    				progress1 = curProgress;
    				progress2 = lastProgress;
    				state = 2;
    				return true;
    			}
    			state = 2;
    			return false;
    		}
    
    		public void Clear() { state = 0; }
    
    		public string getInfo() {
    			if (state == 0) return "";
    
    			var message = progress1.ToString("F1") + "%\t" + name + "\t" + area;
    			if (rank > 0)
    				message += "\t[+" + (progress1 - progress2).ToString("F1") + "%]";
    
    			return message;
    		}
    	}
    }
    Last edited by iThinkiWin; 10-03-2019 at 10:31 AM.

    [INTERNATIONAL] GR Pylon Marker &amp; Chance
  2. Thanks aaa111952 (1 members gave Thanks to iThinkiWin for this useful post)
  3. #17
    RNN's Avatar Legendary
    Reputation
    813
    Join Date
    Sep 2018
    Posts
    1,056
    Thanks G/R
    104/776
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Alternative

    Replace this Line:

    Code:
    	var message = progress1.ToString("F1") + "%\t" + name + "\t" + area;
    for this one

    Code:
    	var message = progress1.ToString("F1") + "%\t" + name + "\t" + "Level" + area.Substring(area.LastIndexOf(" "));
    and you change "Level" for whatever you want

  4. #18
    RNN's Avatar Legendary
    Reputation
    813
    Join Date
    Sep 2018
    Posts
    1,056
    Thanks G/R
    104/776
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    The problem is that Hud.Game.Me.SnoArea.NameEnglish they don't always match for all languages (I don't know the reason) . If TH is set to Korean, return this : [TEMP] Loot Run Level xx.
    My previous code should work

  5. #19
    ArnesMeyer's Avatar Member
    Reputation
    1
    Join Date
    May 2019
    Posts
    17
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    great job tnx

  6. #20
    franehr's Avatar Member
    Reputation
    6
    Join Date
    Oct 2017
    Posts
    82
    Thanks G/R
    34/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats some nice monster counter there on the same photo that shows pylon marker... how to get it ?

  7. #21
    somanoske's Avatar Member
    Reputation
    7
    Join Date
    Aug 2017
    Posts
    32
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, ty for your work, how i can move this description, i want to go down ^^
    pylon03.jpg
    Ty for answer

  8. #22
    s4000's Avatar Contributor
    Reputation
    285
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/272
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by somanoske View Post
    Hi, ty for your work, how i can move this description, i want to go down ^^
    pylon03.jpg
    Ty for answer
    no idea what is your question

  9. #23
    somanoske's Avatar Member
    Reputation
    7
    Join Date
    Aug 2017
    Posts
    32
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would like to move the description icon on down like my screen with blue arrow.

  10. #24
    s4000's Avatar Contributor
    Reputation
    285
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/272
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by somanoske View Post
    I would like to move the description icon on down like my screen with blue arrow.
    the picture is from my screenshot, can you provide yours?

  11. #25
    RNN's Avatar Legendary
    Reputation
    813
    Join Date
    Sep 2018
    Posts
    1,056
    Thanks G/R
    104/776
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by somanoske View Post
    I would like to move the description icon on down like my screen with blue arrow.
    Line 36
    Code:
    	py = Hud.Window.Size.Height / 31;
    Change that value 31 to a lower one, for example 4. Adjust with decimals, ex 3.9f

    (Your blue arrows are somewhat camouflaged)

  12. #26
    somanoske's Avatar Member
    Reputation
    7
    Join Date
    Aug 2017
    Posts
    32
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty very much it's work great

  13. #27
    Mundzso's Avatar Member
    Reputation
    14
    Join Date
    Feb 2018
    Posts
    84
    Thanks G/R
    28/6
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    OFF question:
    which plugin shows the "no generator" alert ? on the 1. picture, if the DH does not have focus/restrain buff
    thanks

  14. #28
    s4000's Avatar Contributor
    Reputation
    285
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/272
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mundzso View Post
    OFF question:
    which plugin shows the "no generator" alert ? on the 1. picture, if the DH does not have focus/restrain buff
    thanks
    https://www.ownedcore.com/forums/dia...f-warming.html ([ENG] Missing Power Buff Warming)

  15. Thanks Mundzso (1 members gave Thanks to s4000 for this useful post)
  16. #29
    s4000's Avatar Contributor
    Reputation
    285
    Join Date
    Oct 2018
    Posts
    489
    Thanks G/R
    18/272
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    update 1.1
    - chance for next pylon formula update (can be customized)

  17. #30
    perzeus's Avatar Member
    Reputation
    1
    Join Date
    May 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello times a question how can I change the position because I do not see it through another plugin spreaktool

    Attachment 70319

    hallo mal ne frage wie kann ich die position ändern da ich es durcg ein anders plugin nicht sehe

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. [Request] can anybody helps to update the pylon marker plugin to V9?
    By greetree in forum TurboHUD Support
    Replies: 3
    Last Post: 06-02-2019, 07:49 AM
  2. [request] Greater Rift pylon spawn chance % plug-in
    By flyingst in forum TurboHUD Discussions
    Replies: 13
    Last Post: 09-20-2018, 09:08 AM
  3. Replies: 1
    Last Post: 08-20-2018, 04:40 AM
  4. Chances of getting caught?
    By 1ns4n1ty in forum World of Warcraft General
    Replies: 7
    Last Post: 08-20-2006, 11:52 AM
  5. President Bush, CAUGHT SWEARING at international meeting
    By mantalcore in forum Community Chat
    Replies: 15
    Last Post: 08-14-2006, 09:41 AM
All times are GMT -5. The time now is 06:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search