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] 4 5 6
31
Orion UO Scripts / Re: Brute Force Egg Hunter
« on: May 22, 2022, 04:24:09 PM »
lol yeah.. that seems to happen! Did find a simple way to make it even snappier though! If you replace the
Orion.Wait(loadScreenDelay);
with
Orion.CheckLag(loadScreenDelay);
it works even faster, and better in some cases :)

32
Orion UO Client / Re: Orion.FindList
« on: May 21, 2022, 12:37:24 PM »
Go into your Lists Tab->Find Tab.
One the left side, Click New, add "Loot" as List Name
On the right side, click New->Select by Target
Add each item you want moved to that list.

Post Merge: May 21, 2022, 12:41:02 PM
ok ty, now i know :)
try setting backpack not as a string. in Orion scripts section you will notice it will  highlight, i think thats the way to use it.

You are correct. Instead of using a string you can use 'backpack' which is a global variable with you backback.Serial() :)

Post Merge: May 21, 2022, 12:43:56 PM
Sorry, had not noticed the picture before. Your Loot name named 'Loot' not Loot (take out the ('))

33
Orion UO Client / Re: Orion.FindList
« on: May 21, 2022, 12:30:59 PM »
I think in your for loop you should declare i as var.. so
Code: [Select]
for (var i = 0; i < sort; i++)not sure if that helps

Javascript allows you to set a variable without the var as long as you add a value to it.
var i, or i=0 is the same thing as far as its concerned.

34
Orion UO Client / Re: Orion.FindList
« on: May 21, 2022, 12:05:20 PM »
function LootToBank()
{
   Orion.Say('Bank');
   var sorttobag = Orion.FindList('Loot', 'backpack', '1');     
   if(sorttobag.length) {
      var sort = sorttobag.length;
      for (i = 0; i < sort; i++) {
         Orion.MoveItem(sorttobag, 0, bankbag);
         Orion.Wait(600);
      }
   }
}
Orion.Say("Bank"); This will open your bank box but without a delay after (like Orion.WaitForContainerGump()) the next commands can be processed before your bank even opens.
Orion.FindList(list, container, flags); flags are listed in the help tab under FindFlags, in this case you just need 'item' instead of '1'
-You'll also need to have a list named "Loot" in your Lists->Find Tab with each item you want moved (If you don't).
Orion.MoveItem(serial, qty, container); For moving to a bank box, the easy way is to use Player.BankSerial()

I added a pile of gold to my "Loot" list and ran the following, it worked.

Code: [Select]
function LootToBank()
{
Orion.Say('Bank');
    Orion.WaitForContainerGump();
var sorttobag = Orion.FindList('Loot', 'backpack', 'item');
if(sorttobag.length) {
for (i = 0; i < sorttobag.length; i++) {
Orion.MoveItem(sorttobag[i], 0, Player.BankSerial());
Orion.Wait(600);
}
}
}

This will only move 1 item from the Loot list though, changing if(sorttobag.length)  to while() will keep it going til there are no found items left in the list.

Here is another example that does the same thing using some JavaScript magic :)

Code: [Select]
function LootToBank(){
Orion.Say('Bank');
        Orion.WaitForContainerGump();
Orion.FindList('Loot', 'backpack', 'item').forEach(function(item){
            Orion.MoveItem(item, 0, Player.BankSerial());
            Orion.Wait(600);
        });
}

35
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 10:11:50 PM »
That's how i would have added it in!
I knew about this glitch, did not realize it could be an issue like this. After it unloads the pack, it goes back to trying to chop the last targeted tree as if it were still standing beside it. Typically, when it fails it should look for the next tree. Im thinking another journal scan..

var msg5 = 'cannot be seen'; added to the journal check
This should make the script pull the next tree out of the array and continue as normal. *hopefully*
I'll make sure all this gets ironed out in v0.3, appreciate the help finding these things!

I also realized why it may be emptying your pack... Are you using a pack animal? In the secureDrop function
Code: [Select]
    if(animal){
        Orion.RequestContextMenu(animal.Serial());
        Orion.WaitContextMenuID(animal.Serial(), 508);
        Orion.WaitForContainerGump();
        Orion.Wait('useitemdelay');
        Orion.FindTypeEx(any, any, lastcontainer).forEach(function(item){
            Orion.MoveItem(item.Serial(), 0, secure.serial);
            Orion.Wait('moveitemdelay');
        });
    }

Orion.FindTypeEx(any, any, lastcontainer)
should be
Orion.FindTypeEx(any, any, animal.Serial())

im thinking lastcontainer is somehow changing to your packpack insteal of the animals pack, this should be the fix.


**Edit: Never mind, pack animals pack Serial is different than the animals, i'll get back to you by morrning, i know there is a command for this in Orion lol, i cheated and skipped this step by using lastcontainer...

36
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 08:08:49 PM »
Well... had not considered that one. Just adding the error message to the journal should be enough to get those out of the way after the first chop though. They'll automatically go into the chopped array after an attempt. But they will be tried again after it resets the trees. I'll have to keep that one in mind.

37
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 07:50:46 PM »
I could be wrong, but i believe you two are having different issues (aside from the timing delays). Regardless, i think a different shard will give me more data to work with, more data, better ability to crunch other related bugs :)

38
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 07:40:06 PM »
Increasing the use item delay helped but it still gets stuck trying to chop a tree saying "you can't chop that with an axe" and when it unloaded all of the lumber and stuff, it also unloaded my runebooks lol.

Don't get me wrong, this is awesome and I cannot wait till the bugs are worked out. I really need to read up on javascript so I can get better. Thank you for sharing and working on this!

Ive really gotta figure out how to reproduce some of these lol, The only items it should know how to move are those listed in harvetTypes array. I'll try getting onto a free shard to test some of this out, might help just mixing things up so i can get a better sample size.

39
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 06:51:59 PM »
Ive run into this issue with a few Gump's now. Just ran into the same issue of bogging down after about 45 minutes each time, v0.1 ran for over 3 hours without a hiccup. Figured it was too short of a delay in one of the while statements, but kept adding to the time and it did not resolve it. I did notice i had it Updating the gump twice on every axe stroke, once to get the updated counts, once to update the Action status. 20 minutes into a fresh run and have not seen any issues starting yet.

40
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 06:33:04 PM »
I'll work on a quick OrionUO Setup guide this evening, ive run into several people having issues getting it running like it can.
This is a copy of my Options 1 Tab setup, It sounds like you're having framerate issues though. Although the client can handle larger fps, they are completely wasted on UO and soak up extra resources it does not need to.

41
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 06:16:24 PM »
Use item Delay adds a delay after using an object. If its trying to swing too fast, this needs to be increased.
Move Item Delay adds a delay after moving an item, before continuing to the next action. The way it's worked into the loops, If you get pickup message errors, this will need to be increased.

I can see how this is becoming an issue but i wanted to keep the delays consistent with the general setup of the OrionAssistant, which also cuts down on the editing required within the script itself. I'll see if i can work something in with the built in CheckLag function to compensate.

Using a bank as a secure would take a little fiddling with the Setup, I'll be adding that feature with with the runebooks in the next update.
I'll also be adding an options menu to the gump to reset secure/pack animal. Right now they are stored in your Lists->Objects Tab and can be edited/deleted from there. (Currently, If the script cannot find the set secure container, or pack animal upon start, it will ask for new targets to be selected).

42
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 05:47:18 PM »
I like it so far, can't wait for runebook usage. Currently I it has a difficult time removing boards. I get a lot of have to wait messages and if there is more than one kind of board in the pack, it won't remove the plain ones. I have checked to make sure the ids and stuff are the same. It also gets stuck on a tree when it says you cannot use an axe on that.

I added this in to try and change the can't use an axe but no avail
Code: [Select]
// Language, Adjust these to suit your clients language
    var msg1 = "There's not enough wood";
    var msg2 = "You cannot see";
    var msg3 = "That is too far";
    var msg4 = "You chop some";
    var msg5 = "you can't use an";

Woohoo! Feedback, thank you!
The script uses the delay settings from OrionAssitant->Main Tab->Options 1, Sounds like you need to increase your moveitemdelay/useitemdelay to fix those messages. No idea how it managed targeting something outside of a tree for the can't use that message but i'll pop that in there for v0.3! As for the not moving plain boards, that'll take some looking.

**I had to change my waitdelays from the default 600 to 1200 to smooth things out

43
Orion UO Scripts / Version 0.2 - Gumps and Counters!
« on: May 20, 2022, 03:16:03 PM »
Coming along quickly :)

44
Orion UO Scripts / Re: Building a Lumberjacking Script
« on: May 20, 2022, 12:53:14 PM »
The mining script is a big part of why i did this. Ive been working on a full blown mining script, on and off... for about 4 months. Its still not done because i kept trying to throw in everything at once and it gets over complicated, then the bugs move in. This method gets you a working script right off the bat, then you can make it as pretty as you want bit by bit.

Post Merge: May 20, 2022, 12:58:32 PM
MwInc have a simple lumber and Minijg script that was easy to set up.   Did the leg work :)    This can be a good base of compassion.
12X have a nice mining as well,  have not used it as much.

If not already include,  can you ensure that you cut log into board plx.:) this way you can carry more.    thx in advance

Orion:  I notice that you can scan an area and get 50 tree load up and just walk to all of them .

12X has the best mining script out there as far as im concerned. Ive used his structure in several of my own scripts, its just got a nice flow to it and is well designed.

Logs2Boards is in there.

That's how this one works! after getting the array full of trees, it uses some lovely JavaScript array manipulation to compare with the choppedTrees array and move the trees around in the array so you always walk to the closest one too you.

45
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 :)

Pages: 1 2 [3] 4 5 6