@LabelIndex 222910
@StringIndex 25213
class 0 eviloverlord_ramsebalius : warrior_passive {
handler:
	EventHandler MY_DYING(always_list,c1,code_info,i1,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 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(334);
					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,334) && gg::GetMemoState(c1,334) == 2 && c1.flag == 3 ) {
							myself::Say(gg::MakeFString(33412,"","","","",""));
							if( gg::Rand(2) == 0 ) {
								if( ( myself::GetCurrentTick() - c1.quest_last_reward_time ) > 1 ) {
									c1.quest_last_reward_time = myself::GetCurrentTick();
									myself::CreateOnePrivate(1027138,"great_demon_king",0,1);
								}
							} else {
								i1 = gg::Rand(4);
								if( i1 == 0 ) {
									myself::GiveItem1(c1,1979,1);
								} else if( i1 == 1 ) {
									myself::GiveItem1(c1,1980,1);
								} else if( i1 == 2 ) {
									myself::GiveItem1(c1,2952,1);
								} else if( i1 == 3 ) {
									myself::GiveItem1(c1,2953,1);
								}
							}
						}
					}
					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(334);
		if( timer_id == 2336006 ) {
			myself::Despawn();
			myself::Say(gg::MakeFString(33411,"","","","",""));
		}
		super;
	}

	EventHandler CREATED(i0) {
		myself::SetCurrentQuestID(334);
		myself::AddTimerEx(2336006,( 1000 * 200 ));
		myself::Say(gg::MakeFString(33426,"","","","",""));
		super;
	}

}
