@LabelIndex 419392
@StringIndex 63382
class 0 b_big_adult_gourd : default_npc {
handler:
	EventHandler MY_DYING(always_list,c1,code_info,i0,i1,i2,i9,i_quest4,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 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(997);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						c1 = myself::GetLastAttacker();
						i0 = gg::Rand(10);
						i0 = ( 99770 + i0 );
						myself::Say(gg::MakeFString(i0,"","","","",""));
						if( gg::Rand(10000) < 5000 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,956,4,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 2150 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,955,2,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 3620 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,952,2,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 1950 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,951,1,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 1340 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,948,1,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 429 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,947,1,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 3968 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,1374,12,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 3968 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,1375,6,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 3968 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,6036,6,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 2380 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							myself::DropItem2(myself.sm,1540,9,myself.sm.summoner_id);
						}
						if( gg::Rand(10000) < 428 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							i2 = gg::Rand(3);
							if( i2 == 0 ) {
								myself::DropItem2(myself.sm,4649,1,myself.sm.summoner_id);
							}
							if( i2 == 1 ) {
								myself::DropItem2(myself.sm,4638,1,myself.sm.summoner_id);
							}
							if( i2 == 2 ) {
								myself::DropItem2(myself.sm,4660,1,myself.sm.summoner_id);
							}
						}
						if( gg::Rand(10000) < 1 ) {
							myself.i_quest4 = ( myself.i_quest4 + 1 );
							i1 = gg::Rand(3);
							if( i1 == 0 ) {
								myself::DropItem2(myself.sm,5581,1,myself.sm.summoner_id);
							}
							if( i1 == 1 ) {
								myself::DropItem2(myself.sm,5580,1,myself.sm.summoner_id);
							}
							if( i1 == 2 ) {
								myself::DropItem2(myself.sm,5582,1,myself.sm.summoner_id);
							}
						}
						if( myself.i_quest4 < 1 ) {
							myself::DropItem2(c1,1461,2,myself.sm.summoner_id);
						}
						myself::SoundEffect(myself.sm,"ItemSound.quest_middle");
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 ) {
			switch (code_info.code) {
			}
		}
		super;
	}

	EventHandler ATTACKED(attacker,damage,i0,i1,i2) {
		myself::SetCurrentQuestID(997);
		switch(myself.i_quest0) {
			case 0: {
				if( myself.sm.last_blow_weapon_class_id == 5817 || myself.sm.last_blow_weapon_class_id == 4202 || myself.sm.last_blow_weapon_class_id == 5133 || myself.sm.last_blow_weapon_class_id == 7058 || myself.sm.last_blow_weapon_class_id == 8350 ) {
					i0 = gg::Rand(10);
					i0 = ( 99750 + i0 );
					myself::Say(gg::MakeFString(i0,"","","","",""));
				}
				myself.i_quest0 = 1;
				break;
			}
			case 1: {
				if( myself.sm.last_blow_weapon_class_id == 5817 || myself.sm.last_blow_weapon_class_id == 4202 || myself.sm.last_blow_weapon_class_id == 5133 || myself.sm.last_blow_weapon_class_id == 7058 || myself.sm.last_blow_weapon_class_id == 8350 ) {
					if( gg::Rand(5) == 0 ) {
						i0 = gg::Rand(10);
						i0 = ( 99750 + i0 );
						i1 = ( i1 + 1 );
						myself::Say(gg::MakeFString(i0,"","","","",""));
					}
				} else if( gg::Rand(3) == 0 ) {
					i0 = gg::Rand(10);
					i0 = ( 99760 + i0 );
					i1 = ( i1 + 1 );
					myself::Say(gg::MakeFString(i0,"","","","",""));
				}
				break;
			}
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(i0,talker,timer_id) {
		myself::SetCurrentQuestID(997);
		if( timer_id == 99706 ) {
			i0 = ( 99745 + gg::Rand(5) );
			myself::Say(gg::MakeFString(i0,"","","","",""));
			myself::Despawn();
		}
		if( timer_id == 99720 ) {
			myself::Say(gg::MakeFString(99740,"","","","",""));
			myself::AddTimerEx(99721,( 1000 * 10 ));
		}
		if( timer_id == 99721 ) {
			myself::Say(gg::MakeFString(99741,"","","","",""));
			myself::AddTimerEx(99722,( 1000 * 10 ));
		}
		if( timer_id == 99722 ) {
			myself::Say(gg::MakeFString(99742,"","","","",""));
			myself::AddTimerEx(99706,( 1000 * 10 ));
		}
		super;
	}

	EventHandler CREATED(i0) {
		myself::SetCurrentQuestID(997);
		myself.sm.summoner_id = myself.sm.param1;
		myself::AddTimerEx(99720,( 1000 * 60 ));
		super;
	}

}
