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 - socon

Pages: [1]
1
Orion UO Scripts / Magic Resist Script
« on: March 23, 2022, 03:25:51 PM »
Disclaimer:  I only started using Javascript 3 months ago.  The server I play on provides good magic resist skill gain by walking through fire fields.  I got sick of the mouse action and made a script.  Just make sure you stock enough regeants.  I have my auto bandage script running as well to not drop below 20% health.  If you do drop below 20% health it will hide and pause script.

Code: [Select]
start()

function start()
{
  while(true)
  {
    // Alert if low on regeants
    if(Orion.Count("0x0F8D|0x0F7A|0x0F8C", 'any', 'backpack') < 60 )
      {
        Orion.Sound(61);
        Orion.Print('0xF0000', "LOW FIREFIELD REGEANT COUNT");
      }
    //While your health is greater than 20%
    while(Player.Hits() > Player.MaxHits()/100*20)
      {
        //Cast Firefield on yourelf
        Firefield()
        //Find the fire on the ground.  On this server always 5 tiles long.
        var fire = Orion.FindType('0x398C','any',ground, 'item', 150);
        //Find the first fire tile
        var fireobj0 = Orion.FindObject(fire[0]);
        //find the last fire tile
        var fireobj4 = Orion.FindObject(fire[4]);
        //while there is fire on the ground and your health is greater than 20%
        while(Orion.FindType('0x398C','any',ground, 'item', 150).length > 0 && (Player.Hits() > Player.MaxHits()/100*20))
        {
          //run back and forth between first tile of fire and last tile of fire
          Orion.WalkTo(fireobj0.X()-2,fireobj0.Y(),1,1,255,1);
          Orion.WalkTo(fireobj4.X()+2,fireobj4.Y(),1,1,255,1);
        }
      }
    //If we do get too low, lets get our of the way and hide and pause. 
    if(Player.Hits() < Player.MaxHits()/100*20)
      {
        Orion.Print("HITS TOO LOW, BAILING OUT")
        Orion.WalkTo(fireobj0.X()-2,fireobj0.Y()+5,1,1,255,1);
        Orion.UseSkill('Hiding');
        Orion.Wait(4000);
        Orion.PauseScript();
      }
    }

}
function Firefield() {
    Orion.Cast('Fire field')
    Orion.Wait(900);
    Orion.TargetObject(self);
    Orion.Wait(3000)
}

2
New member introductions / 1st time poster, long time UO'er
« on: March 18, 2022, 07:00:52 PM »
Hello All!

I hail from California and have been playing UO since about 1998. I still have my cloth map and pin!   This was back when there was just a Pacific shard for us on the west coast.  I stopped playing eventually when other games took interest and I started generating offspring.  Then in the early 2000's I found the wonderful world of UO emulation.  I have run my own SphereServers and RunUO Servers for my household as, before Minecraft hit, the kids loved the multiplay and openness of the game.

 I assume everyone here likes to tinker with programming and scripting?  I once built a bot for a Web game called Grepolis that provided stats for our guild in a Skype chatroom.  It even used an API to call to Cleverbot to give the bot a personality and be interactive.  That was built in Python and was a great learning experience for me.

Now I find myself learning OrionUO and its javascript engine.  It's a great combo of gaming and tinkering now!  I have quite a few scripts I've built to date and look forward to sharing them here.

-Socon






Pages: [1]