@LabelIndex 154255
@StringIndex 19480
class 0 keltir : 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( gg::HaveMemo(target,154) == 1 && gg::OwnItemCount(target,1032) < 10 && gg::OwnItemCount(target,1033) == 0 && gg::OwnItemCount(target,1034) == 0 ) {
			random1_list::SetInfo(0,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(154);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						if( gg::Rand(10) < 4 ) {
							myself::GiveItem1(target,1032,1);
							if( gg::OwnItemCount(target,1032) >= 9 ) {
								myself::SoundEffect(target,"ItemSound.quest_middle");
								myself::SetFlagJournal(target,154,2);
								myself::ShowQuestMark(target,154);
							} else {
								myself::SoundEffect(target,"ItemSound.quest_itemget");
							}
						}
					}
					break;
				}
			}
		}
		super;
	}

}
