FD Forage macro

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

offmyfeetplease
orc pawn
orc pawn
Posts: 22
Joined: Wed Aug 18, 2004 1:57 am

FD Forage macro

Post by offmyfeetplease » Wed Aug 18, 2004 1:59 am

Trying to make this so it will only fd once and after foraging never really done any programming just tinkering, got the idea from the kiss forage i think. Thanks.

Code: Select all

Sub Main 
  /sit
     :Loop 
     /if (${Cursor.ID}) /autoinventory 
     /if (${Me.AbilityReady[Forage]}) /sit
     /if (${Me.AbilityReady[Forage]}) /doability forage /doability 8 
/goto :Loop 
/return

Sparr
a hill giant
a hill giant
Posts: 159
Joined: Mon Jun 24, 2002 5:41 am

Post by Sparr » Wed Aug 18, 2004 2:22 am

who gets forage and FD?
[img]http://www.trifocus.net/~sparr/sparr_rotate_sig_16.gif[/img]

offmyfeetplease
orc pawn
orc pawn
Posts: 22
Joined: Wed Aug 18, 2004 1:57 am

Post by offmyfeetplease » Wed Aug 18, 2004 2:29 am

Iksar Monk

Me.Name
a lesser mummy
a lesser mummy
Posts: 56
Joined: Thu Mar 11, 2004 11:49 pm
Location: ${Me.Bound}

Post by Me.Name » Wed Aug 18, 2004 2:39 am

Sparr wrote:who gets forage and FD?
Iksar Monks do.

btw - you can't forage while FD. Are you trying to FD, then stand/forage, then FD again?
How about this:

Code: Select all

Sub Main
    :loop
    /if (${Me.AbilityReady["Feign Death"]}) /doability "Feign Death"
    /if (${Me.AbilityReady["Mend"]}) /doability "Mend"
    /if (${Me.AbilityReady["Forage"]}) {
        /stand
        /doability "Forage"
    }
    /delay 2s
    /autoinv
    /goto :loop
/return
This should FD when ready, Mend when ready, then stand and forage when ready.

offmyfeetplease
orc pawn
orc pawn
Posts: 22
Joined: Wed Aug 18, 2004 1:57 am

Post by offmyfeetplease » Wed Aug 18, 2004 2:45 am

Ahh thanks, that's probably much better then what i got to "work", it has a 50% chance to fail though :(

Code: Select all

Sub Main 
  /sit
     :Loop 
     /if (${Cursor.ID}) /autoinventory 
     /if (${Me.AbilityReady[Forage]}) /sit
     /if (${Me.AbilityReady[Forage]}) {
/doability forage
/doability 8
}
/goto :Loop 
/return
EDIT: I only want it to FD in between forages so i can read a book at my comp while i forage, and still be safe. Is there any command like /if (${Me.Position[Feign Death]}......?

User avatar
Stults
a lesser mummy
a lesser mummy
Posts: 52
Joined: Tue May 25, 2004 11:47 pm

Re:

Post by Stults » Wed Aug 18, 2004 5:25 am

I am not a very good code writer but I think this might work...

Code: Select all

Sub Main 
    :loop 
    /if (${Me.AbilityReady["Forage"]}) { 
        /stand 
        /doability "Forage" 
    } 
    /delay 2s 
    /autoinv 
    /call FD
    /goto :loop
/return

Sub FD
    /if (${Me.AbilityReady["Feign Death"]}) /doability "Feign Death" 
/return

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Wed Aug 18, 2004 11:20 am

Code: Select all

Sub FD 
    /if (${Me.AbilityReady["Feign Death"]}) /doability "Feign Death" 
/return
may want to expand that if statement just a bit... otherwise you'll be /doability FD while already feigned.

Insipid
decaying skeleton
decaying skeleton
Posts: 9
Joined: Sun Aug 08, 2004 12:15 pm

Post by Insipid » Wed Aug 18, 2004 6:59 pm

I think Mimatas is suggesting it look like this:

Code: Select all

Sub Main 
    :loop 
    /if (${Me.AbilityReady["Forage"]}) { 
        /stand 
        /doability "Forage" 
    } 
    /delay 2s 
    /autoinv 
    /if (!${Me.Feigning}) /call FD 
    /goto :loop 
/return 

Sub FD 
   	/if (${Me.AbilityReady["Feign Death"]}) /doability "Feign Death"
/return
Just stuck the feign check in before attempting to call FD.
- Insipid

offmyfeetplease
orc pawn
orc pawn
Posts: 22
Joined: Wed Aug 18, 2004 1:57 am

Post by offmyfeetplease » Wed Aug 18, 2004 7:03 pm

Thanks, i knew the logic, just not the commands.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Fri Aug 20, 2004 9:52 am

You probably want to add an event for failed fd since ${Me.Feinging} will return true even if your fd failed.

Something as simple as this should do the trick:

Code: Select all

#event FDFail "#1# has fallen to the ground."

Sub Event_FDFail(string Line,string Failer)
   /if (${Failer.Equal[${Me.Name}]}) /stand
/return
Then put /doevents in your main loop.