-- JBG
-- USE THIS TO GET THRESHOLD FROM ACHIEVEMENT DATA BASE -- 
ARCTIC_HARE_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_ARCTIC_HARE); 
BIGHORN_SHEEP_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_BIGHORN_SHEEP);
BISON_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_BISON);
BLACK_BEAR_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_BLACK_BEAR);
BLACK_TAIL_DEER_THRESHOLD = EntGame.GetAchievementThreshold(ACH_BLACK_TAIL_DEER);
CARIBOU_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_CARIBOU);
COUGAR_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_COUGAR);
COYOTE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_COYOTE);
DALL_SHEEP_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_DALL_SHEEP);
ELK_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_ELK);
GOOSE_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_GOOSE);
GRIZZLY_BEAR_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_GRIZZLY);
GROUSE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_GROUSE);
HARLEQUINN_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_HARLEQUINN);
JACKALOPE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_JACKALOPE);
LYNX_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_LYNX);
MOOSE_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_MOOSE);
MUSK_OX_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_MUSK_OX);
SALMON_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_SALMON);
WOLF_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_WOLF);
WOLVERINE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_WOLVERINE);

HEADSHOT_0_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_HEADSHOT_0);
HEADSHOT_1_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_HEADSHOT_1);
HEADSHOT_2_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_HEADSHOT_2);
VITALSHOT_0_THRESHOLD     = EntGame.GetAchievementThreshold(ACH_VITALSHOT_0);
VITALSHOT_1_THRESHOLD     = EntGame.GetAchievementThreshold(ACH_VITALSHOT_1);
VITALSHOT_2_THRESHOLD     = EntGame.GetAchievementThreshold(ACH_VITALSHOT_2);
ACCURACY_0_THRESHOLD      = EntGame.GetAchievementThreshold(ACH_ACCURACY_0);
ACCURACY_1_THRESHOLD      = EntGame.GetAchievementThreshold(ACH_ACCURACY_1);
ACCURACY_2_THRESHOLD      = EntGame.GetAchievementThreshold(ACH_ACCURACY_2);
EQUIPMENT_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_EQUIPMENT);
POINTS_0_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_POINTS_0);
POINTS_1_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_POINTS_1);
POINTS_2_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_POINTS_2);
RIFLE_0_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_RIFLE_0);
RIFLE_1_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_RIFLE_1);
RIFLE_2_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_RIFLE_2);
PISTOL_0_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_PISTOL_0);
PISTOL_1_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_PISTOL_1);
PISTOL_2_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_PISTOL_2);
SHOTGUN_0_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_SHOTGUN_0);
SHOTGUN_1_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_SHOTGUN_1);
SHOTGUN_2_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_SHOTGUN_2);
BOW_0_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_BOW_0);
BOW_1_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_BOW_1);
BOW_2_THRESHOLD			  = EntGame.GetAchievementThreshold(ACH_BOW_2);
HUNTER_0_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_HUNTER_0);
HUNTER_1_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_HUNTER_1);
HUNTER_2_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_HUNTER_2);
FEMALE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_FEMALE);
DAMAGE_THRESHOLD		  = EntGame.GetAchievementThreshold(ACH_DAMAGE);
JAWS_OF_DEATH_0_THRESHOLD = EntGame.GetAchievementThreshold(ACH_JAWS_OF_DEATH_0);
JAWS_OF_DEATH_1_THRESHOLD = EntGame.GetAchievementThreshold(ACH_JAWS_OF_DEATH_1);
JAWS_OF_DEATH_2_THRESHOLD = EntGame.GetAchievementThreshold(ACH_JAWS_OF_DEATH_2);
PROSPECTOR_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_PROSPECTOR);
MULTI_KILL_0_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_MULTI_KILL_0);
MULTI_KILL_1_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_MULTI_KILL_1);
MULTI_KILL_2_THRESHOLD	  = EntGame.GetAchievementThreshold(ACH_MULTI_KILL_2);


