Auto DS Script

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

Moderator: MacroQuest Developers

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

Auto DS Script

Post by GuardianX99 » Tue Dec 31, 2002 6:45 pm

Hi I'm looking to make an auto DS script. Kinda new to scripting, made a FEW minor ones to help out friends. IE a mod rod timing script. well on to my main point, I'm trying to write a script that AUTO DS's my guilds MT's during a raid, keeping tabs on the MA's while Debuffing ETC is kinda cumbersome.

What I need help with is the initial implementation of variables.

What I'd like to do is be able to set up an alias that runs "tankds.mac" in this fashion:
/alias /raidds /macro tankds.mac

THEN from that alias do somthing like this:

/raidds MA1 MA2 MA3 MA4 MA5 MA6

and depending on what value I put in for the MA position (I.e. either a name or a 0) it either adds that players name to the DS cycle OR if a 0 is placed it discards that MA position (the only reason I'd have it discard a position is if we didn't need that many MA's). But this is where I get stuck. HOW do I make it pull the info FROM the command to the program. I've tried reverse enginering a few macro's to see if I could find out on my own but simply couldn't find anything of help.

I am thinking This bit of code MIGHT work but simply don't know:
/if $arg(1,"/raidds") != "0"
then /varadd $v2 $arg(1, "/raidds")

other than that I'm stuch at the starting line with no where to go...
thanks for whatever help you might be able to share.

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

What I have so far

Post by GuardianX99 » Thu Jan 02, 2003 12:47 am

So far what I have is:
Sub main

/for $p# 0 to 1 [step 1]
/target $p
/call spellsub 7 70
/press Esc
/next p#
It seems to crash EQ on the:
/next p#
part.

any Ideas?

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Thu Jan 02, 2003 2:54 pm

From the way you describe that it looks like you are trying to set up a script that continually runs and casts a ds on the guild tanks when it drops. You also want to ba able to add or delete names from the list.

Is this correct ?
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

Yes

Post by GuardianX99 » Sun Jan 05, 2003 8:16 pm

Sorry for the delayed response.

Basicly yeah, L124RD wrote me a simple one that just DS's names I input into the opening command. then I added an Echo to it which made it Equaly annoying cause...YOU guessed it! can't run any macro's while running a macro...yes this was a known fact to me.

Some commands i'd like to have:

/call addtank 1 <name>

What this would do is add the named tank to the Slot number given before his name. I think that if I did it this way I'd have to make it an always on macro and I'd have to spawn other macro's off of it. Which wouldn't necessairily BOTHER me, I'd rather like the idea. I like being able to call sub rutines. Besides with a 2nd PC active I can usualy trouble shoot Problems in game on the Spot of the problem OR add/remove content.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Fri Jan 24, 2003 1:02 am

could ya post that ds script? i'd love a copy of it for on raids.. hate having to keep up with the ds while i'm debuffing and watching the pet go.

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

Here is the code.

Post by GuardianX99 » Fri Jan 24, 2003 4:17 pm

Here it is:

Code: Select all

|** Tankds.mac

Created by L124RD

Created this macro with the single idea of keeping all tanks in my raiding party with a fresh Damage shield. 

While not spending innane amounts of time trying to figure out what tank has what. the Macro is set to use the seventh spell gem. if you want to change that Alter "#define DSGEM 7" to whatever spell gem you have your DS in.

Useage: /macro tankds.mac Tank 1 Tank 2 tank 3 tank 4 tank 5 Tank 6 Tank 7 tank 8 tank 9
**|

 #Event SkillUp "You have become better at " 
 #Event CastFizzle "Your spell fizzles!" 
 #Event CastStart "You begin casting" 
 #Event CastInterrupt "Your spell is interrupted." 
 #Event NeedToRecover "You haven't recovered yet..." 
 #Event CastResist "Your target resisted " 
  
 #define DSGEM 7 
  
 sub main 
  /if "$p0"!="" { 
   /target $p0 
   /call spellsub DSGEM 75 
  } 
  /if "$p1"!="" { 
   /target $p1 
   /call spellsub DSGEM 75 
  } 
  /if "$p2"!="" { 
   /target $p2 
   /call spellsub DSGEM 75 
  } 
  /if "$p3"!="" { 
   /target $p3 
   /call spellsub DSGEM 75 
  } 
  /if "$p4"!="" { 
   /target $p4 
   /call spellsub DSGEM 75 
  } 
  /if "$p5"!="" { 
   /target $p5 
   /call spellsub DSGEM 75 
  } 
  /if "$p6"!="" { 
   /target $p6 
   /call spellsub DSGEM 75 
  } 
  /if "$p7"!="" { 
   /target $p7 
   /call spellsub DSGEM 75 
  } 
  /if "$p8"!="" { 
   /target $p8 
   /call spellsub DSGEM 75 
  } 
/return


 Sub SpellSub 
    /varset v98 $p0 
    /varset v99 $p1 
    /goto :recast
:ReCast 
    /varset v1 0 
    /cast $v98 
    /delay 1s
    /doevents 
    /if n $v1>1 /goto :ReCast 
    /if n $v1==0 /goto :SpellSubGetMana 
/return  


 :SpellSubGetMana 
    /varset v99 999 
    /delay 5 
 /return 

 Sub Event_SkillUp 
    /varset v1 1 
/return  

 Sub Event_CastStart 
    /varset v1 1 
    /delay $v99 
 /return 

 Sub Event_CastFizzle 
    /varset v1 2 
 /return 

 Sub Event_CastInterrupt 
    /varset v1 3 
 /return 

 Sub Event_CastResist 
    /varset v1 4 
 /return 

 Sub Event_NeedToRecover 
    /varset v1 4 
/return
Last edited by GuardianX99 on Fri Jan 24, 2003 4:24 pm, edited 1 time in total.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Fri Jan 24, 2003 4:22 pm

thanks!

edit.. hmm.. i'm getting an error with this macro.. "can't call when a macro isn't running" any clue on this?

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sat Jan 25, 2003 3:06 am

Salutations,
this doesn't have the /call addtank thing. What event do you want it to do something with the tanks I mean... I could give you this code:

Code: Select all

|** Tankds.mac

Created by L124RD

Created this macro with the single idea of keeping all tanks in my raiding party with a fresh Damage shield.

While not spending innane amounts of time trying to figure out what tank has what. the Macro is set to use the seventh spell gem. if you want to change that Alter "#define DSGEM 7" to whatever spell gem you have your DS in.

Useage: /macro tankds.mac Tank 1 Tank 2 tank 3 tank 4 tank 5 Tank 6 Tank 7 tank 8 tank 9
**|

#Event SkillUp "You have become better at "
#Event CastFizzle "Your spell fizzles!"
#Event CastStart "You begin casting"
#Event CastInterrupt "Your spell is interrupted."
#Event NeedToRecover "You haven't recovered yet..."
#Event CastResist "Your target resisted "
 
#define DSGEM 7
 
sub main
  /varset v0 0
 :mainloop
   /for l1 0 to $v0
     /target $a(0,$l1)
     /call spellsub DSGEM 75
   /next l1
  /goto :mainloop
/return


Sub SpellSub
    /varset v98 $p0
    /varset v99 $p1
    /goto :recast
:ReCast
    /varset v1 0
    /cast $v98
    /delay 1s
    /doevents
    /if n $v1>1 /goto :ReCast
    /if n $v1==0 /goto :SpellSubGetMana
/return 


:SpellSubGetMana
    /varset v99 999
    /delay 5
/return

Sub Event_SkillUp
    /varset v1 1
/return 

Sub Event_CastStart
    /varset v1 1
    /delay $v99
/return

Sub Event_CastFizzle
    /varset v1 2
/return

Sub Event_CastInterrupt
    /varset v1 3
/return

Sub Event_CastResist
    /varset v1 4
/return

Sub Event_NeedToRecover
    /varset v1 4
/return

sub addtank
  /varset  a(0,$v0) $p0
  /varadd v0
/return
two problems so far: a: it will just keep calling DS every round, not cool. b: no /call removetank 0.o

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Sat Jan 25, 2003 8:06 pm

am i just doing something wrong? i'm still getting the "Cannot call when a macro isn't running" error with your code l124rd. /macro tankds name name name is how i'm trying it just like the comments at the top say.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Jan 26, 2003 5:00 pm

Salutations,
sorry, didn't remove comment, do this:

Code: Select all

   /macro tankds.mac
   /call addtank <name>
   /call addtank <name>
   /call addtank <name>
   /call addtank <name>
   /call addtank <name>
   /call addtank <name>

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Tue Jan 28, 2003 8:17 pm

hmmm.. still get the error..

/macro tankds.mac gives me the cannot call without a macro running error..

GuardianX99
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 6:31 pm
Contact:

Post by GuardianX99 » Fri Feb 14, 2003 8:32 pm

Sorry to dig up an old postbut this works for me:

Code: Select all

|** Tankds.mac

Created by GuardianX99

I created this macro with the single idea of keeping all tanks in my raiding party with a fresh Damage shield. While not spending innane amounts of time trying to figure out what tank has what.

Useage: /macro tankds.mac <Tank 1> <Tank 2> <tank 3> <tank 4> <tank 5> <Tank 6> <Tank 7> <tank 8> <tank 9>
**|

 #Event SkillUp "You have become better at " 
 #Event CastFizzle "Your spell fizzles!" 
 #Event CastStart "You begin casting" 
 #Event CastInterrupt "Your spell is interrupted." 
 #Event NeedToRecover "You haven't recovered yet..." 
 #Event CastResist "Your target resisted " 
  
 #define DSGEM 7 
  
 sub main 
  /if "$p0"!="" { 
   /target $p0 
   /call spellsub DSGEM 75 
  } 
  /if "$p1"!="" { 
   /target $p1 
   /call spellsub DSGEM 75 
  } 
  /if "$p2"!="" { 
   /target $p2 
   /call spellsub DSGEM 75 
  } 
  /if "$p3"!="" { 
   /target $p3 
   /call spellsub DSGEM 75 
  } 
  /if "$p4"!="" { 
   /target $p4 
   /call spellsub DSGEM 75 
  } 
  /if "$p5"!="" { 
   /target $p5 
   /call spellsub DSGEM 75 
  } 
  /if "$p6"!="" { 
   /target $p6 
   /call spellsub DSGEM 75 
  } 
  /if "$p7"!="" { 
   /target $p7 
   /call spellsub DSGEM 75 
  } 
  /if "$p8"!="" { 
   /target $p8 
   /call spellsub DSGEM 75 
  } 
/return


 Sub SpellSub 
    /varset v98 $p0 
    /varset v99 $p1 
    /goto :recast
:ReCast 
    /varset v1 0 
    /cast $v98 
    /delay 1s
    /doevents 
    /if n $v1>1 /goto :ReCast 
    /if n $v1==0 /goto :SpellSubGetMana 
/return  


 :SpellSubGetMana 
    /varset v99 999 
    /delay 5 
 /return 

 Sub Event_SkillUp 
    /varset v1 1 
/return  

 Sub Event_CastStart 
    /varset v1 1 
    /delay $v99 
 /return 

 Sub Event_CastFizzle 
    /varset v1 2 
 /return 

 Sub Event_CastInterrupt 
    /varset v1 3 
 /return 

 Sub Event_CastResist 
    /varset v1 4 
 /return 

 Sub Event_NeedToRecover 
    /varset v1 4 
/return
I havn't been coding much due to school / work responsibilities.

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Sat Feb 15, 2003 7:18 pm

thanks for replying. this works !! not sure what was wrong before.