Can anyone make this useful plugin (pylon % when detected and floor) make work in 9.0 menu

User Tag List

Results 1 to 3 of 3
  1. #1
    gandalf12's Avatar Member
    Reputation
    2
    Join Date
    Nov 2018
    Posts
    22
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can anyone make this useful plugin (pylon % when detected and floor) make work in 9.0

    As mentioned above this plugin shows when a pylon in percentage of rift progression is detected and what kind of pylon and in addition the floor number where it is detected.
    This is a great help because as a rule of thumb every 20% of rift progression there is a great chance to detect a pylon.
    This plugin helps alot to get a good guess when to expect the next pylon.

    This is the exception:
    Plugins\glq\glq_greaterriftpylonmarkerwfloorsplugin.cs(53,34) : error CS0266: Cannot implicitly convert type 'int' to 'Turbo.Plugins.ActorSnoEnum'. An explicit conversion exists (are you missing a cast?)

    And here is the code. It is not a plugin itself from the plugin section . I take it from a discussion elsewhere in the forum.
    Code:
    //plugin modified . Although it keeps the name GLQ, it is not the original, modified enough to adapt it to what I need
    
    using System;
    using System.Globalization;
    using System.Collections.Generic;
    using System.Linq;
    using Turbo.Plugins.Default;
    
    namespace Turbo.Plugins.glq
    {
    
        public class GLQ_GreaterRiftPylonMarkerPlugin : BasePlugin, IInGameTopPainter
        {
            public IBrush ProgressionLineBrush { get; set; }
            public Dictionary<string, Tuple<double,string>> ProgressionofShrines { get; set; }
            public IFont GreaterRiftFont { get; set; }
            public IFont GreaterRiftFont2 { get; set; }
    
            public GLQ_GreaterRiftPylonMarkerPlugin()
            {
                Enabled = true;
            }
    
            public override void Load(IController hud)
            {
                base.Load(hud);
                GreaterRiftFont = Hud.Render.CreateFont("tahoma", 7, 255, 215, 110, 215, false, false, 160, 0, 0, 0, true);
                GreaterRiftFont2 = Hud.Render.CreateFont("tahoma", 7, 255, 250, 150, 250, false, false, 160, 0, 0, 0, true);
                ProgressionLineBrush = Hud.Render.CreateBrush(255, 125, 175, 240, 1f);
                ProgressionofShrines = new Dictionary<string, Tuple<double,string>>();
            }
    
            public void PaintTopInGame(ClipState clipState)
            {
                if (clipState != ClipState.BeforeClip) return;
    
                if (Hud.Game.SpecialArea == SpecialArea.GreaterRift)
                {
                    var percent = Hud.Game.RiftPercentage;
                    if (percent <= 0)  {
                        ProgressionofShrines.Clear();
                        return;
                    }
                    var ui = Hud.Render.GreaterRiftBarUiElement;
    
                    if (ui.Visible)  {
                        var uiRect = ui.Rectangle;               
                        var shrines = Hud.Game.Shrines;
                        Tuple<double,string> valuesOut; 
                        var poder = "";
                        foreach (var actor in shrines)  { 
                            switch (actor.SnoActor.Sno)   {                           
                                case 330695: poder = "Power";  break;
                                case 330696:
                                case 398654: poder = "Conduit";  break;
                                case 330697: poder = "Chann";  break;
                                case 330698: poder = "Shield";  break;
                                case 330699: poder = "Speed";  break;
                                default: poder = actor.SnoActor.Sno.ToString("F0");  break;
                            }
    // Para parchear que Hud.Game.Me.SnoArea.NameLocalized no se actualice inmediatamente al entrar en un mapa. Hay problemas si el pilón está cerca de la puerta
                            if  (ProgressionofShrines.TryGetValue(poder, out valuesOut)) {     
                                 if (valuesOut.Item2 != Hud.Game.Me.SnoArea.NameLocalized) { 
                                   Tuple<double,string> updateValues = new Tuple<double,string>(valuesOut.Item1, Hud.Game.Me.SnoArea.NameLocalized);
                                   ProgressionofShrines[poder] = updateValues;
                                }
                            }
                            else {
                                    Tuple<double,string> updateValues = new Tuple<double,string>(percent, Hud.Game.Me.SnoArea.NameLocalized);
                                    ProgressionofShrines.Add(poder, updateValues);
                            }
                            
                                      
                       }
    
                       var py = Hud.Window.Size.Height / 30 ; var anterior = 0d; var contador = 0; var text = "";
                       var ancho = (GreaterRiftFont.GetTextLayout("00,0%")).Metrics.Width ; var alto =  (GreaterRiftFont.GetTextLayout("00,0%")).Metrics.Height;
    		   Dictionary<string, Tuple<double,string>>.KeyCollection keyColl = ProgressionofShrines.Keys;
    
                       foreach (string s in keyColl)  { 
    //                        Tuple<double,string> valuesOut;
                            if  (ProgressionofShrines.TryGetValue(s, out valuesOut)) {
                                 contador += 1 ; 
                                
                                 double porcentaje = valuesOut.Item1; //porcentaje al que salio el pilon
                                 string piso = valuesOut.Item2.Replace("Rift ","");; //piso en el que salio el pilon
    
                                 var xPos = (float)( uiRect.Left + uiRect.Width / 100.0f * porcentaje);
                                
                                 ProgressionLineBrush.DrawLine(xPos, uiRect.Bottom, xPos, uiRect.Bottom + py, 0); 
                                 var PilonApilon = (contador > 1) ? (" [+" + (porcentaje - anterior).ToString("F0") + "%" + "]") : "";
                                 text = porcentaje.ToString("F1") + "%" + "\r\n" + s + "\r\n"+ piso + "\r\n" + PilonApilon  ;
                                 anterior = porcentaje;
                                 GreaterRiftFont.DrawText(text, xPos - ancho , uiRect.Bottom + py, true);
    
                                 if ( ( contador != 4) && (contador == ProgressionofShrines.Count) )  {
                                     var DesdePîlon = "(+" + (percent - porcentaje).ToString("F1") + "%" + ")";
                                     GreaterRiftFont2.DrawText(DesdePîlon, uiRect.Left + uiRect.Width /2 - GreaterRiftFont2.GetTextLayout(DesdePîlon).Metrics.Width / 2 , uiRect.Bottom + uiRect.Height * 0.2f, true);
                                     // --- Otra posible colocación del progreso ---
                                     //var progry = ui.Rectangle.Top - ui.Rectangle.Height * 0.7f - alto * 2;   
                                     //var progrx = (float)(ui.Rectangle.Left + ui.Rectangle.Width / 100.0f * percent) - ancho / 2;
                                     //GreaterRiftFont.DrawText(DesdePîlon, progrx, progry, true);
                                 }
    
                            }  
                       }
                    }
                }
            }
    
        }
    }

    Can anyone make this useful plugin (pylon % when detected and floor) make work in 9.0
  2. #2
    gandalf12's Avatar Member
    Reputation
    2
    Join Date
    Nov 2018
    Posts
    22
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok...
    after more research i found a working code.
    Here is the Link.
    [C#] GLQ_GreaterRiftPylonMarkerPlugin - Pastebin.com
    All credits and thanks to the genious who modified it and make it work in 9.0

  3. #3
    takayo72's Avatar Active Member
    Reputation
    17
    Join Date
    Jan 2018
    Posts
    203
    Thanks G/R
    43/15
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    anything popup and overlay on screen when a pylon is detected?

    I did try but nothing was shown

Similar Threads

  1. Can anyone make me sig and that other thing? :)
    By mchugh in forum Art & Graphic Design
    Replies: 7
    Last Post: 10-02-2007, 08:44 PM
  2. Can anyone decode this for me?
    By #ClumsyWizard in forum Community Chat
    Replies: 4
    Last Post: 05-12-2007, 09:00 PM
  3. Can anyone answer this please (GB players mainly)
    By Toldorn in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-11-2006, 07:45 PM
  4. Can anyone make a Mountain Climber hack for me for patch 1.9.0
    By Æiden in forum World of Warcraft General
    Replies: 6
    Last Post: 09-28-2006, 12:50 PM
All times are GMT -5. The time now is 11:38 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