Author Topic: C2's BOD Collector Script  (Read 124703 times)

0 Members and 1 Guest are viewing this topic.

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
C2's BOD Collector Script
« on: May 01, 2009, 03:39:51 PM »
0
I do not support Freeshard directly but have left old versions up for its use- You may post how you tweaked for your own freeshard if you like but i do not play freeshards sorry

;=======================================;
; Script Name: C2
; Author: I-Farm Multi-Shard BOD Collector
; Version: 1.4c  (Version 1.0c has old timer system for free shards)
; Shard OSI/FS: OSI
; Revision Date: 19-May-2008
; Purpose: BOD Farming Smith & Tailor
; Credit: TM journal subs/
; Endless explaining #lshard
;========================================
This script will farm Smith and Tailor bods at the same time or one or the other as you choose at intervals of every hour, two hours or six hours depending on your skill level.


;===============================================================
The script will also allow you to mark collect both smith and tailor even if certain characters in the collection process only have one of the skills. I have the script check your skill level and only collect each bod type if you have the skill to & you have checked the box for that bod type. Why have I done this? To give you more control! I don't want as many Tbods myself so on my main accts I am certainly not going to give my mains tailor skill. Now i can have my mains get a smith bod & the farming acct get both because it won't get stuck trying to collect for a character without skill!

Handles conn loss, shard not being available (retries every 60 seconds to see if it is back), connection loss, and errors on connection pages (takes a short wait and closes error then restarts process)! I wrote the login subs from scratch as they are 100% non OCR dependent and you can pvp while the bod collector client does it's thing underneath. or you can surf the web.
;==========================================
Directions/ Info:
;Script collects bods in luna- i like to be hidden but your call (Location to log at bottom of post in thumbnails)
;script collects every six or 18 hours - your choice
;script allows for you to log up to all seven char. slots
;script allow for CHOICE to decide which slots to log or not
;script allows you to collect both tailor and smith or
;one or the other (choices on menu) (If both checked it will choose due to skill level to get bod)
;script set timer for next collection after the cycle is completed and gives a minute timer and the actual time of next collect.
;will handle extra loose bods in pack while sorting
;YOU MUST name books by bod type! smith or tailor as name... you can name the book smith and tailor if you want them mixed together in one book.The script sorts by a bod type. book named smith- book named tailor
;Use .1 skill of tailor and smith if you want to farm bods
;to fill every hour
;good idea to hide the character in the log in and out spot so peeps don't mess with ya
;==================================
How to set up acct info & shards:

simply fill in the below info and u can add more accts and shards if u wish. I fyour shard has two names connect the two names with an underscore "_". Lake superior would look like this lake_superior. lake_austin or napa_valley etc.

Code: [Select]
;-------------Edit Shards Here-----------
;shard name - if 2 names use _ Ex. Lake_Austin
set %S1 atlantic
set %S2 great_lakes
set %S3
set %S4
set %S5
;--------Accts. and Passwords------------
set %A1 winuoftw <----my pretend acct
set %PW1 freebods <------pretend pass
set %A2
set %PW2
set %A3
set %PW3
set %A4
set %PW4
set %A5
set %PW5
;====================================
Now the final set that gives you the best control over how many accts , slots, shards you collect from is this...


The key is understanding this:
;%1=Char Slot # %2=location %3=acct, %4=pass, %5=shard
everytime you want a new character to login u make this line below that has the above info for that particular collector in it...
gosub login (char slot) (luna) (%acct#) (%pass#) (shard)

examples look like this: remember u already set up the values for %a1, #a2 etc & %pw1, %pw2... & %s1 up top
gosub login 4 luna %A1 %PW1 %S1
-- this gets 4th character from acct #1, password #1, and shard #1

gosub login 2 luna %A2 %PW2 %S2
--this gets the 2nd character from acct #2 with pass #2 on the shard listed up top as %S2.

here is how i would set up characters 1-5 on a trial acct!
Code: [Select]
gosub login 1 luna %A1 %PW1 %S1
gosub login 2 luna %A1 %PW1 %S1
gosub login 3 luna %A1 %PW1 %S1
gosub login 4 luna %A1 %PW1 %S1
gosub login 5 luna %A1 %PW1 %S1
Edit that info here on the script:
Code: [Select]
;----------Add gosub login lines below-----------------------
main_bod_loop:
;%1=Char Slot # %2=location %3=acct, %4=pass, %5=shard
;gosub login 1 luna %A1 %PW1 %S1 ;example
;gosub login 2 luna %A1 %PW1 %S1 ;example
;add line
;add line
;add line
;add line
;add line
;add line
;------------End or Shards--------------
***Luna just needs to be there as a place holder for now. I have that there as a variable if I start to make this script collect at different locations. If I do that, I will want a variable in there to tell the script what strategy to use to collect with. For now, LUNA is the only place as login and outs are fast and efficient.

There are 5 attachment(s) in this post. You must register and post an acceptable introduction to download
C2's IFarm 1.2d public.txt
C2's IFarm 1.4c public (EUO Version 267 or higher).txt
C2's_IFarm_1.2c_public typo fix.txt
ifarm.jpg
upstairs luna bods.jpg
« Last Edit: June 11, 2014, 11:25:45 AM by _C2_ »

Offline Kane12

  • Jr. Member
  • **
  • Posts: 99
  • Activity:
    0%
  • Reputation Power: 1
  • Kane12 has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #1 on: May 03, 2009, 01:01:20 PM »
0
This script was fairly easy to set up once I figured out to take the ";" out of the sub lines after I added the account, password, and shard information (yea I'm a noob).

I did have one question which I PM'd ya on C2, that I think might help others if they run into the same problem and avoid another question if it was to surface.

I have everything set up and the script logs on and prompts the gump menu to take the said script from both the tailor and smithy but for some reason it hangs up after the menu appears and fails to "click or accept" the bod from the menu and the script then moves on to log out and log onto another character after a bit (60 seconds between tries I believe is the default set up and it tries 2-5 times per bod type - tailor/smithy).

With this 60 second delay, I adjusted the delay down after this problem to 10 seconds to move things along. The script responds the same.

Was wondering if there is anything that can be done to tweak or adjust the script to better recognize the menu gump to take the bod before moving on instead of timing out. This happens about 85% of the time and happens randomly.

I am running windows XP, working with 4 accounts (with 15 or so chars total), and only running on one shard (Pacific). I dont seem to experience very much lag or latency that I can tell when logging in that I initially thought might affect it.

Didnt know if this portion of the script reflected a specific location for the curser to function in (and maybe affect the monitor size) or if there was anything else I can do to tweak things in the script.

Regardless of this delay, I'm very thankful for all your time and commitment to setting this up. I work 60+ hours a week and this gives me a chance to better utilize my accounts to collect bods.

Any input or recommendations would be greatly appreciated.

Thanks

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: C2's BOD Collector Script
« Reply #2 on: May 03, 2009, 01:27:55 PM »
0
try 1.0c and does it ever get the bod?  if never is the answer then it is a wrong click position.  if sometimes it is a weird timing issue or getting hung up in the journal scan.  but then again it wouldn't move on to loggin out if it was hung in the journal.


just found out that i posted an old version maybe this will be better.  I haven't used this in about a year and pearls use to use it a ton.
« Last Edit: May 03, 2009, 01:37:01 PM by _C2_ »

Offline Kane12

  • Jr. Member
  • **
  • Posts: 99
  • Activity:
    0%
  • Reputation Power: 1
  • Kane12 has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #3 on: May 03, 2009, 07:32:20 PM »
0
Thanks. Tryin this one out also and will provide feedback.

There is a difference between the mouse pointer location between small and large bods.....wondering if that might be causing some confusion.

Will let ya know what this one does.

Thanks and appreciate it

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: C2's BOD Collector Script
« Reply #4 on: May 03, 2009, 07:41:19 PM »
0
I think you just figured it out.  i have only run this to get .1 skill characters as did my two testers that were running this non stop.  so in testing it always clicked smalls because that is all i could get.... hrm.. now how to fix it?  larges are several different sizes and you cannot to a enter key to accept.  I am open to ideas on this one but pretty sure i just need to find all the gump sizes and just make if x gump click here... etc.


Got it!
« Last Edit: May 03, 2009, 07:56:44 PM by _C2_ »

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *****
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: C2's BOD Collector Script
« Reply #5 on: May 03, 2009, 07:53:40 PM »
0
You had it right Kane!  Thank you for your excellent feedback to help me target the error.  I have added the different sizes of gumps for different sizes of bulk orders.  Let me know if you find this works better.  it should be perfect now!

+1 karma for helping me target a fix!  :o
« Last Edit: May 03, 2009, 07:59:04 PM by _C2_ »

Offline Kane12

  • Jr. Member
  • **
  • Posts: 99
  • Activity:
    0%
  • Reputation Power: 1
  • Kane12 has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #6 on: May 03, 2009, 09:12:26 PM »
0
Good deal!!!

Will run this again tomorrow with the fixes and test again.

Thanks!

Post Merge: May 05, 2009, 12:32:47 AM
Perfecto!!

I ran two runs now at 3pm today and 9pm and no hangups at all.

I had asked wife to "click" the start button this morning at 9am to start while I was working but after 3 chars it paused for a sec and she didnt think it was doin anything and started over.

The only suggestion I would make for the script that would help others using it like me every 6 hours would be an option to do a one time skip over chars then continue with normal runs on next 6 hour time frame. It was a pain to have to wait 6 hours to restart the script as it hangs up on chars that have already collected their bods (60 second delay between trying again and seems to keep trying over and over - did it for over 1.5 hours to my wife when she inadvertantly stopped and restarted) and didnt make it past the 1st character...trying to collect.

I guess another suggestion would be to have it only retry two or three times and have it move on to the other bod type and do the same then log and move to next char. I expect this would be a better option that above (thinking out loud).

Thanks again.....your changes and adjustments to the gump menu sizes to accomodate for the different menu sizes worked like a charm.

I have 22 characters all GM (except 4 legendary) that I will run this with each day....so should be worth the time and payoff. Really appreciate your hard work and expertise C2.


Post Merge: May 04, 2009, 10:37:27 PM
Sorry missed on thing....on timer. Seems the minutes are not displayed correctly. My menu currently shows 3456 minutes remaining when that would be alot of time (57.6 hours). It says next pick up at 3:10am which is 4 hours away from now which would be 240 minutes roughly.

Maybe the timer is set for something other than minutes....just wasnt sure.

Thanks again
« Last Edit: May 04, 2009, 10:37:27 PM by Kane12 »

Offline REEFHAWK

  • Jr. Member
  • **
  • Posts: 43
  • Activity:
    0%
  • Reputation Power: 0
  • REEFHAWK has no influence.
  • Gender: Male
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: C2's BOD Collector Script
« Reply #7 on: October 01, 2009, 01:38:24 PM »
0
First thing, this is an awesome script.  a friend actually found it and sent me a copy and I have been using it for several months.  It is such a time saver.  

However since the publish of SA, as with many scripts, I am having a problem.  between my friend and I we have been able to get many of them working once again.  We can not figure this one out.  What is happening;  I hit begin, it logs character in, then acts like it used to when I had my character somewhere other than Luna, and it log that character out and the logs next one in.  

So, i did F7 to see where it was getting to:  

sub gump_locations ; %1 = xpos  %2 = ypos  %3 type of click
    set %clickx #CONTPOSX + %1
    set %clicky #CONTPOSY + %2
    click %clickx %clicky %3
return

wait 2s
sub find_vendor  ;%1 tailor or smith
ignoreitem #charid
still_searching:

it just keeps going over the following lines:

finditem HS_IS
if #findkind = -1
  return
  if #findrep <> 7
    {
    ignoreitem #findid
    goto still_searching

and just keeps going back to these lines over and over with me hitting F7.  

I play EA Catskills.  All my characters that are bod collectors are Legendary Blacksmith and Legendary Tailors.

Hoping for a little help in getting this one back up.  It is such a time saver.  Thanks
« Last Edit: October 01, 2009, 01:42:34 PM by REEFHAWK »

Offline Larppa

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • Larppa has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #8 on: January 08, 2010, 04:24:28 PM »
0
Freeshard note, i had issue with the distance to npcs from that specific luna corner so i modified the script a bit:
Code: [Select]
    if weaver in #property || tailor in #property
       {
       Set %bodguy #findid
       move #findx #findy 2
       ignoreitem reset
       return


and

Code: [Select]
if blacksmith in #property || armourer in #property
             {
             Set %bodguy #findid
              move #findx #findy 2
             ignoreitem reset
             return
             }

this can be handy for others playing on freeshards (or suffering from range issues).

Btw, thanks for awesome script  ;D

Offline bendel

  • Full Member
  • ***
  • Posts: 215
  • Activity:
    0%
  • Reputation Power: 4
  • bendel has no influence.
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #9 on: January 10, 2010, 05:33:02 AM »
0
Hello, i have a little for entering on the shard.

The name of the shard is like  : My - Shard


then i tried  1) set %S1 My - Shard
             or     2) set %S1 My_-_Shard

And when i'm in the screeen selection, the script return instantly on the first screen (login:pass)

Any ideas to resolve ?

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #10 on: January 10, 2010, 04:56:18 PM »
0
try something like this

set %S1 My , #Spc , - , #Spc , Shard

Offline bendel

  • Full Member
  • ***
  • Posts: 215
  • Activity:
    0%
  • Reputation Power: 4
  • bendel has no influence.
  • Respect: +34
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #11 on: January 10, 2010, 09:15:09 PM »
0
Thanks worked ;)


Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #12 on: January 11, 2010, 02:36:22 PM »
0
I R Weasel!

Offline Iraq-

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 0
  • Iraq- has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: C2's BOD Collector Script
« Reply #13 on: February 27, 2010, 09:51:07 AM »
0
I am having an issue with this script, and I know where it's running into problems for me...

I'm playing a freeserver where the line to get the BOD from the tailor is the 4th option down (instead of the 2nd line down like it is on OSI)..

When I run this script, it does everything correctly besides clicking the vendor buy option rather than claim bod reward..

Where would I change which line the collect sub chooses from the drop menu?

Thanks,
-Iraq-


Edit:
Nevermind guys, I did some critical thinking and figured it out.

If anyone else is having this issue, here's the solution:

Change line 185:

From:

gosub bod_gump 30 40 ; for menu pop up spot

To:

gosub bod_gump 30 80 ; for menu pop up spot

... Since the 2nd number is %y in the drop down menu. 20 is the 1st option of the 5 options, 40 is the 2nd, 60 is the 3rd, 80 is the 4th, and 100 is the 5th.
Simple stuff, enjoy.
-Iraq-


Post Merge: February 27, 2010, 10:12:07 AM
I had another thought while running this and i figured i'd share it here.


I ran this script once, it got about half way through my account, but then I crashed and had to start it over. Upon doing so it went to the first character, and is now sitting there trying each minute to get a BOD (which it will continue to do for the next hour since I just got one not 5 minutes ago). Wouldn't it be awesome if there was a "Skip this character, move on to the next character" button on the mini timer window?

I'm not a scripter, but i can see it going something like
sub next_character
 --> if button is clicked
 --> log out character
 --> move to next character on the list..
 --> proceed as usual.
end sub
« Last Edit: February 27, 2010, 10:12:07 AM by Iraq- »

Offline Paulonius

  • 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: +162
  • Referrals: 1
    • View Profile
Re: C2's BOD Collector Script
« Reply #14 on: March 04, 2010, 11:56:46 AM »
0
I am currently running a hacked up version of Razael's. I would have used yours for template if I had known about it C2!! When a toon can't recall to a location it simply logs out wherever the toon is and runs a three minute timer.  That was his solution, not mine, but I kinda like it.  If you have enough accounts to cycle you can adjust the timer downward.  My current setup takes just under a minute to collect and dump for each toon, so four accounts would be no timer if they are set up to run sequentially by account rather than toons on an account.

I also have the script using a rune book to go to smiths and tailors, and then dumping the books into bod books in secures at my house so that I have them all in one book.  I don't like having to log on all of my bod runner toons to consolidate the bods they picked up. 
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

Tags: