Combat SKills macro help

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Combat SKills macro help

Post by Draekz » Sat May 03, 2003 4:16 pm

This is my basic script. I've forgotten a lot about scripting and the codes changed a bit so wanted to know if anyone could assist me here.

What im trying to do is get my char to do these skills while attack is on..and to stop attempting them when attack is off.

Doesnt seem to do anything as it says it has no compare for statement 'false'.

Anyway, here's my code. If anyone can help please post idea's here :) thanks!

Code: Select all


|** A macro to use my kick and taunt skills as well as tracking and whatnot for my ranger
**|

sub main 
:start 
/if $combat == TRUE {
/goto :abilities
}else /if $combat == FALSE {
/goto :start
}
/return

:abilities
/if n $char(ability,"Tracking")>0 /doability "Tracking" 
/if n $char(ability,"Sense Heading")>0 /doability "Sense Heading" 
/if n $char(ability,"Kick")>0 /doability "Kick" 
/if n $char(ability,"Taunt")>0 /doability "Taunt" 
/return
Draekz

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sat May 03, 2003 5:15 pm

take out the spaces around your comparisons..

Code: Select all

|** A macro to use my kick and taunt skills as well as tracking and whatnot for my ranger 
**| 

sub main 
:start 
[b]/if $combat==TRUE { [/b]
/goto :abilities 
[b]}else /if $combat==FALSE { [/b]
/goto :start 
} 
/return 

:abilities 
/if n $char(ability,"Tracking")>0 /doability "Tracking" 
/if n $char(ability,"Sense Heading")>0 /doability "Sense Heading" 
/if n $char(ability,"Kick")>0 /doability "Kick" 
/if n $char(ability,"Taunt")>0 /doability "Taunt" 
/return 

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sun May 04, 2003 1:39 am

ack thanks val, been a very long time since i looked at this code. Appreciate the help ;)

Draekz

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Sun May 04, 2003 10:32 am

Ok this crazy thing is annoying me and for the life of me I cant figure out wtf it is thats wrong!! arg

Anyway, edited it a bit and it keeps saying "cannot call when macro isnt running"

But there's no calls in the script!?

Anyway here it is

Code: Select all

|** A macro to use my kick and taunt skills as well as tracking and whatnot for my ranger 
**| 

Sub Main

/echo Combat Macro Running

 :start
 /doevents
  /if $combat==TRUE { 
   /goto :fighting
}else /if $combat==FALSE { 
      /goto :nofight 
} 
/return 

 
:fighting
/if n $char(ability,Kick)>0 /doability Kick
/if n $char(ability,Taunt)>0 /doability Taunt 
/goto :start

/return 


:nofight
/if n $char(ability,Forage)>0 {
/sit off
/doability Forage
/sit on
}else /goto :start

/return
I have a feeling it has to do with the $combat script thing i got going on but dunno any other way to make it do what i want it to w/o the /goto's

Anyway any help would be great thanks

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sun May 04, 2003 10:42 am

Code: Select all

|** A macro to use my kick and taunt skills as well as tracking and whatnot for my ranger 
**| 

Sub Main 

/echo Combat Macro Running 

:start 
/doevents 
  /if $combat==TRUE { 
   /goto :fighting 
}else /if $combat==FALSE { 
      /goto :nofight 
} 
[b]| Take out this return, it ends the Main sub.
| /return [/b]

:fighting 
/if n $char(ability,Kick)>0 /doability Kick 
/if n $char(ability,Taunt)>0 /doability Taunt 
/goto :start 

[b]| This one too. 
| /return [/b]

:nofight 
/if n $char(ability,Forage)>0 { 
/sit off 
/doability Forage 
/sit on 
}else /goto :start 

/return

compuboy
a ghoul
a ghoul
Posts: 108
Joined: Thu Apr 24, 2003 8:19 am
Location: Good Question, if anyone finds out, let me know

Post by compuboy » Sun May 04, 2003 12:17 pm

Valerian wrote:

Code: Select all

|** A macro to use my kick and taunt skills as well as tracking and whatnot for my ranger 
**| 

Sub Main 

/echo Combat Macro Running 

:start 
[b]| What is this doevents for?[/b]
[b]/doevents [/b]

  /if $combat==TRUE { 
   /goto :fighting 
}else /if $combat==FALSE { 
      /goto :nofight 
} 

:fighting 
/if n $char(ability,Kick)>0 /doability Kick 
/if n $char(ability,Taunt)>0 /doability Taunt 
/goto :start 


:nofight 
/if n $char(ability,Forage)>0 { 
/sit off 
/doability Forage 
/sit on 
}else /goto :start 

/return

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sun May 04, 2003 12:26 pm

heh, didn't catch that... after scripting a macro all night I was thinking more of cleaning it up and seeing if that fixed it... :oops:

compuboy
a ghoul
a ghoul
Posts: 108
Joined: Thu Apr 24, 2003 8:19 am
Location: Good Question, if anyone finds out, let me know

Post by compuboy » Sun May 04, 2003 12:36 pm

ok, wont effect much, just wanted to know if that served a purpose.

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sun May 04, 2003 12:49 pm

ah... well I'm not sure it wouldn't do much... probably wouldn't, but *shrug* never know... anyways, did you see the macro I posted? it had me busy for a long time last night.. worked on it for like 4 hours while extremely tired.. try it out and see if you can find any bugs! http://macroquest2.com/phpBB2/viewtopic.php?t=2200