Help a newbie out

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

Moderator: MacroQuest Developers

User avatar
k0ger
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 17, 2004 10:21 am

Help a newbie out

Post by k0ger » Sun Oct 17, 2004 10:42 am

Hello guys , first off let me say love this site. Spent alot of time looking here and reading.

Well this is my first try at this .. Everyting is more or less "stolen" from other once (i have seen how they did it)

this is for my monk .. its a auto flying kick , redo some buffs.

Code: Select all

 Sub Main
:mainloop

	/if  (${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick"
	/if (!${Me.Buff[Soul Claw].ID}) { 
     	/cast item "Timestone Adorned Ring"
	  }

/goto :mainloop 
/return 

this works fine. Only 2 problem.
I want to add my wood elf cown to it. and didnt work :?


Code: Select all

 Sub Main
:mainloop

         /if  (${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick"
                /if (!${Me.Buff[Soul Claw].ID}) { 
     	    /cast item "Timestone Adorned Ring"
	  }
                        /if (!${Me.Buff[Illusion: Fier'dal].ID}) { 
     	           /cast item "Crown of Deceit"
	  }

/goto :mainloop 
/return 

and 2nd i wanted to add so it only kicks when i have attack on

Been looking at mac. monk and playing around with

Code: Select all

:mainloop
/doevents 
/if (${Me.Combat}) { 


         /if  (${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick"
                /if (!${Me.Buff[Soul Claw].ID}) { 
     	    /cast item "Timestone Adorned Ring"
	  }" 
/goto :mainloop 
/return 
And its not working.

Hope someone can help me out. Or post an link to where i can read about it. Love playing around with it , but im really stuck atm

A poor noob

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sun Oct 17, 2004 11:14 am

Rant: Why must every topic have the word newbie in it, and then the post explaining how they are a newb? Does it really matter?

Now for the help.

Your simple problem as I can see if where to put IFs and extra statements.

Firstly we'll work with that.

We can combine the check for having Attack On and your Flying Kick to be ready in the same line:

Code: Select all

/if (${Me.Combat}&&${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick"
Now for your first buff check, everything is looking fine.

For the second buff check my only guess is you need a ` and not a '.

Code: Select all

   /if (!${Me.Buff[Illusion: Fier`dal].ID}) {
      /cast item "Crown of Deceit"
   }

Secondly, you do not need the line "/doevents". You have no events, therefor you need not check them.


So, in the end you should have something like so:

Code: Select all

Sub Main
   :mainloop
   /if (${Me.Combat}&&${Me.AbilityReady[Flying Kick]}) /doability "Flying Kick"
   /if (!${Me.Buff[Soul Claw].ID}) {
      /cast item "Timestone Adorned Ring"
   }
   /if (!${Me.Buff[Illusion: Fier`dal].ID}) {
      /cast item "Crown of Deceit"
   }
   /goto :mainloop
/return
My only suggestion is to add a little to the Flying Kick check. Here's what mine looks like converted to Flying Kick:

Code: Select all

/if (${Me.Combat}&&${Me.AbilityReady["Flying Kick"]}&&!${Me.Casting.ID}&&${Target.ID}&&!${Me.Stunned}) /doability "Flying Kick"
Last edited by Night Hawk on Sun Oct 17, 2004 11:17 am, edited 2 times in total.

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sun Oct 17, 2004 11:16 am

Ok first... you should really be careful about indenting.. make sure things line up, so it's easy to see where you need to put brackets.

Seconds.. to cast items from bags, you should get spell_routines.inc.

You basically had the main parts down, but a few things wrong. Here's an example of a working version of what you were trying for:

Code: Select all

#include spell_routines.inc

Sub Main
:mainloop
   /doevents  | not really needed now, but will be if you add events
   /if ( ${Me.Combat} ) { 
      /if ( ${Me.AbilityReady[Flying Kick]} ) /doability "Flying Kick" 
      /if ( !${Me.Buff[Soul Claw].ID} ) /call Cast "Timestone Adorned Ring"  item
      /if ( !${Me.Buff[Illusion: Fier'dal].ID} ) /call Cast "Crown of Deceit" item
   }
/goto :mainloop 
Last edited by Rusty~ on Sun Oct 17, 2004 11:17 am, edited 1 time in total.

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sun Oct 17, 2004 11:16 am

Beat ya rusty :P

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sun Oct 17, 2004 11:19 am

oh and yeah, in my example I guess you wouldn't want the buffs inside the if statement... cause then it would only cast them when you had attack on :P

User avatar
k0ger
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 17, 2004 10:21 am

Post by k0ger » Sun Oct 17, 2004 11:25 am

WOW thanks alot , it works great both of em. And im starting to see more of how this is done.

Can't wait to work on more

/cheers

Lum
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Sep 16, 2004 10:12 am

Post by Lum » Sun Oct 17, 2004 1:31 pm

Code: Select all

#include spell_routines.inc 

Sub Main 
:mainloop 
   /doevents  | not really needed now, but will be if you add events 
   /if ( ${Me.Combat} ) { 
      /if ( ${Me.AbilityReady[Flying Kick]} ) /doability "Flying Kick" 
  }
      /if ( !${Me.Buff[Soul Claw].ID} ) /call Cast "Timestone Adorned Ring"  item 
      /if ( !${Me.Buff[Illusion: Fier'dal].ID} ) /call Cast "Crown of Deceit" item  
/goto :mainloop 
would make it so you rebuff any time, not just when attacking :P

(Cheap chance to get another post count woo)

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Sun Oct 17, 2004 4:41 pm

Guess you missed my post then, and rusty's comment. Yup yup.