Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2014, 02:10 AM
Esildor
Hill Giant
 
Join Date: Feb 2010
Posts: 207
Default

Been playing with this for a bit and still haven't been able to get anything to work.

I don't understand enough of what's going on in what you posted previously Kayen in order to work in what I'm trying to get done.

I've tried this, and I know it's specific to this ID, I was just trying to see if I could get it to work. Also, yes, 4001 was the GroupID assigned to the group my guys were in while testing it.

Code:
sub EVENT_LOOT {
  if ($Group_ID == 4001) {
    if($looted_id == 132611) {
      quest::updatetaskactivity(275,7,1);
      }
    }
}
I found elsewhere the if ($Group_ID == #) so I assume that is valid? If so, how come this won't work? I have confirmed that this works:

Code:
sub EVENT_LOOT {
  if($looted_id == 132611) {
    quest::updatetaskactivity(275,7,1);
    }
 }
I took a complete shot in the dark on this:

Code:
my $GroupID = $client->GetGroup();

sub EVENT_LOOT {
  if ($looted_id == 132611) {
    if ($GroupID == ()) {
      quest::updatetaskactivity(275,7,1);
      }
    }
}
Lastly on a whim I tried using signals. I used:

Code:
##In the player.pl

sub EVENT_LOOT {
  if ($looted_id == 132611) {
    quest::signalwith(4280015,200,0);
    }
}

##In a Controller.pl

sub EVENT_SIGNAL {
  if ($signal == 200) {
    quest::updatetaskactivity(275,7,1);
    }
}
I really don't see why the last option didn't work with signals, it's a shitty way to do it but in theory should work .. right?

Any help is appreciated. Or, if someone could help break down the snippet of code that Kayen posted, if I understood it better I could probably get it to work for what I want.
Reply With Quote
  #2  
Old 04-18-2014, 02:58 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

I was missing an if statement in the code I initially posted.
Code:
//Define the variable '$Group_ID'  by getting the client's (ie person getting the primary task update) actual group ID. THIS is your groups ID.
$Group_ID = $client->GetGroup()->GetID();

//This pulls all clients in the zone and puts it into an array.		
my @clientlist = $entity_list->GetClientList();

//Now go through the array and ONLY select other clients IN your group.	
foreach $cur (@clientlist) 
{
       //Make sure client exists
	if ($cur) 
	{
              //Make sure you got a group ID
               if ($Group_ID)
			{ 
                               //Check if this client is in a group
				if ($cur->GetGroup())
				{
                                        
					$Client_GroupID = $cur->GetGroup()->GetID();
 //Now if the primary group ID (as first defined) is the same as THIS clients group id, you are in the same group. Now do whatever.
                                       if (Client_GroupID == $Group_ID)
                                       {
                                        Shout("We are in the same group");
                                        cur->UpdateTaskActivity(275,7,1); // example
					}
				}
}}}}
The reason your signal code won't work is because your signaling an NPC it looks like and having it do the task update on that it. You need to have the task updates on the client, so it needs to be in player.pl IF your not directly interacting with the npc like hailing it ect. In other words the NPC has to know who it is updating some how and just a signal does not provide that alone.
Reply With Quote
  #3  
Old 04-18-2014, 03:22 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by Esildor View Post
Been playing with this for a bit and still haven't been able to get anything to work.

I don't understand enough of what's going on in what you posted previously Kayen in order to work in what I'm trying to get done.

I've tried this, and I know it's specific to this ID, I was just trying to see if I could get it to work. Also, yes, 4001 was the GroupID assigned to the group my guys were in while testing it.

Code:
sub EVENT_LOOT {
  if ($Group_ID == 4001) {
    if($looted_id == 132611) {
      quest::updatetaskactivity(275,7,1);
      }
    }
}
I found elsewhere the if ($Group_ID == #) so I assume that is valid? If so, how come this won't work? I have confirmed that this works:

Code:
sub EVENT_LOOT {
  if($looted_id == 132611) {
    quest::updatetaskactivity(275,7,1);
    }
 }
I took a complete shot in the dark on this:

Code:
my $GroupID = $client->GetGroup();

sub EVENT_LOOT {
  if ($looted_id == 132611) {
    if ($GroupID == ()) {
      quest::updatetaskactivity(275,7,1);
      }
    }
}
Lastly on a whim I tried using signals. I used:

Code:
##In the player.pl

sub EVENT_LOOT {
  if ($looted_id == 132611) {
    quest::signalwith(4280015,200,0);
    }
}

##In a Controller.pl

sub EVENT_SIGNAL {
  if ($signal == 200) {
    quest::updatetaskactivity(275,7,1);
    }
}
I really don't see why the last option didn't work with signals, it's a shitty way to do it but in theory should work .. right?

Any help is appreciated. Or, if someone could help break down the snippet of code that Kayen posted, if I understood it better I could probably get it to work for what I want.
I'd honestly wait, I'm working on posting my Expedition/Shared tasks this weekend.
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:06 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