@LabelIndex 221386
@StringIndex 24914
class 0 serpent_demon_kadesh : warrior_passive {
handler:
	EventHandler MY_DYING(always_list,c1,code_info,i9,last_attacker,lparty,member,random1_list,target,weapon_class_id) {
		always_list = gg::AllocCodeInfoList();
		random1_list = gg::AllocCodeInfoList();
		target = last_attacker;
		always_list::SetInfo(0,target);
		while( gg::IsNull(code_info = always_list::Next()) == 0 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(224);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						c1 = myself::GetLastAttacker();
						if( c1.master ) {
							c1 = c1.master;
						}
						if( gg::HaveMemo(c1,224) && gg::GetMemoState(c1,224) == 13 && gg::OwnItemCount(c1,3300) == 0 ) {
							if( myself.sm.last_blow_weapon_class_id == 3028 ) {
								myself::GiveItem1(c1,3300,1);
								myself::SetMemoState(c1,224,14);
								myself::SoundEffect(c1,"Itemsound.quest_middle");
								myself::SetFlagJournal(c1,224,14);
								myself::ShowQuestMark(c1,224);
							} else {
								myself::CreateOnePrivateEx(1027090,"serpent_demon_kadesh",0,0,gg::FloatToInt(myself.sm.x),gg::FloatToInt(myself.sm.y),gg::FloatToInt(myself.sm.z),0,0,0,0);
							}
						}
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 ) {
			switch (code_info.code) {
			}
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id) {
		myself::SetCurrentQuestID(224);
		if( timer_id == 22401 ) {
			myself::Despawn();
		}
		super;
	}

	EventHandler CREATED(i0) {
		myself::SetCurrentQuestID(224);
		myself::AddTimerEx(22401,( 1000 * 300 ));
		super;
	}

}