--[[
-- USE THIS BLOCK FOR TESTING
ARCTIC_HARE_THRESHOLD	  = 0;
BIGHORN_SHEEP_THRESHOLD	  = 0;
BISON_THRESHOLD			  = 0;
BLACK_BEAR_THRESHOLD	  = 0;
BLACK_TAIL_DEER_THRESHOLD = 0;
CARIBOU_THRESHOLD		  = 0;
COUGAR_THRESHOLD		  = 0;
COYOTE_THRESHOLD		  = 0;
DALL_SHEEP_THRESHOLD	  = 0;
ELK_THRESHOLD			  = 0;
GOOSE_THRESHOLD			  = 0;
GRIZZLY_BEAR_THRESHOLD	  = 0;
GROUSE_THRESHOLD		  = 0;
HARLEQUINN_THRESHOLD	  = 0;
JACKALOPE_THRESHOLD		  = 0;
LYNX_THRESHOLD			  = 0;
MOOSE_THRESHOLD			  = 0;
MUSK_OX_THRESHOLD		  = 0;
SALMON_THRESHOLD		  = 0;
WOLF_THRESHOLD			  = 0;
WOLVERINE_THRESHOLD		  = 0;

HEADSHOT_0_THRESHOLD	  = 0;
HEADSHOT_1_THRESHOLD	  = 0;
HEADSHOT_2_THRESHOLD	  = 0;
VITALSHOT_0_THRESHOLD     = 0;
VITALSHOT_1_THRESHOLD     = 0;
VITALSHOT_2_THRESHOLD     = 0;
ACCURACY_0_THRESHOLD      = 0;
ACCURACY_1_THRESHOLD      = 0;
ACCURACY_2_THRESHOLD      = 0;
EQUIPMENT_THRESHOLD		  = 2;
POINTS_0_THRESHOLD		  = 0;
POINTS_1_THRESHOLD		  = 0;
POINTS_2_THRESHOLD		  = 0;
RIFLE_0_THRESHOLD		  = 0;
RIFLE_1_THRESHOLD		  = 0;
RIFLE_2_THRESHOLD		  = 0;
PISTOL_0_THRESHOLD		  = 0;
PISTOL_1_THRESHOLD		  = 0;
PISTOL_2_THRESHOLD		  = 0;
SHOTGUN_0_THRESHOLD		  = 0;
SHOTGUN_1_THRESHOLD		  = 0;
SHOTGUN_2_THRESHOLD		  = 0;
BOW_0_THRESHOLD			  = 0;
BOW_1_THRESHOLD			  = 0;
BOW_2_THRESHOLD			  = 0;
HUNTER_0_THRESHOLD		  = 0;
HUNTER_1_THRESHOLD		  = 0;
HUNTER_2_THRESHOLD		  = 0;
FEMALE_THRESHOLD		  = 0;
DAMAGE_THRESHOLD		  = 0;
JAWS_OF_DEATH_0_THRESHOLD = 0;
JAWS_OF_DEATH_1_THRESHOLD = 0;
JAWS_OF_DEATH_2_THRESHOLD = 0;
PROSPECTOR_THRESHOLD	  = 0;
MULTI_KILL_0_THRESHOLD	  = 0;
MULTI_KILL_1_THRESHOLD	  = 0;
MULTI_KILL_2_THRESHOLD	  = 0;
]]--

ONLIVE_OFFSET = 2; -- this is to account for the Headshot Achievements (in our .ini, but not actually being checked for, and not present in our OnLive Achievement DB).

-- JJK: 2010-09-27 Added functions from instore.lua

-----------------------------------------------------------------------------
-- CHECK ALL EQUIPMENT UNLOCKED
-----------------------------------------------------------------------------
function CheckAllEquipment()
	System.OutputDebugString("Checking All Equipment\n");
	
	equipUnlocked = Profile.GetEquipUnlocked(profile);
	if(equipUnlocked > EQUIPMENT_THRESHOLD) then
		equipUnlocked = EQUIPMENT_THRESHOLD;
		end;
	
	EntGame.SetOnLiveAchievementProgress(ACH_EQUIPMENT - ONLIVE_OFFSET, equipUnlocked);
	System.OutputDebugString("Past OnLive Set\n");
	if(Profile.IsAchievementUnlocked(profile, ACH_EQUIPMENT) == false) then
		if(Profile.GetEquipUnlocked(profile) >= EQUIPMENT_THRESHOLD) then
			EntGame.AwardAchievement(ACH_EQUIPMENT);
			return(true);
			end;
		end; 
	end;


-----------------------------------------------------------------------------
-- CHECK ANIMAL KILLS
-- Helper function to quickly check the kill count of an animal against
-- it's threshold
-----------------------------------------------------------------------------

function CheckAnimalKills(achieveId, animalId, count)
    System.OutputDebugString("Checking Animal Kills\n");
	
	totalKills = Profile.GetAnimalKills(profile, animalId);
	if(totalKills > count) then
		totalKills = count;
		end;
	EntGame.SetOnLiveAchievementProgress(achieveId - ONLIVE_OFFSET, totalKills);	
	
	if (Profile.IsAchievementUnlocked(profile, achieveId) == false) then
		totalKills = Profile.GetAnimalKills(profile, animalId);
		if (totalKills >= count) then
			EntGame.AwardAchievement(achieveId);
			return(true);
			end;
		end;
		
	return(false);
	end;
	
-----------------------------------------------------------------------------
-- CHECK NEW TOTAL $$$$
-----------------------------------------------------------------------------	
function CheckPoints0()
	System.OutputDebugString("Checking Points 0 \n");
	
	totalCash = Profile.GetCredits(profile);
	if(totalCash >= POINTS_0_THRESHOLD) then
		totalCash = POINTS_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_POINTS_0 - ONLIVE_OFFSET, totalCash);
	
	if(Profile.IsAchievementUnlocked(profile, ACH_POINTS_0) == false) then
		totalCash = Profile.GetCredits(profile); --+ PlayerState.GetMoney(stats);
		if(totalCash >= POINTS_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_POINTS_0);
			return(true);
			end;
		end;
	end;
	
function CheckPoints1()
	System.OutputDebugString("Checking Points 1 \n");

	totalCash = Profile.GetCredits(profile);
	if(totalCash >= POINTS_1_THRESHOLD) then
		totalCash = POINTS_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_POINTS_1 - ONLIVE_OFFSET, totalCash);	
	
	if(Profile.IsAchievementUnlocked(profile, ACH_POINTS_1) == false) then
		totalCash = Profile.GetCredits(profile); -- + PlayerState.GetMoney(stats);
		if(totalCash >= POINTS_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_POINTS_1);
			return(true);
			end;
		end;
	end;

