@LabelIndex 115024
@StringIndex 0
class 0 ai_keym_pavion : warrior_basic {
parameter:
	int	WaterDeBuff = 378273793;

handler:
	EventHandler CREATED() {
		myself::AddTimerEx(1000,1000);
	}

	EventHandler NO_DESIRE() {
		if( myself::GetLifeTime() > 9 ) {
			myself::AddMoveAroundDesire(5,5);
			myself::LookNeighbor(3000);
		}
	}

	EventHandler SEE_CREATURE(creature) {
		if( creature.is_pc == 1 && myself.i_ai0 == 0 ) {
			myself.c_ai0 = creature;
			if( gg::GetMemoState(myself.c_ai0,128) < 4 ) {
				myself::SetVisible(0);
			} else {
				myself::SetVisible(1);
				myself::AddTimerEx(6000,1000);
				myself.i_ai0 = 1;
			}
		}
		super;
	}

	EventHandler TIMER_FIRED_EX(timer_id,c0,i0,i1) {
		if( timer_id == 1000 ) {
			myself::LookNeighbor(3000);
			myself::AddTimerEx(1000,( 30 * 1000 ));
		}
		if( timer_id == 6000 ) {
			if( myself::Skill_GetConsumeMP(WaterDeBuff) < myself.sm.mp && myself::Skill_GetConsumeHP(WaterDeBuff) < myself.sm.hp && myself::Skill_InReuseDelay(WaterDeBuff) == 0 ) {
				myself::AddUseSkillDesire(myself.sm,WaterDeBuff,0,1,1000000);
			}
			myself::AddTimerEx(6000,60000);
		}
	}

}
