Page 1 of 1

Help a newbie out

Posted: Sun Oct 17, 2004 10:42 am
by k0ger
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

Posted: Sun Oct 17, 2004 11:14 am
by Night Hawk
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"

Posted: Sun Oct 17, 2004 11:16 am
by Rusty~
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 

Posted: Sun Oct 17, 2004 11:16 am
by Night Hawk
Beat ya rusty :P

Posted: Sun Oct 17, 2004 11:19 am
by Rusty~
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

Posted: Sun Oct 17, 2004 11:25 am
by k0ger
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

Posted: Sun Oct 17, 2004 1:31 pm
by Lum

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)

Posted: Sun Oct 17, 2004 4:41 pm
by Night Hawk
Guess you missed my post then, and rusty's comment. Yup yup.