Author Topic: Whole Book BOD Filler  (Read 129164 times)

0 Members and 1 Guest are viewing this topic.

Offline Xanderyum

  • Full Member
  • ***
  • Posts: 143
  • Activity:
    0%
  • Reputation Power: 2
  • Xanderyum has no influence.
  • Gender: Male
  • Respect: +25
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #60 on: August 07, 2012, 12:59:51 PM »
+1
I've been searching for this script for a week and finally remembered its name. That's what I get for take a year off. Still working perfectly, been chugging along all day and finally clearing out the mass of iron smalls. .

Heh, since this post I've gotten 6 full soulstones, all from gold achieved through running scripts directly or modified versions from this super Site.   
Cheers,
  Xander the yummiest.

Offline Oracle

  • Hero Member
  • *
  • Posts: 888
  • Activity:
    0%
  • Reputation Power: 14
  • Oracle barely matters.Oracle barely matters.
  • Gender: Male
  • We always want something that we cannot have...!
  • Respect: +188
  • Referrals: 3
    • View Profile
Re: Whole Book BOD Filler
« Reply #61 on: August 31, 2012, 01:03:17 PM »
+1
Any chance of getting this to work with Tailor BODs?  There currently is not a good Whole Book tailoring Bod filler available...

ORACLE
Get me a Straw...because I suck...!
PIXEL CRACK -- Love it! Crave it! Want it! Got to have it!

Offline StarWoman

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 1
  • StarWoman has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #62 on: December 29, 2012, 04:10:18 AM »
+1
I thought this looked like a useful script and so made it my first download from here.  I use S7BodFiller daily so it is all working.  Put this script into same directory as per instructions.  Correct skills on character.  Two BOD books as instructed with roughly 100 bods in the one to be made and an empty one for putting the filled bods in.  Started up script and it dropped the BOD into backpack, picked up 10 copper ingots (was iron bod) and opened the blacksmith gump and stalled.  Can see it is because it hasn't picked up the iron ingots (zero in bag) but I have no idea why it isn't.  S7's works perfectly.  Any ideas anyone?  Is this still working after the recent patching?

Thanks for any help.  Clueless at scripting sorry.  Hope you can help as this would be awesome to use... I currently buy the 'normal' small bods but that is time consuming to do and I think this would enable some very nice bodding sessions.

Offline Ultima

  • Insane Scripter
  • *
  • Posts: 1580
  • Activity:
    0%
  • Reputation Power: 26
  • Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.
  • Gender: Male
  • Respect: +316
  • Referrals: 4
    • View Profile
Re: Whole Book BOD Filler
« Reply #63 on: December 29, 2012, 06:51:14 AM »
+1
I had similar issues when I tried using it last few times. I think the issue revolves around the script trying to make tongs. Try making a bunch of tongs and have them in your backpack before you hit play on the script, it fixed the issue for me.


Offline StarWoman

  • Newbie
  • *
  • Posts: 6
  • Activity:
    0%
  • Reputation Power: 1
  • StarWoman has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #64 on: December 29, 2012, 12:13:18 PM »
+1
Thanks for the tip Ultima.  I tried it out but unfortunately it didn't work.  Do you normally see S7's gump come up when it is called?  Being totally unfamiliar with the script it is hard to figure out what is happening.  I am using the script fresh from the download... has there been any mods needed to be made that aren't noted in the forum for this script?  I have read through it all and haven't found any. 

Offline Ultima

  • Insane Scripter
  • *
  • Posts: 1580
  • Activity:
    0%
  • Reputation Power: 26
  • Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.Ultima is on the verge of being accepted.
  • Gender: Male
  • Respect: +316
  • Referrals: 4
    • View Profile
Re: Whole Book BOD Filler
« Reply #65 on: December 29, 2012, 08:36:07 PM »
+1
I just ran 8 BODs with Wholebookfiller  with no problems at all. It crafted the tongs no issues this time around.

There aren't any changes as far as I know this script is the same version V.10. There hasn't been any updates or changed in order to keep it working.