function CheckPoints2()
	System.OutputDebugString("Checking Points 2 \n");

	totalCash = Profile.GetCredits(profile);
	if(totalCash >= POINTS_2_THRESHOLD) then
		totalCash = POINTS_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_POINTS_2 - ONLIVE_OFFSET, totalCash);	
	
	if(Profile.IsAchievementUnlocked(profile, ACH_POINTS_2) == false) then
		totalCash = Profile.GetCredits(profile);-- + PlayerState.GetMoney(stats);
		if(totalCash >= POINTS_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_POINTS_2);
			return(true);
			end;
		end;
	end;		
	
-----------------------------------------------------------------------------
-- CHECK HEADSHOTS
-----------------------------------------------------------------------------	

function CheckHeadShots0()
	System.OutputDebugString("Checking Head Shots 0 \n");

	if(Profile.IsAchievementUnlocked(profile, ACH_HEADSHOT_0) == false) then
		headShots = Profile.GetHeadShots(profile);
		if(headShots >= HEADSHOT_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HEADSHOT_0);
			return(true);
			end;
		end;
	end;

function CheckHeadShots1()
	System.OutputDebugString("Checking Head Shots 1 \n");

	if(Profile.IsAchievementUnlocked(profile, ACH_HEADSHOT_1) == false) then
		headShots = Profile.GetHeadShots(profile);
		if(headShots >= HEADSHOT_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HEADSHOT_1);
			return(true);
			end;
		end;
	end;
	
function CheckHeadShots2()
	System.OutputDebugString("Checking Head Shots 2 \n");

	if(Profile.IsAchievementUnlocked(profile, ACH_HEADSHOT_2) == false) then
		headShots = Profile.GetHeadShots(profile);
		if(headShots >= HEADSHOT_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HEADSHOT_2);
			return(true);
			end;
		end;
	end;	
-----------------------------------------------------------------------------
-- CHECK VITALSHOTS
-----------------------------------------------------------------------------	
function CheckVitalShots0()
	System.OutputDebugString("Checking Vital Shots 0 \n");
	
	vitalShots = Profile.GetVitalShots(profile);
	if(vitalShots > VITALSHOT_0_THRESHOLD) then
		vitalShots = VITALSHOT_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_VITALSHOT_0 - ONLIVE_OFFSET, vitalShots);	

	if(Profile.IsAchievementUnlocked(profile, ACH_VITALSHOT_0) == false) then
		vitalShots = Profile.GetVitalShots(profile);
		if(vitalShots >= VITALSHOT_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_VITALSHOT_0);
			return(true);
			end;
		end;
	end;
	
function CheckVitalShots1()
	System.OutputDebugString("Checking Vital Shots 1 \n");
	
	vitalShots = Profile.GetVitalShots(profile);
	if(vitalShots > VITALSHOT_1_THRESHOLD) then
		vitalShots = VITALSHOT_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_VITALSHOT_1 - ONLIVE_OFFSET, vitalShots);	

	if(Profile.IsAchievementUnlocked(profile, ACH_VITALSHOT_1) == false) then
		vitalShots = Profile.GetVitalShots(profile);
		if(vitalShots >= VITALSHOT_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_VITALSHOT_1);
			return(true);
			end;
		end;
	end;
	
function CheckVitalShots2()
	System.OutputDebugString("Checking Vital Shots 2 \n");

	vitalShots = Profile.GetVitalShots(profile);
	if(vitalShots > VITALSHOT_2_THRESHOLD) then
		vitalShots = VITALSHOT_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_VITALSHOT_2 - ONLIVE_OFFSET, vitalShots);	

	if(Profile.IsAchievementUnlocked(profile, ACH_VITALSHOT_2) == false) then
		vitalShots = Profile.GetVitalShots(profile);
		if(vitalShots >= VITALSHOT_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_VITALSHOT_2);
			return(true);
			end;
		end;
	end;	
	
-----------------------------------------------------------------------------
-- CHECK MULTI KILLS
-----------------------------------------------------------------------------
		
function CheckMultiKills0()
	System.OutputDebugString("Checking Multi Kills 0 \n");
	
	multiKills = Profile.GetMultiKills(profile);
	if(multiKills> MULTI_KILL_0_THRESHOLD) then
		multiKills = MULTI_KILL_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_MULTI_KILL_0 - ONLIVE_OFFSET, multiKills);
	
	if(Profile.IsAchievementUnlocked(profile, ACH_MULTI_KILL_0) == false) then
		multiKills = Profile.GetMultiKills(profile);
		if(multiKills >= MULTI_KILL_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_MULTI_KILL_0);
			return(true);
			end;
		end;
	end;		

function CheckMultiKills1()
	System.OutputDebugString("Checking Multi Kills 1 \n");
	
	multiKills = Profile.GetMultiKills(profile);
	if(multiKills> MULTI_KILL_1_THRESHOLD) then
		multiKills = MULTI_KILL_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_MULTI_KILL_1 - ONLIVE_OFFSET, multiKills);			
	
	if(Profile.IsAchievementUnlocked(profile, ACH_MULTI_KILL_1) == false) then
		multiKills = Profile.GetMultiKills(profile);
		if(multiKills >= MULTI_KILL_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_MULTI_KILL_1);
			return(true);
			end;
		end;
	end;
	
