Valor Kiting Macro - Need help

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

DyvimTvar
orc pawn
orc pawn
Posts: 16
Joined: Wed Oct 22, 2003 1:21 pm

Valor Kiting Macro - Need help

Post by DyvimTvar » Tue Mar 02, 2004 6:06 pm

Hi all,

I tried to take elretardo's SE HoH kite macro and re-task it to Valor kiting in the NE corner. Here is the code I have, but when I run it it just gives the error:
Cannot call when a macro isn't running.
I'm sure I'm doing something both simple and stupid, but I can't see it, any ideas?

Thanks in advance.

Code: Select all

|**  Plane of Valor NE Kiter v1.0 for Necromancers 
|**  Originally by elretardo Modified to Valor by DyvimTvar

|**  This script isn't intended for AFK experience but can 
|**  probably be modified to do it.  I just have a general 
|**  hatred for kiting.  So, I use a hotkey to activate this 
|**  script after I've pulled the mob and watch a movie or 
|**  something while it does its thing.

|**  -- The above is the original intent copy by elretardo --
|**  --               I completely agree                   --

|**  Change the anchor locs for different zones or different 
|**  camps in HoH. 

|**  Note: Be sure to target yourself and run this script first. 
|**        That way you can get a feel of its movement.  When you 
|**        pull a real mob, be sure to distance yourself from the 
|**        camp location and preferably on the opposite side of the 
|**        first kite/turn anchors. 
 

#turbo 90 

#include Spellcast.inc

Sub Main 
  /echo Does this work?
  /declare CampAnc global 
  /declare KiteAnchorA global 
  /declare KiteAnchorB global 
  /declare KiteAnchorC global 
  /declare KiteAnchorD global 
  /declare JBootKey global 
  /declare PetAttackKey global 
    
  |||||||||BEGIN USER SET VARIABLES||||||||| 
  /varset JBootKey 5 
  /varset PetAttackKey 6 
  /varset TestingFlag 1
  ||||||||||END USER SET VARIABLES|||||||||| 

  ||||||||||BEGIN ANCHOR LOCATIONS|||||||||| 
  /varset CampAnc 1590.72,-1027.32 
  /varset KiteAnchorA 1637.25,-795.06 
  /varset KiteAnchorB 1590.72,-1027.32 
  /varset KiteAnchorC 1363.50,-1114.95 
  /varset KiteAnchorD 1590.72,-1027.32 
  |||||||||||END ANCHOR LOCATIONS||||||||||| 
  
  /echo Does this work?
  /call KiteTheMob 

/return 

Sub KiteTheMob 
| /tell MeleeBot_01 Go Ninja Go! <- Hehe, ignore this. I left it in in this version as I find it amusing. ;)
  /press @PetAttackKey 
