[Orion] Weapon leveling statistics
Posted: Sun Aug 25, 2019 12:43 pm
Hello everyone!
I made a tiny script, that shows how much exp you got after each kill and shows exp per minute rate. It helped me alot to find more optimal spot for farming =) Just edit weapon serial at beginning and start trackDeadMobs() function right before you start hunting!

I made a tiny script, that shows how much exp you got after each kill and shows exp per minute rate. It helped me alot to find more optimal spot for farming =) Just edit weapon serial at beginning and start trackDeadMobs() function right before you start hunting!

Code: Select all
var weapon = "0x4096EF53";
function getWeaponInfo(serial)
{
var result = {};
var exp = 0;
var lvl = 0;
var object = Orion.FindObject(serial);
if(object != null)
{
var properties = object.Properties();
var matchesExp = /Experience: (\d+)/.exec(properties);
var matcheslvl = /Level: (\d+)/.exec(properties);
if(matchesExp && matchesExp.length>0)
var exp = parseInt(matchesExp[1]);
if(matcheslvl && matcheslvl.length>0)
var lvl = parseInt(matcheslvl[1]);
return {"lvl" : lvl, "exp" : exp};
}
}
function trackDeadMobs()
{
var started = new Date().getTime();
var totalExp = 0;
while(true)
{
var startExp = getWeaponInfo(weapon)['exp'];
if(Orion.WaitJournal("You received",Orion.Now(),Orion.Now()+20000))
{
Orion.Wait(500);
var currentExp = getWeaponInfo(weapon)['exp'];
var currentLvl = getWeaponInfo(weapon)['lvl'];
var toNextLvl = 100*Math.pow(currentLvl+1,2)-100;
Orion.Print('0x0035',"Weapon lvl : "+currentLvl);
Orion.Print('0x0035',"Weapon exp : "+currentExp+"/"+toNextLvl+" (+"+(currentExp-startExp)+")");
totalExp = totalExp+(currentExp-startExp);
var minutes = ((new Date().getTime() - started) / 1000) / 60;
var expPerMinute = (totalExp/minutes).toFixed(2);
Orion.Print('0x0035', "Exp@minute : "+expPerMinute);
}
}
}