Nexus Transmutation GMCP Rift Upkeep Script - Auto Rift Filler

Hey there folks, I'm back again with another small work for everyone's enjoyment.


Today I got a script that lets you refill your rift's minerals up to their maximum given you are a Transmutation practitioner. It accounts for reactants and can choose which mineral type to draw from.

This script requires an additional alias called "paymute", Which simply refills your vial with reactants and resets the current reactantCount before doing the transmutation.


Alias Text: ^PAYMUTE (.*)

Regular expression

Whole words only: ON

Match case: OFF


Script:

------------------------------------------------------------------

var VialSize = 200;

//This is really up to your preference, For me I choose to keep my gold in my pack before transmuting, but really just do whatever works for you.

send_command("tgfp");

//send_command("Movement if needed");

send_command("refill empty with reactants");

set_variable("ReactantsLeft", VialSize);

send_command("pgip");

//send_command("Movement if needed");

send_command("transmutate " + args[1]);

------------------------------------------------------------------


Next we get to the actual transmutation script itself:


Alias Text: REFILLMINERALS (\w+)

Regular expression

Whole words only: ON

Match case: OFF


Script:

------------------------------------------------------------------

var VialSize = 200;

var reactants = get_variable("ReactantsLeft")

//Insert every mineral you are able to transmute in this string.

var minerals = "cuprum,realgar,stannum,calcite,gypsum,antimony,malachite,azurite,quicksilver,arsenic,ferrum,dolomite,bisemutum,magnesium,aurum,argentum,calamine,plumbum,potash".split(",").sort();

//You can leave the ones you don't have in a list commented out.

//quartz,cinnabar

for (var item in minerals){

  //print(item)

  if (GMCP.Rift[minerals[item]].amount == undefined) GMCP.Rift[minerals[item]].amount = 0;

  var difference = 2500 - GMCP.Rift[minerals[item]].amount;

  if (difference > VialSize) difference = VialSize;

  if ((difference > 0)&&(difference > reactants)&&(reactants != 0)){

   send_command("transmutate " + reactants + " " + args[1] + " to " + minerals[item]);

    send_command("inr all");

    set_variable("ReactantsLeft", 0);

    break;

  } else if ((difference > 0)&&(difference < reactants)&&(reactants != 0)){

    send_command("transmutate " + difference + " " + args[1] + " to " + minerals[item]);

    send_command("inr all");

    var newreactants = get_variable("ReactantsLeft") - difference;

    print(newreactants)

    set_variable("ReactantsLeft", newreactants);

    break;

  }

  if ((difference > 0)&&(reactants == 0)){

    send_command("paymute " + difference + " " + args[1] + " to " + minerals[item]);

    send_command("inr all");

    var newreactants = get_variable("ReactantsLeft") - difference;

    print(newreactants)

    set_variable("ReactantsLeft", newreactants);

    break;

  }

}

------------------------------------------------------------------


Worth noting that this script will hang up on the specific mineral you are choosing to consume, if that mineral is under it's maximum in your rift.


Enjoy!

Comments

  • edited August 2021

    It seems like I've misused one of the nexus args.


    For the Paymute command, you want:

    An alias text of paymute (.*)

    send_command("transmutate " + args[1]);


    And NOT:

    send_command("transmutate " + args.suffix);

Sign In or Register to comment.