Extend TLO Group to have Group.MinHP & Group.MinMana

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Extend TLO Group to have Group.MinHP & Group.MinMana

Post by dewey2461 » Sun Sep 25, 2016 1:58 am

Group.MinHP[HP,MinNumPlayers,FromWhere]

HP = 0-100 true if players hp < HP ( dead doesn't count )
MinNumPlayers = 1+ , how many do you need to count ? Default is 1
FromWhere = [ GROUP, XT , BCS , ALL ] Default is GROUP

Example:

/if (${Group.MinHP[40, 3]}) /cast "Some oh shit big group heal"
/if (${Group.MinHP[80, 3]}) /cast "Some small group heal"
/if (${Group.MinHP[60, 1, ALL]}) /cast "Single Target Big Heal"

Do the same for Mana ... Maybe it should be just ${Group.Min[...]} and have a What field.


Code: Soon to come ... (Maybe tonight)

PeteSampras
a snow griffon
a snow griffon
Posts: 322
Joined: Sat Dec 15, 2007 8:56 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by PeteSampras » Sun Sep 25, 2016 4:04 pm

I honestly dont know if it is in this vanilla compile, but i had already added a version of Group.MinHP and MinMana that returns spawntype to our compile a couple years ago and had posted the code on here for vanilla inclusion. So naming convention-wise, maybe call it something else.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by EqMule » Sun Sep 25, 2016 7:05 pm

I don't think it was ever added and when I finally had time to add it I couldn't find the post or something, so go for it Dewey I'll add it when you post it, if it's solid.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

desgn
a lesser mummy
a lesser mummy
Posts: 30
Joined: Mon Mar 18, 2013 9:10 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by desgn » Sun Sep 25, 2016 7:29 pm

I've been using these for my macros - not perfect but works for my group

Code: Select all

	case AvgHP:
		{
			Dest.DWord = 0;
			DWORD GroupCount = 0;
			LONG TotalHPPct = 0;

			LONG maxhp = GetMaxHPS();
			if (maxhp != 0)
			{
				TotalHPPct = GetCurHPS() * 100 / maxhp;
				GroupCount++;
			}

			for (i = 1; i < 6; i++)
			{
				if (pChar->pGroupInfo->pMember[i])
				{
					if (pChar->pGroupInfo->pMember[i]->pSpawn)
					{
						maxhp = pChar->pGroupInfo->pMember[i]->pSpawn->HPMax;
						if (maxhp != 0 && pChar->pGroupInfo->pMember[i]->pSpawn->StandState != STANDSTATE_DEAD)
						{
							TotalHPPct += pChar->pGroupInfo->pMember[i]->pSpawn->HPCurrent * 100 / maxhp;
							GroupCount++;
						}
					}
				}
			}

			Dest.DWord = TotalHPPct / GroupCount;
			Dest.Type = pIntType;
			return true;
		}

Code: Select all

	case LowestHP:
		{
			Dest.DWord = 0;
			LONG Lowest = 0;

			LONG maxhp = GetMaxHPS();
			if (maxhp != 0)
				Lowest = GetCurHPS() * 100 / maxhp;

			for (i = 1; i < 6; i++)
			{
				if (pChar->pGroupInfo->pMember[i])
					if (pChar->pGroupInfo->pMember[i]->pSpawn)
						if (pChar->pGroupInfo->pMember[i]->pSpawn->HPMax != 0 && pChar->pGroupInfo->pMember[i]->pSpawn->StandState!=STANDSTATE_DEAD)
							if ((pChar->pGroupInfo->pMember[i]->pSpawn->HPCurrent * 100 / pChar->pGroupInfo->pMember[i]->pSpawn->HPMax) < Lowest)
							{
								Lowest = pChar->pGroupInfo->pMember[i]->pSpawn->HPCurrent * 100 / pChar->pGroupInfo->pMember[i]->pSpawn->HPMax;
								Dest.DWord = i;
							}
			}

			Dest.Type = pGroupMemberType;
			return true;
		}

User avatar
MacQ
Macro Author
Macro Author
Posts: 674
Joined: Sat Apr 02, 2005 2:39 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by MacQ » Sun Sep 25, 2016 8:34 pm

Group.MinHP[HP,MinNumPlayers,FromWhere] seems like a pretty cool addition.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by dewey2461 » Mon Sep 26, 2016 8:52 pm

What I have in mind isnt' really just "group" its more a generic "find"

User avatar
MacQ
Macro Author
Macro Author
Posts: 674
Joined: Sat Apr 02, 2005 2:39 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by MacQ » Tue Sep 27, 2016 10:57 am

It all sounds pretty cool dewey2461, I'm looking forward to your creation.

Currently I scan my group's HP with a macro loop. It has worked well for years, but your plugin extension defiantly caught my attention as I assumed would be more efficient.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by dewey2461 » Tue Sep 27, 2016 4:56 pm

MacQ wrote: .. but your plugin extension defiantly caught my attention as I assumed would be more efficient.

You haven't seen my code :oops:

User avatar
MacQ
Macro Author
Macro Author
Posts: 674
Joined: Sat Apr 02, 2005 2:39 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by MacQ » Wed Sep 28, 2016 4:52 pm

dewey2461 wrote:You haven't seen my code :oops:
It can't be worse than the c++ crap I would cobble together ;)

I'm sure EqMule will be able to throw in some suggestions, it still sounds like a cool feature.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by dewey2461 » Wed Sep 28, 2016 6:10 pm

I'm currently thinking of extending netbots to include the general Data[Key,Val] as well as add a GUI. I have a working prototype writing to the HUD and can definitely see the utility. Just have to summon the energy to perform surgery on MQ2NetBots ...

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by warlock45 » Wed Sep 28, 2016 6:52 pm

I always thought NetBots and NetHeal would be much more efficient and more in use when I first discovered them. Admitedly with being able to see mana and endurance levels in group/XTarget, some of that went away, but I would think plugins talking to each other over EQBC would be a faster response, especially with the annoying tendancy of toon stat lag (where someones mana appears low until you target them to get the UI to update correctly)

But with RD and MB both saying in posts they work better with out netheals, I never did figure out why, but went with the flow

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Extend TLO Group to have Group.MinHP & Group.MinMana

Post by dewey2461 » Wed Sep 28, 2016 7:32 pm

I never got netheals working either.

FrankJScott
naggy
naggy
Posts: 2326
Joined: Sun Feb 19, 2023 7:11 am

Awesome Scooter Rental Disney World Website

Post by FrankJScott » Mon Oct 16, 2023 8:37 pm

For the people talking about street scooter rental, handicap scooter rental, bird shared scooter, buena vista rentals orlando, magic kingdom electric scooter rental, scooter rental at silver dollar city, I highly recommend this source about Orlando scooter rentals link or mopeds for rent, mobility scooter hire disney world, medical supply rental orlando, electric scooters in orlando, universal studios ecv rental, mobility scooter hire orlando, alongside all this at bing on Disney World scooter rentals info not to mention epcot ecv rental, renting electric scooters near me, mobility scooter disney, disney world scooter rental price, sea world wheelchair rental, rent a moped scooter, on top of this continued on ecv rental Orlando tips which is also great. Also, have a look at this inquiry about walt Disney World scooter rentals blog on top of lime scooter rental, electric kick scooter rental, rent motor scooters, disabled scooter hire, animal kingdom scooter rental, power wheelchair rental orlando, and don't forget this over at this website on walt Disney World scooter rentals forum on top of public e scooters near me, lime rental scooters, buena vista rentals orlando florida, foldable scooter rental orlando, e moped sharing, moped scooters for rent, as well as resources for wheelchair rental Orlando forum which is also worth a look. I also recommend this great scooter rental Disney World url as well as 24 hour scooter rental, cheapest scooter rental orlando, Keyword Stats 2023-07-24 at 13_55_54, gold mobility scooters disney world, best wheelchair rental orlando, seaworld orlando wheelchair rental, as well as this here about Orlando mobility scooter rentals forum on top of seaworld orlando electric scooter rental, ev scooter rental, electric scooters for rent in orlando florida, electric rental scooters, lime scooter sharing, spin scooter pick up, alongside all useful Orlando scooter rentals url alongside all electric scooter to rent, getting a scooter at disney world, lime scooter rental, wheelchair hire orlando florida, zypp rent, universal studio wheelchair rental, which is also great. Finally, have a look at this great Orlando mobility scooter rentals tips with buena vista scooters orlando, dockless, ofo scooter, walker rental orlando, electric scooter rental at universal studios orlando, buena vista scooters orlando florida, for good measure. Check more @ New Walt Disney World Scooter Rentals Guide 1ac76_c
Last edited by FrankJScott on Thu Dec 07, 2023 4:55 pm, edited 1 time in total.

FrankJScott
naggy
naggy
Posts: 2326
Joined: Sun Feb 19, 2023 7:11 am

New Product Tips

Post by FrankJScott » Thu Dec 07, 2023 11:09 am

Please try Google before asking about Cool Product Site c8dec9a

FrankJScott
naggy
naggy
Posts: 2326
Joined: Sun Feb 19, 2023 7:11 am

Cool Product Tips

Post by FrankJScott » Thu Dec 07, 2023 2:58 pm

Please try Google before asking about Cool Product Blog a1b86b3