Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2010, 07:05 PM
Auxie
Fire Beetle
 
Join Date: Mar 2005
Posts: 21
Default Getting a player's PVP status.

Hi Everyone,

In the interest of keeping things brief i'll cut out a snippet of what i'd like to do overall.

I'm interested in having the perl quest return SOMETHING that shows if a player is PVP flagged or if they are NON PVP flagged. Be it a 1 or a 0, true/false no matter.

Here is some super basic code to get an npc to tell you if you are PVP flagged or not. I searched to see what I could find with SetPVP but couldn't find anything and found some GetPVP references in the cpp code. Not sure if this is the right direction or not but would appreciate any help.

Code:
sub EVENT_SPAWN {
me $pvpstatus;
$pvpstatus = $client->GetPVP();

} 
sub EVENT_SAY {

if ($text =~/Hail/i){
	quest::say("Your pvpstatus is $pvpstatus");
    }
}
Thanks.
Reply With Quote
  #2  
Old 04-25-2010, 12:30 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 541
Default

Pretty sure you can't use $client in a spawn event as there are no clients to pull info from as the mob spawns. If you put it in the say event then it will be able to properly identify the client that initiates the event.
Reply With Quote
  #3  
Old 04-25-2010, 12:58 PM
Auxie
Fire Beetle
 
Join Date: Mar 2005
Posts: 21
Default

hah you rock and i'll tell you why.

changing it to
Code:
sub EVENT_SAY {

$pvpstatus = $client->GetPVP();

if ($text =~/Hail/i){
	quest::say("Your pvpstatus is $pvpstatus");
    }
}
returns "Your pvp status is ". oh noes!

But don't worry, if you are PKable it WILL return 1. My problem was that I was testing it in a "pvp safe" area I have coded in. Thanks for pointing that out - it's the little things that wind up fixing it.
Reply With Quote
Reply


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 06:32 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3