function CheckMultiKills2()
	System.OutputDebugString("Checking Multi Kills 2 \n");
	
	multiKills = Profile.GetMultiKills(profile);
	if(multiKills> MULTI_KILL_2_THRESHOLD) then
		multiKills = MULTI_KILL_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_MULTI_KILL_2 - ONLIVE_OFFSET, multiKills);			
	
	if(Profile.IsAchievementUnlocked(profile, ACH_MULTI_KILL_2) == false) then
		multiKills = Profile.GetMultiKills(profile);
		if(multiKills >= MULTI_KILL_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_MULTI_KILL_2);
			return(true);
			end;
		end;
	end;		
	
-----------------------------------------------------------------------------
-- CHECK ACCURACY
-----------------------------------------------------------------------------
function CheckAccuracy0()
	System.OutputDebugString("Checking Accuracy 0\n");
	
	roundsAccurate = Profile.GetRoundsAccurate(profile);
	if(roundsAccurate> ACCURACY_0_THRESHOLD) then
		roundsAccurate = ACCURACY_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_ACCURACY_0 - ONLIVE_OFFSET, roundsAccurate);

	if(Profile.IsAchievementUnlocked(profile, ACH_ACCURACY_0) == false) then
		if((Profile.GetRoundsAccurate(profile)) >= ACCURACY_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_ACCURACY_0);
			return(true);
			end;
		end;
	end;

function CheckAccuracy1()
	System.OutputDebugString("Checking Accuracy 1\n");
	
	roundsAccurate = Profile.GetRoundsAccurate(profile);
	if(roundsAccurate> ACCURACY_1_THRESHOLD) then
		roundsAccurate = ACCURACY_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_ACCURACY_1 - ONLIVE_OFFSET, roundsAccurate);	

	if(Profile.IsAchievementUnlocked(profile, ACH_ACCURACY_1) == false) then
		if((Profile.GetRoundsAccurate(profile)) >= ACCURACY_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_ACCURACY_1);
			return(true);
			end;
		end;
	end;
	
function CheckAccuracy2()
	System.OutputDebugString("Checking Accuracy 2\n");
	
	roundsAccurate = Profile.GetRoundsAccurate(profile);
	if(roundsAccurate> ACCURACY_2_THRESHOLD) then
		roundsAccurate = ACCURACY_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_ACCURACY_2 - ONLIVE_OFFSET, roundsAccurate);	

	if(Profile.IsAchievementUnlocked(profile, ACH_ACCURACY_2) == false) then
		if((Profile.GetRoundsAccurate(profile)) >= ACCURACY_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_ACCURACY_2);
			return(true);
			end;
		end;
	end;		
	
-----------------------------------------------------------------------------
-- CHECK RIFLE KILLS
-----------------------------------------------------------------------------
function CheckRifleKills0()
	System.OutputDebugString("Checking Rifle Kills 0\n");
	
	rifleKills = Profile.GetRifleKills(profile);
	if(rifleKills> RIFLE_0_THRESHOLD) then
		rifleKills = RIFLE_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_RIFLE_0 - ONLIVE_OFFSET, rifleKills);

	if(Profile.IsAchievementUnlocked(profile, ACH_RIFLE_0) == false) then
		rifleKills = Profile.GetRifleKills(profile); 
		if(rifleKills >= RIFLE_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_RIFLE_0);
			return(true);
			end;
		end;
	end;
	
function CheckRifleKills1()
	System.OutputDebugString("Checking Rifle Kills 1\n");
	
	rifleKills = Profile.GetRifleKills(profile);
	if(rifleKills> RIFLE_1_THRESHOLD) then
		rifleKills = RIFLE_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_RIFLE_1 - ONLIVE_OFFSET, rifleKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_RIFLE_1) == false) then
		rifleKills = Profile.GetRifleKills(profile); 
		if(rifleKills >= RIFLE_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_RIFLE_1);
			return(true);
			end;
		end;
	end;
	
function CheckRifleKills2()
	System.OutputDebugString("Checking Rifle Kills 2\n");
	
	rifleKills = Profile.GetRifleKills(profile);
	if(rifleKills> RIFLE_2_THRESHOLD) then
		rifleKills = RIFLE_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_RIFLE_2 - ONLIVE_OFFSET, rifleKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_RIFLE_2) == false) then
		rifleKills = Profile.GetRifleKills(profile); 
		if(rifleKills >= RIFLE_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_RIFLE_2);
			return(true);
			end;
		end;
	end;	
	
-----------------------------------------------------------------------------
-- CHECK PISTOL KILLS
-----------------------------------------------------------------------------
function CheckPistolKills0()
	System.OutputDebugString("Checking Pistol Kills 0\n");
	
	pistolKills = Profile.GetPistolKills(profile);
	if(pistolKills> PISTOL_0_THRESHOLD) then
		pistolKills = PISTOL_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_PISTOL_0 - ONLIVE_OFFSET, pistolKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_PISTOL_0) == false) then
		pistolKills = Profile.GetPistolKills(profile);
		if(pistolKills >= PISTOL_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_PISTOL_0);
			return(true);
			end;
		end;
	end;

function CheckPistolKills1()
	System.OutputDebugString("Checking Pistol Kills 1\n");
	
	pistolKills = Profile.GetPistolKills(profile);
	if(pistolKills> PISTOL_1_THRESHOLD) then
		pistolKills = PISTOL_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_PISTOL_1 - ONLIVE_OFFSET, pistolKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_PISTOL_1) == false) then
		pistolKills = Profile.GetPistolKills(profile);
		if(pistolKills >= PISTOL_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_PISTOL_1);
			return(true);
			end;
		end;
	end;
	
