Page 1 of 1

First attempt

Posted: Tue Feb 15, 2005 6:10 am
by dirtynumbangel333
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.

Posted: Tue Feb 15, 2005 6:30 am
by Terramantian
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]

Posted: Tue Feb 15, 2005 6:46 am
by dirtynumbangel333
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

Posted: Tue Feb 15, 2005 6:59 am
by Terramantian
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.

Posted: Tue Feb 15, 2005 8:27 am
by wassup
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.

Posted: Tue Feb 15, 2005 11:19 am
by Fibby
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 

Posted: Tue Feb 15, 2005 12:00 pm
by fearless
might want to introduce some small delay.

Posted: Tue Feb 15, 2005 2:31 pm
by Fibby
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