class 1 argos_boss_08 : warrior_aggressive
{
handler:
	EventHandler MY_DYING(always_list,code_info,i9,last_attacker,lparty,member,random1_list,target)
	{
		always_list = gg::AllocCodeInfoList();
		random1_list = gg::AllocCodeInfoList();
		target = last_attacker;
		if( myself::HaveMemo(target,76) == 1 && target.occupation == 48 && myself::GetMemoState(target,76) == 12 && myself::OwnItemCount(target,7398) == 0 )
		{
			always_list::SetInfo(0,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,77) == 1 && target.occupation == 51 && myself::GetMemoState(target,77) == 12 && myself::OwnItemCount(target,7399) == 0 )
		{
			always_list::SetInfo(1,target);
		}
		while( gg::IsNull(code_info = always_list::Next()) == 0 )
		{
			switch(code_info.code)
			{
				case 0:
				{
					myself::SetCurrentQuestID(76);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( target.is_pc == 1 )
						{
							if( target.dbid == myself.sm.param2 )
							{
								myself::GiveItem1(target,7398,1);
								myself::SetFlagJournal(target,76,16);
								myself::SoundEffect(target,"ItemSound.quest_middle");
								myself::DeleteItem1(target,7491,myself::OwnItemCount(target,7491));
								myself::Say(myself::MakeFString(7654,"","","","",""));
							}
							else
							{
								myself::Say(myself::MakeFString(7655,"","","","",""));
							}
						}
					}
					break;
				}
				case 1:
				{
					myself::SetCurrentQuestID(77);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( target.is_pc == 1 )
						{
							if( target.dbid == myself.sm.param2 )
							{
								myself::GiveItem1(target,7399,1);
								myself::SetFlagJournal(target,77,16);
								myself::SoundEffect(target,"ItemSound.quest_middle");
								myself::DeleteItem1(target,7492,myself::OwnItemCount(target,7492));
								myself::Say(myself::MakeFString(7754,"","","","",""));
							}
							else
							{
								myself::Say(myself::MakeFString(7755,"","","","",""));
							}
						}
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 )
		{
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(c0,i0,timer_id)
	{
		myself::SetCurrentQuestID(76);
		if( timer_id == 99908 )
		{
			myself::Say(myself::MakeFString(7656,"","","","",""));
			myself::Despawn();
		}
		myself::SetCurrentQuestID(77);
		if( timer_id == 99908 )
		{
			myself::Say(myself::MakeFString(7756,"","","","",""));
			myself::Despawn();
		}
		super;
	}

	EventHandler CREATED(c0)
	{
		myself::SetCurrentQuestID(76);
		myself::AddTimerEx(99908,( 1000 * 600 ));
		c0 = myself::GetCreatureFromIndex(myself.sm.param1);
		if( c0 )
		{
			if( c0.is_pc == 1 )
			{
				myself::AddAttackDesire(c0,1,10000);
			}
			if( c0.is_pc == 1 )
			{
				myself::Say(myself::MakeFString(7653,c0.name,"","","",""));
			}
		}
		myself::SetCurrentQuestID(77);
		myself::AddTimerEx(99908,( 1000 * 600 ));
		c0 = myself::GetCreatureFromIndex(myself.sm.param1);
		if( c0 )
		{
			if( c0.is_pc == 1 )
			{
				myself::AddAttackDesire(c0,1,10000);
			}
			if( c0.is_pc == 1 )
			{
				myself::Say(myself::MakeFString(7753,c0.name,"","","",""));
			}
		}
		super;
	}

}
