View Single Post
  #22  
Old 06-15-2013, 03:43 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

This works almost. It saves the state change between zoning and applies it. I watch the state change to empty from 1 when zoning after changing from pvpon to pvpoff but then about 2 seconds pass and your name still turns read.
It even says the chat msg of "You no longer follow the ways of discord" but still turns back on after the couple seconds.
Possible hard coding conflict?
Edit : I don't think its hard coding, still blindly missing the correct order I guess. Because it does change the globals from 1 to Nothing to save the change after talking to NPC but when the name turns red after the couple seconds the pvpstatus value changes back to 1. So, its somewhere in the script always applying the change maybe. lol I envy you smart guys who know this stuff. I am learning through trial, error and eqemu forums

notice the del qglobals are # for testing purposes.

Code:
sub EVENT_ENTERZONE {
quest::setglobal("PvPState",$client->GetPVP(),5,"F");
	if(defined $qglobals{"PvPState"} && $qglobals{"PvPState"}==1)
	{
		$client->SetPVP(1);
		#quest::delglobal([PvPState]);
	}
	elsif($zonesn =~ /^mischiefplane$/) {
	$client->SetPVP(1);
	$client->Message(15, "It's time for some Mischief, kill or be killed");
	
	}
	else
	{
		$client->SetPVP(0);
		#quest::delglobal([PvPState]);
	}
}

sub EVENT_ZONE {
quest::setglobal("PvPState",$client->GetPVP(),5,"F");
	if(defined $qglobals{"PvPState"} && $qglobals{"PvPState"}==1)
	{
		$client->SetPVP(1);
		#quest::delglobal([PvPState]);
		
	}
	else
	{
		$client->SetPVP(0);
		#quest::delglobal([PvPState]);
		
	}
}
__________________
Reply With Quote