ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Petkiller on May 26, 2009, 11:24:53 AM

Title: Dark Guardian Room Bone Farmer in Doom
Post by: Petkiller on May 26, 2009, 11:24:53 AM
I worked on this for a friend who sells gold skulls on her vendor.  I farmed about 90k of bones over the weekend working on it.  The set up is a bit tricky since you have to set your own runebooks and mark your runes then set the rune book default location to home and guardian room and set up your secure on your porch.  Its farming about 3300 bones 77k gold per hour.   It will play a tone and go home and pause if someone else shows up in room.   I only died 3 times, once bout 6 guys came into the room and that put the spawn at 16 that killed all them then me(thats when I put the  sub to go home if anyone else shows up) lag or a bad loop killed me the other two times.

Known big bugs:
Don't have your paperdoll open it might/will put your weapons/jewery in the drop/secure.
Lag when your recalling can really mess it up.
Better have good durabitly on your armor/weapons
Not pulling bandies out of secure atm.
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: Cerveza on June 02, 2009, 05:07:10 AM
I'll probably give this a whirl to see how it works out.

I was farming bones for a skull, but I do it a little different.

I'm using my Stealth Mage. I open the door into the last room and stand in the doorway. Cast two EV's in the middle of the room then step inside and close the door.

As soon as I hear the "click" I hide. My EV's take out all 6 Guardians, then I go in and loot the bones. I get 180 everytime, and I can do it twice on this char before going heavy. Now that BOS's are working, I just send them to the bank and continue.

I'm not sure that I could script my method though. I know I can invis on the "click" message, and I know I can get the EV's down. I think it would all come down to the timing.

Besides, it's not that bad to attend UO occasionally  ;)

*I'll keep track of how many per hour I can do this way and post it up.
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: TrailMyx on June 04, 2009, 01:23:48 PM
Cerveza brought this up, and I wanted to comment on it because it can cause issues if you aren't aware of what's going on.  In a couple places in your code, you are calling the same subroutine within your sub.  This is known as recursive calling, and EUO has limits built in to prevent this from happening.  For example:

Code: [Select]
sub opendoor ; your sub
  wait 20
  finditem %monsters G_12 ;Don't try to open door is spawn still in there
  if #findkind >= 1
  {
    gosub heal
    wait 50
    gosub heal
    wait 50
    gosub opendoor ; your call to the same sub
  }
  finditem %doors
  set #lobjectid #findid
  event macro 17
  wait 10
return

From the flow of your script, I'm not sure how to prevent this.  But since your "returns" will not be balanced, you will be piling up "gosubs" without returning from some of them.  It might "seem" to work, but if you follow the script flow, you might find it's not working how you think it should.

Now I'm not saying you can't use EUO recursively (although it doesn't really work well), I'm saying that if you do a "gosub", there needs to be a matching "return".  One other thing to note about recursive calls in EUO is that if you have "for" loop in a recursively called routine, it WON'T WORK!  fyi. 

Just wanted you to think a bit about this.
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: Petkiller on June 05, 2009, 10:57:31 AM
I understand what your saying, that is prob how I got stuck in loops a few times.   A friend of mine said he will help me rewrite some of it.  I am starting on a script to farm the bone demon but the quest gumps are hanging me up right now.
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: TrailMyx on June 05, 2009, 11:19:14 AM
I'm glad you understand!  It will come down to sometimes when you really want to leave the routine to continue with your main loop, you'll just return back to the last instance of the gosubs.  Once you pile those up, chances are good you won't ever leave.  It's like a roach motel!  ehehh

Post if you get stuck or need help.  I don't think the problem is too hard to fix and it'll make your code flow much nicer.

I have used recursion in scripts on a couple occassions.  The CLAw and Miffy's Item Finder both use recursion, but these scripts make sure that for every gosub, there is a return.  This takes a bit of accounting, but it makes for code that compact (although bends the mind a bit).
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: TrailMyx on June 24, 2009, 10:53:41 AM
Did you get yourself out of the pickle, Petkiller?
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: Hoby on June 25, 2009, 04:46:45 AM
Ive been farming daemon bones the same way cerveza does.  Cept i use a reg necro mage, cast two ev's, i try to wait about ten seconds between casting ev's so there is always one there when the other disappears.  Cast invis, let the ev's take out the first to dark gaurdians the i usually wither a couple times to help take out the rest.  Loot the bones with claw and send to bank with bos.  Farmed about twenty k in bones over the last two days. 
Title: Re: Dark Guardian Room Bone Farmer in Doom
Post by: Noobie on August 13, 2009, 10:45:16 PM
This is a good idea for a script. I cant wait to get off work and try it out!