ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Character skill advancement => Topic started by: Cerveza on February 21, 2010, 12:16:17 PM

Title: Detect Hidden
Post by: Cerveza on February 21, 2010, 12:16:17 PM
I looked at other scripts for doing this and they just seemed way too complicated.

I mean what are you really doing? Look for a box, see if it's trapped, move on to the next box. Once you check all the boxes, go back and do it again. That's it right?

Here ya go...

Code: [Select]
set %boxes BKF_KKF_ZTD_WMF_KIF_BUD_VMF_KKF_TMF_UMF_JIF_HKF_HIF_IKF_JKF_

repeat
finditem %boxes G_4
set %count #findCnt
gosub detect
if %count = 1
  gosub reset
until #false

sub detect
if #findID = X
  return
event macro 13 14
target 5s
set #ltargetID #findID
set #ltargetKind 1
event macro 22 0
wait 5
ignoreitem #findID
wait 10s
return

sub reset
ignoreitem reset
wait 1
return


Seems to be working ok for me ;)

*Added BKF - barrel
*Added JKF - small barrel
Title: Re: Detect Hidden
Post by: _C2_ on February 21, 2010, 12:38:37 PM
you can use the same box over and over.  also you really want to use diff level tinker skill trapped boxes for diff levels of gaining.  but yeah it is pretty darn basic
Title: Re: Detect Hidden
Post by: Khameleon on February 21, 2010, 12:59:42 PM
lol... ya how complicated where the other scripts? 1k+ lines?
Title: Re: Detect Hidden
Post by: Cerveza on February 21, 2010, 01:54:42 PM
They disappear and reappear, also they are different levels of trapped so you need to cycle them.

This looks at one, then ignores it, when it goes through them all it resets the ignore counter and starts again. Gaining pretty well in Vesper bank with this.

Quote from: Kham
lol... ya how complicated where the other scripts? 1k+ lines?

One would check for one type of crate, then GOTO another type of crate, etc.... Ghudahs multi skill trainer didn't actually seem to work at all in there. One used a similar logic to the first, but actually worked somewhat. Mine cycles through everything and seems to work well.

The only improvement would require researching what messages and delays there are... like if you fail do you still wait 10 seconds? If there's no message after a detect how long is the delay? As it is now, it checks, waits 10 seconds, then checks the next.

Actually, doesn't someone have a "non standard skill gain script" around here?? I'll have to check it.
Title: Re: Detect Hidden
Post by: _C2_ on February 21, 2010, 04:14:11 PM
my odd ball skill trainer does detect in the vesper area or on leveled boxes.  it has a bunch of skills in thre so it seems long but the detect part is short
Title: Re: Detect Hidden
Post by: DeadIssue2 on February 21, 2010, 06:48:26 PM
C2 did you update the pen part of this script? It is still asking to have a scribe pen on you? not sure if you made the proper updates  :-X
Title: Re: Detect Hidden
Post by: _C2_ on February 21, 2010, 08:46:54 PM
i had removed all the pen stuff.  did i miss something on this current version.  within two days of it being fixed i pulled it out.  let me know if it is not working
Title: Re: Detect Hidden
Post by: Cerveza on February 22, 2010, 03:14:38 AM
- Added BKF - Barrel
Title: Re: Detect Hidden
Post by: Cerveza on February 22, 2010, 03:36:18 AM
Rewrote part of the code. C2 you should consider this as well.

I subbed out the actual detect portion so I could put this in...

if #findID = X
return

Each cycle through the boxes the script would find something with an ID of X and cause it to wait out the 10 seconds. It's doing it in your script also C2. By putting this in you knock at least 30% off the total cycle checking time.

*******************
The reason it's doing this is that I'm resetting the ignoreitem list before I go back to find more boxes. This is a quick fix so the cycle will start over after the findID.
Title: Re: Detect Hidden
Post by: Cerveza on February 22, 2010, 04:22:09 AM
OK fixed it completely. Doesn't find X anymore. I set the counter *after* so when there's only 1 found, the script detects on it, then the counter is reset.

I left the findID X return in there just in case, but it should never be seen. The only case I can think of is if a target disappears between being ID'd and being Detected on.
Title: Re: Detect Hidden
Post by: 12TimesOver on February 22, 2010, 05:39:22 AM
*12x wonders what was so complicated about his Detect script*
Title: Re: Detect Hidden
Post by: Cerveza on February 22, 2010, 05:49:23 AM
LOL you have one? I was talking about the ones over at EUO. Most started with initevents so you get an idea how old they were.
Title: Re: Detect Hidden
Post by: 12TimesOver on February 22, 2010, 06:02:07 AM
LOL you have one? I was talking about the ones over at EUO. Most started with initevents so you get an idea how old they were.
LOL!

Yep, I have one in my library that first checks your backpack for any trunks to use then moves to anything on the ground if nothing is in the backpack (e.g. Vesper Bank). Works great, although now this thread has me realizing I should remove the pen trick stuff so I'm off to do that right now.

The ability to put a locked box in your backpack made with the correct tinkering level GREATLY speeds up the training over the Vesper training.

X

P.S. for the record - http://www.scriptuo.com/index.php?topic=1746.0 ;) (link only four or so threads below this one)
Title: Re: Detect Hidden
Post by: 12TimesOver on February 22, 2010, 06:21:23 AM
There, just updated mine to remove the Pen Trick, now it's even MORE simplified ;) (went from 204 lines/7 subs down to 145 lines/4 subs (includes skill tracking menu and optional Hiding)).

I'm at work though so I haven't tested it to make sure my timings are ok.

X
Title: Re: Detect Hidden
Post by: _C2_ on February 22, 2010, 08:13:10 AM
Cool Cerv- I will look into this sometime this week.  Never saw that happening.