Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Bulldog

Pages: [1]
1
Orion UO Client / Help! Casting string array elements to integers
« on: June 06, 2022, 02:17:35 AM »
Hello everyone I hope someone can help with this ..

I have a function that is returning durability on items as elements of an array these come out as arrayelement
  • /arrayelement[y] which is the durability say 234 / 255. I want to cast the strings into an integer but I am not sure what the Orion version of Integer.parseInt ?


eg:

 int numberx = Integer.parseInt(arrayelement
  • );

 int numbery = Integer.parseInt(arrayelement[y]);

2
Orion UO Scripts / Post into Discord
« on: May 20, 2022, 07:18:05 AM »
Quick function that will post some text into a Discord bot server
function testDiscord()
{
    // Discord
    var bot = "https://discord.com/api/webhooks/"; // Your Webhook url goes here
    var charName = Player.Name();
    var paramText = "username="+charName+"&content=@everyone "+charName+" just made dinner";
    Orion.Wait(100);
    Orion.HttpPost(bot, paramText);
    Orion.Wait(1000);
   
}

3
New member introductions / New guy!
« on: May 18, 2022, 12:43:31 AM »
Hi Folks I am back playing UO first started in 1999 and I am loving the Orion Client and learning Java script

4
Orion UO Scripts / 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);
   
}

Pages: [1]