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

Pages: [1]
1
Orion UO Scripts / Altiric's Amazing All-Skills Trainer
« on: November 16, 2023, 09:47:35 AM »
Been dabbling with this one for a while now. While its fully operational as is, its ability to be expanded is the real focus of this script. It includes a complete gump/gui system that is fully dynamic, and a skill training "engine" that works off a single function for each skill. The skills table is the only area that needs modification to add new skills, the rest of the code will update itself as needed. I have included a few different training methods for various skills to provide examples for implementing new skills.

The script it pretty crammed right now and should realistically be split into a couple files with #includes to make the code cleaner and easier to work with, there are also a lot of areas with no comments. If there is enough interest from people who want to work on adding skills, ill get a mini guide going inside the code itself. None of this will really matter for people who just want to train skills though :)

Skills currently available: Anatomy, Swordsmanship, Chivalry, Detecting Hidden, Discordance, Hiding, Magery, Musicianship, Mysticism, Necromancy, Peacemaking, and Stealth

Simply select the skill you want to train, and it will attempt training the skill to cap. There is currently no error checking, so use common sense when you begin training, having a LRC suit for casting, tools you'll require, etc. Again, if there is enough interest in this script, I'll polish it up and get more skills added. This is mostly to gauge interest in the script, and determine how people would like to use it (using it as a framework, or just as a skills trainer).

2
Orion UO Scripts / Altiric's Amazing Archaeologist v1.0 - Cave Miner
« on: August 19, 2023, 11:56:54 AM »
I am so happy with how this one turned out, was really a labour of love!

Operation:
  • Mines in a grid around the player
  • Marks cave tiles the color of ore extracted
  • Smelts ore on fire beetle when pack gets heavy
  • Makes new shovels as old ones break
  • Scans for the next best spot to mine and walks there
  • Repeats the process until the entire cave has been mapped out

Setup:
  • Have a couple ingots and tinker tools handy, or some shovels
  • Stand in an area that can be mined with a fire beetle handy
  • Play Autostart()
  • Watch the magic happen!

3
Orion UO Scripts / Fully functional Lumberjack script!
« on: July 25, 2023, 07:47:24 PM »
Setup:
-Make sure OrionAssistant->Main->Options 1->useitemdelay and moveitemdelay are adjusted properly
-Have a secure container available
-Run setup()

Usage:
-Simply run Autoharvest to collect resources from the trees around your house.

Function:
-Script will attempt to scan and harvest all trees with the set distance from your secure container
-As trees are harvested, a timer and the last wood type each tree produced is logged and saved to a file
-Once all trees have been harvested, the script will only harvest from trees that will produce resources and skip all others
-Trees harvested will become the color of the wood they last produced.
-As players weight goes up, logs will be cut to boards, if a beetle is available it will be used to store boards
-When player and beetle are nearly full, the script will return to secure, unload, and continue.
-If all trees in range have been harvested, script will wait for trees to respawn based on the RESPAWNTIME variable

v1.0 seems pretty solid and has gotten good reviews.
v1.1 contained small fixes
v1.2 has lots of updates but as the script gets more complex, so does testing all the features. Call this one a BETA version for now.

* v1.2
 *  -Code restructured, better layout, more debugging, more comments
 *  -Script now only walks when riding an overloaded beetle
 *  -Added setup gump for easy configuration
 *  -Updated all journal checks to Clilocs, should now work with any language!
 *  -A tree history will be built as the script scans for trees in range of secure
 *  -Once the list is built, trees that dont produce wood will be skipped
 *  -Trees are ignored for 30minutes once harvested, then reset
 *  -If all trees in range are depleted, script will wait tree timers reset then continue
 *  -Tree colors: white=active, lightgreen=chopList, color=lastWoodType, plain=not harvesting
 * v1.1 updates:
 *  -Now waits at secure for hp regen instead of pausing
 *  -Now waits at secure 5min, then rechecks area for hostiles instead of pausing
 *  -Now detects tinkering skill and will pull ingots from secure instead of axes, makes axes as needed
 *  -Better navigation, more intelligent tree finding
 *  -*Bugfix: Fixed issue with not having axes in secure causing an error


4
Orion UO Scripts / Sampire Helper
« on: June 12, 2023, 07:48:50 PM »
Got a request for this script. Just extracted a few main functions from my own script. Will spend the next few days re-working it based on feedback here.

Usage: Autostart should run in the background. It will scan all valid targets on the screen, and add them to a find list called mobTypes if the targets graphic does not already exists. The comments of each graphic are used as tags in the script. The first element is the mobile name and is currently unused in the script. The second entry is for the slayer type. If you change the value from false, that word will be used to find the correct slayer in your inventory. For example "a water elemental|elemental|false" will try to find an elemental slayer in your pack and equip it when the attack function is called. The third element will be used to ignore that mob when scanning for valid targets(not completed yet).

You can assign a hotkey to the attack function which will attempt to attack the closest valid target. If the target is at full health, and is in range, it will be honored. The targets type will be checked for a slayer, if one is returned, and that slayer is found in your inventory, it will be equipped. The script will then try to move and stay within one tile of the target. The best bushido stance will then be selected. If only one target is in range, swordsmanship mastery is active, and you are holding a double axe, onslaught will be used every 6 seconds. Then Primary Ability will be activated if only one target is in range. Momentum strike will be used if there are two targets. If you are holding a double axe, and 3 or more targets are in range, whirlwind will be used instead. Once the target dies, a counter for its graphic type will be increased giving a decent approximation of how many of those targets have been killed(if the target becomes invalid, but did not die the counter will still increase).

Bit of a messy explanation, and currently does not have any Chivalry spells in use, but if more people are interested in this type of a script i am willing to get it cleaned up and expand it a little further. I have not fully tested this script since my own sampire script runs just fine even though i have only provided some of its functionality here.

5
Orion UO Scripts / Building a Lumberjacking Script
« on: May 20, 2022, 11:36:30 AM »
Altiric's Amazing Arborist v0.1 (Works in Ter Mur)

A simple Lumberjack script that lets you harvest wood from your house. All you need is a secure container and an axe!

Load this one into your Scripts Tab, run Autostart, and you're up and running.

Finally been getting around to releasing my lumberjack script. Since there are a lot of people trying to learn more about scripting for Orion, I will be releasing this one in stages. Not to say my way is the best way, but it works lol. The first stage was just a matter of getting the bones together. Once i was able to find, walk to, and chop trees; I added support for the pack animal, then secure drop. I added a few messages to show where the script was in its operation, then sat back and let it run. Once i got the kinks worked out, i removed any extra bits i had and tossed a v0.1 on it!

Revisions:
 * v0.2
 *  -Added GUI
 *  -Moved action messages to gump
 *  -Updated chopping to make sure axe is held
 *  -Added counter for all items listed in harvestTypes(stored in registry)
 *  -Added gump display for harvestTypes
 * v0.1
 *  -Added ability to find trees, walk up to the closest one, and chop it
 *  -Added logs2boards
 *  -Added pack animal support
 *  -Added secure drop
 *  -Added action messages

v0.2 - I plan on adding a GUI and Counter system. ** in progress **
v0.3 - Will have rune book capability
v0.4 - Looking for suggestions :)

6
Orion UO Scripts / Brute Force Egg Hunter
« on: May 16, 2022, 08:55:04 PM »
*** FINAL VERSION! ***

Had a lot of fun with this one and learned a lot about what I have been doing wrong in some of my other scripts. Its time to wrap this one up with version 2.2 and move on to my other projects.

To run this script simply save the file into your Orion scripts folder. Either re-start your Orion Assistant to get the script to show up under "Scripts from folder" or load it from "Script file path" (at least on linux). Select Autostart from the drop down menu and click play. A gump will be displayed showing you a list of options you can edit.

-Items that are red are not setup, click the button beside it and it will turn green or ask for what it needs to get setup.
-When Max Backpack Items is reached, any combination of the following active actions will be performed:
---Turn in Eggs: Will travel to "Rune in Travel Book" and exchange eggs for fey ingots
---Turn in Ingots: Will approach the fey dealer and turn in all ingots for points
---Insure Eggs: Will insure eggs as you pick them up
---Insure Ingots: Will insure any Fey Ingots found in your pack
---Pause When Full: Will cause you to travel to "Rune in Travel Book" then pause the script
---Clicking Recall/Sacred journey will toggle your travel method to the one displayed
---Travel Rune Book: Will ask you to target a new rune book used with "Rune in Travel Book"
---Max Load Screen Delay: Sets the maximum amount of seconds to wait for a lag check to pass
---Delay Before next Recall: Creates a delay after scanning/collecting eggs, and travelling to the next rune
---Rune in Travel Book: This rune will be travelled too any time you go somewhere besides an egg rune
---Use portal for Destard: This will cause you to travel to "Rune in Travel Book", search for and approch, corrupted portal, then say "Dungeon Destard"
---Clicking cancel will return you to the main gump
---Click apply and the settings will be updated
---Selecting default will set all values to false or default.

To get back to the Options penal and make changes later, simply click the pause button on the egg gump, and select 'options' to make any changes.

You can name your rune books "egg book", add they will be cycled through the script automatically. If you don't have any books with that name in your backpack, you will be asked to select a book that contains your egg locations. Simply hit Esc to stop adding books to the list, you can have as many as you want.

If your a more experienced user, or would like to try adding further customization to the script without the risk of breaking it, There are two functions you can safely edit at the top of the script. customCodeOne() will be executed each time you travel, and before you scan for an egg. This allows you to add your own custom additions to the script such as checking for other players, checking your health, for pk's, etc. If your still learning, and make a mistake, simply correct or remove the code in the edit area and you're back to normal. customCodeTwo() works the same way but will be run after completing an egg scan and collecting any eggs and before travelling to the next rune.

The script will recall to each spot in each book, it reads how many runes each book has so they don't need to be full. It will do a quick scan in the area for Eggs and grab any it find before continuing to the next. Once you're pack is full, it will head to rune set in travel book and perform any active actions. This allows you to automatically turn in eggs for ingots, then turn in ingots for points, and continue hunting. You can easily change it to put all the eggs in a bag while collecting, go to a safe spot when pack is full and pause the script. Have it go to a custom spot when you're pack is full and run a custom function you create with the provided functions, like sorting eggs and putting a collection together! Simply edit the options and the script will respond to the updates real time.

You can also assign a hot key to eggScan that will automatically move you to an egg it finds and pick it up if you want to just run around scanning for eggs. To do this, go into your Orion Assistant -> Hotkeys -> Scripts -> Double click here to add new script hotkey. Then, in the box to the right click in the Hotkey: entry and assign your hotkey. Active the "Run one script" box, under script name select the drop down and choose eggScan. You can now use it any time in game as long as the eggHunter.oajs script is active in your Orion Assistant's Scripts tab.

 * Version 2.2
 * -Created travel function to cleanup some code.
 * -General code cleanup
 * -Added Options button while script is paused
 * -Moved all script options to Options panel in game, now even easier to set up!
 * -Added ability to use corrupt portal to get to destard instead of relying on rune book

 * Version 2.1
 * -Added grab bag option, eggs picked up will be put in selected bag if true.
 * -Will now stop walking to egg if pause button is pressed.
 * -Added optional delay between recalls, to uhh slow it down(?).
 * -Can now name rune books to egg book and avoid being asked to target books.
 * -Will no longer be asked for destard book once set, Remove from
 *  OrionAssistant->Lists->Objects->destardBook to be asked for a new book.
 * -Added customCodeOne and customCodeTwo functions to add your own behaviours
 * -Updated gump to display egg count individually

 * Version 2.0
 * -Faster and more responsive than the original!
 * -Better Egg scanning, more range.
 * -Better interaction with NPCs.
 * -Ability to insure eggs/ingots.
 * -Can now toggle EggTurnin and IngotTurnin on/off.
 * -Added pause once pack is full (Will still recall to destard book location first, it does not have to be destard in this case).
 * -Added function to move Eggs from backpack to a container.
 * -Can now switch between recall/sacred journey.
 * -Added Pause/Resume button.
 * -Added ignore egg button (For those porch locked eggs)

 * Version 1.0
 * -Will recall to array of rune books scanning for and picking up eggs.
 * -Will recall to destard book when full and exchange eggs for ingots.
 * -Will turn in eggs for points and continue hunting.

7
Orion UO Client / Can .js/.oajs extentions be added to upload?
« on: May 16, 2022, 12:32:54 PM »
Title pretty much sums it up, can't upload OrionUO files without changing the type.

8
Orion UO Scripts / Orion Snippets!
« on: May 12, 2022, 12:13:40 AM »
 Been away for a while, was glad to see some interest in the client while i was gone! Decided to throw this up for some of the newer people getting into Orion. I'll post up some examples i know are sought after, and add any smaller functions i can that people ask for. Ive got a couple big projects i was close to wrapping up when i left, looking forward to grinding those out!

This will simply attack the nearest neutral target within the range set by var range = 12, up to a max of 24. While the target exists, it will keep your lightning strike up.
Code: [Select]
function attackNearestMob(){
    var target, range = 12;

    var mobs = Orion.FindTypeEx(any, any, ground, 'mobile|live|inlos', 8, 'gray|enemy').sort(function(a, b){
        return a.Distance() - b.Distance();
    })[0];
    if(mobs){
        Orion.Print("Attacking " +mobs.Name());
        if(mobs.Hits("%") == 100){
            Orion.AddWaitTargetObject(mobs.Serial());
            Orion.InvokeVirtue('Honor');
        }
        Orion.Attack(mobs.Serial());
        while(mobs.Exists()){
            if(Player.Mana() > 10 && !Orion.BuffExists('Lightning Strike'))
                Orion.Cast('Lightning Strike');
            Orion.Wait(500);
        }
        Orion.Print("Target dead");
    } else {
        Orion.Print("No targets found");
    }
}

This is the same function, rewritten for animal tamers. It will sick your pet on the nearest target.
Code: [Select]
function petAttackNearest(){
    var target, range = 12;

    var mobs = Orion.FindTypeEx(any, any, ground, 'mobile|live|inlos', 8, 'gray|enemy').sort(function(a, b){
        return a.Distance() - b.Distance();
    })[0];
    if(mobs){
        Orion.AddWaitTargetObject(mobs.Serial());
        Orion.Say("All kill");
    } else {
        Orion.Print("No targets found");
    }
}

This one will ask you to target a pet, unless you already have. Then will watch your pets health until you move. If you are in range, and have bandages, it will apply as needed. Otherwise, it will check your magery skill and mana for a ranged cure/heal.
Code: [Select]
function vetPet(){
    var pet, startX = Player.X(), startY = Player.Y();
    if(!Orion.FindObject('pet')){
        Orion.Print("Select your pet");
        Orion.WaitForAddObject('pet');
    }
    pet = Orion.FindObject('pet');
    if(!pet)
        return;
    Orion.Print("Starting Auto Vet");
    while(Player.X() == startX && Player.Y() == startY){
        if(pet.Poisoned()){
            if(pet.Distance() < 3 && Orion.Count(bandages) > 0 && !Orion.BuffExists('vet'))
                Orion.BandageTarget('pet');
            else if(Orion.SkillValue('Magery') > 400 && Player.Mana() > 20)
                Orion.Cast('Arch Cure', 'pet');
        } else if(pet.Hits("%") < 90){
            if(pet.Distance() < 3 && Orion.Count(bandages) > 0 && !Orion.BuffExists('vet'))
                Orion.BandageTarget('pet');
            else if(Orion.SkillValue('Magery') > 500 && Player.Mana() > 25)
                Orion.Cast('Greater Heal', pet.Serial());
        }
        Orion.Wait(250);
    }
    Orion.Print("Auto Vet Ended");
}

Simple vacuum function for grabbing gold piles.
Code: [Select]
function vacuum(){
Orion.FindType('0x0EED', '0xFFFF', 'ground', 'item|inlos|near', 2).forEach(function(gold){
Orion.MoveItem(gold, 0, backpack);
Orion.Wait('moveitemdelay');
});
}

This is a really basic travel function. Use travel(runebook.Serial(), 'gate', 1); To gate travel to the first location in your book, for example.
Code: [Select]
function travel(book, method, rune){
    var startX = Player.X(), startY = Player.Y();
    if(method == 'recall')      // Recall
        rune += 49;
    else if(method == 'gate')   // Gate
        rune+=99;
    else   
        rune += 74;             // Sacred Journey
       
    Orion.UseObject(book);
    Orion.WaitGump(Orion.CreateGumpHook(rune));
    if(method == 'gate'){
        while(!Orion.FindType(0x0F6C, any, ground))
            Orion.Wait(500);
        while(Player.X() == startX && Player.Y() == startY){
            Orion.Wait(2000);
            Orion.UseFromGround(0x0F6C, any, 2);
            Orion.WaitGump(Orion.CreateGumpHook(1));
        }
        Orion.CancelWaitGump();
    }
}





 


9
Scripting Chat / Latitude/Longitude from X/Y.... Finally!
« on: August 28, 2021, 01:47:41 PM »
This has been an idea of mine (and im sure many others) for quite some time. I was just never able to actually hammer it out til now. I was writing up an area recognition routine for my new hunting script and ran into a few issues. Through the process of resolving it, i stumbled across this solution! First i came up with a way to return N/E/W/S or NE/NW/SE/SW/etc from one location to another (character position to an object). I then set the object to lord british's throne, figure out how many steps and in which direction i am, an boom! a couple calculations/guesses later and i had my data. This is a quick and dirty example of finding long/lat simple based off an X/Y coordinate!

Code: [Select]
gosub Header
repeat
  if #CHARPOSX <> %LastX || #CHARPOSY <> %LastY
  {
    set %LastX #CHARPOSX
    set %LastY #CHARPOSY
    set %xyz #CHARPOSX , X , #SPC , #CHARPOSY , Y , #SPC , #CHARPOSZ , Z
    menu set xyz %xyz
  }
  gosub FindLongLat #CHARPOSX #CHARPOSY
  wait 5