Do you have S7s latest version?  I take it you do as you said it was working for you.

Try starting with some iron ingots already in your pack.

This is on an OSI shard your using it on?

Offline pashadiv

  • Jr. Member
  • **
  • Posts: 23
  • Activity:
    0%
  • Reputation Power: 0
  • pashadiv has no influence.
  • Respect: +12
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #66 on: May 20, 2013, 12:19:10 AM »
+1
I run this script all the time and only recently got the same hang up with the tongs crafting. Starting with tongs in pack works fine naturally but I didn't have to do this before.

Offline Black Widow

  • Jr. Member
  • **
  • Posts: 37
  • Activity:
    0%
  • Reputation Power: 1
  • Black Widow has no influence.
  • Gender: Male
  • Well Hello there....Skippy
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: Whole Book BOD Filler
« Reply #67 on: August 31, 2013, 11:49:01 AM »
+1
Had the same issue with the tongs...works well with them in pack !!
And I heard as it were the noise of thunder
One of the four beasts saying come and see and I saw
And behold a white horse...
And I heard a voice in the midst of the four beasts
And I looked and behold, a pale horse
And his name that sat on him was Death
And Hell followed with him....

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +304
  • Referrals: 1
    • View Profile
Re: Whole Book BOD Filler
« Reply #68 on: September 12, 2013, 07:28:07 AM »
+1
Black Widow,

I have not been able to reproduce this. Are you on an OSI production shard or on a freeshard? Can you share any other details?
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline silverfox15987

  • Newbie
  • *
  • Posts: 5
  • Activity:
    0%
  • Reputation Power: 1
  • silverfox15987 has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #69 on: March 25, 2017, 09:58:49 AM »
+1
Hello, I don't know if anyone is actually keeping up with this or not, but the script will run and create the items but will not select said items to bond them to the bods. Any idea what is causing this?

Offline valen2.0

  • Full Member
  • ***
  • Posts: 229
  • Activity:
    0%
  • Reputation Power: 3
  • valen2.0 has no influence.
  • Respect: +104
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #70 on: March 26, 2017, 11:09:38 AM »
+1
You need to mod the gumps to make it select the right items so it will select them.

Offline Crisis

  • Global Moderator
  • *
  • *
  • Posts: 3177
  • Activity:
    0.2%
  • Reputation Power: 43
  • Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.Crisis is a force to reckon with.
  • Gender: Male
  • Scripting well enough to break things!
  • Respect: +566
  • Referrals: 2
    • View Profile
Re: Whole Book BOD Filler
« Reply #71 on: March 29, 2017, 07:22:57 PM »
+1
Yes, a lot of gump changes since this was first made. it also depends on whether you are on a free shard or on OSI.

Offline MungoTolkien

  • Newbie
  • *
  • Posts: 4
  • Activity:
    0%
  • Reputation Power: 1
  • MungoTolkien has no influence.
  • Gender: Male
  • Respect: +2
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #72 on: May 22, 2021, 03:06:35 PM »
+1
for some reason the script isnt filling the bods does anyone else have this problem ?

Offline Gaderian

  • Elite
  • *
  • *
  • Posts: 493
  • Activity:
    0%
  • Reputation Power: 10
  • Gaderian barely matters.Gaderian barely matters.
  • Respect: +283
  • Referrals: 4
    • View Profile
Re: Whole Book BOD Filler
« Reply #73 on: May 22, 2021, 04:01:17 PM »
+1
I haven't tried it. There are 2 other scripts you need in the same folder as your easyuo executable. The S7 BOD and the craftinfo scripts. Do you have that setup?
Has this worked in the past for you but now is failing with the same setup? (Or is this the first time you are trying to get it to work?)
"Go ahead ask me: 'Should I use hard waits or timers?'"
You say:"Should I"
Gaderian:"Timers!"
You Say:"use hard waits or timers?"

The serious side of timer use is illustrated here: http://www.scriptuo.com/index.php?topic=12094.msg101926#msg101926

However, every time I go back and look at this [AutoLooter] script, I realize I had wrote it in my zen state of EUO scripting - so it makes my brain hurt.

