Author Topic: Train Necromancy  (Read 3269 times)

0 Members and 1 Guest are viewing this topic.

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
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');
    }
}
« Last Edit: October 24, 2021, 04:53:47 AM by Crisis »

Offline Ahzmandius

  • Jr. Member
  • **
  • Posts: 11
  • Activity:
    0%
  • Reputation Power: 1
  • Ahzmandius has no influence.
  • Gender: Male
  • Referrals: 0
    • View Profile
Re: Train Necromancy
« Reply #1 on: November 07, 2021, 05:23:18 PM »
Too funny. I literally just did one of these up last night for a toon. Dont want to hijack this(can delete if its not the right place for it) but since there are virtually no scripts here, figured a different style might be nice. A little less elegant, and just based on the stratics guide. I just started learning java when i started on the client last month.
Code: [Select]
function necroBot(){
var beastset = 0;
while(Orion.SkillValue('Necromancy') < 1200){
var skill = Orion.SkillValue('Necromancy');
if(Player.Mana() < 30){
do {
if(!Orion.BuffExists('Meditation'))
Orion.UseSkill('Meditation');
Orion.Wait(2000);
} while (Player.Mana() < Player.MaxMana() - 15);
}
if(!Player.IsHuman() && beastset == 1)
Orion.Cast('Horrific Beast');
if(Player.Hits() < Player.MaxHits() - 40)
Orion.Cast('Greater Heal', self);
if(skill < 400){
Orion.Print("Buy some skill");
Orion.PauseScript();
}
if(skill > 399 && skill < 500)
Orion.Cast('Pain Spike', self);
if(skill > 500 && skill < 700){
Orion.Cast('Horrific Beast');
bestset = 1;
}
if(skill > 699 && skill < 900)
Orion.Cast('Wither', self);
if(skill > 899 && skill < 1000)
Orion.Cast('Lich Form');
if(skill > 999 && skill < 1200)
Orion.Cast('Vampiric Embrace');
Orion.Wait(1500);
Orion.ClearJournal();
}
}

Offline CrisisTopic starter

  • Global Moderator
  • *
  • *
  • Posts: 2998
  • Activity:
    3.4%
  • Reputation Power: 41
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Referrals: 2
    • View Profile
Re: Train Necromancy
« Reply #2 on: November 07, 2021, 06:27:25 PM »
It's all good, glad to see more contributions!

Offline Ahzmandius

  • Jr. Member
  • **
  • Posts: 11
  • Activity:
    0%
  • Reputation Power: 1
  • Ahzmandius has no influence.
  • Gender: Male
  • Referrals: 0
    • View Profile
Re: Train Necromancy
« Reply #3 on: November 07, 2021, 07:00:46 PM »
yeah, with stuff like this i just never know whats worth posting. Although i have learned primarily by example and even learned a few cool things from some useless code :)

Tags: