Snare Nuke script

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

CrackMe
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sat Feb 08, 2003 2:19 pm

Snare Nuke script

Post by CrackMe » Mon Feb 10, 2003 5:21 pm

Hello Im a little MQ newbie and tryied to make my own macro, but it seems like I havent all understood how it works yet.

Im looking for a simple macro there cast a spell if the target is under X% hp - I would use it to heal my tank (I cant use the cleric bot script since I wont have them grouped) and on another computer to snare the mob with another toon (Yes I am triple boxing) I guess I just could put a /assist tank on the last one but else use the same macro?

I dont want alot of fancy things, Im trying to learn how to make it and it makes me confused with to many things in the same macro

I hope you can help me

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

Post by younglove » Tue Feb 11, 2003 12:40 am

here's an idle thought if you are not gonna be grouped with a char there is a command in E itself "/tar <charname>" minus the quotes of course. perhaps there is a way for you to adapt this command into your macro and see how that works. of course you do need to make sure that you hav the correct spelling of the char name you intend to target and they do of course have to be within range other wise you get the message "<Charname> is not in range" or some such

just my 2 cp worth Hope it helps

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Tue Feb 11, 2003 2:16 am

Actually, I have always liked having direct control over my bot's via tells, and chat channels, and it's pretty easy to have healer do commands based on the contents of a tell, and have it target the sender of that tell, and either cast, or assist (for snares, nukes, and whatnot), and then cast. I'll work up some simple things at work and post them for you later.

CrackMe
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sat Feb 08, 2003 2:19 pm

Post by CrackMe » Wed Feb 12, 2003 11:03 am

Ive been trying a few things now like

/if "$ChatCommand"=="snare the bitch" {
/rt
/ass
/stand
/cast 3
/delay 25
/sit
/press esc }

But do I need to do anything else or did I completly misunderstand the way of making macros?

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Thu Feb 13, 2003 5:17 pm

Here's a fairly simple macro, with perhaps some useless garbage in it, that does commands based on chat channle messages. It's keyed for a cleric, but you can easily change the spells it casts, and the commands.

It uses some bastardized code from a few sources, so it's not pretty and I haven't bothered to clean it up because I'm lazy.


Code: Select all

#Event Loading "LOADING, PLEASE WAIT..." 
#Event Slainby "You have been slain by a"
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"

#include spellsub.mac
#chat chat 

Sub main
   /varset v15 0 
:resetattack 
   /varset v0 $target(name) 
   /varset v1 $target(id) 
   /varset v22 0 
   /varset t1 10 
   /varset t5 120 
   /varset t6 50 
   /varset v30 0 
:CloserAF 
   /doevents 
   /if n $v22==1 /goto :resetattack 
   /if "$target()"=="FALSE" /goto :holdingpatt 
   /if "$target(type)"!="NPC" /goto :holdingpatt 
   /varset v11 0 
   /if n $char(hp,pct)<=75 /1 remedy me
   /goto :CloserAF 
:holdingpatt 
        /varset t1 70 
        /if n $v11!=1 /goto :holdingmove 
        /delay 5 
        /attack off 
        /goto :CloserAF 
:holdingmove 
        /sendkey up ctrl 
        /varset v11 1 
        /delay 5 
        /attack off 
        /goto :CloserAF 


|||||||||||||||||||||||||||| 
Sub Event_Chat 

/if "$p2"=="I Need a heal" { 
   /sit off
/delay 5
   /target $p1
   /call SpellSub 2 105
/delay 5
/sit on

} else /if "$p2"=="Remedy me" { 
   /sit off
/delay 5
   /target $p1
   /call SpellSub 1 42
/delay 5
/sit on


} else /if "$p2"=="nuke" { 
   /sit off
/delay 5
   /target $p1
   /assist
      /if "$target(type)"=="NPC" /goto :nukeaway
      /goto :nonuke
:nukeaway
   /call SpellSub 3 70
:nonuke
/delay 5
/sit on

} else /if "$p2"=="root" { 
   /sit off
/delay 5
   /target $p1
   /assist
      /if "$target(type)"=="NPC" /goto :rootaway
      /goto :noroot
:rootaway
   /call SpellSub 4 24
:noroot
/delay 5
/sit on

} else /if "$p2"=="gate now" { 
   /sit off
/delay 5
   /cast 8 
/endmacro

} 

/return 

||||||||||||||||||||||||||||||||| 
Sub Event_Loading 
   /endmacro 
/return 

Sub Event_Slainby 
   /endmacro 
/return

Sub Event_Invited 
   /delay 20 
   /invite
/return

And the spellsub.mac I use.

Code: Select all

| - SpellSub.mac - 
| Spell Casting Sub routine - Usage "/call SpellSub <gem> <delay *actual cast time plus recast*>" 
| Will return $v99 = 999 if you go oom. 
| 
| Modified by GD to work with the 7-4-2002 Release 
| 
| modified by sempi to include sitting/standing and be more cleric oriented 
|
| Modified by S_B_R to handle more events and relay more information to the person 
| issuing the command. Also removed the auto-sit function to help control aggro. 09-07-02 

#Event CastStart "You begin casting" 
#Event CastFizzle "Your spell fizzles!" 
#Event CastInterrupt "Your spell is interrupted." 
#Event CastNoMana "Insufficient Mana to cast this spell" 
#Event CastTooFar "Your target is out of range, get closer!" 
#Event CastTimer "You haven't recovered yet..." 

Sub SpellSub 
   /varset v98 $p0 
   /varset v99 $p1 
   :ReCast 
   /sit off 
   /varset v1 2 
   /cast $v98 
   /delay 10 
   /doevents 
   /if n $v1==0 /goto :ReCast 
   /if n $v1>1 /goto :Failure 
/return 

:Failure 
   /if n $v1==2 { 
      /1 Spell failed for unknown reason... 
      /delay 5 
   } else /if n $v1==3 { 
      /1 You're too far away. Come back. 
      /delay 5 
   } else /if n $v1==4 { 
      /1 OOM 
      /delay 100 
   } else /if n $v1==5 { 
      /1 Waiting for repop... 
   } 
/return 

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

Sub Event_CastFizzle 
   /varset v1 0 
/return 

Sub Event_CastInterrupt 
   /varset v1 0 
/return 

Sub Event_CastTooFar 
   /varset v1 3 
/return 

Sub Event_CastNoMana 
   /varset v1 4 
/return 

Sub Event_CastTimer 
   /varset v1 5 
/return