Offline wampa

  • Newbie
  • *
  • Posts: 2
  • Activity:
    0.2%
  • Reputation Power: 1
  • wampa has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Whole Book BOD Filler
« Reply #74 on: March 29, 2026, 05:09:28 AM »
0
I thought this looked like a useful script and so made it my first download from here.  I use S7BodFiller daily so it is all working.  Put this script into same directory as per instructions.  Correct skills on character.  Two BOD books as instructed with roughly 100 bods in the one to be made and an empty one for putting the filled bods in.  Started up script and it dropped the BOD into backpack, picked up 10 copper ingots (was iron bod) and opened the blacksmith gump and stalled.  Can see it is because it hasn't picked up the iron ingots (zero in bag) but I have no idea why it isn't.  S7's works perfectly.  Any ideas anyone?  Is this still working after the recent patching?

Thanks for any help.  Clueless at scripting sorry.  Hope you can help as this would be awesome to use... I currently buy the 'normal' small bods but that is time consuming to do and I think this would enable some very nice bodding sessions.


I had the same problem. It was ranging from just taking 10 copper to stalling.
I added "&& copper notin #property" to all lines with
"If shadow notin #property && dull notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property"

This seems to have fixed it.
Below is a fixed script if anybody still needs it.

Code: [Select]
;=====================================================================
; Script Name:  S7 Filler Call Full BOD Book Filler
; Version: 0.10
; Author: Paulonius
; Special Thanks to TrailMix and S7 for the use of their code
; Client Tested with:
; EUO version tested with:
; Shard OSI / FS: OSI
; Initial Release Date:  04/21/2010
; Revision Date: TBD
; Global Variables Used: N/A
; Dependencies: Script requires that you have S7BodFiller and CraftInfo
;               in the same file as script
;----------------------------------------------------------------------
; Purpose: Fills Bods in one book and transfers them into a second
;======================================================================
; TO Do List
; 1. build a tracking menu
; 2. Menu based setup
;======================================================================
; Initial Setup
; 1. You must have a secure with your resources in it within reach
; 2. You should have two books in your pack, one with bods that you
;    want to fill, and another to drop the completed bods into
;======================================================================
; Instructions:
; 1. Position yourself with reach of a forge, anvil, and your secures
; 2. Have a tinker kit in your backpack
; 3. Toon should have 120 Blacksmith, 100 Mining and 70 Tinker
; 4. Not recommended that you try to fill books with more than 450 BODs
;    490 is your max with a pack empty of everything except what you
;    need to run the script.
; 5. Do not use the same BOD book for full and empty deeds
;======================================================================

Gosub Setup

Repeat
   {
   Gosub Get_Next_BOD
   If #Result = #False
      Set %NoMoreBODs Yes
   Else
      Gosub Fill_BOD %CurrentBod
   }
Until %NoMoreBODs = Yes
IgnoreItem Reset 1
Halt

;==========================================================
Sub Get_Next_BOD
Set #LObjectID #BackPackID
Event Macro 17 0
Wait 20
Start_Get_Next_BOD:
FindItem EYM C_ , #BackpackID
If #FindCnt > 0
   {
   Set %BODFoundInPack #FindID
   GoSub SBOD_Check %BODFoundInPack
   If #Result = #True
      {
      Gosub Drop_BOD_In_BODBook %BODFoundInPack %FullBODBook
      Wait 10
      Gosub OffsetClick 387 427     ; Close BOD Book Gump
      GoTo Start_Get_Next_BOD
      }
   If Large in %BODStatus
      {
      IgnoreItem %BODFoundInPack 1
      GoTo Start_Get_Next_BOD
      }
   If Partial in %BODStatus
      {
      Set %CurrentBod #FindID
      Return #True
      }
   IgnoreItem %BODFoundInPack 1  ; NOTE TO SELF: Look for SBODs as remainders
                                 ; as these will be the result of errors
   GoTo Start_Get_Next_BOD
   }
FindItem %EmptyBODBook C_ , #BackPackID
If #FindCnt < 1
   Return #False
