Thank you for noticing that. changed it but its still not working. here is a newer try and even more a mess. I am sure im over complicating things but still learning lol.
Code:
sub EVENT_ENTERZONE {
my $on = $client->GetPVP(1);
my $off = $client->GetPVP(0);
if($client->GetPVP() == $client->GetPVP(1)){
quest::setglobal("PvPState", $PvP, 2, "F");
}
if($client->GetPVP() == $client->GetPVP(0)){
quest::setglobal("PvPState2", $PvP2, 2, "F");
$client->SetPVP(1);
$client->Message(15, "It's time for some Mischief, kill or be killed!");
}
sub EVENT_ZONE {
if ($PvP == $on) {
$client->SetPVP(1);
}
if ($PvP2 == $off) {
$client->SetPVP(0);
}
}