Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-04-2010, 08:53 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think I went over this before with you a while back, but the GetID() does work fine every time for groups as long as you have the script setup properly.

Some things to note about your script example there are:

You need to verify that a group exists for the player before getting the ID of the group:

This:
Code:
my $ClientGroup = $client->GetGroup();
my $GroupID = $ClientGroup->GetID();
Should be:
Code:
my $ClientGroup = $client->GetGroup();
my $GroupID = 0;
if ($ClientGroup) {
	$GroupID = $ClientGroup->GetID();
}
You can add that at the beginning of your event (such as EVENT_SAY) and then you won't need to do that check again within that particular event. You can't do that check outside of a sub event, because that stuff is only loaded at the time the NPC spawns.

If you have any problems with it, maybe we can chat on IRC or something.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:36 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3