GoSub Get_BODs_From_BOD_Book %EmptyBODBook 1
If #Result = #False
   Return #False
FindItem EYM C_ , #BackpackID
Set %CurrentBod #FindID
Wait 10
Gosub OffsetClick 387 427     ; Close BOD Book Gump
Return #True

;==========================================================
Sub Drop_BOD_In_BODBook
Set %BODToMove %1
Set %BODBookToDropOn %2
FindItem %BODToMove C_ , #BackpackID
While #FindCnt > 0
      {
      exevent drag %BODToMove
      wait 10
      exevent dropc %BODBookToDropOn
      Wait 20
      FindItem %BODToMove C_ , #BackpackID
      }
Return

;==========================================================
; Sub will check a SBOD for Item Count
; Returns #True if it is full or #False if it's not
; Sets %SBODItemCount to the number of items in the sBod
; Returns #False for LBODs and sets %BODStatus to Large
; Will return %BODstatus for SBODs as Full# or Partial# where #
; is the number required to fill the SBOD
;----------------------------------------------------------
; Dependency: This Sub requires the included Sub Large_Check
Sub SBOD_Check
Set %BOD %1
Set %BODStatus N/A
Set %SBODItemCnt N/A
Set %Ones N/A
Set %Tens N/A
Set %BODFillStatusSubString N/A
Event Property %BOD
Set %BODFillStatusString #Property
Str Len %BODFillStatusString
Set %BODFillStatusStringLength #strRes - 3
Str Left %BODFillStatusString %BODFillStatusStringLength
Set %BODFillStatusStringRemainder #StrRes
If Large in #Property
   {
   Gosub Large_Check %BOD
   If #Result = #True
      {
      Set %BODStatus Large
      Return #False
      }
   }
str Right %BODFillStatusString 3
Set %BODFillStatusSubString #strRes
Str Left %BODFillStatusSubString 2
Set %BODFillStatusSubString2 #strRes
Str Left %BODFillStatusSubString2 1
Set %Tens #StrRes
Str Right %BODFillStatusSubString2 1
Set %Ones #StrRes
If %tens > 0
   {
   Set %sBODItemCnt %Tens , %Ones
   }
If %tens < 1
   Set %sBODItemCnt %Ones
If %sBODItemCnt = 20
   {
   Set %BODStatus Full20
   Return #True
   }
If %sBODItemCnt = 15
   {
   If 15 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Full15
      Return #True
      }
   Set %BODStatus Partial20
   Return #False
   }
If %sBODItemCnt = 10
   {
   If 10 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Full10
      Return #True
      }
   If 15 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Partial15
      Return #False
      }
   If 20 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Partial20
      Return #False
      }
   }
If 10 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Parial10
   Return #False
   }
If 15 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Partial15
   Return #False
   }
If 20 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Partial20
   Return #False
   }
Set %BODStatus ERROR
Return #False

;----------------------------------------------------------
; Returns #True for LBOD
Sub Large_Check
Set %BODLargeCheck %1
Event Property %BODLargeCheck
Set %StringCheckLarge #Property
str Pos %StringCheckLarge Large
If #StrRes = 43
   Return #TRUE
Return #False

;==========================================================
Sub Fill_BOD
;event exmsg #charid 3 4 TEST MESSAGE in Fill_BOD Current BOD ID is %1
Set %CurrentBODToFill %1
FillBODLoop:
Finditem %TinkerTools C_ , #BackpackID
If #FindCnt < 2
   Gosub Check_Tinker_Kit
Finditem %Tongs C_ , #BackpackID
If #FindCnt < 2
   Gosub Check_Tongs
Finditem %CurrentBODToFill C_ , #BackpackID
If #FindCnt < 1
      Return #False
