@LabelIndex 162213
@StringIndex 20464
class 0 harit_lizardm_matriarch : warrior_aggressive_physicalspecial {
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( ( ( gg::GetMemoState(target,337) == 21110 || gg::GetMemoState(target,337) == 21100 || gg::GetMemoState(target,337) == 21010 || gg::GetMemoState(target,337) == 21000 || gg::GetMemoState(target,337) == 20110 || gg::GetMemoState(target,337) == 20100 || gg::GetMemoState(target,337) == 20010 || gg::GetMemoState(target,337) == 20000 ) && gg::OwnItemCount(target,3858) == 0 ) && gg::HaveMemo(target,337) == 1 ) {
			random1_list::SetInfo(0,target);
		}
		if( ( ( gg::GetMemoState(target,337) == 21110 || gg::GetMemoState(target,337) == 21100 || gg::GetMemoState(target,337) == 21010 || gg::GetMemoState(target,337) == 21000 || gg::GetMemoState(target,337) == 20110 || gg::GetMemoState(target,337) == 20100 || gg::GetMemoState(target,337) == 20010 || gg::GetMemoState(target,337) == 20000 ) && gg::OwnItemCount(target,3858) == 0 ) && gg::HaveMemo(target,337) == 1 ) {
			random1_list::SetInfo(0,target);
		}
		if( gg::IsNull(lparty) == 0 ) {
			for(i9 = 0; i9 < lparty.member_count; i9++) {
				target = myself::GetMemberOfParty(lparty,i9);
				if( ( ( gg::GetMemoState(target,337) == 21110 || gg::GetMemoState(target,337) == 21100 || gg::GetMemoState(target,337) == 21010 || gg::GetMemoState(target,337) == 21000 || gg::GetMemoState(target,337) == 20110 || gg::GetMemoState(target,337) == 20100 || gg::GetMemoState(target,337) == 20010 || gg::GetMemoState(target,337) == 20000 ) && gg::OwnItemCount(target,3858) == 0 ) && gg::HaveMemo(target,337) == 1 ) {
					random1_list::SetInfo(0,target);
				}
			}
		}
		target = last_attacker;
		if( gg::HaveMemo(target,336) && gg::GetMemoState(target,336) == 2 && gg::OwnItemCount(target,3812) == 0 ) {
			random1_list::SetInfo(1,target);
		}
		if( gg::HaveMemo(target,336) && gg::GetMemoState(target,336) == 2 && gg::OwnItemCount(target,3812) == 0 ) {
			random1_list::SetInfo(1,target);
		}
		if( gg::IsNull(lparty) == 0 ) {
			for(i9 = 0; i9 < lparty.member_count; i9++) {
				target = myself::GetMemberOfParty(lparty,i9);
				if( gg::HaveMemo(target,336) && gg::GetMemoState(target,336) == 2 && gg::OwnItemCount(target,3812) == 0 ) {
					random1_list::SetInfo(1,target);
				}
			}
		}
		while( gg::IsNull(code_info = always_list::Next()) == 0 ) {
			switch (code_info.code) {
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(337);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						if( gg::Rand(5) == 0 ) {
							myself::CreateOnePrivate(1027172,"harit_lizardman_zealot",0,1);
							myself::CreateOnePrivate(1027172,"harit_lizardman_zealot",0,1);
							myself::CreateOnePrivate(1027172,"harit_lizardman_zealot",0,1);
						}
					}
					break;
				}
				case 1: {
					myself::SetCurrentQuestID(336);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						if( gg::Rand(100) < 63 ) {
							target.quest_last_reward_time = myself::GetCurrentTick();
							myself::GiveItem1(target,3812,1);
							myself::SoundEffect(target,"ItemSound.quest_itemget");
							myself::SetFlagJournal(target,336,3);
							myself::ShowQuestMark(target,336);
						}
					}
					break;
				}
			}
		}
		super;
	}

}
