First attempt

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

Moderator: MacroQuest Developers

User avatar
dirtynumbangel333
decaying skeleton
decaying skeleton
Posts: 3
Joined: Mon Jan 31, 2005 7:52 pm

First attempt

Post by dirtynumbangel333 » Tue Feb 15, 2005 6:10 am

I know there are already macros to practice FD and mend for monks.
I didn't even bother to look for them.
I just looked at the way other macros are writen, RTFM a bit and wrote this all by my self. it is somewhat simple. I'm sure it could be reduced to a simpler form though.

FD.mac

#turbo 10

Sub Main

:Start
/doevents
/call FD

|--------------------------------------------------------------------------------
|SUB: FD
|--------------------------------------------------------------------------------
Sub FD
:FDLoop
/doability "Feign Death"
/Delay 11s
/Stand

/if ((${Me.AbilityReady["Mend"]})) {
/doability "Mend"

}
/goto :FDLoop

/return


what i would like, if you would please be so kind,
is for someone to show me a simplified way of doing this, if there is one. Also please tell me where I am going wrong or right with this.

Yes I use search, yes I RTFM, yes I am new to this, and yes I want to learn.
As nasty as some of the people here are, I do expect to be flamed to hell and back for something like this. I guess if you want to..... feel free but at least I am trying to learn damnit.
so please do not discourage me.
Dirty
' . '

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Tue Feb 15, 2005 6:30 am

Well that works... but there a few things you could improve.... first, all functions, including Main, should end with /return . Even if they're infinite loops and will have to be stopped manually, it's still a good practice. Also I don't think your Sub FD is really necessary, since you don't seem to be doing anything else in Sub Main (not that it hurts if you're just practicing, of course.) You do have an unreferenced label there though.... A cleaner version would be

Code: Select all


#turbo 10

Sub Main

   :Start

   /doevents
   /doability "Feign Death"
   /Delay 11s
   /Stand
   /if ((${Me.AbilityReady["Mend"]})) {
      /doability "Mend"
   }
   /goto :Start

/return
The /doevents isn't really necessary unless you actually have some events. But I left it in there, because if you wanted to have events, usually you'd want them as part of the iteration and not just called once at the beginning. Cause that's the point of events, you dunno when they're gonna happen... hehe. Good first attempt.... Oh, and use [ code] [ /code]
Last edited by Terramantian on Tue Feb 15, 2005 6:56 am, edited 1 time in total.

User avatar
dirtynumbangel333
decaying skeleton
decaying skeleton
Posts: 3
Joined: Mon Jan 31, 2005 7:52 pm

Post by dirtynumbangel333 » Tue Feb 15, 2005 6:46 am

thank you very much :)

I figured the sub was too much, and that it was something ment to be used with more complex macros. You're very right though, I am just trying to practice.
I understand what you suggested, and now have a little more of a grasp on the proper way to write a macro that is only preforming a simple function or functions.

I really try to read the manual and take it in. However I am new to coding, and really want to learn, not just for hacking games. I honestly want to learn.
I swear though, at 4 am after a long day at work some of it starts to blur together. and reads something like the teacher in Charlie Brown spoke.
At other times I really grasp it.

You can all expect more questions from me now and then, but I swear I will not post anything untill I have RTFM and used search for hours and can't take it anymore.

thanx again :D
Dirty
' . '

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Tue Feb 15, 2005 6:59 am

heh, I understand... I can't count how many times I've changed or added a pretty complex sub in one of my macros, then it doesn't work perfectly and I go back to the code a day later and think 'WTF? what is this doing? did I actually write this?' that'd be where commenting liberally just helps... but I'm not gonna give advice I don't follow lol.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Tue Feb 15, 2005 8:27 am

I'm not a monk, but I think I would want to make sure my Mend was up before I stood up?

Code: Select all

#turbo 10 

Sub Main 
   :Start 
   /doability "Feign Death" 
   /Delay 11s 
   /if ((${Me.AbilityReady[Mend]})) {
      /stand
      /doability Mend
   } 
   /goto :Start 
/return
Also, /doevents is useless without an event to use it with, so that can be removed. You don't need " " around single word abilities using /doability, and you don't need to use " " around the text inside AbilityReady[], although you can put them there. Just personal preference I guess.

User avatar
Fibby
a lesser mummy
a lesser mummy
Posts: 58
Joined: Mon Nov 15, 2004 2:18 am

Post by Fibby » Tue Feb 15, 2005 11:19 am

Naw..

Monks can Mend while FD, so that makes no differance.

The whole timer part of the FD trainer is to make the monk stand up and then fall back down again. However, Triva note is that you can FD while laying on the ground.. all you really need to do is check to see if the FD button is ready.

Personally, I would do something like this:

Code: Select all

#turbo 10 

Sub Main 
   :Start
   /if ((${Me.AbilityReady[Feign Death]})) {
      /doability "Feign Death" 
   }
   /if ((${Me.AbilityReady[Mend]})) { 
      /doability Mend 
   } 
   /goto :Start 
/return 
True genius is not knowing all the answers
It's knowing where to find them.

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Tue Feb 15, 2005 12:00 pm

might want to introduce some small delay.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

User avatar
Fibby
a lesser mummy
a lesser mummy
Posts: 58
Joined: Mon Nov 15, 2004 2:18 am

Post by Fibby » Tue Feb 15, 2005 2:31 pm

Sure..

Code: Select all

#turbo 10 

Sub Main 
   :Start 
   /if ((${Me.AbilityReady[Feign Death]})) { 
      /doability "Feign Death" 
   } 
   /if ((${Me.AbilityReady[Mend]})) { 
      /doability Mend 
   } 
   /delay 2
   /goto :Start 
/return 
True genius is not knowing all the answers
It's knowing where to find them.