function CheckPistolKills2()
	System.OutputDebugString("Checking Pistol Kills 2\n");
	
	pistolKills = Profile.GetPistolKills(profile);
	if(pistolKills> PISTOL_2_THRESHOLD) then
		pistolKills = PISTOL_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_PISTOL_2 - ONLIVE_OFFSET, pistolKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_PISTOL_2) == false) then
		pistolKills = Profile.GetPistolKills(profile);
		if(pistolKills >= PISTOL_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_PISTOL_2);
			return(true);
			end;
		end;
	end;	
	
-----------------------------------------------------------------------------
-- CHECK SHOTGUN KILLS
-----------------------------------------------------------------------------

function CheckShotgunKills0()
	System.OutputDebugString("Checking Shotgun Kills 0\n");
	
	shotgunKills = Profile.GetShotgunKills(profile);
	if(shotgunKills> SHOTGUN_0_THRESHOLD) then
		shotgunKills = SHOTGUN_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_SHOTGUN_0 - ONLIVE_OFFSET, shotgunKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_SHOTGUN_0) == false) then
		shotgunKills = Profile.GetShotgunKills(profile);
		if(shotgunKills  >= SHOTGUN_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_SHOTGUN_0);
			return(true);
			end;
		end;
	end;	
	
function CheckShotgunKills1()
	System.OutputDebugString("Checking Shotgun Kills 1\n");
	
	shotgunKills = Profile.GetShotgunKills(profile);
	if(shotgunKills> SHOTGUN_1_THRESHOLD) then
		shotgunKills = SHOTGUN_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_SHOTGUN_1 - ONLIVE_OFFSET, shotgunKills);		

	if(Profile.IsAchievementUnlocked(profile, ACH_SHOTGUN_1) == false) then
		shotgunKills = Profile.GetShotgunKills(profile);
		if(shotgunKills  >= SHOTGUN_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_SHOTGUN_1);
			return(true);
			end;
		end;
	end;	

function CheckShotgunKills2()
	System.OutputDebugString("Checking Shotgun Kills 2\n");
	
	shotgunKills = Profile.GetShotgunKills(profile);
	if(shotgunKills> SHOTGUN_2_THRESHOLD) then
		shotgunKills = SHOTGUN_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_SHOTGUN_2 - ONLIVE_OFFSET, shotgunKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_SHOTGUN_2) == false) then
		shotgunKills = Profile.GetShotgunKills(profile);
		if(shotgunKills  >= SHOTGUN_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_SHOTGUN_2);
			return(true);
			end;
		end;
	end;	

-----------------------------------------------------------------------------
-- CHECK BOW KILLS
-----------------------------------------------------------------------------

function CheckBowKills0()
	System.OutputDebugString("Checking Bow Kills 0\n");

	bowKills = Profile.GetBowKills(profile);
	if(bowKills> BOW_0_THRESHOLD) then
		bowKills = BOW_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_BOW_0 - ONLIVE_OFFSET, bowKills);	
	
	if(Profile.IsAchievementUnlocked(profile, ACH_BOW_0) == false) then
		bowKills = Profile.GetBowKills(profile);
		if(bowKills  >= BOW_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_BOW_0);
			return(true);
			end;
		end;
	end;

function CheckBowKills1()
	System.OutputDebugString("Checking Bow Kills 1\n");
	
	bowKills = Profile.GetBowKills(profile);
	if(bowKills> BOW_1_THRESHOLD) then
		bowKills = BOW_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_BOW_1 - ONLIVE_OFFSET, bowKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_BOW_1) == false) then
		bowKills = Profile.GetBowKills(profile);
		if(bowKills  >= BOW_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_BOW_1);
			return(true);
			end;
		end;
	end;

function CheckBowKills2()
	System.OutputDebugString("Checking Bow Kills 2\n");
	
	bowKills = Profile.GetBowKills(profile);
	if(bowKills> BOW_2_THRESHOLD) then
		bowKills = BOW_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_BOW_2 - ONLIVE_OFFSET, bowKills);	

	if(Profile.IsAchievementUnlocked(profile, ACH_BOW_2) == false) then
		bowKills = Profile.GetBowKills(profile);
		if(bowKills  >= BOW_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_BOW_2);
			return(true);
			end;
		end;
	end;	
	
-----------------------------------------------------------------------------
-- CHECK MEDALS
-----------------------------------------------------------------------------
function CheckBronzeMedal()
	System.OutputDebugString("Checking Bronze Medals\n");
	
	bronzeMedals = Profile.GetBronzeMedals(profile);
	if(bronzeMedals > HUNTER_0_THRESHOLD) then
		bronzeMedals = HUNTER_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_HUNTER_0 - ONLIVE_OFFSET, bronzeMedals);

	if(Profile.IsAchievementUnlocked(profile, ACH_HUNTER_0) == false) then
		if(Profile.GetBronzeMedals(profile) >= HUNTER_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HUNTER_0);
			return(true);
			end;
		end;
	end;

