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