While #FindCnt > 0
   {
   Call s7BODFiller.euo %CurrentBODToFill %ResourceSecure #False
   Wait 10
   Gosub OffsetClick 30 453         ; Close Craft Gump
   GoSub SBOD_Check %CurrentBODToFill
   If #Result = #True
      {
      Gosub Drop_BOD_In_BODBook %CurrentBODToFill %FullBODBook
      Wait 10
      Gosub OffsetClick 387 427     ; Close BOD Book Gump
      }
   Finditem %CurrentBODToFill C_ , #BackpackID
   }
Return #True

;==========================================================
Sub Get_BODs_From_BOD_Book
;event exmsg #charid 3 4 TEST MESSAGE in Get_BODs_From_BOD_Book
If %BODBookEmpty = Yes
   Return #False
Set %BookToPullFrom %1
Set %NumberBODsDesired %2
Finditem %BookToPullFrom C_ , #backpackid
if #findcnt < 1
   Return #False
Set #LobjectID %BookToPullFrom
Event Macro 17 0
Gosub waitforgump %BODBookMainGump
If ! #Result
   {
    Set #LobjectID %BookToPullFrom
    event macro 17 0
    Wait 25
    Gosub TM_AdvJournalScan BODBOOK Advance The_book_is_empty
    if #Result = #True
         {
         Set %BODBookEmpty Yes
         Return #False
         }
    }
Repeat
      {
      Gosub OffsetClick 41 102
      Gosub waitforgump %BODBookMainGump
            If ! #Result
               {
               Set #LobjectId %BookToPullFrom
               Event Macro 17 0
               Wait 25
               Gosub TM_AdvJournalScan BODBOOK Advance The_book_is_empty
               If #Result = #True
                  Set %BODBookEmpty Yes
               }
      Finditem EYM C_ , #backpackid
      }
Until #FindCnt = %NumberBODsDesired
Return #True

;-------------------------------------------------------------------------------
; %1 = Gumpname 1
; %2 = Gumpname 2
; #TRUE gump occured before timeout
sub GumpWait
  namespace push
  namespace local GW
  wait 10
  set !timedelay #SCNT
  while #SCNT <= !timedelay + 7
  {
    if #CONTNAME = %1 || #CONTNAME = %2
    {
      namespace pop
      return #TRUE
    }
  }
  namespace pop
return #FALSE

;======================================================================
Sub Check_Tinker_Kit
;event exmsg #charid 3 4 TEST MESSAGE in MakeTinkerKit
MakeKitLoop:
Finditem %TinkerTools C_ , #BackpackID
If #FindCnt >= 2
   Return #True
If #FindCnt < 1
   {
   Finditem %TinkerTools C_ , %ResourceSecure
   If #FindCnt < 1
      {
      Display Please get a tinker kit in your packpack and hit play
      Pause
      Goto MakeKitLoop
      }
   Else
      {
      exevent drag #findid
      wait 10
      exevent dropc #backpackid
      wait 20
      }
   }
Set %IronIngotsFound No
Repeat
   {
   finditem %Ingots C_ , #BackpackID
   Event Property #FindID
   If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
      Set %IronIngotsFound Yes
   Else
       IgnoreItem #FindID 3
   }
Until %IronIngotsFound = Yes || #FindCnt < 1
IgnoreItem Reset 3
If #findstack < 10 && %IronIngotsFound = Yes
   {
   Set %quantityinpack 10 - #findstack
   Set %IronIngotsFound No
   Repeat
       {
       Finditem %Ingots C_ , %ResourceSecure
       Event Property #FindID
       If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
          Set %IronIngotsFound Yes
       Else
           IgnoreItem #FindID 3
       }
   Until %IronIngotsFound = Yes || #FindCnt < 1
   IgnoreItem Reset 3
   If #findstack < %quantityinpack
      {
      display You need to place more Iron ingots in your Resource Secure and hit play.
      pause
      Goto MakeKitLoop
      }
   else
       {
       exevent drag #findid %quantityinpack
       wait 10
       exevent dropc #backpackid
       wait 20
       }
   }
