class 1 silhouette_f : summon_magicalattack
{
handler:
	EventHandler MY_DYING(always_list,c0,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(230);
				target = code_info::RandomSelectOne();
				if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
				{
					c0 = myself::GetLastAttacker();
					if( c0.npc_class_id == 1027103 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3371) )
							{
								myself::GiveItem1(c1,3373,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3371,myself::OwnItemCount(c1,3371));
								myself::DeleteItem1(c1,3370,myself::OwnItemCount(c1,3370));
							}
						}
					}
					else if( c0.npc_class_id == 1027102 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3361) )
							{
								myself::GiveItem1(c1,3363,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3361,myself::OwnItemCount(c1,3361));
								myself::DeleteItem1(c1,3360,myself::OwnItemCount(c1,3360));
							}
						}
					}
					else if( c0.npc_class_id == 1027105 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3366) )
							{
								myself::GiveItem1(c1,3368,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3366,myself::OwnItemCount(c1,3366));
								myself::DeleteItem1(c1,3365,myself::OwnItemCount(c1,3365));
							}
						}
					}
					else if( c0.npc_class_id == 1027106 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3376) )
							{
								myself::GiveItem1(c1,3378,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3376,myself::OwnItemCount(c1,3376));
								myself::DeleteItem1(c1,3375,myself::OwnItemCount(c1,3375));
							}
						}
					}
					else if( c0.npc_class_id == 1027107 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3386) )
							{
								myself::GiveItem1(c1,3388,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3386,myself::OwnItemCount(c1,3386));
								myself::DeleteItem1(c1,3385,myself::OwnItemCount(c1,3385));
							}
						}
					}
					else if( c0.npc_class_id == 1027104 )
					{
						if( myself.sm.master )
						{
							c1 = myself.sm.master;
							if( myself::HaveMemo(c1,230) && myself::OwnItemCount(c1,3381) )
							{
								myself::GiveItem1(c1,3383,1);
								myself::SoundEffect(c1,"ItemSound.quest_itemget");
								myself::DeleteItem1(c1,3381,myself::OwnItemCount(c1,3381));
								myself::DeleteItem1(c1,3380,myself::OwnItemCount(c1,3380));
							}
						}
					}
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 )
		{
		}
		super;
	}

}
