Group.Member[x] returns self or the wrong player

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

nokternal
orc pawn
orc pawn
Posts: 18
Joined: Sun Dec 21, 2003 10:07 pm

Group.Member[x] returns self or the wrong player

Post by nokternal » Sat Mar 12, 2005 10:04 am

Hey all, been working on fixing some of the shammy macs, and all seems to be coming along, however Group.Member seems to be not working correctly. for Example if I do a /targ pc ${Group.Member[0]} I am targeted as expected. But if I do a /targ pc ${Group.Member[2]} it again targets me versus the correct player. I"m trying to put a group together as we speak so i can verify it. But seems that ${Group.Member[x]} is not selecting the correct players. I am using the MQ2-20050310.zip.


An example of the code i'm trying to get working correctly.

Code: Select all

Sub Check_grpHPs 
   /declare i int local 1 
    
   /for i 1 to ${Group} 

   /if (${Group.Member[${i}].Class.Name.Equal[Cleric]} || ${Group.Member[${i}].Class.Name.Equal[Druid]} || ${Group.Member[${i}].Class.Name.Equal[Wizard]} || ${Group.Member[${i}].Class.Name.Equal[Magician]} || ${Group.Member[${i}].Class.Name.Equal[Necromancer]} || ${Group.Member[${i}].Class.Name.Equal[Enchanter]}) /if (${Group.Member[${i}].PctHPs}<=${CasterHeals}) { 
      /target pc ${Group.Member[${i}].Name} 
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=200) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 
    
   /if (${Group.Member[${i}].Class.Name.Equal[Warrior]} || ${Group.Member[${i}].Class.Name.Equal[Monk]} || ${Group.Member[${i}].Class.Name.Equal[Rouge]} || ${Group.Member[${i}].Class.Name.Equal[Bard]} || ${Group.Member[${i}].Class.Name.Equal[Ranger]} || ${Group.Member[${i}].Class.Name.Equal[Beastlord]} || ${Group.Member[${i}].Class.Name.Equal[Shadow Knight]} || ${Group.Member[${i}].Class.Name.Equal[Berserker]} || ${Group.Member[${i}].Class.Name.Equal[Paladin]}) /if (${Group.Member[${i}].PctHPs}<=${MelleeHeals} && ${Group.Member[${i}].Name.NotEqual[${M_Assist}]}) { 
      /target pc ${Group.Member[${i}]} 
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=200) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 

   /if (${Group.Member[${i}].Name.Equal[${M_Assist}]} && ${Group.Member[${i}].PctHPs}<=${TankHeal}) { 
      /target pc ${Group.Member[${i}]} 
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=200) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 

   /next i 
/return 

Arune
a hill giant
a hill giant
Posts: 216
Joined: Sat Jul 03, 2004 1:51 pm

Post by Arune » Sat Mar 12, 2005 11:55 am

I had same problem, but I just redownloaded, recompiled, deleted everything in the folder I run MQ from, copied the new files into the folder and went into game and it worked.

I just tested this now, and it works perfect.

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Post by htw » Sat Mar 12, 2005 11:57 am

Bah. :-P

htw

Quagmire
orc pawn
orc pawn
Posts: 27
Joined: Thu Sep 09, 2004 1:21 am

Post by Quagmire » Wed Mar 23, 2005 12:55 pm

I'm still seeing this problem w/ MQ2-20050319. Only happens after you zone once.

Quagmire
orc pawn
orc pawn
Posts: 27
Joined: Thu Sep 09, 2004 1:21 am

Post by Quagmire » Wed Mar 23, 2005 1:20 pm

just did some of my own debuggin on this issue:

the _CHARINFO->GroupMember[] actually has 6 members, not 5 like currently declared in the structs. When you join a group you're not added to the array, but when you zone you are added and it's re-ordered to the order in which you joined the group. So group leader/creator in 0, and there can be gaps if someone has left the group.

User avatar
htw
a grimling bloodguard
a grimling bloodguard
Posts: 512
Joined: Wed Feb 18, 2004 8:30 pm
Location: Albuquerque, NM USA
Contact:

Post by htw » Wed Mar 23, 2005 5:43 pm

Hmm, right you are. It is only for the zoning char also (makes sense), but just wanted to point that out. Is easy enough to add a 6th member to the group array, make a few changes to DataTypes, and then let's do some more testing to see where we are after that.


htw

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Mar 23, 2005 5:48 pm

I'll have a fix up shortly, but feel free ;)
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 2:54 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 2:55 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 2:56 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 2:57 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 2:59 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 3:00 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 3:01 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Group.Member[x] returns self or the wrong player

Post by xyilla » Wed Apr 30, 2025 3:02 pm