Thread: Kingdom Quest
View Single Post
  #6  
Old 09-06-2008, 07:33 PM
Neiv
Hill Giant
 
Join Date: May 2008
Location: Colorado
Posts: 238
Post

I have revised this script to increment the reward for kingdom faction based on level.

Levels 1-19 get Valor
Levels 20-35 get Temperance
Levels 36-49 get Aegolism
Levels 50-60 get Virtue
Levels 60-65 get Conviction

The script still assumes four kingdoms (factions) that may be eligible for kingdom blessings. I placed this in my quest/templates folder, and renamed the player.pl in the other zones I'm working with, and it works great.

Here it is
Code:
sub EVENT_ENTERZONE 
	{
	quest::settimer("check",1);
	}	

sub EVENT_TIMER 
	{
	if($timer eq "check") {
		my $factioncheck = undef;
		if (defined($qglobals{kingdomfaction}))
			{	
			if ($qglobals{kingdomfaction} == 1) 
				{	
				$factioncheck = $client->GetCharacterFactionLevel(484);
					{
					if ($factioncheck >= 850 && $ulevel >= 60)
						{
						if (!$client->FindBuff(5257)) #kingdom blessing V  

							{
							quest::selfcast(5257);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 50) 
						{
						if (!$client->FindBuff(3467)) 
#kingdom blessing IV
							{
							quest::selfcast(3467);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 35) 
						{
						if (!$client->FindBuff(1447)) 
#kingdom blessing III
							{
							quest::selfcast(1447);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 20) 
						{
						if (!$client->FindBuff(3692)) 
#kingdom blessing II
							{
							quest::selfcast(3692);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 1) 
						{
						if (!$client->FindBuff(312)) 
#kingdom blessing I
							{
							quest::selfcast(312);
							}
						}
					
					elsif ($client->FindBuff(5257) || $client->FindBuff(3467) || $client->FindBuff(1447) || $client->FindBuff(3692) || $client->FindBuff(312)) 
						{
						$client->BuffFadeBySpellID(5257);
						$client->BuffFadeBySpellID(3467);
						$client->BuffFadeBySpellID(1447);
						$client->BuffFadeBySpellID(3692);
						$client->BuffFadeBySpellID(312);		
						}
					}
				}
			
			if ($qglobals{kingdomfaction} == 2) 
				{	
				$factioncheck = $client->GetCharacterFactionLevel(485);
					{
					if ($factioncheck >= 850 && $ulevel >= 60)
						{
						if (!$client->FindBuff(5257)) #kingdom blessing V  

							{
							quest::selfcast(5257);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 50) 
						{
						if (!$client->FindBuff(3467)) 
#kingdom blessing IV
							{
							quest::selfcast(3467);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 35) 
						{
						if (!$client->FindBuff(1447)) 
#kingdom blessing III
							{
							quest::selfcast(1447);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 20) 
						{
						if (!$client->FindBuff(3692)) 
#kingdom blessing II
							{
							quest::selfcast(3692);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 1) 
						{
						if (!$client->FindBuff(312)) 
#kingdom blessing I
							{
							quest::selfcast(312);
							}
						}
					
					elsif ($client->FindBuff(5257) || $client->FindBuff(3467) || $client->FindBuff(1447) || $client->FindBuff(3692) || $client->FindBuff(312)) 
						{
						$client->BuffFadeBySpellID(5257);
						$client->BuffFadeBySpellID(3467);
						$client->BuffFadeBySpellID(1447);
						$client->BuffFadeBySpellID(3692);
						$client->BuffFadeBySpellID(312);		
						}
					}
				}

			if ($qglobals{kingdomfaction} == 3) 
				{	
				$factioncheck = $client->GetCharacterFactionLevel(487);
					{
					if ($factioncheck >= 850 && $ulevel >= 60)
						{
						if (!$client->FindBuff(5257)) #kingdom blessing V  

							{
							quest::selfcast(5257);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 50) 
						{
						if (!$client->FindBuff(3467)) 
#kingdom blessing IV
							{
							quest::selfcast(3467);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 35) 
						{
						if (!$client->FindBuff(1447)) 
#kingdom blessing III
							{
							quest::selfcast(1447);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 20) 
						{
						if (!$client->FindBuff(3692)) 
#kingdom blessing II
							{
							quest::selfcast(3692);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 1) 
						{
						if (!$client->FindBuff(312)) 
#kingdom blessing I
							{
							quest::selfcast(312);
							}
						}
					
					elsif ($client->FindBuff(5257) || $client->FindBuff(3467) || $client->FindBuff(1447) || $client->FindBuff(3692) || $client->FindBuff(312)) 
						{
						$client->BuffFadeBySpellID(5257);
						$client->BuffFadeBySpellID(3467);
						$client->BuffFadeBySpellID(1447);
						$client->BuffFadeBySpellID(3692);
						$client->BuffFadeBySpellID(312);		
						}
					}
				}
		
			if ($qglobals{kingdomfaction} == 4) 
				{	
				$factioncheck = $client->GetCharacterFactionLevel(488);
					{
					if ($factioncheck >= 850 && $ulevel >= 60)
						{
						if (!$client->FindBuff(5257)) #kingdom blessing V  

							{
							quest::selfcast(5257);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 50) 
						{
						if (!$client->FindBuff(3467)) 
#kingdom blessing IV
							{
							quest::selfcast(3467);
							}
						}

					elsif ($factioncheck >= 850 && $ulevel >= 35) 
						{
						if (!$client->FindBuff(1447)) 
#kingdom blessing III
							{
							quest::selfcast(1447);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 20) 
						{
						if (!$client->FindBuff(3692)) 
#kingdom blessing II
							{
							quest::selfcast(3692);
							}
						}
					elsif ($factioncheck >= 850 && $ulevel >= 1) 
						{
						if (!$client->FindBuff(312)) 
#kingdom blessing I
							{
							quest::selfcast(312);
							}
						}
					
					elsif ($client->FindBuff(5257) || $client->FindBuff(3467) || $client->FindBuff(1447) || $client->FindBuff(3692) || $client->FindBuff(312)) 
						{
						$client->BuffFadeBySpellID(5257);
						$client->BuffFadeBySpellID(3467);
						$client->BuffFadeBySpellID(1447);
						$client->BuffFadeBySpellID(3692);
						$client->BuffFadeBySpellID(312);		
						}
					}
				}
			}
		}
	}
Reply With Quote