@LabelIndex 229384
@StringIndex 28276
class 0 beres : ai_boss09_beres {
handler:
	EventHandler MY_DYING(always_list,code_info,i0,i1,i9,last_attacker,lparty,member,random1_list,target) {
		always_list = gg::AllocCodeInfoList();
		random1_list = gg::AllocCodeInfoList();
		target = last_attacker;
		if( gg::HaveMemo(target,350) == 1 ) {
			always_list::SetInfo(0,target);
		}
		if( gg::HaveMemo(target,350) == 1 ) {
			always_list::SetInfo(0,target);
		}
		if( gg::IsNull(lparty) == 0 ) {
			for(i9 = 0; i9 < lparty.member_count; i9++) {
				target = myself::GetMemberOfParty(lparty,i9);
				if( gg::HaveMemo(target,350) == 1 ) {
					always_list::SetInfo(0,target);
				}
			}
		}
		while( gg::IsNull(code_info = always_list::Next()) == 0 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(350);
					while( gg::IsNull(target = code_info::Next()) == 0 ) {
						if( myself::DistFromMe(target) <= 1500 ) {
							myself::SetCurrentQuestID(350);
							i1 = gg::Rand(1000);
							if( i1 < 100 ) {
								if( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( gg::OwnItemCount(target,4651) + gg::OwnItemCount(target,4652) ) + gg::OwnItemCount(target,4653) ) + gg::OwnItemCount(target,4654) ) + gg::OwnItemCount(target,4655) ) + gg::OwnItemCount(target,4656) ) + gg::OwnItemCount(target,4657) ) + gg::OwnItemCount(target,4658) ) + gg::OwnItemCount(target,4659) ) + gg::OwnItemCount(target,4660) ) + gg::OwnItemCount(target,4661) ) + gg::OwnItemCount(target,5579) ) + gg::OwnItemCount(target,5582) ) + gg::OwnItemCount(target,5914) ) + gg::OwnItemCount(target,4629) ) + gg::OwnItemCount(target,4630) ) + gg::OwnItemCount(target,4631) ) + gg::OwnItemCount(target,4632) ) + gg::OwnItemCount(target,4633) ) + gg::OwnItemCount(target,4634) ) + gg::OwnItemCount(target,4635) ) + gg::OwnItemCount(target,4636) ) + gg::OwnItemCount(target,4637) ) + gg::OwnItemCount(target,4638) ) + gg::OwnItemCount(target,4639) ) + gg::OwnItemCount(target,5577) ) + gg::OwnItemCount(target,5580) ) + gg::OwnItemCount(target,5908) ) + gg::OwnItemCount(target,4640) ) + gg::OwnItemCount(target,4641) ) + gg::OwnItemCount(target,4642) ) + gg::OwnItemCount(target,4643) ) + gg::OwnItemCount(target,4644) ) + gg::OwnItemCount(target,4645) ) + gg::OwnItemCount(target,4646) ) + gg::OwnItemCount(target,4647) ) + gg::OwnItemCount(target,4648) ) + gg::OwnItemCount(target,4649) ) + gg::OwnItemCount(target,4650) ) + gg::OwnItemCount(target,5578) ) + gg::OwnItemCount(target,5581) ) + gg::OwnItemCount(target,5911) ) + gg::OwnItemCount(target,9571) ) + gg::OwnItemCount(target,10161) ) + gg::OwnItemCount(target,9570) ) + gg::OwnItemCount(target,10160) ) + gg::OwnItemCount(target,9572) ) + gg::OwnItemCount(target,10162) ) + gg::OwnItemCount(target,10482) ) + gg::OwnItemCount(target,10481) ) + gg::OwnItemCount(target,10480) ) + gg::OwnItemCount(target,13072) ) + gg::OwnItemCount(target,13073) ) + gg::OwnItemCount(target,13071) ) == 1 ) {
									if( gg::OwnItemCount(target,9571) == 1 ) {
										myself::DeleteItem1(target,9571,1);
										myself::GiveItem1(target,10481,1);
										gg::AddLog(6,target,10481);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35051,target.name,gg::IntToStr(15),"","",""));
									} else if( gg::OwnItemCount(target,9572) == 1 ) {
										myself::DeleteItem1(target,9572,1);
										myself::GiveItem1(target,10482,1);
										gg::AddLog(6,target,10482);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35053,target.name,gg::IntToStr(15),"","",""));
									} else if( gg::OwnItemCount(target,9570) == 1 ) {
										myself::DeleteItem1(target,9570,1);
										myself::GiveItem1(target,10480,1);
										gg::AddLog(6,target,10480);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35052,target.name,gg::IntToStr(15),"","",""));
									} else if( gg::OwnItemCount(target,10481) == 1 ) {
										myself::DeleteItem1(target,10481,1);
										myself::GiveItem1(target,13072,1);
										gg::AddLog(6,target,13072);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35051,target.name,gg::IntToStr(16),"","",""));
									} else if( gg::OwnItemCount(target,10482) == 1 ) {
										myself::DeleteItem1(target,10482,1);
										myself::GiveItem1(target,13073,1);
										gg::AddLog(6,target,13073);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35053,target.name,gg::IntToStr(16),"","",""));
									} else if( gg::OwnItemCount(target,10480) == 1 ) {
										myself::DeleteItem1(target,10480,1);
										myself::GiveItem1(target,13071,1);
										gg::AddLog(6,target,13071);
										myself::SoundEffect(target,"ItemSound.quest_itemget");
										myself::ShowSystemMessage(target,974);
										myself::BroadcastSystemMessageStr(myself.sm,1500,gg::MakeFString(35052,target.name,gg::IntToStr(16),"","",""));
									} else if( gg::OwnItemCount(target,13072) >= 1 || gg::OwnItemCount(target,13073) >= 1 || gg::OwnItemCount(target,13071) >= 1 ) {
										myself::ShowSystemMessage(target,978);
									} else {
										myself::ShowSystemMessage(target,1264);
									}
								} else if( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( gg::OwnItemCount(target,4651) + gg::OwnItemCount(target,4652) ) + gg::OwnItemCount(target,4653) ) + gg::OwnItemCount(target,4654) ) + gg::OwnItemCount(target,4655) ) + gg::OwnItemCount(target,4656) ) + gg::OwnItemCount(target,4657) ) + gg::OwnItemCount(target,4658) ) + gg::OwnItemCount(target,4659) ) + gg::OwnItemCount(target,4660) ) + gg::OwnItemCount(target,4661) ) + gg::OwnItemCount(target,5579) ) + gg::OwnItemCount(target,5582) ) + gg::OwnItemCount(target,5914) ) + gg::OwnItemCount(target,4629) ) + gg::OwnItemCount(target,4630) ) + gg::OwnItemCount(target,4631) ) + gg::OwnItemCount(target,4632) ) + gg::OwnItemCount(target,4633) ) + gg::OwnItemCount(target,4634) ) + gg::OwnItemCount(target,4635) ) + gg::OwnItemCount(target,4636) ) + gg::OwnItemCount(target,4637) ) + gg::OwnItemCount(target,4638) ) + gg::OwnItemCount(target,4639) ) + gg::OwnItemCount(target,5577) ) + gg::OwnItemCount(target,5580) ) + gg::OwnItemCount(target,5908) ) + gg::OwnItemCount(target,4640) ) + gg::OwnItemCount(target,4641) ) + gg::OwnItemCount(target,4642) ) + gg::OwnItemCount(target,4643) ) + gg::OwnItemCount(target,4644) ) + gg::OwnItemCount(target,4645) ) + gg::OwnItemCount(target,4646) ) + gg::OwnItemCount(target,4647) ) + gg::OwnItemCount(target,4648) ) + gg::OwnItemCount(target,4649) ) + gg::OwnItemCount(target,4650) ) + gg::OwnItemCount(target,5578) ) + gg::OwnItemCount(target,5581) ) + gg::OwnItemCount(target,5911) ) + gg::OwnItemCount(target,9571) ) + gg::OwnItemCount(target,10161) ) + gg::OwnItemCount(target,9570) ) + gg::OwnItemCount(target,10160) ) + gg::OwnItemCount(target,9572) ) + gg::OwnItemCount(target,10162) ) + gg::OwnItemCount(target,10481) ) + gg::OwnItemCount(target,10482) ) + gg::OwnItemCount(target,10480) ) + gg::OwnItemCount(target,13072) ) + gg::OwnItemCount(target,13073) ) + gg::OwnItemCount(target,13071) ) >= 2 ) {
									myself::ShowSystemMessage(target,977);
								} else {
									myself::ShowSystemMessage(target,1265);
								}
							}
						}
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 ) {
			switch (code_info.code) {
			}
		}
		super;
	}

}