If %IronIngotsFound = No
   {
   Set %quantityinpack 10
   Set %IronIngotsFound No
   Repeat
       {
       Finditem %Ingots C_ , %ResourceSecure
       Event Property #FindID
       If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
          Set %IronIngotsFound Yes
       Else
           IgnoreItem #FindID 3
       }
   Until %IronIngotsFound = Yes || #FindCnt < 1
   IgnoreItem Reset 3
   If #findstack < %quantityinpack
      {
      display You need to place more Iron ingots in your Resource Secure and hit play.
      pause
      Goto MakeKitLoop
      }
   else
       {
       exevent drag #findid %quantityinpack
       wait 10
       exevent dropc #backpackid
       wait 20
       }
   }
Finditem %TinkerTools C_ , #backpackid
set #lobjectid #findid
event macro 17
gosub waitforgump %cwin
if ! #result
   GoTo MakeKitLoop
Gosub OffSetClick 30 130    ; Selects Tools Category
gosub waitforgump %cwin
if ! #result
   GoTo MakeKitLoop
Gosub OffSetClick 230 130   ; Selects Tinker Kit
gosub waitforgump %cwin
if ! #result
   GoTo MakeKitLoop
Gosub OffSetClick 28 453    ; Closes Craft Gump
Wait 10
Return #True

;======================================================================
Sub Check_Tongs
;event exmsg #charid 3 4 TEST MESSAGE in Check Tongs
MakeTongsLoop:
Finditem %TinkerTools C_ , #BackpackID
If #FindCnt < 2
   Gosub Check_Tinker_Kit
Set %IronIngotsFound No
Repeat
   {
   finditem %Ingots C_ , #BackpackID
   Event Property #FindID
   If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
      Set %IronIngotsFound Yes
   Else
       IgnoreItem #FindID 3
   }
Until %IronIngotsFound = Yes || #FindCnt < 1
IgnoreItem Reset 3
If #findstack < 10 && %IronIngotsFound = Yes
   {
   Set %quantityinpack 10 - #findstack
   Set %IronIngotsFound No
   Repeat
       {
       Finditem %Ingots C_ , %ResourceSecure
       Event Property #FindID
       If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
          Set %IronIngotsFound Yes
       Else
           IgnoreItem #FindID 3
       }
   Until %IronIngotsFound = Yes || #FindCnt < 1
   IgnoreItem Reset 3
   If #findstack < %quantityinpack
      {
      display You need to place more Iron ingots in your Resource Secure and hit play.
      pause
      Goto MakeTongsLoop
      }
   else
       {
       exevent drag #findid %quantityinpack
       wait 10
       exevent dropc #backpackid
       wait 20
       }
   }
If %IronIngotsFound = No
   {
   Set %quantityinpack 10
   Set %IronIngotsFound No
   Repeat
       {
       Finditem %Ingots C_ , %ResourceSecure
       Event Property #FindID
       If shadow notin #property && dull notin #property && copper notin #property && bronze notin #property && gold notin #property && agapite notin #property && verite notin #property && valorite notin #property
          Set %IronIngotsFound Yes
       Else
           IgnoreItem #FindID 3
       }
   Until %IronIngotsFound = Yes || #FindCnt < 1
   IgnoreItem Reset 3
   If #findstack < %quantityinpack
      {
      display You need to place more Iron ingots in your Resource Secure and hit play.
      pause
      Goto MakeTongsLoop
      }
   else
       {
       exevent drag #findid %quantityinpack
       wait 10
       exevent dropc #backpackid
       wait 20
       }
   }
Finditem %TinkerTools C_ , #backpackid
If #FindCnt < 2
   {
   Gosub Check_Tinker_Kit
   GoTo MakeTongsLoop
   }
Set #lobjectid #findid
Event macro 17
gosub waitforgump %cwin
if ! #result
   Goto MakeTongsLoop
Gosub OffSetClick 30 130     ; Selects Tools Category
gosub waitforgump %cwin
if ! #result
   GoTo MakeTongsLoop
Gosub OffSetClick 380 270    ; Selects next page
gosub waitforgump %cwin
if ! #result
   GoTo MakeTongsLoop
Gosub OffSetClick 230 110    ; Selects make tongs
gosub waitforgump %cwin
if ! #result
   GoTo MakeTongsLoop
