What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

check if player is in my RAID

Deg026

Member
Joined
Jan 18, 2015
Messages
58
Reaction score
0
now i know only how to checking if player is in party (max 5 players)
but it doesn't work for the RAID players...
can somebody help me if know how can i check if the player is in my RAID (when i have 10+ 20+ 50 players....)?
 
now i know only how to checking if player is in party (max 5 players)
but it doesn't work for the RAID players...
can somebody help me if know how can i check if the player is in my RAID (when i have 10+ 20+ 50 players....)?

Code:
List<PartyMember> RaidMembers = getPartyMembers();
if (RaidMembrs != null && RaidMembers.Count > 5)
{
	// We've confirmed we're in a party, and it's a raid.
	if (me.isPartyMember) // Doing a second check just in case
	{ 
		// Do things here because i'm in a raid
	}
}

#edit
A nicer one:

Code:
List<PartyMember> RaidMembers = getPartyMembers();
int raidcount = partyMembersCount();
bool israid = (RaidMembers != null && raidcount > 5);
// We've confirmed we're in a party, and it's a raid.
if (israid && me.isPartyMember) // Doing a second check just in case
{ 
	// Do things here because i'm in a raid
	// You also have "raidcount" as a variable to play with
	// along with "israid"
	// Enjoy =]
}
 
Last edited:
Code:
bool inparty = isPartyMember(String name);

bool inparty = isPartyMember(Creature obj);

it is working for RAID players??
i am using isInMyPartyGroup - and it show true only for party(5 players) and false for all other players from raid...
 
it is working for RAID players??
i am using isInMyPartyGroup - and it show true only for party(5 players) and false for all other players from raid...

isInMyPartyGroup will only return for those that are in your group (5 Players)
isPartyMember will return true for both party and raid (50 Players)

Code:
foreach (var obj in getCreatures())
	{
		if (obj.type == BotTypes.Player && isPartyMember(obj))
		{
			// Do things
		}
	}
 
THANK YOU very much! :)

No problem, good luck on your project :)

Also it might be beneficial for you to put a Thread.Sleep(10); in there to stop ArcheBuddy from "freezing up" whilst it does the foreach statement.

Code:
foreach (var obj in getCreatures())
	{
		if (obj.type == BotTypes.Player && isPartyMember(obj))
		{
			// Do things
		}
		Thread.Sleep(10); // 0.01 Second between each creatures function
	}

If the list doesn't hold too many entries, it's not really necessary but given it's all creatures in your area it can get up to or around 200 items - that could put your ArcheBuddy in a "not responding" state for a few seconds, the sleep will stop that.
 
Back
Top