Page 1 of 6

Noob needing a starting point

Posted: Sun Jan 23, 2005 5:30 am
by pythag
Very new to this and never written a macro, but used others. I am looking to see how they are formed starting at a very easy level - I know I could simply copy others that are here but I would rather get to my own some day - so I wish to make a macro that practises hide and sneak lets say, waits for the delay then performs a sneak and hide again. I need this to see how to perform an ability and a delay - although I beleive a delay command is not required, just an if and loop ?? TIA

Posted: Sun Jan 23, 2005 7:11 am
by blueninja
To check if an ability is ready use ${Me.AbilityReady[]}. To actually use it, use /doability.

Code: Select all

Sub Main
    :loop
         /delay 10
         /if (${Me.AbilityReady[sneak]}) /doability Sneak
    /goto :loop
/return

Posted: Sun Jan 23, 2005 1:59 pm
by dedpoet
The first thing to do when writing any macro, big or small, is to think it through entirely. I do this with pen and paper. Chart out what you want it to do, generally. At each step, ask yourself what could happen, and make a case for every possibilitiy. Get the whole thing mapped out before you do anything with the script.

In your above example, you want to practice sneak and hide. The loop that blueninja posted will do exactly that, but only exactly that. You may want to consider making sure you have the ability first; checking what your max skill is, and if you are at that in both; end the macro automatically; train additional skills; make the delay random; etc. If you think it through on paper first and be sure to consider all of the possibilities, your macro will be much better for it.

Thanks

Posted: Sun Jan 23, 2005 6:36 pm
by pythag
Thanks for the start - already making adjustments to improve this :D

Posted: Sun Jan 23, 2005 6:59 pm
by blueninja
dedpoet wrote:In your above example, you want to practice sneak and hide. The loop that blueninja posted will do exactly that, but only exactly that.
Actually it won't do that very well, sneak and hide need to be clicked off before they are activated again I think.. At least that's what I did in my skillup macro. But he asked for a starting point and that's what he got hehe.. To see how I did it look up my bardskill macro in the depot.

EDIT: Oooh 400 posts :)

Posted: Mon Jan 24, 2005 4:47 am
by wizzyman
best way to learn is to pick a macro quite simple but not too basic and play with it, read it, edit it to add or change things to feet your need. you ll learn faster this way.

then once u want to make your own mac, you ll need as someone said to write down his structure, like a map or a logical script with what u want it to do, in what order, what may happen and what need to be done if it happen.

i am new to this also but what i can say already, is that a macro is never ended :smile:

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 10:04 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 10:05 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 10:06 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 10:43 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 10:44 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 11:22 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 11:23 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 11:24 am
by xyilla

Re: Noob needing a starting point

Posted: Sat Mar 29, 2025 11:25 am
by xyilla