Gosub OffSetClick 28 453     ; Selects Close Craft Gump
Wait 10
Return #True

;==========================================================
; Script Name: TrailMyx's Advanced Journal Scanner
; Author: TrailMyx
; Version: 1.1
; Shard OSI / FS: OSI / FS?
; Revision Date: 10/20/2007
; Purpose:
;   Use these subs to quickly find text in your #journal entries.  These subs
; use #jindex for flawless journal scanning and is much more reliable than using
; standard indexing of #journal and #SYSMSG.
;
;   Now it is possible to manage separate journals based on unrelated text.  It's now possible
; to monitor spellcasting, bandaging, stealing, or anything else without a TM_AdvJournalSync
; potentially removing text needed for another UO funciton.
;
;   New is the ability to either gosub or call these functions without the need to change the
; header!  When calling, a limit of 10 arguments is allowed, but more can be added by editing the
; call interface section.
;
;  Examples:
;     gosub TM_AdvJournalSync speech 100 ; sync "speech" journal space, set #LPC to 100 from default of 1000
;     gosub TM_AdvJournalScan speech VALID Find_this_text and_find_this_too ; will not advance copy of #jindex
;     gosub TM_AdvJournalScan heal VALID_ADVANCE you_heal_what that_patient_is_not ; advances pointer after scan
;     gosub TM_AdvJournalScan spellcast NONE fizzle ; no spam checking and doesn't advance #jindex copy automatically
;
;  Subs included:
;     TM_AdvJournalSync - Must call this in initialzation
;     TM_AdvJournalScan - see header for details....
;
;  Release history:
;    v1.0 - Initial release.
;    v1.1 - debug code added, fixed small possibility to miss an incoming journal entry
;
;  Requirements:
;    Nothing special
;
;  Credit:
;    If you use these subs, please leave credit for me somewhere in your script header.
;=================================================================
;------------------------  Call interface  -----------------------
;=================================================================
set !TM_FunctionCalled #FALSE
if %0 = 1
  gosub %1
if %0 = 2
  gosub %1 %2
if %0 = 3
  gosub %1 %2 %3
if %0 = 4
  gosub %1 %2 %3 %4
if %0 = 5
  gosub %1 %2 %3 %4 %5
if %0 = 6
  gosub %1 %2 %3 %4 %5 %6
if %0 = 7
  gosub %1 %2 %3 %4 %5 %6 %7
if %0 = 8
  gosub %1 %2 %3 %4 %5 %6 %7 %8
if %0 = 9
  gosub %1 %2 %3 %4 %5 %6 %7 %8 %9
if %0 = 10
  gosub %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
if %0 = 11
  gosub %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11
if %0 > 11
{
  display ok Too many arguments for "call", edit file.
  stop
}

if !TM_FunctionCalled = #TRUE
  exit
if %0 = N/A
  display ok You may not run this script directly.
else
  display ok Function " , %1 , " not found.
stop
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - #LPC setting (optional)
; Brings !_jindex up to the most recent #journal entry
sub TM_AdvJournalSync
  namespace push
  namespace local TM_AdvJS_ , %1
  set !_jindex #jindex + 1
  if %0 > 1
    set !lpc_set %2
  namespace pop
  set !TM_FunctionCalled #TRUE
