Stick.mac with class specific feature's help

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

Moderator: MacroQuest Developers

Fabolous1
a ghoul
a ghoul
Posts: 134
Joined: Sun Jun 27, 2004 12:44 am

Stick.mac with class specific feature's help

Post by Fabolous1 » Sat Aug 07, 2004 2:59 pm

Code: Select all

|=============| 
|   V 1.0     | 
|_____________| 
|             | 
|  stick.mac  | 
|By Fabolous1 | 
|_____________|_________________________________________
|Usage: /macro stick.mac [taunt/no] [slam/no] [kick/no] |
|no=wont do it                                          |
|taunt=taunt when ability ready                         |
|slam=slam when ability ready                           |
|kick=kick when ability ready                           |
|_______________________________________________________|

#turbo 
#event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#" 

Sub Main

|When macro start's notifications
/echo Starting stick.mac
/delay 2s
/if (${Param0.Equal[taunt]}) /echo Taunting when within range.
/if (${Param0.Equal[no]}) /echo Not taunting when within range.
/if (${Param1.Equal[slam]}) /echo Slaming when within range.
/if (${Param1.Equal[no]}) /echo Not slaming when within range.
/if (${Param2.Equal[kick]}) /echo Kicking when within range.
/if (${Param2.Equal[no]}) /echo Not kicking when within range.

|Start Loop
  :Loop 
  /if (${Target.Distance}<11) /goto :Combat 
  /if (${Target.Distance}>10) /goto :MoveCloser
  /goto :Loop

/return 
   :Combat 
   /face fast 
   /attack on 
   /goto :Loop 
/return 
    :MoveCloser 
    /face fast 
    /if (${Target.Distance}>10) /keypress forward
    /goto :Loop
/return 

|||||Casting/Ability Information
|Non-Class specific
/if ((${Param0.Equal[taunt]})&&(${Target.Distance}<11)&&(${Me.AbilityReady["Taunt"]})) /doability "Taunt"
/if ((${Param1.Equal[slam]})&&(${Target.Distance}<11)&&(${Me.AbilityReady["Slam"]})) /doability "Slam"
/if ((${Param2.Equal[kick]})&&(${Target.Distance}<11)&&(${Me.AbilityReady["Kick"]})) /doability "Kick"

|Paladin: Cast lay on hands if below 10% health
/if ((${Me.Class.Name.Equal[Paladin]})&&(${Int[${Me.PctHPs}]}<10)&&(${Me.AbilityReady["Lay on Hands"]}))
     /echo Health is below 10% casting using Lay on Hands
     /target myself
     /doability "Lay on Hands"
     } else {
            /echo Health is below 10% and Lay on Hand's isnt ready!
            }

|Monk: Attack Abilities for Human - Must be trained
/if ((${Me.Class.Name.Equal[Monk]})&&(${Me.Race.Name.Equal[Human]})&&(${Me.Level}>=5&&${Me.Level}<=9)&&(${Target.Distance}<10)&&(${Me.AbilityReady["Round Kick"]})) /doability "Round Kick"
/if ((${Me.Class.Name.Equal[Monk]})&&(${Me.Race.Name.Equal[Human]})&&(${Me.Level}>=10&&${Me.Level}<=19)&&(${Target.Distance}<10)&&(${Me.AbilityReady["Tiger Claw"]})) /doability "Tiger Claw"
/if ((${Me.Class.Name.Equal[Monk]})&&(${Me.Race.Name.Equal[Human]})&&(${Me.Level}>=20&&${Me.Level}<=24)&&(${Target.Distance}<10)&&(${Me.AbilityReady["Eagle Strike"]})) /doability "Eagle Strike"
/if ((${Me.Class.Name.Equal[Monk]})&&(${Me.Race.Name.Equal[Human]})&&(${Me.Level}>=25&&${Me.Level}<=29)&&(${Target.Distance}<10)&&(${Me.AbilityReady["Dragon Punch"]})) /doability "Dragon Punch"
/if ((${Me.Class.Name.Equal[Monk]})&&(${Me.Race.Name.Equal[Human]})&&(${Me.Level}>=30)&&(${Target.Distance}<10)&&(${Me.AbilityReady["Flying Kick"]})) /doability "Flying Kick"

Sub event_Invited
  /delay 5s
  /invite
/return
How doe's it look so far?
Last edited by Fabolous1 on Sun Aug 08, 2004 6:22 pm, edited 2 times in total.

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

Post by dman » Sat Aug 07, 2004 3:35 pm

Code: Select all

    /if (${Target.Distance}>10) /keypress forward HOLD 
I see you hit the forward button and hold it, but you never release it, as I read it now, the second you get to far away you'll hit forward, run past the mob, and as soon as you hit the >11 distance again on the other side you'll face fast and overshoot the mob again over and over again. Also, not sure if its intentional right now, but you never check the events for the invited text and you'll never do the class based skills as your loop will never include that part of the macro.

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sat Aug 07, 2004 4:43 pm

Not like it matters:

Code: Select all

|Start Loop 
  :Loop 
  /if (${Target.Distance}<11) /goto :Combat 
  /if (${Target.Distance}>10) /goto :MoveCloser 
  /goto :Loop 

/return 
   :Combat 
   /face fast 
   /attack on 
   /goto :Loop 
/return 
    :MoveCloser 
    /face fast 
    /if (${Target.Distance}>10) /keypress forward HOLD 
    /goto :Loop 
/return 
Would be an never ending loop, cept for the fact there's 3 /returns that shouldn't be there. I dunno if this is just a learning in process or a bad copy and paste job.

Fabolous1
a ghoul
a ghoul
Posts: 134
Joined: Sun Jun 27, 2004 12:44 am

Post by Fabolous1 » Sat Aug 07, 2004 9:16 pm

What should it be more like? Sorry I'm a little new

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sun Aug 08, 2004 12:17 am

/return basically signifys the end of a Sub and returns to where it got called. if it's a /return in the main sub, the macro would be ending.

Fabolous1
a ghoul
a ghoul
Posts: 134
Joined: Sun Jun 27, 2004 12:44 am

Post by Fabolous1 » Sun Aug 08, 2004 6:21 pm

Now when i use this, it just faces em, fast, and then stops... It wont go, and I can't make it go it like completely stops

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Sun Aug 08, 2004 6:28 pm

Try hitting the up arror (or w if you have it programmed that way) once as quickly as possible. Did you move?

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sun Aug 08, 2004 8:40 pm

Fabolous1 wrote:Now when i use this, it just faces em, fast, and then stops... It wont go, and I can't make it go it like completely stops
Lol, did you read my post on how you have 3 /returns ?