Page 1 of 3

[EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 6:54 am
by BlaZe
The first in my TrainR series, this script will get you to 95 lockpicking provided you have the lockpicks (I've been told about 350 will go from 30-95) and are standing in the Haven Thieves' Guild. If you don't know where that is, here's the path from the Haven telepad:
Haven Thieves' Guild.JPG
Haven Thieves' Guild.JPG (17.21 KiB) Viewed 23496 times
If you're on a slower connection or get the "doesn't appear to be locked" message often, try bumping up the %timer at the beginning of the script.


Revision History
v1.1: 90-95 boxes now 'findable'

Code: Select all

; BlaZin' TrainR: Lockpicking
; by BlaZe Budd of Excelsior's ßud ßrothers
; v1.1 completed 3/5/09
;
;
; YOU NEED TO BE IN THE HAVEN THIEVES'
; GUILD FOR THIS TO WORK, PERIOD!

set %timer 5 ; Increase this if you often get
             ; 'Does not appear to be locked' messages.


;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
set %boxes HKF_CUD
chooseSkill Lock
if #skill >= 950
  {
  event exMsg #charID 3 33 You're already at 95+ lockpicking!
  halt
  }
mainLoop:
gosub checkSkill
gosub setupBox
gosub checkBox
gosub checkPicks
gosub pick
gosub checkJournal
goto mainLoop
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub pick
set #lObjectID %picks
event macro 17
target 10s
event macro 22
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub setupBox
if %done = 1
  return
setupBox:
findItem %boxes G_ , 1
if #findKind = -1
  {
  event exMsg #charID 3 33 Can't find a usable box nearby!
  halt
  }
event property #findID
if Stones notin #property
  {
  ignoreitem #findID
  goto setupBox
  }
set #lObjectID #findID
event macro 17
wait %timer
mainBox:
if #contSize <> 206_166
  goto mainBox
set %mainBox #contID
findItem SEG C_ , %mainBox
set %key #findID
set %box #random % 9
setupBox2:
findItem %boxes C_ , %mainBox
if %box <> 0
  {
  set %box %box - 1
  ignoreitem #findID
  goto setupBox2
  }
set %box #findID
set %done 1
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub checkPicks
findItem IWH C_ , #backpackID
if #findKind = -1
  {
  event exMsg #charID 3 33 No lockpicks! Halting script..
  halt
  }
set %picks #findID
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub checkBox
deleteJournal
set #lTargetID %box
set #lTargetKind 1
checkBox:
event property %box
if Stones notin #property || %locked = 1
  return
set #lObjectID %key
event macro 17
target 10s
event macro 22
gosub checkJournal
goto checkBox
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub checkSkill
if #skill < 950
  {
  set %x 3690
  set %y 2510
  }
if #skill < 900
  {
  set %x 3692
  set %y 2512
  }
if #skill < 700
  {
  set %x 3692
  set %y 2516
  }
if #skill < 500
  set %x 3689
if #skill < 250
  set %y 2512
pathFind:
if #charPosX <> %x || #charPosY <> %y
  {
  set %done 0
  if %closeBox = 1
    {
    set %contX #contPosX + 50
    set %contY #contPosY + 50
    click %contX %contY r
    set %closeBox 0
    }
  event pathFind %x %y
  wait 3
  goto pathFind
  }
set %closeBox 1
return
;;;;; ;;;;; ;;;;; ;;;;; ;;;;;
sub checkJournal
journal:
for %scan 1 5
  {
  scanjournal %scan
  if unable_to_pick in #journal || You_lock_it in #journal
    {
    set %locked 1
    deleteJournal
    wait %timer
    return
    }
  if yields_to_your_skill in #journal || not_appear_to_be_locked in #journal
    {
    deleteJournal
    set %locked 0
    wait %timer
    return
    }
  }
goto journal

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 8:33 am
by Controlled Chaos
Blaze, if this works you're my hero. Will be testing it soon and will post my results.

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 8:48 am
by Sorgon
Blaze I am very glad your doing these. I will try this one as soon as i get a bit of time. Let me know if your taking requests. I have a few idea's but I am by no means a good coder....I tried to make an easy uo script and came up with an EPIC FAIL.

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 11:30 am
by Efanchenko_MM
testing this right now! so far no problems! thank you very very much indeed blaze!!! i'll let you know how i have gotten on!

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 11:54 am
by Efanchenko_MM
Ok got to 90 and it says "cant find a usable box nearby" any ideas?

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 5:20 pm
by Controlled Chaos
Efanchenko_MM wrote:Ok got to 90 and it says "cant find a usable box nearby" any ideas?
x2.

Finds the charPos just fine.... just doesn't recognize the 90-95 boxes as usable.

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Thu Mar 05, 2009 8:34 pm
by BlaZe
Fixed, the East and South -facing boxes have different #itemTypes.

As mentioned, I was quite sleep-deprived when I wrote it. :P

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Fri Mar 06, 2009 7:25 am
by Efanchenko_MM
thank you a ton blaze!!! works great 10/10 :D

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Mon Jun 01, 2009 9:18 pm
by plague08
TYVM Blaze

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Sat Jul 18, 2009 9:24 am
by Striker
Thank you kindly Blaze

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Sat Jul 18, 2009 6:49 pm
by Striker
when I began this script i had already began my training by hand. (the agony) I started with 42.5 lockpicking and 412 lockpicks. Aproximately 4 hours later i hit 95 lockpicking and still had 144 lockpicks left. i think i could have gotten it done faster but i forgot to eat the first hour.

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Sat Nov 21, 2009 5:57 pm
by Oiskis
Thanks Blaze, working great so far...

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Wed Dec 02, 2009 11:39 am
by Adin
AMAZING macro. +1

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Wed Dec 02, 2009 3:22 pm
by Adin
Two things:

1. The macro closed my backpack every time it went up one difficulty level and then of course stopped because it could not find the lockpicks anymore. No idea what causes this.

2. Users that are from any country that Origin bothered to support language-wise need to add this line to their uo.cfg:

Code: Select all

UserLanguageCodeString=ENU
Reason: EasyUO will not be able to properly recognize the strings for example in german, and will stop.

Re: [EasyUO] BlaZin' TrainR: Lockpicking

Posted: Mon Jan 11, 2010 2:48 pm
by lucas
Good macro. Doesn't work well when you try to combine it with other ones simultaneously. :P Took me around 360 lockpicks to go from 30-95. :P