return
;-------------------------------------------------------------------------------
; %1 - Journal Name
; %2 - NONE, ADVANCE , ( _VALID ) - advances jindex pointer, anything else
; %3, %4, %5, etc strings to match
; returns #TRUE for match, #FALSE for no match
;  Will not advance !_jindex pointer to allow for scanning journal history for more than one search.
;  Also searches for : , #SPC in journal entry to be sure someone isn't spamming the text
;  About %2 arguments:
;    NONE: defaults to basic journal scan (no SPAM checking, no #jindex pointer copy advancing)
;    ADVANCE: no spam checking, advances #jindex copy
;    VALID: invokes SPAM filtering, no advance of #jindex copy
;    VALID_ADVANCE, VALIDADVANCE, ADVANCE_VALID, etc.: invokes SPAM filtering, advances of #jindex copy
sub TM_AdvJournalScan
  namespace push
  namespace local TM_AdvJS_ , %1
  set !args %2
  set !temp_lpc #LPC
  if !lpc_set = N/A
    set #LPC 1000
  else
    set #LPC !lpc_set
  set !num_args %0
  set !first_arg 3
  set !sampled_jindex #JINDEX
  if !_jindex = N/A
    set !_jindex !sampled_jindex
  if !charname = N/A
  {
    set !charname #CHARNAME
    AdvJournalScan_loop1:
      str pos !charname #SPC
      if #STRRES <> 0
      {
        set !val #STRRES - 1
        str left !charname !val
        set !left #STRRES
        set !val !val + 1
        str del !charname 1 !val
        set !charname !left , _ , #STRRES
        goto AdvJournalScan_loop1
      }
  }
  set !index !first_arg
  repeat
    set !temp_jindex !_jindex
    set !text % . !index
    while !temp_jindex <= !sampled_jindex
    {
      scanjournal !temp_jindex
      str pos #JOURNAL !charname 1
      set !namepos #STRRES
      str count #JOURNAL !charname
      set !namecnt #STRRES
      str pos #JOURNAL :_ 1
      set !smcpos #STRRES
      str pos #JOURNAL !text 1
      set !textpos #STRRES
      if !textpos < !smcpos && !smcpos <> 0 || !smcpos = 1 || :_ notin #JOURNAL || VALID notin !args
        set !pass #TRUE
      else
        set !pass #FALSE
      if ( !text in #journal && ( ( !namepos = 1 && !namecnt <= 1 ) || !pass ) )
      {
        set !temp_jindex !temp_jindex + 1
        if ADVANCE in !args
          set !_jindex !temp_jindex
        set #LPC !temp_lpc
        namespace pop
        set !TM_FunctionCalled #TRUE
        return #TRUE
      }
      set !temp_jindex !temp_jindex + 1
    }
    set !index !index + 1
  until !index - !first_arg > !num_args - !first_arg
  set %10 !sampled_jindex - !_jindex
  set %10 %1 , _ , %10 ; for debugging purposes
  set #LPC !temp_lpc
  namespace pop
  set !TM_FunctionCalled #TRUE
return #FALSE

;==========================================================
Sub OffSetClick
  Set %tempx %1 + #CONTPOSX
  Set %tempy %2 + #CONTPOSY
  Click %tempx %tempy f
Return

;==========================================================
Sub waitforgump
Set %timeout #scnt + 10
While #contsize <> %1
      {
      Wait %gumpwait
      If #scnt > %timeout
         {
         Return #false
         }
      }
Wait %gumpwait
Return #true

;======================================================================
Sub Setup

Gosub Tm_AdvJournalSync BODBOOK 100
Set %BODBookEmpty No
Set %TinkerTools JTL_GTL_KTL
Set %Tongs OBG
Set %Ingots ENK
Set %cwin 530_497       ; Publish 65 Craft window size
Set %BODBookNameGump 87_42
Set %BODBookMainGump 620_459
Set %GumpWait 2
Set %targetcursorwait 2

Set %EmptyBODBookFound N/A

Display Target the book in your backpack with BODs that you want to fill
  set #targcurs 1
      while #targcurs = 1
         wait 1
         Set %EmptyBODBook #LTargetID
      wait 5

Display Target the book in your backpack for completed BODs
  set #targcurs 1
      while #targcurs = 1
         wait 1
         Set %FullBODBook #LTargetID
      wait 5

Display Target your resource secure
  set #targcurs 1
      while #targcurs = 1
         wait 1
         Set %ResourceSecure #LTargetID
      wait 5

Open_Check_ResourceSecure:
FindItem %ResourceSecure G_2
If #FindCnt < 1
   {
   Display You are either too far from your Resource Secure, or have not assigned one. Please restart.
   Pause
   }
Set #LObjectID #FindID
Event Macro 17 0
Wait 20

Return

Tags: