Author Topic: Accept the res gump and redress the character  (Read 2724 times)

0 Members and 1 Guest are viewing this topic.

Offline BulldogTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • Bulldog has no influence.
  • Referrals: 0
    • View Profile
Accept the res gump and redress the character
« on: May 08, 2022, 09:59:26 AM »
Hi folks I have just come back to Ultima after my second break from the game. I came across this client and it looks like a really solid piece of work. I am just learning the java script functions. I thought I would share this little script I wrote today. It can be run along side any other script. If you use the dress agent to record what your wearing then replace the 'Dress_Legion' with your own list then they script will accept the rez gump and redress you and thank the person. Hope you find it useful.

// Accept res gump and re-equip
function acceptRez()
{
      // Force an infinite loop so this can be run with any other script
      var LoopCount ='0'       
         while (LoopCount='0') {
            // What to do when dead
            while (Player.Dead()){
                //War mode on
                Orion.WarMode(1);
               
               // Wait for the ressurection gump to appear
               if (Orion.WaitForGump(1000)){
         
               var gump0 = Orion.GetGump('last');
               // Select 'ok'
               if ((gump0 !== null) && (!gump0.Replayed()) && (gump0.ID() === '0x000008AF')){
                  gump0.Select(Orion.CreateGumpHook(2));
                  // Wait to dress
                  Orion.Wait(3000);
                  // This is the dress agent for the char record and name this in Agents
               AgentDress();
               
                  
      } //End of gump and accept
   }} // End of While Dead
} //End of infinite loop
} // End of acceptRez
///GetDressed
function AgentDress() {
   var colour = 55;
   Orion.Print(colour, 'Dressing');
   Orion.Say('Thanks for the rez');
   // This is the dress agent for the char record and name this in Agents
   Orion.Dress('Dress_Legion');
   Orion.Wait(3000);
   
}

Tags: