ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: DeadIssue2 on March 15, 2009, 05:27:50 AM

Title: What's the deal with trees?
Post by: DeadIssue2 on March 15, 2009, 05:27:50 AM
Almost every scripter that I know of is terrified of trees.

When I say that you must understand that I have been trying for ages to write or get someone to help me with making a gating lumberjack script similiar to the gating mining script. I figure, man how easy can you get, most of the script is done just have to change the mine subs to jackin sub. So I guess I am wrong. Someone tried to tell me that finding the ID's of trees is very hard not to mention getting it to find and hit each of them. Is this true or false??

Basically what i'm looking for here guys is some one to explain in detail the process of walking up to a tree and using an axe on it to get logs. I swear this sounds simple enough but not one scripter that I know is able to do this.
Title: Re: What's the deal with trees?
Post by: TrailMyx on March 15, 2009, 10:48:34 AM
Ah, it's not very hard.  It's different than normal item scanning.  I'll explain some from my Beetle Lumberjacker.

The best way to hunt for trees is to use the tile stacks.  First you need in your code somewhere in your setup section:

Code: [Select]
tile init

Then you need a determine how many different tiles are located at a specific location:

Code: [Select]
; !targx, !targy computed somewhere relative to your character...
tile cnt !targx !targy #CURSKIND
if #TILECNT > 0
{
  for !i 1 #TILECNT
  {
    tile get !targx !targy !i #CURSKIND
    if tree in #TILENAME
    {
      ; you found a tree, wack it.
    }
  }
}

But how do you wack it?  Well you need to save the stack information found to the last target tiles stuff by:

Code: [Select]
set #LTARGETX !targx
set #LTARGETY !targy
set #LTARGETZ #TILEZ
set #LTARGETTILE #TILETYPE
set #LTARGETKIND 3

Now you can use "event macro 22" on the tile space to hack at.




Title: Re: What's the deal with trees?
Post by: DeadIssue2 on March 15, 2009, 11:34:05 AM
where might I take a look at your beetle lumberjack script? Maybe in context this makes more sense.
Title: Re: What's the deal with trees?
Post by: TrailMyx on March 15, 2009, 11:45:36 AM
I haven't released the beetlejacker script to anyone but the Elites.  However, if you go take a look at the recall lumberjacker they have over at WinUO, that script uses tiles and scans your general proximity for trees.

Cerveza was working on a similar script based on j4bs original work, but I'm not sure if his intention was to release it to the general public.
Title: Re: What's the deal with trees?
Post by: Cerveza on March 15, 2009, 01:32:23 PM
j4bs had a major issue with banking. When I feel the need for trees I'll kick it back up and see what the problems are.
Title: Re: What's the deal with trees?
Post by: Khameleon on March 15, 2009, 02:16:06 PM
beetle Jacker one great script. to advanced to let the whole world in on it yet.
Title: Re: What's the deal with trees?
Post by: TrailMyx on March 15, 2009, 02:18:25 PM
Those little hinty-poos I gave you DeadIssue2 are pretty much the meat of any lumberjacking script.
Title: Re: What's the deal with trees?
Post by: DeadIssue2 on March 15, 2009, 02:53:18 PM
I am on the right track for sure thanks to you guys. I had to go back to EZuo site to find documentation on the different commands you are referencing. Lucky for me I found an old essay on it how to use it and what its for. Hopefully that puts things into a better light for me. I will worry about banking later. And yes the recall miner from WinUO is a good start esp since I can set that one up to gate. I just need to remove the mining nonsense and replace with LJ subs. I will have to make due without the beetle lumberjacker for now; I don't think I am Elite yet tho I wouldn't mind joining the club someday.
Title: Re: What's the deal with trees?
Post by: Endless Night on March 16, 2009, 05:37:29 PM
thiers plenty of good lumberjacking scripts out thier.. on easyuo on winuo.. and many people have thier own custom versions .. myself included... but as TM said the principle in all of them is the same.

Title: Re: What's the deal with trees?
Post by: DeadIssue2 on March 16, 2009, 05:45:16 PM
No doubt there is no shortage of lumberjacking scripts but the two troubles I have been having with them is they are not SIEGE specific. We can not recall or sacred journey so most of these scripts just point and laugh at me :) The other trouble is I am currently not so very good at writing or understanding half of what those scripts are doing. I am currently learning as I go and asking a TON of questions. Thanks go out to both TM and Cerveza who have both been so helpful with all my annoying questions.
Title: Re: What's the deal with trees?
Post by: Endless Night on March 16, 2009, 05:46:47 PM
have a look at the walking mining mubler bot on easyuo. its old and its mining but can be modififed.