function CheckSilverMedal()
	System.OutputDebugString("Checking Silver Medals\n");
	
	silverMedals = Profile.GetSilverMedals(profile);
	if(silverMedals > HUNTER_1_THRESHOLD) then
		silverMedals = HUNTER_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_HUNTER_1 - ONLIVE_OFFSET, silverMedals);	

	if(Profile.IsAchievementUnlocked(profile, ACH_HUNTER_1) == false) then
		if(Profile.GetSilverMedals(profile) >= HUNTER_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HUNTER_1);
			return(true);
			end;
		end;
	end;
	
function CheckGoldMedal()
	System.OutputDebugString("Checking Gold Medals\n");
	
	goldMedals = Profile.GetGoldMedals(profile);
	if(goldMedals > HUNTER_2_THRESHOLD) then
		goldMedals = HUNTER_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_HUNTER_2 - ONLIVE_OFFSET, goldMedals);	

	if(Profile.IsAchievementUnlocked(profile, ACH_HUNTER_2) == false) then
		if(Profile.GetGoldMedals(profile) >= HUNTER_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_HUNTER_2);
			return(true);
			end;
		end;
	end;
	
-----------------------------------------------------------------------------
-- CHECK DAMAGE STAGE
-----------------------------------------------------------------------------		
function CheckDamageStage()
	System.OutputDebugString("Checking Damage Stage\n");
	
	sitesNoDamage = Profile.GetSitesNoDamage(profile);
	if(sitesNoDamage > DAMAGE_THRESHOLD) then
		sitesNoDamage = DAMAGE_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_DAMAGE - ONLIVE_OFFSET, sitesNoDamage);
	
	if(Profile.IsAchievementUnlocked(profile, ACH_DAMAGE) == false) then
		if(Profile.GetSitesNoDamage(profile) >= DAMAGE_THRESHOLD) then
			EntGame.AwardAchievement(ACH_DAMAGE);
			return(true);
			end;
		end;
	end;
	
-----------------------------------------------------------------------------
-- CHECK FEMALE STAGE
-----------------------------------------------------------------------------	
function CheckFemaleStage()
	System.OutputDebugString("Checking Female Stage\n");
	
	sitesNoFemKill = Profile.GetSitesNoFemKill(profile);
	if(sitesNoFemKill > FEMALE_THRESHOLD) then
		sitesNoFemKill = FEMALE_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_FEMALE - ONLIVE_OFFSET, sitesNoFemKill);	

	if(Profile.IsAchievementUnlocked(profile, ACH_FEMALE) == false) then
		if(Profile.GetSitesNoFemKill(profile) >= FEMALE_THRESHOLD) then
			EntGame.AwardAchievement(ACH_FEMALE);
			return(true);
			end;
		end;
	end;

		
-----------------------------------------------------------------------------
-- CHECK JAWS OF DEATH
-----------------------------------------------------------------------------
function CheckJawsOfDeath0()
	System.OutputDebugString("Checking Jaws of Death 0\n");
	
	jawsOfDeath = Profile.GetJawsOfDeath(profile);
	if(jawsOfDeath > JAWS_OF_DEATH_0_THRESHOLD) then
		jawsOfDeath = JAWS_OF_DEATH_0_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_JAWS_OF_DEATH_0 - ONLIVE_OFFSET, jawsOfDeath);

	if(Profile.IsAchievementUnlocked(profile, ACH_JAWS_OF_DEATH_0) == false) then
		if(Profile.GetJawsOfDeath(profile) >= JAWS_OF_DEATH_0_THRESHOLD) then
			EntGame.AwardAchievement(ACH_JAWS_OF_DEATH_0);
			return(true);
			end;
		end;
	end;

function CheckJawsOfDeath1()
	System.OutputDebugString("Checking Jaws of Death 1\n");
	
	jawsOfDeath = Profile.GetJawsOfDeath(profile);
	if(jawsOfDeath > JAWS_OF_DEATH_1_THRESHOLD) then
		jawsOfDeath = JAWS_OF_DEATH_1_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_JAWS_OF_DEATH_1 - ONLIVE_OFFSET, jawsOfDeath);	

	if(Profile.IsAchievementUnlocked(profile, ACH_JAWS_OF_DEATH_1) == false) then
		if(Profile.GetJawsOfDeath(profile) >= JAWS_OF_DEATH_1_THRESHOLD) then
			EntGame.AwardAchievement(ACH_JAWS_OF_DEATH_1);
			return(true);
			end;
		end;
	end;
	
function CheckJawsOfDeath2()
	System.OutputDebugString("Checking Jaws of Death 2\n");
	
	jawsOfDeath = Profile.GetJawsOfDeath(profile);
	if(jawsOfDeath > JAWS_OF_DEATH_2_THRESHOLD) then
		jawsOfDeath = JAWS_OF_DEATH_2_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_JAWS_OF_DEATH_2 - ONLIVE_OFFSET, jawsOfDeath);	

	if(Profile.IsAchievementUnlocked(profile, ACH_JAWS_OF_DEATH_2) == false) then
		if(Profile.GetJawsOfDeath(profile) >= JAWS_OF_DEATH_2_THRESHOLD) then
			EntGame.AwardAchievement(ACH_JAWS_OF_DEATH_2);
			return(true);
			end;
		end;
	end;
	
