Would you consider my request and answer the question?
1. Is there anyway to have a popup notification before 4 secs of my own CoE?
2. What is the number "0", "1", "2" right after buff number in BuffAppliedPopup.cs?
// BuffsToWatch.Add(new Buff(246562, 1, "Flying Dragon", "", "Buff activated", 3000));
Thanks in advance.
How about a popup for when you Proc (GTFO)
Hey together
First, many thanks for this awesome plugin!
I'm trying to extend the functionality to show some more Popups and even color coded ones depending on event (Goblin appeared: purple, Ancient dropped: yellow, Primal dropped: red, buff applied: green a.s.o.)
Now I got stuck with the ActorAppearedPopup...
I'm trying to let a popup appear when there are open Portals like "Whimsydale", Vault or such.
I got managed to have the popup to appear, but it will appear infinite times while the portal is in range (memory).
How can I achieve that those popups just appear once? Same behaviour btw for bringing up a popup when a Horadric Cache dropped on Floor. Just after pickung it up, the popup stopped spamming.
My code atm (ActorAppearedPopup.cs):
Code:using System.Collections.Generic; using System.Linq; using Turbo.Plugins.Default; namespace Turbo.Plugins.Prrovoss.Popups { public class ActorAppearedPopup : BasePlugin, IInGameWorldPainter { public class MyActor { public List<IWorldCoordinate> FloorCoords { get; set; } public uint Sno { get; set; } public string Name { get; set; } public string Hint { get; set; } public string Title { get; set; } public int Duration { get; set; } public string Type { get; set; } public MyActor(uint sno, string name, string hint, string title, int duration, string type) { FloorCoords = new List<IWorldCoordinate>(); this.Sno = sno; this.Hint = hint; this.Name = name; this.Title = title; this.Duration = duration; this.Type = type; } } public List<MyActor> ActorsToWatch { get; set; } public override void Load(IController hud) { base.Load(hud); ActorsToWatch = new List<MyActor>(); /* _actorSnoList.Add(207706); // Mysterious Chest _actorSnoList.Add(451035); // Mysterious Chest _actorSnoList.Add(451028); // Mysterious Chest _actorSnoList.Add(451030); // Mysterious Chest _actorSnoList.Add(451047); // Mysterious Chest _actorSnoList.Add(451029); // Mysterious Chest _actorSnoList.Add(451038); // Mysterious Chest _actorSnoList.Add(451034); // Mysterious Chest _actorSnoList.Add(451033); // Mysterious Chest _actorSnoList.Add(451027); // Mysterious Chest _actorSnoList.Add(451039); // Mysterious Barrel _actorSnoList.Add(211861); // Pinata _actorSnoList.Add(457828); // Wirt's Stash _actorSnoList.Add(225782); // Bishibosh's Remains _actorSnoList.Add(173325); // Anvil of Fury _actorSnoList.Add(113845); // Fallen Shrine */ // // Pylons // Shield Pylon ActorsToWatch.Add(new MyActor(330698, "Shield Pylon", "", "Appeared", 5000, "Pylon")); // Channeling Pylon ActorsToWatch.Add(new MyActor(330697, "Channeling Pylon", "", "Appeared", 5000, "Pylon")); // Power Pylon ActorsToWatch.Add(new MyActor(330695, "Power Pylon", "", "Appeared", 5000, "Pylon")); // Conduit Pylon ActorsToWatch.Add(new MyActor(398654, "Conduit Pylon", "", "Appeared", 5000, "Pylon")); // // Portals // Whimsydale ActorsToWatch.Add(new MyActor(405590, "Whimsydale", "", "Portal open", 5000, "Portal")); // Not a Cow Level ActorsToWatch.Add(new MyActor(434659, "Not a Cow Level", "", "Portal open", 5000, "Portal")); // The Vault //ActorsToWatch.Add(new MyActor(XXXXXX, "The Vault", "", "Portal open", 5000, "Portal")); // Normal Rift ActorsToWatch.Add(new MyActor(345935, "Normal Rift", "", "Portal open", 5000, "Portal")); // Greater Rift ActorsToWatch.Add(new MyActor(396751, "Greater Rift", "", "Portal open", 5000, "Portal")); // // Specials // Pinata ActorsToWatch.Add(new MyActor(457175, "Pinata", "", "Appeared", 5000, "Special")); } private bool EqualCoordinates(IWorldCoordinate a, IWorldCoordinate b) { return ((a.X == b.X) && (a.Y == b.Y) && (a.Z==b.Z)); } public void Add(uint sno, string name, string hint, string title, int duration, string type) { ActorsToWatch.Add(new MyActor(sno, name, hint, title, duration, type)); } public void PaintWorld(WorldLayer layer) { foreach (MyActor actor in ActorsToWatch) { var candidates = Hud.Game.Actors.Where(a => a.SnoActor.Sno == actor.Sno && !(actor.FloorCoords.Any(c => EqualCoordinates(c, a.FloorCoordinate)))); if (candidates.Count() != 0) { foreach (IActor candidate in candidates) { Hud.RunOnPlugin<PopupNotificationsPlugin>(plugin => { plugin.Show(actor.Name, actor.Title, actor.Duration, actor.Hint, actor.Type); }); if (candidate.IsClickable) { actor.FloorCoords.Add(candidate.FloorCoordinate); } } } } } public ActorAppearedPopup() { Enabled = true; } } }
Thanks in advance for your help!
Cheers
to answer your post, read the first post of the thread. ive reworked the popups. Note that LegendaryDroppedPopup now is called ItemDroppedPopup, so you have to create a new file and delete the old one. Or overwrite it..
- the whole customization now takes place in your main plugin, so you dont have to redo all your customization when i update the plugin.
- ive also added a check that prevents the popups from constantly popping up when a portal is open. there is a limitation: when you leave the scene the portal is wiped from memory. if you reenter it, the portal appears again and to thud it looks like its a new portal. there is no way to work around that as fair as i could see.
- ive added custom decorators. so now its possible to have different looking popups for ancients, primals, rifts, grifts, activated buffs, whatever. see the example customization of the ItemDroppedPopup to get an idea on how to use them
Many thanks Prrovoss! I'll have a dive into that on weekend (will be a bit more work on my side whilst I've creted an own plugin which includes all the plugins I find useful - I borrowed much plugin codes from diffrerent plugins out there and added a lot of customization to them ;-). And for everyone now wants to get this plugin: NO, I won't share this plugin, whilst most of the code isn't mine and it's on many places hard customized for my own needs ;-) )
Last edited by wickedazz; 05-15-2018 at 12:48 PM.
Hi prrovoss, do you know what I'm doing wrong with this plugin?
I'm trying to to what wickeddazz did for the cursed peat bounty, but as a generic bounty plugin using your popup notifications, but it seems I'm getting an infinite loop. Whenever one of the bounties is available, 13 popups appear for it and never disappear.
Hi prrovoss, I have a question.
Is it possible to up the range of the popup when a legendary drop ?
I mean, when I am at the end of the room and someone open a chest at the start so I don't have to look everysingle time on the map.
well, you have to keep a list of bounties that you have already created a popup for. check my other example plugins, in most of them you will find some kind of list that holds all the actors, monsters etc that have already been "shown". your plugin will be scheduled (call to the PaintTopInGame function) about 60 times a second. and every time it is scheduled, it will find a the bounty you are looking for (if its present in the game). i dont know if its possible to determine a unique bounty... maybe try the Quest.CreatedOn property. If this is the ticks since thuds startup, this will suffice to uniquely identify a bounty i guess.
nope, there is no way to do that. thud provides everything that is present in the memory of the d3 process. so if it doesnt inform my plugin about a new item, it just doesnt know about this item.
Thanks a lot prrovoss. I fixed it here by adding a "Displayed" variable to the bounties.
The list can be customized with:
Code:Hud.RunOnPlugin<Prrovoss.Popups.BountyAppearedPopup>(plugin => { //sno, name, hint, title, duration (in ms), custom decorator (ignore if not needed) plugin.Add(375278, "The Cursed Peat", "", "Bounty available", 5000); //plugin.Add(347095, "Kill The Dataminer", "", "Bounty available", 5000); //plugin.Add(361354, "Kill Captain Clegg", "", "Bounty available", 5000); //plugin.Add(361352, "Kill Radnoj", "", "Bounty available", 5000); //plugin.Add(345517, "Clear The Crypt Of The Ancients", "", "Bounty available", 5000); //plugin.Add(345520, "Clear Warrior's Rest", "", "Bounty available", 5000); //plugin.Add(345500, "Carrion Farm", "", "Bounty available", 5000); //plugin.Add(345505, "Eternal War", "", "Bounty available", 5000); //plugin.Add(369944, "Last Stand Of The Ancients", "", "Bounty available", 5000); //plugin.Add(345502, "The Cursed Cellar", "", "Bounty available", 5000); });
Last edited by johnbl; 07-01-2018 at 05:14 PM.
Hi all, Sorry to ask but where can i download the file?
i download the file create a new folder but still the plugin don't work, any idea how to fix this?