class 1 guardian_of_secrets_b : warrior_passive
{
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,71) == 1 && target.occupation == 20 && myself::GetMemoState(target,71) == 6 && myself::OwnItemCount(target,7300) == 0 )
		{
			always_list::SetInfo(0,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,74) == 1 && target.occupation == 3 && myself::GetMemoState(target,74) == 6 && myself::OwnItemCount(target,7303) == 0 )
		{
			always_list::SetInfo(1,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,77) == 1 && target.occupation == 51 && myself::GetMemoState(target,77) == 6 && myself::OwnItemCount(target,7306) == 0 )
		{
			always_list::SetInfo(2,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,80) == 1 && target.occupation == 23 && myself::GetMemoState(target,80) == 6 && myself::OwnItemCount(target,7309) == 0 )
		{
			always_list::SetInfo(3,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,83) == 1 && target.occupation == 24 && myself::GetMemoState(target,83) == 6 && myself::OwnItemCount(target,7312) == 0 )
		{
			always_list::SetInfo(4,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,86) == 1 && target.occupation == 17 && myself::GetMemoState(target,86) == 6 && myself::OwnItemCount(target,7315) == 0 )
		{
			always_list::SetInfo(5,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,89) == 1 && target.occupation == 27 && myself::GetMemoState(target,89) == 6 && myself::OwnItemCount(target,7318) == 0 )
		{
			always_list::SetInfo(6,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,92) == 1 && target.occupation == 28 && myself::GetMemoState(target,92) == 6 && myself::OwnItemCount(target,7321) == 0 )
		{
			always_list::SetInfo(7,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,94) == 1 && target.occupation == 13 && myself::GetMemoState(target,94) == 6 && myself::OwnItemCount(target,7323) == 0 )
		{
			always_list::SetInfo(8,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,97) == 1 && target.occupation == 33 && myself::GetMemoState(target,97) == 6 && myself::OwnItemCount(target,7326) == 0 )
		{
			always_list::SetInfo(9,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,100) == 1 && target.occupation == 57 && myself::GetMemoState(target,100) == 6 && myself::OwnItemCount(target,7329) == 0 )
		{
			always_list::SetInfo(10,target);
		}
		target = last_attacker;
		if( myself::HaveMemo(target,68) == 1 && ( myself::GetMemoState(target,68) == 6 && ( myself::OwnItemCount(target,9726) == 0 && ( target.occupation == 128 || target.occupation == 129 ) ) ) )
		{
			always_list::SetInfo(11,target);
		}
		while( gg::IsNull(code_info = always_list::Next()) == 0 )
		{
			switch(code_info.code)
			{
				case 0:
				{
					myself::SetCurrentQuestID(71);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,71,1) < 9 )
						{
							myself::SetMemoStateEx(target,71,1,( myself::GetMemoStateEx(target,71,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7300,1);
							myself::SetFlagJournal(target,71,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 1:
				{
					myself::SetCurrentQuestID(74);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,74,1) < 9 )
						{
							myself::SetMemoStateEx(target,74,1,( myself::GetMemoStateEx(target,74,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7303,1);
							myself::SetFlagJournal(target,74,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 2:
				{
					myself::SetCurrentQuestID(77);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,77,1) < 9 )
						{
							myself::SetMemoStateEx(target,77,1,( myself::GetMemoStateEx(target,77,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7306,1);
							myself::SetFlagJournal(target,77,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 3:
				{
					myself::SetCurrentQuestID(80);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,80,1) < 9 )
						{
							myself::SetMemoStateEx(target,80,1,( myself::GetMemoStateEx(target,80,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7309,1);
							myself::SetFlagJournal(target,80,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 4:
				{
					myself::SetCurrentQuestID(83);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,83,1) < 9 )
						{
							myself::SetMemoStateEx(target,83,1,( myself::GetMemoStateEx(target,83,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7312,1);
							myself::SetFlagJournal(target,83,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 5:
				{
					myself::SetCurrentQuestID(86);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,86,1) < 9 )
						{
							myself::SetMemoStateEx(target,86,1,( myself::GetMemoStateEx(target,86,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7315,1);
							myself::SetFlagJournal(target,86,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 6:
				{
					myself::SetCurrentQuestID(89);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,89,1) < 9 )
						{
							myself::SetMemoStateEx(target,89,1,( myself::GetMemoStateEx(target,89,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7318,1);
							myself::SetFlagJournal(target,89,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 7:
				{
					myself::SetCurrentQuestID(92);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,92,1) < 9 )
						{
							myself::SetMemoStateEx(target,92,1,( myself::GetMemoStateEx(target,92,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7321,1);
							myself::SetFlagJournal(target,92,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 8:
				{
					myself::SetCurrentQuestID(94);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,94,1) < 9 )
						{
							myself::SetMemoStateEx(target,94,1,( myself::GetMemoStateEx(target,94,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7323,1);
							myself::SetFlagJournal(target,94,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 9:
				{
					myself::SetCurrentQuestID(97);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,97,1) < 9 )
						{
							myself::SetMemoStateEx(target,97,1,( myself::GetMemoStateEx(target,97,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7326,1);
							myself::SetFlagJournal(target,97,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 10:
				{
					myself::SetCurrentQuestID(100);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,100,1) < 9 )
						{
							myself::SetMemoStateEx(target,100,1,( myself::GetMemoStateEx(target,100,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,7329,1);
							myself::SetFlagJournal(target,100,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
				case 11:
				{
					myself::SetCurrentQuestID(68);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						if( myself::GetMemoStateEx(target,68,1) < 9 )
						{
							myself::SetMemoStateEx(target,68,1,( myself::GetMemoStateEx(target,68,1) + 1 ));
						}
						else
						{
							myself::GiveItem1(target,9726,1);
							myself::SetFlagJournal(target,68,7);
							myself::SoundEffect(target,"ItemSound.quest_middle");
						}
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 )
		{
		}
		super;
	}

}
