1
Orion UO Scripts / Train Necromancy
« on: October 23, 2021, 09:44:30 PM »Code: [Select]
function trainNecromancy() {
const castSpellDelay = 4000;
const skillValueGoal = 1000;
const target = Player.Serial();
const useSkillDelay = 10250;
var skillValue = Orion.SkillValue('Necromancy');
while (skillValue < skillValueGoal) {
if (skillValue < 600)
var spell = 'Wraith Form';
else if (skillValue < 800)
var spell = 'Horrific Beast';
else
var spell = 'Lich Form';
while (Player.Mana() < 10) {
var meditating = false;
while (!meditating) {
Orion.ClearJournal();
Orion.UseSkill('meditation');
Orion.Wait(250);
if (Orion.InJournal('You cannot focus your concentration|You stop meditating'))
{
Orion.Wait(useSkillDelay);
}
else
{
var meditating = true;
}
}
Orion.WaitJournal('You are at peace', 0, Orion.Now() + 60000);
}
Orion.Cast(spell, target);
Orion.Wait(castSpellDelay);
skillValue = Orion.SkillValue('Necromancy');
}
}
function circuitBreaker(skillValue) {
if (skillValue < 30) {
Orion.Print('[Error] trainNecromancy: Train skill to 30.0 before proceeding.');
Orion.Terminate('trainNecromancy');
}
}