class 1 tutorial_gremlin : warrior_passive
{
handler:
	EventHandler MY_DYING(always_list,c1,code_info,i9,last_attacker,lparty,member,random1_list,target)
	{
		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 )
		{
			if( code_info.code == 0 )
			{
				myself::SetCurrentQuestID(201);
				target = code_info::RandomSelectOne();
				if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
				{
					c1 = myself::GetLastAttacker();
					if( myself::GetMemoStateEx(myself.c_quest0,255,1) == 1 || myself::GetMemoStateEx(myself.c_quest0,255,1) == 0 )
					{
						myself::VoiceEffect(myself.c_quest0,"tutorial_voice_011",1000);
						myself::ShowQuestionMark(myself.c_quest0,3);
						myself::SetMemoStateEx(myself.c_quest0,255,1,2);
					}
					if( ( ( ( myself::GetMemoStateEx(myself.c_quest0,255,1) == 1 || myself::GetMemoStateEx(myself.c_quest0,255,1) == 2 || myself::GetMemoStateEx(myself.c_quest0,255,1) == 0 ) && myself::OwnItemCount(myself.c_quest0,6353) < 1 ) && myself.i_quest0 == 1 ) && gg::Rand(2) == 0 )
					{
						myself::DropItem1(myself.c_quest0,6353,1);
						myself::SoundEffect(myself.c_quest0,"ItemSound.quest_tutorial");
					}
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 )
		{
		}
		super;
	}

	EventHandler ATTACKED(attacker,damage)
	{
		myself::SetCurrentQuestID(201);
		switch(myself.i_quest0)
		{
			case 0:
			{
				myself.i_quest0 = 1;
				myself.c_quest0 = attacker;
			}
			case 1:
			{
				if( myself.c_quest0 != attacker )
				{
					myself.i_quest0 = 2;
				}
				break;
			}
			case 2:
			{
				break;
			}
		}
		super;
	}

}
