class 1 halisha_tishas : raid_boss_type3
{
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;
		always_list::SetInfo(0,target);
		target = last_attacker;
		if( myself::HaveMemo(target,620) == 1 )
		{
			always_list::SetInfo(1,target);
		}
		if( gg::IsNull(lparty) == 0 )
		{
			for(i9 = 0; i9 < lparty.member_count; i9 = ( i9 + 1 ))
			{
				target = myself::GetMemberOfParty(lparty,i9);
				if( myself::HaveMemo(target,620) == 1 )
				{
					always_list::SetInfo(1,target);
				}
			}
		}
		while( gg::IsNull(code_info = always_list::Next()) == 0 )
		{
			switch(code_info.code)
			{
				case 0:
				{
					myself::SetCurrentQuestID(620);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						myself::CreateOnePrivateEx(1031452,"wigoth_ghost_a",0,0,myself::FloatToInt(myself.sm.x),myself::FloatToInt(myself.sm.y),myself::FloatToInt(myself.sm.z),0,0,0,0);
					}
					break;
				}
				case 1:
				{
					myself::SetCurrentQuestID(620);
					while( gg::IsNull(target = code_info::Next()) == 0 && myself::DistFromMe(target) <= 1500 )
					{
						myself::SetCurrentQuestID(620);
						if( myself::OwnItemCount(target,7257) == 0 && myself::OwnItemCount(target,7262) == 0 )
						{
							myself::GiveItem1(target,7257,1);
						}
						myself::SetMemoStateEx(target,620,1,2);
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 )
		{
		}
		super;
	}

}
