Orion Script

Name says it all
Post Reply
Alibaster
Legendary Scribe
Posts: 211
Joined: Wed Nov 16, 2016 11:02 am

Orion Script

Post by Alibaster »

Anyone have a good attack script for Orion that I can use? I just need something I can build off of. Not that good at making scripts from scratch. feel free to PM me in game...Alibaster. Thank you
Alibaster in game!!
davethemage
Grandmaster Scribe
Posts: 89
Joined: Sun Aug 09, 2020 2:13 pm

Re: Orion Script

Post by davethemage »

This is what I use for just attacking the closest:

function OneShot()
{
Orion.IgnoreReset();
Orion.Ignore(self);
var enemy = Orion.FindType("-1 | !0x0191 | !0x0190 ", -1, "ground", "mobile | near | ignorefriends", "15", "murderer | gray | criminal | enemy | red");
Orion.Wait(50);
if (enemy.length > 0)
{
Orion.Wait(50);
Orion.Attack(enemy[0]);
}
}

This is what I use for attacking everything around me and looting the bodies


function attackClosest()
{
Orion.IgnoreReset();
Orion.Ignore(self);
var foundmobs = 1;
while (foundmobs == 1)
{
var enemies = Orion.FindType(" !0x0191 | !0x0190 ", "-1", "ground", "mobile | near | ignorefriends", "8", "gray | criminal | murderer | enemy | red");
if (enemies.length > 0)
{
foundmobs = 1;
Orion.Wait(50);
var mob = Orion.FindObject(enemies[0]);
while(mob.Exists())
{
Orion.WalkTo(mob.X(), mob.Y(),0); //comment this out if your using a bow
Orion.Wait(50);
Orion.Attack(mob.Serial());
Orion.Wait(50);
}
} else {
foundmobs = 0;
claimeverything();
}
enemies.length = 0;
}
Orion.Print("done attacking");

}
function claimeverything ()
{
var deadmob = Orion.FindType('0x2006', '-1', ground, '-1', '8');
if (deadmob.length)
{
Orion.Say('[claimall'); //change this to Orion.Say('[claim'); if you just want the gold
Orion.Wait(100);
for (i in deadmob)
{
if (Orion.WaitForTarget(1000))
Orion.TargetObject(deadmob);
}
if (Orion.WaitForTarget(1000))
Orion.TargetObject('0x00000000');
} else {
Orion.Print('0x0040',"nothing is dead...yet");
}
}
IGN: Edwin Roach
Post Reply