@LabelIndex 380137
@StringIndex 55881
class 0 dawn_priest_schuttgart : ssq_npc_priest {
property:
	TelPosList Position = {{"Necropolis of Sacrifice"; -41184; 206752; -3357; 17000; 0 };{"The Pilgrim's Necropolis"; 45600; 126944; -3686; 19000; 0 };{"The Catacomb of the Heretic"; 39232; 143568; -3651; 20000; 0 };{"Catacomb of the Branded"; 43200; 170688; -3251; 30000; 0 };{"Necropolis of Worship"; 107514; 174329; -3704; 22000; 0 };{"Catacomb of the Apostate"; 74672; 78032; -3398; 26000; 0 };{"The Patriot's Necropolis"; -25472; 77728; -3446; 29000; 0 }};
	TelPosList PositionCompetition = {{"Necropolis of Sacrifice"; -41184; 206752; -3357; 29000; 0 };{"The Pilgrim's Necropolis"; 45600; 126944; -3686; 32000; 0 };{"The Catacomb of the Heretic"; 39232; 143568; -3651; 34000; 0 };{"Catacomb of the Branded"; 43200; 170688; -3251; 50000; 0 };{"Necropolis of Worship"; 107514; 174329; -3704; 38000; 0 };{"Catacomb of the Apostate"; 74672; 78032; -3398; 44000; 0 };{"The Patriot's Necropolis"; -25472; 77728; -3446; 49000; 0 }};

handler:
	EventHandler MENU_SELECTED(ask,i0,quest_id,reply,talker) {
		if( ask == 507 ) {
			myself::SetCurrentQuestID(507);
			if( myself::GetInventoryInfo(talker,0) >= ( myself::GetInventoryInfo(talker,1) * 0.800000 ) || myself::GetInventoryInfo(talker,2) >= ( myself::GetInventoryInfo(talker,3) * 0.800000 ) ) {
				myself::ShowSystemMessage(talker,1118);
				return;
			}
		}
		if( ask == 507 ) {
			if( reply == 1 ) {
				myself::ShowPage(talker,"ssq_npc_priest_q507_01.htm");
			}
			if( reply == 2 ) {
				i0 = gg::GetMemoStateEx(talker,255,1);
				i0 = ( i0 % 100 );
				if( i0 >= 95 || i0 < 0 ) {
					i0 = 0;
				}
				myself::SetMemoStateEx(talker,255,1,( i0 + 1200 ));
				if( gg::HaveMemo(talker,505) ) {
					myself::RemoveMemo(talker,505);
				}
				myself::DeleteItem1(talker,5901,gg::OwnItemCount(talker,5901));
				switch(gg::Rand(3)) {
					case 0: {
						myself::InstantTeleport(talker,-80316,111356,-4896);
						break;
					}
					case 1: {
						myself::InstantTeleport(talker,-80226,111290,-4896);
						break;
					}
					case 2: {
						myself::InstantTeleport(talker,-80217,111435,-4896);
						break;
					}
				}
				gg::AddLog(1,talker,507);
				myself::SoundEffect(talker,"ItemSound.quest_accept");
			}
		}
		super;
	}

}
