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.


Messages - altiric

Pages: [1] 2 3 ... 6
1
Getting to this a little late, but here is some info.

Whirlwind is an AbilityStatus so either AbilityStatus('Primary') or AbiliatyStatus('Secondary'). Here are a couple snippets i use for working with special abilities.

Code: [Select]
function have_ability(name){
    return Orion.Contains(Orion.GetCurrentAbilityNames(), name);
}

Code: [Select]
function ability_status(name){
    const abilities = Orion.GetCurrentAbilityNames();
    if(Orion.AbilityStatus('Primary') && abilities[0].match(new RegExp(name, 'i')))
        return true;
    else if(Orion.AbilityStatus('Secondary') && abilities[1].match(new RegExp(name, 'i')))
        return true;
    else
        return false;
}

Code: [Select]
function use_ability(name){
    const abilities = Orion.GetCurrentAbilityNames();
    const primary = Orion.AbilityStatus('Primary');
    const secondary = Orion.AbilityStatus('Secondary');
    const regex = new RegExp(name, 'i');

    if(abilities[0].match(regex) && !primary){
        Orion.SetTimer('ability', 500);
        Orion.UseAbility('Primary', true);
        Orion.Wait(200);
    } else if(abilities[1].match(regex) && !secondary){
        Orion.SetTimer('ability', 500);
        Orion.UseAbility('Secondary', true);
        Orion.Wait(200);
    } else {
        return false;
    }
}

I set a timer when using an ability so i can calculate the mana cost of abilities, since if you use an ability within 3 seconds of another ability, the cost is doubled.

2
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).

3
Instead of Wait('useitemdelay') try Orion.WaitForGump()
It's possible useitemdelay is too short to catch the gump poping up.
You'll also need to use Orion.Print(gump0.ID()) not (gump0.ID)

4
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 20, 2023, 08:15:54 PM »
Here in the scripts section and on my github, Altiric's Amazing Archaeologist v1.0 :)
I called it a DEMO, its actually a full v1.0, but a demo of the full script, which i now call 2.0 to make things easier lol (2.0 wont be public)

5
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 20, 2023, 04:05:05 PM »
The mining script is actually complete. Fully functional, can map its way around caves as it mines. I just kept certain aspects of it limited. My version 2 has runebook mining, storage, etc but i don't think ill be releasing it anytime soon. The one i put out works very well and can easily be upgraded.

6
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 19, 2023, 07:46:41 PM »
Had the newer version on hold while i rolled out a more ambitious project, since version 1.0 works quite well. Got that out and rolling now so i'll be working on finishing this up soon. Then its back to my fisher... fun times :)

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

8
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 11, 2023, 10:19:28 PM »
Ill look into that in the morning. I did some swapping between Orion Assistant variables and RegRead/Writes. May have saved a value i stopped using and it didnt show up as an error on my end because it was still valid with the previous method.... guessing that the issue.

9
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 10, 2023, 09:34:59 PM »
The issue with always run on is the risk of the beetle getting stuck on objects, or an overloaded beetle having stamina drain. v1.2 has an option in the setup gump to toggle mounting a beetle or not. If mounted, the script will make sure the beetles weight is under stamina drain levels and run, or walk accordingly. The script will always run while not mounted, trying to make sure the beetle is following the whole time and trying to recover it if it does get stuck. I am adding an option now to the setup gump to relog at secure if beetle recovery fails. I did also adjust the way it finds and logs trees. Now, when you run the script it will scan and harvest all the trees is can find within the set distance from secure container. It will log the results and save them to a file. As trees get scanned, trees in the history are ignored while the list is built. Once the list of trees is complete and has been harvested, it will be used for subsequent runs. This means no more walking to and chopping trees that will not produce wood, which should result in a good production boost! Will also allow for some neat features in the future like being able to chop specific woods as long as the trees in history contained that wood last time, not sure if the resource type is random each time its depleted, etc. Will need some testing on that, but with the ability to log every tree it will be possible :)

Basically down to a little gump work and just watching it build new tree lists then run them a few times in different locations before releasing the newer version. Lots of other cool additions than i am quite happy with so far.

10
Orion UO Scripts / Re: Fully functional Lumberjack script!
« on: August 05, 2023, 04:58:43 PM »
gruntman: If your getting that with every swing it seems like your usitemdelay is too short. In your Orion Assistant, you can go to the Main page and click on the Options 1 tab. In there you will find useitemdelay and moveitemdelay. You can adjust the values there as needed and they will be updated in the script, don't even need to reload or pause the script. I did it this way so all the wait timers in the script can be adjusted by the user without having to edit anything. 1200ms works perfectly for me, but i have heard of people getting away with as little as 600ms, or needing as much as 1800ms. I did put v1.1 on my github which changes the pause scripts when health is low or enemy is spotted. It will now wait for full health and continue, or check for histiles again after 5min and continue rather than just stop. I have already finished a number of other little updates and will have 1.2 ready to post here before the end of the weekend.

Gderian: That timer is just in there encase the message gets missing or does not display for some reason, the script wont just hang. It really should be set to the useitemdelay like the rest for consistency, but was just in there as a precaution anyway. The script runs without that check in at all, but not having it would cause extra chops  when a tree is empty since the journal message would not show up before the next swing.

Thanks for the feedback, and glad its working for most people right out of the box! I am working on a couple little glitches that are causing issues, like opening the paperdoll before counting axes, etc. I'll add in that amber, just keep forgetting lol. Also trying to fix up the comments since people have already been ripping this apart for their own needs, which is awesome.

11
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


12
Orion UO Scripts / Re: Sampire Helper
« on: July 06, 2023, 12:09:26 PM »
Heh there actually should have been a cast function in there. You are the first person to point out it's missing/broken. I'll add it in if I ever do an update. Right now there seems to be no interest, so no reason too. Your fix should work fine, may need to add a slight delay after Orion.Cast since my cast function adds the delays based on fcr, etc.
Thank you for your answer. You are right, must be delay because script activate Whirwind attack very fast. And also tried to activate this attack with busido abilities but it no possible.  So modification in progress. If you can give me some advices i will be appreciate. Thank you in advance.

Code: [Select]
function cast(spell, target){
    var fcr = (6 - Player.FCR()) / 4 * 1000 + 250;
        Orion.CancelWaitTarget();
        if(Orion.HaveTarget())
            Orion.CancelTarget();
        if(Player.Frozen())
            return;

        if(target)
            Orion.CastTarget(spell, target);
        else
            Orion.Cast(spell);
       
        Orion.Wait(500);
        while(Player.Frozen() && !Player.Paralyzed())
            Orion.Wait(10);

        Orion.Wait(fcr);
}

Adding that to the script should solve a lot of issues. If you find anymore, feel free to post them here. Seems more people are getting interested, i may do an update to make sure everything is tweaked correctly and add some other features i have handy if it keeps up :)

13
Orion UO Scripts / Re: Sampire Helper
« on: July 03, 2023, 09:23:38 AM »
Heh there actually should have been a cast function in there. You are the first person to point out it's missing/broken. I'll add it in if I ever do an update. Right now there seems to be no interest, so no reason too. Your fix should work fine, may need to add a slight delay after Orion.Cast since my cast function adds the delays based on fcr, etc.

14
Orion UO Scripts / Re: Sampire Helper
« on: June 14, 2023, 12:22:37 PM »
Autorun on its own wont do anything. This script is not meant to play the game for you. Autorun only keeps a log of mobiles, and some information about them. The attack function needs to be added to a hotkey and called each time you want to attack a new target. It is very easy to add a function that will loop the attack function if thats how you want the script to work but is out of the scope of this script. I'll add a section on assigning hotkeys to functions if anyone needs clarification on that.

15
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.

Pages: [1] 2 3 ... 6