-----------------------------------------------------------------------------
-- CHECK PROSPECTOR
-----------------------------------------------------------------------------
function CheckProspector()
	System.OutputDebugString("Checking Prospector\n");
	
	sitesOreDepleted = Profile.GetSitesOreDepleted(profile);
	if(sitesOreDepleted > PROSPECTOR_THRESHOLD) then
		sitesOreDepleted = PROSPECTOR_THRESHOLD;
		end;
	EntGame.SetOnLiveAchievementProgress(ACH_PROSPECTOR - ONLIVE_OFFSET, sitesOreDepleted);
	
	if(Profile.IsAchievementUnlocked(profile, ACH_PROSPECTOR) == false) then
		if(Profile.GetSitesOreDepleted(profile) >= PROSPECTOR_THRESHOLD) then
			EntGame.AwardAchievement(ACH_PROSPECTOR);
			return(true);
			end;
		end;
	end;	
				
------------------------------------------------------------------------------
function DoAchEndRound()
	System.OutputDebugString("Checking End-of-Round achievements\n");
	
	profile = EntGame.GetProfile();
    stats	= EntGame.GetPlayerState(0);
	
	System.OutputDebugString("ACH_ARCTIC_HARE\n");
	
    -- ACH_ARCTIC_HARE
    if (CheckAnimalKills(ACH_ARCTIC_HARE, AID_ARCTIC_HARE, ARCTIC_HARE_THRESHOLD)) then 
		return(true); 
		end;

	System.OutputDebugString("ACH_BIGHORN_SHEEP\n");
	
    -- ACH_BIGHORN_SHEEP
    if (CheckAnimalKills(ACH_BIGHORN_SHEEP, AID_BIGHORN_SHEEP_M, BIGHORN_SHEEP_THRESHOLD)) then 
		return(true); 
		end;

	System.OutputDebugString("ACH_BISON\n");

    -- ACH_BISON
    if (CheckAnimalKills(ACH_BISON, AID_BISON, BISON_THRESHOLD)) then 
		return(true); 
		end;

	System.OutputDebugString("ACH_BLACK_BEAR\n");
	
    -- ACH_BLACK_BEAR
    if (CheckAnimalKills(ACH_BLACK_BEAR, AID_BLACK_BEAR, BLACK_BEAR_THRESHOLD)) then 
		return(true); 
		end;

	System.OutputDebugString("ACH_BLACK_TAIL_DEER\n");
	
    -- ACH_BLACK_TAIL_DEER
    if (CheckAnimalKills(ACH_BLACK_TAIL_DEER, AID_BLACK_TAIL_DEER_M, BLACK_TAIL_DEER_THRESHOLD)) then 
		return(true); 
		end;

	System.OutputDebugString("ACH_CARIBOU\n");
	
    -- ACH_CARIBOU
    if (CheckAnimalKills(ACH_CARIBOU, AID_CARIBOU_M, CARIBOU_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_COUGAR\n");
	
    -- ACH_COUGAR
    if (CheckAnimalKills(ACH_COUGAR, AID_COUGAR, COUGAR_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_COYOTE\n");
	
    -- ACH_COYOTE
    if (CheckAnimalKills(ACH_COYOTE, AID_COYOTE, COYOTE_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_DALL_SHEEP\n");
	
    -- ACH_DALL_SHEEP
    if (CheckAnimalKills(ACH_DALL_SHEEP, AID_DALL_SHEEP_M, DALL_SHEEP_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_ELK\n");
	
    -- ACH_ELK
    if (CheckAnimalKills(ACH_ELK, AID_ELK_M, ELK_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_GOOSE\n");
	
    -- ACH_GOOSE
    if (CheckAnimalKills(ACH_GOOSE, AID_GOOSE, GOOSE_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_GRIZZLY\n");
	
    -- ACH_GRIZZLY
    if (CheckAnimalKills(ACH_GRIZZLY, AID_GRIZZLY_BEAR, GRIZZLY_BEAR_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_GROUSE\n");
	
    -- ACH_GROUSE
    if (CheckAnimalKills(ACH_GROUSE, AID_GROUSE, GROUSE_THRESHOLD)) then 
		return(true); 
		end;
	
	System.OutputDebugString("ACH_HARLEQUINN\n");
	
    -- ACH_HARLEQUINN
    if (CheckAnimalKills(ACH_HARLEQUINN, AID_HARLEQUINN, HARLEQUINN_THRESHOLD)) then 
		return(true); 
		end;
		
	System.OutputDebugString("ACH_JACKALOPE\n");
			
	-- ACH_JACKALOPE
	if (CheckAnimalKills(ACH_JACKALOPE, AID_JACKALOPE, JACKALOPE_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_LYNX\n");
	
	-- ACH_LYNX
	if (CheckAnimalKills(ACH_LYNX, AID_LYNX, LYNX_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_MOOSE\n");
	
	-- ACH_MOOSE
	if (CheckAnimalKills(ACH_MOOSE, AID_MOOSE, MOOSE_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_MUSK_OX\n");
		
	-- ACH_MUSK_OX
	if (CheckAnimalKills(ACH_MUSK_OX, AID_MUSK_OX_M, MUSK_OX_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_SALMON\n");
		
	-- ACH_SALMON
	if (CheckAnimalKills(ACH_SALMON, AID_SALMON, SALMON_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_WOLF\n");
		
	-- ACH_WOLF
	if (CheckAnimalKills(ACH_WOLF, AID_WOLF, WOLF_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_WOLVERINE\n");
		
	-- ACH_WOLVERINE
	if (CheckAnimalKills(ACH_WOLVERINE, AID_WOLVERINE, WOLVERINE_THRESHOLD)) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_POINTS_0\n");
		
	-- ACH_POINTS_0
	if(CheckPoints0()) then
		return(true);
		end;

	System.OutputDebugString("ACH_POINTS_1\n");

	-- ACH_POINTS_1
	if(CheckPoints1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_POINTS_2\n");
	
	-- ACH_POINTS_2
	if(CheckPoints2()) then
		return(true);
		end;	
	
	--System.OutputDebugString("ACH_HEADSHOT_0\n");
			
	-- ACH_HEADSHOT_0
	--if(CheckHeadShots0()) then
	--	return(true);
	--	end;

	--System.OutputDebugString("ACH_HEADSHOT_1\n");

	-- ACH_HEADSHOT_1
	--if(CheckHeadShots1()) then
	--	return(true);
	--	end;

	--System.OutputDebugString("ACH_HEADSHOT_2\n");

	-- ACH_HEADSHOT_2
	--if(CheckHeadShots2()) then
	--	return(true);
	--	end;
	
	System.OutputDebugString("ACH_VITALSHOT_0\n");
					
	-- ACH_VITALSHOT_0
	if(CheckVitalShots0()) then
		return(true);
		end;

	System.OutputDebugString("ACH_VITALSHOT_1\n");
	
	-- ACH_VITALSHOT_1
	if(CheckVitalShots1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_VITALSHOT_2\n");
		
	-- ACH_VITALSHOT_2
	if(CheckVitalShots2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_MULTIKILLS_0\n");
						
	-- ACH_MULTIKILLS_0
	if(CheckMultiKills0()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_MULTIKILLS_1\n");
	
	-- ACH_MULTIKILLS_1
	if(CheckMultiKills1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_MULTIKILLS_2\n");
		
	-- ACH_MULTIKILLS_2
	if(CheckMultiKills2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_ACCURACY_0\n");
					
	-- ACH_ACCURACY_0
	if(CheckAccuracy0()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_ACCURACY_1\n");
	
	-- ACH_ACCURACY_1
	if(CheckAccuracy1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_ACCURACY_2\n");
	
	-- ACH_ACCURACY_2
	if(CheckAccuracy2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_RIFLE_0\n");
					
	-- ACH_RIFLE_0
	if(CheckRifleKills0()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_RIFLE_1\n");
	
	-- ACH_RIFLE_1
	if(CheckRifleKills1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_RIFLE_2\n");
		
	-- ACH_RIFLE_2
	if(CheckRifleKills2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_PISTOL_0\n");
					
	-- ACH_PISTOL_0
	if(CheckPistolKills0()) then
		return(true);
		end;

	System.OutputDebugString("ACH_PISTOL_1\n");
	
	-- ACH_PISTOL_1
	if(CheckPistolKills1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_PISTOL_2\n");
		
	-- ACH_PISTOL_2
	if(CheckPistolKills2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_SHOTGUN_0\n");
					
	-- ACH_SHOTGUN_0
	if(CheckShotgunKills0()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_SHOTGUN_1\n");
		
	-- ACH_SHOTGUN_1
	if(CheckShotgunKills1()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_SHOTGUN_2\n");
		
	-- ACH_SHOTGUN_2
	if(CheckShotgunKills2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_BOW_0\n");
				
	-- ACH_BOW_0
	if(CheckBowKills0()) then
		return(true);
		end;

	System.OutputDebugString("ACH_BOW_1\n");

	-- ACH_BOW_1
	if(CheckBowKills1()) then
		return(true);
		end;

	System.OutputDebugString("ACH_BOW_2\n");

	-- ACH_BOW_2
	if(CheckBowKills2()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_HUNTER_0\n");
		
	-- ACH_HUNTER_0
	if(CheckBronzeMedal()) then
		return(true);
		end;
		
	System.OutputDebugString("ACH_HUNTER_1\n");

	-- ACH_HUNTER_1
	if(CheckSilverMedal()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_HUNTER_2\n");
	
	-- ACH_HUNTER_2
	if(CheckGoldMedal()) then
		return(true);
		end;	

	System.OutputDebugString("ACH_FEMALE_STAGE\n");
						
	-- ACH_FEMALE_STAGE
	if(CheckFemaleStage()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_DAMAGE\n");
		
	-- ACH_DAMAGE
	if(CheckDamageStage()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_JAWS_OF_DEATH_0\n");
		
	-- ACH_JAWS_OF_DEATH_0
	if(CheckJawsOfDeath0()) then
		return(true);
		end;

	System.OutputDebugString("ACH_JAWS_OF_DEATH_1\n");
	
	-- ACH_JAWS_OF_DEATH_1
	if(CheckJawsOfDeath1()) then
		return(true);
		end;
		
	System.OutputDebugString("ACH_JAWS_OF_DEATH_2\n");
	
	-- ACH_JAWS_OF_DEATH_2		
	if(CheckJawsOfDeath2()) then
		return(true);
		end;				
	
	System.OutputDebugString("ACH_PROSPECTOR\n");
		
	-- ACH_PROSPECTOR
	if(CheckProspector()) then
		return(true);
		end;
	
	System.OutputDebugString("ACH_EQUIPMENT\n");
		
	-- ACH_EQUIPMENT
	if(CheckAllEquipment()) then
		return(true);
		end;
	
	System.OutputDebugString("End of Achievement Checking\n");
	
	end;