until #FALSE

sub FindLongLat
  set %long_dir
  set %lat_dir
  set %CenterX 1323
  set %CenterY 1624
  set %long_time 3168
  set %lat_time 2531
  set %FindX %1
  set %FindY %2
  set %fx ( %FindX - %CenterX )
  set %fy ( %FindY - %CenterY )
  set #RESULT #FALSE
  if %fy > 0
    set %long_dir %long_dir , S
  else
    set %long_dir %long_dir , N
  set %steps %fy ABS
  if %fx > 0
    set %lat_dir %lat_dir , E
  else
    set %lat_dir %lat_dir , W
  set %steps2 %fx ABS

  set %seconds ( ( %steps * %long_time ) )   ;3165
  set %seconds2 ( ( %steps2 * %lat_time ) ) ;2531
  set %lathrs ( %seconds / ( 60 * 60 ) / 10 )
  set %latmin ( ( %seconds / 600 ) - ( %lathrs * 60 ) )
  set %lonhrs ( %seconds2 / ( 60 * 60 ) / 10 )
  set %lonmin ( ( %seconds2 / 600 ) - ( %lonhrs * 60 ) )

  menu set longlat %lathrs , o , #SPC , %latmin , ' , %long_dir , #SPC , %lonhrs , o , #SPC , %lonmin , ' , %lat_dir
return %return

sub Header
menu Clear
menu Window Title Altiric's Sextant
menu Window Size 275 50 ;250 245
menu font name Verdana
  menu font align right
menu text lab1 85 5 Sextant:
menu text lab2 85 20 XYZ:
  menu font align left
  menu text longlat 90 5
  menu text xyz 90 20
  menu Show 500 270
return

this will only work in Tram/Fel unless you update the center X/Y to the different maps.[

10
Submit your Script / Altiric's Soul Fletcher 0.9b!
« on: April 14, 2021, 10:56:29 PM »
First time i am actually releasing a script. Polished it up as well as i could for being the only one testing it.

Uses the current soul stone method for getting through RoT on siege. I worked a few skills up with this method
then while setting up my subs for fetching i decided to try getting it setup for public release. If all goes well, i
would like to look into adding other skills to the list and make it a complete trainer using this method. After talking
to a few others around here, ive decided to go all out on this one. Polished it up, fixed the little quirks and got it
up to version 0.9b! If you have tried the original, this version is MUCH cleaner and can work with any starting skill
level.

Code: easyuo
  1. ;===============================================================
  2. ; Script Name: Altiric's Soul Bowcrafting/Flechting Trainer
  3. ; Authors: Altiric
  4. ; Version: 0.9b
  5. ; Client Tested with: 5.0.2b
  6. ; EUmenuO version tested with: 1.5 Version 77
  7. ; Shard OSI / FS: OSI / works on FS with correct item types
  8. ; Public Release: 05/12/2004
  9. ; Global Variables Used: None
  10. ; Purpose: Train Bowcrafting/Fletching using the Soulstone gaining method
  11. ; Setup: Have a blank Soulstone, fletching tools, a secure with wood and a trash barrel handy.
  12. ; Click on the setup button to assign variables, then select start.
  13. ;
  14. ; How it works:
  15. ; Uses standard gaining method from 0-70
  16. ; After 70 skill (rot kicks in) the selected skill will be placed into a
  17. ; soul tone after each gain, then retieve it. This will force a gsg on
  18. ; the next success.
  19. ;
  20. ; Updates!!
  21. ; -Added ability to train from 0-100 (This is for siege afterall)
  22. ; -Crafts shafts from 0-34.9 skill trashing every 50
  23. ; -Items crafting are now placed in trash
  24. ; -Cleaned up the menu so everything is aligned
  25. ; -Improved the setup routine
  26. ; -Will now only pull one board at a time for shafts/fukia darts
  27. ;===============================================================
  28.  

Looking for feedback on this one o i can work on expanding it into a full multi skill trainer.

11
New member introductions / New Introduction
« on: March 15, 2021, 05:27:06 PM »
Hello, Been playing UO since early 97, was actually a beta tester! Also got into the beta for t2a and was one of the first people in the new lands. Then was around for Malas and a samurai expansion but left shortly after. Just been getting back into the game recently and getting caught up with all of the changes. With the low population on my shard, scripts come in very handy for trying to multi-task since im doing a lot more on my own than i used to. Used to dabble in EUO scripting and am looking forward to playing with some of the new lua options.

Pages: [1]