[v9] Urshi Gem Upgrade reminder menu

User Tag List

Results 1 to 13 of 13
  1. #1
    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)

    [v9] Urshi Gem Upgrade reminder

    This plugin show who has not upgrade the gems yet after the GR

    Urshi.png

    save in plugins\DAV

    [C#] DAV_UrshiPlugin - Pastebin.com

    [v9] Urshi Gem Upgrade reminder
  2. Thanks RNN, BeeAntOS, mois, AffaBanana, (Sarge), menl, HoaryWitch, 731113, DoctoreGDL, Skeeh, QianLei (11 members gave Thanks to s4000 for this useful post)
  3. #2
    RNN's Avatar Legendary
    Reputation
    810
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/773
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Interesting plugin

    One suggestion, instead of if (Hud.Game.SpecialArea == SpecialArea.GreaterRift) return; you could use:

    Code:
    	using System.Linq;
    	using Turbo.Plugins.Default;
    	....
    	private bool Urshi  { get; set; } = false;
    	...
    	public void AfterCollect()  
    	{
    		Urshi = Hud.Game.Quests.Any(q => (q.SnoQuest.Sno == 337492) && (q.QuestStepId == 34)) ;
    	}
    	public void PaintTopInGame(ClipState clipState) 
    	{
    		if  (Urshi)
    		{
    			....
    		}
    	}
    and with this change the if ( outMSG != "") would not matter much if you remove it
    Last edited by RNN; 01-14-2020 at 12:35 PM.

  4. Thanks BeeAntOS (1 members gave Thanks to RNN for this useful post)
  5. #3
    RNN's Avatar Legendary
    Reputation
    810
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/773
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I complicated it too much, it was really only necessary to change

    Code:
    	if (Hud.Game.SpecialArea == SpecialArea.GreaterRift) return;
    to

    Code:
    	if (!Hud.Game.Quests.Any(q => (q.SnoQuest.Sno == 337492) && (q.QuestStepId == 34))) return;
    (and the check if ( outMSG != "") could be removed)
    Last edited by RNN; 01-14-2020 at 04:37 PM.

  6. #4
    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)
    don't get much knowledge on the Quests variable in hud,

    What is the different between GreaterNephalemRift_382695 & NephalemRift_337492(sno = 337492 ?) ?

    & any advantage using that than checking the special area??

    & don't remove the check if ( outMSG != "") , otherwise the Icon will always paint on screen

  7. #5
    RNN's Avatar Legendary
    Reputation
    810
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/773
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I don't know why there are 2 sno, maybe it corresponds to obsolete code, 337492 can be used to detect if a GreaterRift or Nephalem Rift have been started

    if (Hud.Game.SpecialArea == SpecialArea.GreaterRift) Initially it indicated that a GR had been initiated even if your character was not on some of the GR maps, this was subsequently changed. It has a behavior that may seem strange: when the Boss dies, Hud.Game.SpecialArea = SpecialArea.None, this is because it really depends on the visibility of the progress bar: the consequence is that if the user hides that bar some plugins may fail if this is not taken into account,that's why I don't like to use it. In addition, you are processing the For and IF when is not necessary, for example when you are in a Nephalem Rift.

    I suggested the code because it seems more intuitive, at the user level it is possible that no changes are detected.
    It seems to me a better option to check if Urshi is present, and this is achieved with the code I wrote before. Only in this case could you remove the if (outMSG! = "") Check. When all the players have upgraded the gems, for a few milliseconds, the could be shown the icon but it is imperceptible.


    Greater Rift
    QuestStepId 13 -> progression < 100
    QuestStepId 16 -> Boss Alive (progression = 100)
    QuestStepId 34 -> Rift Completed on schedule and Urshi Appear (Boss Dead)
    QuestStepId 46 -> Orek Wait to talk ( Boss Dead, Ushi Disappears if GR completed on time, or remains an instant if it was not completed. )
    QuestStepId 5 --> He talked with Orek. It lasts a very short moment and the GR closes.

    Nephalem Rift
    QuestStepId 1 --> progressión < 100
    QuestStepId 3 --> Boss Alive (progression = 100)
    QuestStepId 10 -> Orek Wait to talk (Boss Dead)
    QuestStepId 5 --> He talked with Orek. The 30 sec countdown begins

    I have a doubt, player.GetAttributeValueAsInt (xxxx, 2147483647, 0) gives a real value even if the player is not a valid actor? I'm going to testing it in a group .... :
    if the player stays at the door does not appear on the list. And if we are in the town while the other player upgrade the gems, the data is not updated until he returns to the town.
    Last edited by RNN; 01-15-2020 at 11:00 AM.

  8. Thanks Miquiqui (1 members gave Thanks to RNN for this useful post)
  9. #6
    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)
    I will test more using the quest stage,

    for the GetAttributeValueAsInt, it will return 0 (the 3rd input) when no such attribute,
    And of course all actor need to be "close" in order to get the updated value.

  10. #7
    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)
    from Hud

    Sno Code NameEnglish Id SplashEnglish
    337492 X1_LR_DungeonFinder Nephalem Rift 1 Kill the Nephalem Rift Guardian's minions
    337492 X1_LR_DungeonFinder Nephalem Rift 3 Kill the Nephalem Rift Guardian
    337492 X1_LR_DungeonFinder Nephalem Rift 10 Speak to Orek in town
    337492 X1_LR_DungeonFinder Nephalem Rift 13 Kill the Rift Guardian's minions
    337492 X1_LR_DungeonFinder Nephalem Rift 16 Kill the Rift Guardian
    337492 X1_LR_DungeonFinder Nephalem Rift 34 Speak to Urshi
    337492 X1_LR_DungeonFinder Nephalem Rift 46 Speak to Orek in town
    382695 X1_LR_TieredRift Greater Nephalem Rift 1 Kill the Nephalem Rift Guardian's minions
    382695 X1_LR_TieredRift Greater Nephalem Rift 3 Kill the Nephalem Rift Guardian
    382695 X1_LR_TieredRift Greater Nephalem Rift 10 Speak to Orek in town

  11. #8
    RNN's Avatar Legendary
    Reputation
    810
    Join Date
    Sep 2018
    Posts
    1,051
    Thanks G/R
    103/773
    Trade Feedback
    0 (0%)
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    I have not found any Quest with sno 382695
    I have observed that SpecialArea works in NR as I would expect, the problem is that its behavior is different in GR (depends of the progress bar)
    This is one of several files that I use to get information: Plugins\RNN\Debugme.cs (Shift + End to activate)
    Show this information: https://i.imgur.com/XHJWkEF.png
    Last edited by RNN; 01-16-2020 at 12:18 PM.

  12. #9
    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)
    Its on the Hud Sno database, not sure if that actually exists in game or just an outdated value like GreaterRiftTrial_405695

  13. #10
    HiFive's Avatar Member
    Reputation
    2
    Join Date
    Aug 2018
    Posts
    23
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this plugin is so GG ty.

    can you make a plugin that shows a percent or wait timer on top of the monsters based on immunity to crowd control effects.

    for example a pull barb is trying to pull a yellow elite to the next set up but you have to wait a few seconds so he can be pulled again would be nice to know the exact time he can be pulled.

    can you make a plugin that would show like a timer on top of their heads that starts at 0 and goes to 10 when it is at 10 they cant be pulled but when they are at 5 they can be or something like that.

  14. Thanks Shawmeck (1 members gave Thanks to HiFive for this useful post)
  15. #11
    LazyDruid's Avatar Member
    Reputation
    3
    Join Date
    Sep 2019
    Posts
    53
    Thanks G/R
    4/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I played around to make the readout a bit easier.. leading space between the image icon and the number of remaining attempts ( it was scrunched up to the icon image )..
    and wrapping the player name in ( ).

    I also ( with help from RNN on Texture info ) changed the icon to be the purple Urushi GEM icon on the minimap.
    There is a commented out alternate image of a lady with a crown included for anyone who wants to try that one.

    Also.. I moved the entire position closer to the "Speak to Urshi and claim your reward" text on screen.... but making sure it is not overlapped when inventory screen is opened.

    Text is now neon green instead of a darker red... to make it more visible.



    Code:
    using System;
    using System.Linq;
    using Turbo.Plugins.Default;
    
    namespace Turbo.Plugins.DAV
    {
    	public class DAV_UrshiPlugin : BasePlugin, IInGameTopPainter {
    		public float xPos { get; set; }
    		public float yPos { get; set; }
    		public float iconSize { get; set; }
    		public bool showCount { get; set; }
    		public IFont textFont { get; set; }
    		public ITexture gemIcon { get; set; }
    
    		public DAV_UrshiPlugin() {
    			Enabled = true;
    		}
    
    		public override void Load(IController hud) {
    			base.Load(hud);
    
    			xPos = Hud.Window.Size.Width * 655 / 1080;
    			yPos = Hud.Window.Size.Height * 425 / 1080;
    			iconSize = 60
    			showCount = true;
    			textFont = Hud.Render.CreateFont("arial", 9, 255, 51, 255, 51, true, true, true);
    
    		        gemIcon = Hud.Texture.GetTexture(525359980); // -- Purple Gem Minimap Icon
    		        // gemIcon = Hud.Texture.GetTexture(3435159457); // -- Original
    		        // gemIcon = Hud.Texture.GetTexture(228371303); // -- Queen with crown Icon
    		}
    
    		public void PaintTopInGame(ClipState clipState) {
    			if (clipState != ClipState.BeforeClip) return;
    			if (!Hud.Game.Quests.Any(q => (q.SnoQuest.Sno == 337492) && (q.QuestStepId == 34))) return;
    
    			var outMSG = "";
    			foreach (var player in Hud.Game.Players) {
    			var reminder = player.GetAttributeValueAsInt(Hud.Sno.Attributes.Jewel_Upgrades_Bonus, 2147483647, 0) + player.GetAttributeValueAsInt(Hud.Sno.Attributes.Jewel_Upgrades_Max, 2147483647, 0) - player.GetAttributeValueAsInt(Hud.Sno.Attributes.Jewel_Upgrades_Used, 2147483647, 0);
    					
    				if (reminder > 0)
    				{			
    				    outMSG += " " + (showCount ? (reminder.ToString() + " x ") : "") + "(" + player.BattleTagAbovePortrait + ")\n";				
    				}                     
                                            
    			}
    
    			gemIcon?.Draw(xPos, yPos, iconSize, iconSize);
    			textFont.DrawText(outMSG, xPos + iconSize, yPos);
    		}
    	}
    }


    Thank you RNN ... for locating the GetTexture code for the alternate icons.
    Last edited by LazyDruid; 12-05-2020 at 08:44 PM.

  16. #12
    Glex's Avatar Member
    Reputation
    4
    Join Date
    Apr 2017
    Posts
    37
    Thanks G/R
    2/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    can you this "Icon" Movable?

    Movable plugins system

    Please

    Last edited by Glex; 02-24-2021 at 04:08 AM.

  17. #13
    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 Glex View Post
    Hello

    can you this "Icon" Movable?

    Movable plugins system

    Please

    No, you can modify yourself

  18. Thanks alternate_ (1 members gave Thanks to s4000 for this useful post)

Similar Threads

  1. [Selling] [US] Season 6 Powerleveling, Gem Upgrades, Unidentified Legendaries and Set Items!
    By GamingServices in forum Diablo 3 Buy Sell Trade
    Replies: 14
    Last Post: 05-06-2016, 09:49 AM
  2. [Selling] ▓ ▓ ▓ US Seasons & NS #1 Ranked Team - Gem Upgrades Up to 50 & Loot Service ▓ ▓ ▓
    By valarmorgulis in forum Diablo 3 Buy Sell Trade
    Replies: 0
    Last Post: 10-20-2014, 05:40 PM
  3. Legendary gem upgrade chances from Geater Rifts
    By Drogant in forum Diablo 3 Guides
    Replies: 2
    Last Post: 10-16-2014, 09:04 AM
  4. Replies: 0
    Last Post: 09-26-2014, 03:17 AM
  5. [Selling] ▓ ▓ ▓ US NS #1 Ranked Team - Gem Upgrade Service: 0-45 ▓ ▓ ▓
    By valarmorgulis in forum Diablo 3 Buy Sell Trade
    Replies: 0
    Last Post: 09-23-2014, 11:18 PM
All times are GMT -5. The time now is 02:33 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