View Single Post
  #14  
Old 06-15-2013, 12:47 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

Hmm I dunno what I am doing wrong then. These are my steps.

I deleted the qglobals for the quest in the table
#reloadpl
#pvp off
#zone ecommons
(PVP Turns on)
#zone nro
(PVP Stays On when intial was #pvp off)
#zone sro
(PVP Still on)
NateDogs Version
Code:
sub EVENT_ENTERZONE {
	quest::setglobal("PvPState",$client->GetPVP(),5,"F");
	$client->SetPVP(1);
}

sub EVENT_ZONE {
	if(defined $qglobals{"PvPState"} && $qglobals{"PvPState"}==1)
	{
		$client->SetPVP(1);
	}
	else
	{
		$client->SetPVP(0);
	}
}

Steps with my Version
I again clear Qglobals.
#reloadpl
#pvp off
#zone ecommons
(PVP Still off)
#zone nro
(pvp still off)
#zone mischiefplane
(PVP Turns on)
#zone ecommons
(PVP Turns Off) Seems to work but false)

Again Clear qglobals
#reloadpl
#pvp on
#zone ecommons
(PVP Turns off)

My Version
Code:
sub EVENT_ENTERZONE {
	quest::setglobal("PvPState",$client->GetPVP(),5,"F");  #Adds their PVPstate to gloabl

	if($zonesn =~ /^mischiefplane$/) {
	$client->SetPVP(1);
	$client->Message(15, "It's time for some Mischief, kill or be killed");
	}

	
	
	}

sub EVENT_ZONE {
	if(defined $qglobals{"PvPState"} && $qglobals{"PvPState"}==1)   
	{
		$client->SetPVP(1);   #Player was already PVP before entering zone will remain PVP on zone out
	}
	else
	{
		$client->SetPVP(0);  #This player was not PVP flagged when zoning in
	}

}

In Conclusion: My version is always pvpoff on zoneout, Nates is always pvpon with zonein.

If this makes sense lol
__________________
Reply With Quote