ScriptUO

Scripting Resources & Utilities => Orion UO Client => Orion UO Scripts => Topic started by: Crisis on October 23, 2021, 09:43:01 PM

Title: Train Bushido
Post by: Crisis on October 23, 2021, 09:43:01 PM
Code: [Select]
function trainBushido() {
    const castSpellDelay = 3000;
    const skillValueGoal = 1000;
    const target = Player.Serial();
    const useSkillDelay = 10250;
    var SkillValue = Orion.SkillValue('Bushido', 'real');

    while (SkillValue < skillValueGoal) {
          if (SkillValue < 600)
              var spell = 'Confidence';
        else if (SkillValue < 750)
            var spell = 'Counter Attack';
        else
            var spell = 'Evasion';
 
           
        while (Player.Mana() < 15) {
            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('Bushido', 'real');
    }
}