@LabelIndex 416989
@StringIndex 62975
class 0 gludio_supply_box : default_npc {
handler:
	EventHandler MY_DYING(always_list,code_info,i0,i1,i2,i3,i4,i9,last_attacker,lparty,member,random1_list,target) {
		always_list = gg::AllocCodeInfoList();
		random1_list = gg::AllocCodeInfoList();
		target = last_attacker;
		always_list::SetInfo(0,target);
		always_list::SetInfo(0,target);
		if( gg::IsNull(lparty) == 0 ) {
			for(i9 = 0; i9 < lparty.member_count; i9++) {
				target = myself::GetMemberOfParty(lparty,i9);
				always_list::SetInfo(0,target);
			}
		}
		target = last_attacker;
		always_list::SetInfo(1,target);
		while( gg::IsNull(code_info = always_list::Next()) == 0 ) {
			switch(code_info.code) {
				case 0: {
					myself::SetCurrentQuestID(717);
					while( gg::IsNull(target = code_info::Next()) == 0 ) {
						if( myself::DistFromMe(target) <= 1500 ) {
							myself::SetCurrentQuestID(717);
							i0 = myself::GetDominionSiegeID(target);
							i1 = ( i0 + 636 );
							if( gg::GetDominionWarState(i0) == 5 && i0 != 81 ) {
								if( gg::HaveNRMemo(target,i1) == 1 ) {
									i2 = gg::GetNRMemoState(target,i1);
									myself::SetNRMemoState(target,i1,( i2 + 90 ));
									if( gg::GetNRMemoStateEx(target,i1,1) == 0 ) {
										myself::SetNRFlagJournal(target,i1,3);
										myself::ShowQuestMark(target,i1);
										myself::SoundEffect(target,"ItemSound.quest_middle");
										myself::SetNRMemoStateEx(target,i1,1,10);
									} else if( gg::GetNRMemoStateEx(target,i1,1) == 1 ) {
										myself::SetNRFlagJournal(target,i1,5);
										myself::ShowQuestMark(target,i1);
										myself::SoundEffect(target,"ItemSound.quest_middle");
										myself::SetNRMemoStateEx(target,i1,1,11);
									} else if( gg::GetNRMemoStateEx(target,i1,1) == 100 ) {
										myself::SetNRFlagJournal(target,i1,10);
										myself::ShowQuestMark(target,i1);
										myself::SoundEffect(target,"ItemSound.quest_middle");
										myself::SetNRMemoStateEx(target,i1,1,110);
									} else if( gg::GetNRMemoStateEx(target,i1,1) == 101 ) {
										myself::SetNRFlagJournal(target,i1,11);
										myself::ShowQuestMark(target,i1);
										myself::SoundEffect(target,"ItemSound.quest_middle");
										myself::SetNRMemoStateEx(target,i1,1,111);
										if( target.level >= 80 ) {
											myself::IncrementParam(target,0,460000);
											myself::IncrementParam(target,1,47000);
										} else if( target.level >= 75 ) {
											myself::IncrementParam(target,0,450000);
											myself::IncrementParam(target,1,45000);
										} else if( target.level >= 61 ) {
											myself::IncrementParam(target,0,420000);
											myself::IncrementParam(target,1,37000);
										} else if( target.level >= 52 ) {
											myself::IncrementParam(target,0,360000);
											myself::IncrementParam(target,1,32000);
										} else if( target.level >= 45 ) {
											myself::IncrementParam(target,0,290000);
											myself::IncrementParam(target,1,22000);
										} else {
											myself::IncrementParam(target,0,250000);
											myself::IncrementParam(target,1,17000);
										}
									}
								}
							}
						}
					}
					break;
				}
				case 1: {
					myself::SetCurrentQuestID(730);
					target = code_info::RandomSelectOne();
					if( gg::IsNull(target) == 0 && myself::DistFromMe(target) <= 1500 ) {
						i0 = gg::GetIndexFromCreature(myself.sm);
						if( gg::GetDominionWarState(81) == 5 ) {
							gg::SendDominionScriptEvent(i0,81,73002);
						}
						i1 = gg::GetDBSavingMap(20);
						i2 = ( i1 - 1 );
						gg::RegisterDBSavingMap(20,i2);
					}
					break;
				}
			}
		}
		code_info = random1_list::RandomSelectOne();
		if( gg::IsNull(code_info) == 0 ) {
			switch (code_info.code) {
			}
		}
		super;
	}

	EventHandler ATTACKED(attacker,c0,c1,i0,i1,i2,i3,i4,npc0) {
		myself::SetCurrentQuestID(730);
		c1 = attacker;
		if( c1.master ) {
			c1 = c1.master;
		}
		if( myself::IsNullCreature(c1) == 0 ) {
			i0 = gg::GetIndexFromCreature(myself.sm);
			i1 = 81;
			if( myself.i_quest0 != 1 ) {
				myself.i_quest0 = 1;
				gg::SendDominionScriptEvent(i0,i1,73001);
				myself.i_quest2 = myself::GetCurrentTick();
			} else if( myself.i_quest0 >= 1 ) {
				if( myself.i_quest1 < 0 ) {
					myself.i_quest1 = 0;
				} else if( myself.i_quest1 < 10 ) {
					myself.i_quest1 = ( myself.i_quest1 + 1 );
				} else if( ( myself::GetCurrentTick() - myself.i_quest2 ) >= 300 ) {
				}
			}
		}
		super;
	}

}
