What's new

Orion Scripting

paperninja

New member
Just a few scripts I've been using with Orion Client. I haven't found a ton of stuff on the internet, mostly trainers, and what I have found, I've often had to tweak it to actually get it to work (maybe written for an older version? or tranlated from Russian poorly). I thought I'd share what I've been using and add more to it as I use/need more. The trainers you just load and run. The gameplay scripts you want to load into a large single script and assign the function to a hot key. I'm going to keep adding to this thread as I find/use/need them. I encourage other people to add to this thread as well.

Client Screenshots -

1673372924884.png


1673372979804.png
 
-Use Healing Stone-

I couldn't find this anywhere so I made a super simple script that searches by graphic, set item ID if found and uses item. I may go back and add some warnings if it's not found or low on points at a later date. You will need to create an Object under Lists called 'mainbag' for this to work, otherwise you could just change the script to replace 'mainbag' with your backpacks serial id.

function useHealingStone()
{
var healingStone = Orion.FindType('0x4078',any,'mainbag');
Orion.UseObject(healingStone);
}
 

Attachments

  • 1673373129804.png
    1673373129804.png
    81 KB · Views: 116
-Auto Vet Care-

Found this. It didn't work. I fixed the code errors and added the Mysticism functionality. May need tweaking, works great for me. This will use bandages and spells if you're close and only spells if you're further away. I could change it to not use spells up close, but I like the over healing quite a bit and it's good for me because Cleansing Winds is also cure + heal.

function vetPet(){
var pet, startX = Player.X(), startY = Player.Y();
if(!Orion.FindObject('pet')){
Orion.Print("Select your pet");
Orion.WaitForAddObject('pet');
}
pet = Orion.FindObject('pet');
if(!pet)
return;
Orion.Print("Starting Auto Vet");
while(Player.X() == startX && Player.Y() == startY){
if(pet.Poisoned()){
if(pet.Distance() < 3 && Orion.Count('bandage') > 0 && !Orion.BuffExists('Veterinary'))
Orion.BandageTarget('pet');
else if(Orion.SkillValue('Magery') > 400 && Player.Mana() > 20)
Orion.Cast('Arch Cure', 'pet');
else if(Orion.SkillValue('Mysticism') > 600 && Player.Mana() > 20)
Orion.Cast('Cleansing Winds', 'pet');
} else if(pet.Hits("%") < 90){
if(pet.Distance() < 3 && Orion.Count('bandage') > 0 && !Orion.BuffExists('Veterinary'))
Orion.BandageTarget('pet');
else if(Orion.SkillValue('Magery') > 500 && Player.Mana() > 25)
Orion.Cast('Greater Heal', pet.Serial());
else if(Orion.SkillValue('Mysticism') > 600 && Player.Mana() > 20)
Orion.Cast('Cleansing Winds', 'pet');
}
Orion.Wait(250);
}
Orion.Print("Auto Vet Ended");
}
 
- Attack Nearest Mob -

Also has built in Honor and Lightning Strike. I don't know if those are working. I found this and made 0 changes. If I need to tweak this to get it working properly I'll update this thread.

function attackNearestMob(){
var target, range = 12;

var mobs = Orion.FindTypeEx(any, any, ground, 'mobile|live|inlos', 8, 'gray|enemy').sort(function(a, b){
return a.Distance() - b.Distance();
})[0];
if(mobs){
Orion.Print("Attacking " +mobs.Name());
if(mobs.Hits("%") == 100){
Orion.AddWaitTargetObject(mobs.Serial());
Orion.InvokeVirtue('Honor');
}
Orion.Attack(mobs.Serial());
while(mobs.Exists()){
if(Player.Mana() > 10 && !Orion.BuffExists('Lightning Strike'))
Orion.Cast('Lightning Strike');
Orion.Wait(500);
}
Orion.Print("Target dead");
} else {
Orion.Print("No targets found");
}
}
 
- Train Necromancy -

Found and tweaked for high gains system implemented on this shard.

function trainNecromancy() {
const castSpellDelay = 4000;
const skillValueGoal = 1100;
const target = Player.Serial();
const useSkillDelay = 10250;
var skillValue = Orion.SkillValue('Necromancy');

while (skillValue < skillValueGoal) {
if (skillValue < 400)
var spell = 'Wraith Form';
else if (skillValue < 700)
var spell = 'Horrific Beast';
else if (skillValue < 990)
var spell = 'Lich Form';
else
var spell = 'Vampiric Embrace';

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');
}
}
 
- Train Bushido -
There is a skill gap in this one and you will have to run around lightning striking everything to jump that gap.

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
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');
}
}
 
- Train Chivalry -

function trainChivalry() {
const castSpellDelay = 4000;
const skillValueGoal = 1000;
const target = Player.Serial();
const useSkillDelay = 10250;
var skillValue = Orion.SkillValue('Chivalry');

while (skillValue < skillValueGoal) {
if (skillValue < 600)
var spell = 'Enemy of One';
else if (skillValue < 700)
var spell = 'Holy Light';
else
var spell = 'Noble Sacrifice';


}
Orion.Cast(spell, target);
Orion.Wait(castSpellDelay);

skillValue = Orion.SkillValue('Chivalry');
}


function circuitBreaker(skillValue) {
if (skillValue < 30) {
Orion.Print('[Error] trainChivalry: Train skill to 30.0 before proceeding.');
Orion.Terminate('trainChivalry');
}
}
 
- Train Hiding -

function trainHiding() {
const castSpellDelay = 4000;
const skillValueGoal = 1000;
const target = Player.Serial();
const useSkillDelay = 10250;
var skillValue = Orion.SkillValue('hiding');

while (skillValue < skillValueGoal)
{
Orion.UseSkill('hiding');
Orion.Wait(10000);
}
}