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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-14-2013, 02:45 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default Save pvp state on zone in.

Hello everyone. I am having an issue trying to save the clients pvp state upon zone in so when they leave the zone it will revert them back to their pre-zone in pvp state.

So lets say. your pvp state is 0 or off. You zone into a pvp only zone, lets say ecommons. I need it to save their state of pvp 0, change them to pvp 1, then when they zone out reload the pvp 0. I figured I needed to use qglobals to store the intial pvp state but I cannot get it right. It either doesn't work other times crashes the zone.

Here is what I have so far.
Code:
sub EVENT_ENTERZONE {

if($client->GetPVP() == $client->GetPVP(1){ 
quest::setglobal("PvPState", $PvP, 2, "F");
}

$client->SetPVP(1);
$client->Message(15, "It's time for some Mischief, kill or be killed!");
}


sub EVENT_ZONE {

if $PvP == $client->GetPVP(0) {
$client->SetPVP(0);
}
 
}

Thanks guys!

Fig
__________________
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:22 AM.


 

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