About to explode...

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Droodie
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri Oct 10, 2003 2:35 am

About to explode...

Post by Droodie » Mon Apr 19, 2004 9:34 am

My treasured kick.mac doesnt work anymore. It is a ten liner doing the simplest things. DO you have a target? If yes, then ARE you in combat, if yes then FLYING KICK and DISARM.

I pretty much suck at programming and ruthlessly stole the parts of code needed. This is how I figure the macro should look like since the data to param change thingy happened. The if statements below are taken from the rogue macros posted in macro depot, but when I run this I get parse errors and "is not a numeric" blah blah errors.

If anyone would just tell me what is wrong and show me how it should be, I would be ever so happy as manually pushing the flying kick button is slowly killing my left wrist.

Code: Select all

Sub Main
	:Mainloop
		/newif ${Bool[${Target}]}==1 {
			/newif $(Me.Combat)==1 {
        			/newif $char(ability,"Flying Kick")>0 /doability "Flying kick"
 				/newif $char(ability,"Disarm")>0 /doability "Disarm
			}
   		}
	/goto :Mainloop
/return

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Mon Apr 19, 2004 10:10 am

Try

Code: Select all

Sub Main
  :Mainloop
     /newif ${Target.ID} && ${Me.Combat} {
        /newif ${Me.AbilityReady["Flying Kick"]} /doability "Flying Kick"
        /newif ${Me.AbilityReady[Disarm]} /doability Disarm
     }
   /goto :Mainloop
/endmacro

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Mon Apr 19, 2004 10:11 am

Code: Select all

Sub Main 
   :Mainloop 
      /newif ${Bool[${Target}]}==1 { 
         /newif [color=red]$(Me.Combat)==1[/color] { 
                 /newif [color=red]$char(ability,"Flying Kick")[/color]>0 /doability "Flying kick" 
            /newif [color=red]$char(ability,"Disarm")[/color]>0 /doability "Disarm 
         } 
         } 
   /goto :Mainloop 
/return
i could be mistaken but isnt /newif meant to be used with the new datatypes and /if for the old ones

right?

try this :

Code: Select all

Sub Main 
   :Mainloop 
      /newif ${Bool[${Target}]}==1 { 
         [color=red]/if[/color] $(Me.Combat)==1 { 
                 [color=red]/if[/color] $char(ability,"Flying Kick")>0 /doability "Flying kick" 
            [color=red]/if[/color] $char(ability,"Disarm")>0 /doability "Disarm 
         } 
         } 
   /goto :Mainloop 
/return

Zazoot
a hill giant
a hill giant
Posts: 163
Joined: Sat Feb 07, 2004 11:02 am

Post by Zazoot » Mon Apr 19, 2004 10:12 am

just use what dman suggested because eventually the old $() stuff will be gone :)

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Mon Apr 19, 2004 10:46 am

/newif is simply put a replacement for /if. it doesnt care if you're using old or new, but you will not be able to do string comparisons with it in the old system.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

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 » Mon Apr 19, 2004 11:11 am

You had some things wrong with how you were trying to use the new system.

I am pretty sure this will work:

Code: Select all

Sub Main 
   :Mainloop 
      /newif ( ${Target.ID} && ${Me.Combat} ) { 
            /newif ${Me.AbilityReady[Flying Kick]} /doability "Flying kick" 
            /newif ${Me.AbilityReady[Disarm]} /doability "Disarm"
      } 
   /goto :Mainloop 
/return
Edit: Oops... sorry dman... I didn't even see your post...
Last edited by wassup on Mon Apr 19, 2004 11:35 am, edited 1 time in total.

Droodie
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri Oct 10, 2003 2:35 am

Thanks

Post by Droodie » Mon Apr 19, 2004 11:29 am

Thank you Wassup and all. It works perfectly, you guys are all primo elite! :D