| /press @JBootKey  <- Don't use JBoots myself
  /echo Kiting $target(name). 
  /press Num_Lock 
  /goto :CampAnchor 
  :CampAnchor 
  /if $target(name)==NULL /call MobDead 
  /if n $distance(@CampAnc)<=10 { 
   /press Num_Lock 
   /goto :CastSnare 
  } 
  /face fast loc @CampAnc 
  /goto :CampAnchor 

  :CastSnare 
  /if $target(name)==NULL /call MobDead 
  /delay 1s 
  /if TestingFlag==1  /call cast "Embracing Darkness" 
  /echo Casting Embracing Darkness
  /doevents 
  /delay 4s 
  /press Num_Lock 
  /goto :AnchorA 

  :AnchorA 
  /if $target(name)==NULL /call MobDead 
  /if n $distance(@KiteAnchorA)<=10 { 
   /press Num_Lock 
   /goto :CastDot1 
  } 
  /face fast loc @KiteAnchorA 
  /goto :AnchorA 

  :CastDot1 
  /if $target(name)==NULL /call MobDead 
  /delay 1s 
  /if TestingFlag==1  /call cast "Blood of Thule" 
  /echo Casting Blood of Thule
  /doevents 
  /delay 7s 
  /press Num_Lock 
  /goto :TurnAnchorA 

  :TurnAnchorA 
  /if $target(name)==NULL /call MobDead 
  /if n $distance(@KiteAnchorB)<=10 { 
   /goto :CampAnchorKite 
  } 
  /face fast loc @KiteAnchorB 
  /goto :TurnAnchorA 

  :CampAnchorKite 
  /if n $distance(@CampAnc)<=10 { 
   /press Num_Lock 
   /goto :CastSnare2 
  } 
  /face fast loc @CampAnc 
  /goto :CampAnchorKite 

  :CastSnare2 
  /if $target(name)==NULL /call MobDead 
  /delay 1s 
  /if TestingFlag==1  /call cast "Dark Plague" 
  /echo Casting Dark Plague
  /doevents 
  /delay 2s 
  /press Num_Lock 
  /goto :AnchorC 

  :AnchorC 
  /if $target(name)==NULL /call MobDead 
  /if n $distance(@KiteAnchorC)<=10 { 
   /press Num_Lock 
   /goto :CastDot2 
  } 
  /face fast loc @KiteAnchorC 
  /goto :AnchorC 

  :CastDot2 
  /if $target(name)==NULL /call MobDead 
  /delay 1s 
  /if TestingFlag==1  /call cast "Saryrn's Kiss" 
  /echo Casting Saryn's Kiss
  /doevents 
  /delay 7s 
  /press Num_Lock 
  /goto :TurnAnchorB 

  :TurnAnchorB 
  /if $target(name)==NULL /call MobDead 
  /if n $distance(@KiteAnchorD)<=10 { 
   /goto :CampAnchor 
  } 
  /face fast loc @KiteAnchorD 
  /goto :TurnAnchorB 
/return 

Sub MobDead 
  /press up down 
  /goto :RestartAnchor 
  :RestartAnchor 
  /if n $distance(@CampAnc)<=10 { 
   /press up down 
        /sit 
   /endmacro 
  } 
  /face fast loc @CampAnc 
  /press up up 
  /goto :RestartAnchor 
/return 
DyvimTvar

bonehand
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 17, 2004 5:16 pm

Post by bonehand » Tue Mar 02, 2004 8:25 pm

Not a very experienced macroer yet with this but:

You don't /call cast "such and such"

It should be /cast "such and such"

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Tue Mar 02, 2004 8:43 pm

/call cast "such and such" is used because it's calling the "cast" sub from Spellcast.inc

Note the
#include Spellcast.inc
toward the top of the macro.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Mar 03, 2004 12:42 am

You are asking for trouble with these lines:

Code: Select all

|**  Plane of Valor NE Kiter v1.0 for Necromancers 
|**  Originally by elretardo Modified to Valor by DyvimTvar 

|**  This script isn't intended for AFK experience but can 
|**  probably be modified to do it.  I just have a general 
|**  hatred for kiting.  So, I use a hotkey to activate this 
|**  script after I've pulled the mob and watch a movie or 
|**  something while it does its thing. 

|**  -- The above is the original intent copy by elretardo -- 
|**  --               I completely agree                   -- 

|**  Change the anchor locs for different zones or different 
|**  camps in HoH. 

|**  Note: Be sure to target yourself and run this script first. 
|**        That way you can get a feel of its movement.  When you 
|**        pull a real mob, be sure to distance yourself from the 
|**        camp location and preferably on the opposite side of the 
|**        first kite/turn anchors. 
Change all of the |** entries to just |

bonehand
a lesser mummy
a lesser mummy
Posts: 48
Joined: Tue Feb 17, 2004 5:16 pm

Post by bonehand » Wed Mar 03, 2004 12:44 am

Well, hrmph...

The only things not coming up correct in my code editor is that /call cast might need to match case with spellcast.inc's Cast subroutine and /echo Casting Saryn's Kiss might need to be quoted or leave out the ' character.

After briefly testing the ' with an echo, it seems to not cause any issues, but case sensitivity seems to be needed in /call's, variables(spells) and events. Calls seem to work half the time(or at least the first time, but in my modified stick.mac, the attack subroutine seems to go through fine the first time, but never loops back through...not a complete test, but changing lower case to upper certainly breaks it.

Maybe /call Cast "such and such"...of course that's if you are using the latest spellcast.inc from Snippets.

And thanks for the little description of calls...that actually helped me a lot surprisingly.