Moderator: MacroQuest Developers
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Wed Aug 09, 2006 6:58 am
This is my Basic Combat Script. I have not had a problem with this version working, so far so am posting it as complete. I will see what I can do to add on to it, but it really is just a basic script.
It does require that you create a hotkey to start it with the command being:
/runscript bcs ${Target.ID}
An example of my hotkey for when I group with my two toons with a puller:
Page10Button1Name=BCS
Page10Button1Color=13
Page10Button1Line1=/relay is1 EQExecute /assist ToonName
Page10Button1Line2=/relay is2 EQExecute /assist ToonName
Page10Button1Line3=/pause 5
Page10Button1Line4=/relay is1 runscript bcs ${Target.ID}
Page10Button1Line5=/relay is2 runscript bcs ${Target.ID}
Suggetions, additions, help are all appriciated.
And now, the script:
Code: Select all
;basic combat script
#include spell_routines.inc
variable int CurMobID
function main(int CurTarget)
{
AddTrigger woreoff "Your @p1@ spell has worn off of @p2@"
echo ***Basic Combat Script Now Running***
CurMobID:Set[${CurTarget}]
wait 15 ${Target(exists)}
Echo ${Target.CleanName} is in my sights
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana}>50
{
call dots ${CurMobFull}
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
}
function dots()
{
if ${Me.Class.ShortName.Equal[SHM]}
{
;slow
call Cast "Drowsy" GEM1 1
relay all echo Attempting to slow ${Target.CleanName} with Drowsy
wait 2
;dot
relay all echo Attempting to DOT ${Target.CleanName} with Tainted Breath
call Cast "Tainted Breath" GEM2 1
stick 12
EQExecute /attack on
}
if ${Me.Class.ShortName.Equal[NEC]}
{
target ${CurMobID}
;Snare
relay all echo Attempting to snare ${Target.CleanName} with Clinging Darkness
call Cast "Clinging Darkness" GEM1 1
;dot
relay all echo Attempting to DOT ${Target.CleanName} with Poison Bolt
call Cast "Poison Bolt" GEM2 1
}
if ${Me.Class.ShortName.Equal[SHD]}
{
}
if ${Me.Class.ShortName.Equal[MAG]}
{
relay all echo Attempting to nuke ${Target.CleanName} with Burn
call Cast "Burn" GEM1 1
relay all echo Attempting to nuke ${Target.CleanName} with Shock of Blades
call Cast "Shock of Blades" GEM2 1
}
if ${Me.Class.ShortName.Equal[WIZ]}
{
}
}
function woreoff(string Line,... params)
{
if ${Me.PctMana}>40 && ${Target.PctHPs}>30
call Cast "@p1@"
}
function atexit()
{
EQExecute /attack off
echo Basic Combat Script Closed
}
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Thu Aug 10, 2006 9:09 pm
This is the most current version. It works, so far.
Code: Select all
;basic combat script
#include spell_routines.inc
variable int CurMobID
function main(int CurTarget)
{
AddTrigger woreoff "Your @p1@ spell has worn off of @p2@"
echo ***Basic Combat Script Now Running***
CurMobID:Set[${CurTarget}]
; target ${CurMobID}
wait 15 ${Target(exists)}
if ${Target(exists} && ${Target.ID}==${CurMobID}
Echo ${Target.CleanName} is in my sights
call fightclub
}
function fightclub()
{
switch ${Me.Class.ShortName}
{
case SHM
Me:Stand
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;dot
if ${Me.PctMana} > 30
EQExecute /gs Attempting to DOT ${Target.CleanName} with Tainted Breath
call Cast "Tainted Breath"
}
stick 10
EQExecute /attack on
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
case NEC
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;Snare
EQExecute /gs Attempting to snare ${Target.CleanName} with Clinging Darkness
call Cast "Clinging Darkness"
;dot
EQExecute /gs Attempting to DOT ${Target.CleanName} with Poison Bolt
call Cast "Poison Bolt"
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
if ${Me.PctHp} < 70%
call TapHeals
wait 5
}
BREAK
case SHD
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;Snare
EQExecute /gs Attempting to DOT ${Target.CleanName} with Festering Darkness
call Cast "Festering Darkness"
;dot
EQExecute /gs Attempting to DOT ${Target.CleanName} with Ignite Blood
call Cast "Ignite Blood"
}
stick 10
EQExecute /attack on
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
call TapHeals
wait 5
}
BREAK
case MAG
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
EQExecute /gs Attempting to nuke ${Target.CleanName} with Burn
call Cast "Burn"
EQExecute /gs Attempting to nuke ${Target.CleanName} with Shock of Blades
call Cast "Shock of Blades"
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
case WIZ
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.PctMana} > 45
{
; Nukes to be added
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
}
}
function woreoff(string Line,... params)
{
if ${Me.PctMana}>40 && ${Target.PctHP}>30 && ( ${@p1@} == (${Drowsy} || ${Clinging Darkness}) )
call Cast "@p1@"
}
function debuffs()
{
variable bool DidDoDebuff
switch ${Me.Class.ShortName}
{
case SHM
echo ${DidDoDebuff}
if ${Me.PctMana} > 45 && !${DidDoDebuff}
{
;slow
call Cast "Drowsy"
EQExecute /gs Attempting to slow ${Target.CleanName} with Drowsy
DidDoDebuff:Set[TRUE]
}
BREAK
case NEC
if ${Me.PctMana} > 70 && !${DidDoDebuff}
{
;debuff
call Cast "Scent of Dusk"
EQExecute /gs Attempting to debuff ${Target.CleanName} with Scent of Dusk
DidDoDebuff:Set[TRUE]
}
BREAK
case SHD
if ${Me.PctMana} > 45&& !${DidDoDebuff}
{
;debuff1
relay all echo Attempting to DOT ${Target.CleanName} with Aura of pain
call Cast "Aura of pain"
;debuff2
relay all echo Attempting to DOT ${Target.CleanName} with Aura of hate
call Cast "Aura of hate"
DidDoDebuff:Set[TRUE]
}
BREAK
}
}
function TapHeals()
{
variable bool Tapped
switch ${Me.Class.ShortName}
{
case SHD
;Lifetap1
if ${Me.PctHP} < 70 && !${Tapped}
relay all echo Attempting to DOT ${Target.CleanName} with Touch of Inruku
call Cast "Touch of Inruku"
;Lifetap2
if ${Me.PctHP} < 50 && !${Tapped}
relay all echo Attempting to DOT ${Target.CleanName} with Touch of Volatis
call Cast "Touch of Volatis"
Tapped:Set[TRUE]
BREAK
case NEC
;Lifetap1
if ${Me.PctHP} < 70 && !${Tapped}
relay all echo Attempting to TAP ${Target.CleanName} to heal self
call Cast "Leach"
Tapped:Set[TRUE]
BREAK
}
}
function atexit()
{
EQExecute /attack off
echo Basic Combat Script Closed
;I expect that my Casters have not moved so am simply sitting them down
switch ${Me.Class.ShortName}
{
case NEC
case WIZ
case MAG
if !${Me.Sitting}
EQExecute /sit
}
}
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Thu Aug 10, 2006 10:42 pm
The above works for shammy and necro, so far. The version up there now was just put there, I had to edit it because of mistakes I found while testing.
Input and suggestions are appriciated. Eventually, once I get the basics ironed out, I'm hoping to learn how to do LavishSettings and create individual character files, rather than using all that extra coding.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
aChallenged1
- a grimling bloodguard

- Posts: 1804
- Joined: Mon Jun 28, 2004 10:12 pm
Post
by aChallenged1 » Fri Aug 11, 2006 11:29 am
Ok, another update. I've been working out some bugs that I find as I go along, plus I'm trying to add new stuff in.
Code: Select all
;basic combat script
#include spell_routines.inc
variable int CurMobID
function main(int CurTarget)
{
echo ***Basic Combat Script Now Running***
CurMobID:Set[${CurTarget}]
wait 15 ${Target(exists)}
if ${Target(exists} && ${Target.ID}==${CurMobID}
Echo ${Target.CleanName} is in my sights
call fightclub
}
function fightclub()
{
variable bool SuccessfulCast
AddTrigger woreoff "Your @p1@ spell has worn off of @p2@"
AddTrigger ResistCD "@p1@Your target resisted the Clining Darkness Spell."
switch ${Me.Class.ShortName}
{
case SHM
Me:Stand
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;dot
if ${Me.PctMana} > 30
call Cast "Tainted Breath"
}
stick 10
EQExecute /attack on
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
case NEC
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;dot
call Cast "Poison Bolt"
call Cast "Heat Blood"
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
if ${Me.PctHPs} < 70%
call TapHeals
;Snare
if ${Target.Body.Name.Equal[Humanoid]} && ${Target.PctHPs} <= 30
{
call Cast "Clinging Darkness"
Me:Sit
endscript bcs
}
wait 5
}
BREAK
case SHD
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
call debuffs
;Snare
EQExecute /gs Attempting to DOT ${Target.CleanName} with Festering Darkness
call Cast "Festering Darkness"
;dot
EQExecute /gs Attempting to DOT ${Target.CleanName} with Ignite Blood
call Cast "Ignite Blood"
}
stick 10
EQExecute /attack on
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
call TapHeals
wait 5
}
BREAK
case MAG
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.Pet(exists)}
EQExecute /pet attack
if ${Me.PctMana} > 45
{
EQExecute /gs Attempting to nuke ${Target.CleanName} with Burn
call Cast "Burn"
EQExecute /gs Attempting to nuke ${Target.CleanName} with Shock of Blades
call Cast "Shock of Blades"
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
case WIZ
if ${Target.ID} != ${CurMobID}
target ${CurMobID}
if ${Me.PctMana} > 45
{
; Nukes to be added
}
while "${Target(exists)}"
{
if ${QueuedCommands}
ExecuteQueued
wait 5
}
BREAK
}
}
function woreoff(string Line,... params)
{
if ${Me.PctMana}>40 && ${Target.PctHPs}>30 && ( ${@p1@} == ${Drowsy}
call Cast "@p1@"
}
function debuffs()
{
variable bool DidDoDebuff
switch ${Me.Class.ShortName}
{
case SHM
echo ${DidDoDebuff}
if ${Me.PctMana} > 45 && !${DidDoDebuff}
{
;slow
call Cast "Drowsy"
DidDoDebuff:Set[TRUE]
}
BREAK
case NEC
if ${Me.PctMana} > 70 && !${DidDoDebuff}
{
;debuff
call Cast "Scent of Dusk"
DidDoDebuff:Set[TRUE]
}
BREAK
case SHD
if ${Me.PctMana} > 45&& !${DidDoDebuff}
{
;debuff1
call Cast "Aura of pain"
;debuff2
call Cast "Aura of hate"
DidDoDebuff:Set[TRUE]
}
BREAK
}
}
function resistCD()
{
SuccessfulCast:Set[FALSE]
}
function TapHeals()
{
variable bool Tapped
switch ${Me.Class.ShortName}
{
case SHD
;Lifetap1
if ${Me.PctHPs} < 70 && !${Tapped}
call Cast "Touch of Inruku"
;Lifetap2
if ${Me.PctHPs} < 50 && !${Tapped}
call Cast "Touch of Volatis"
Tapped:Set[TRUE]
BREAK
case NEC
;Lifetap1
if ${Me.PctHPs} < 70 && !${Tapped}
{
EQExecute /gs Attempting to TAP ${Target.CleanName} to heal self
call Cast "Leach"
Tapped:Set[TRUE]
}
BREAK
}
}
function atexit()
{
EQExecute /attack off
echo Basic Combat Script Closed
;I expect that my Casters have not moved so am simply sitting them down
switch ${Me.Class.ShortName}
{
case NEC
case WIZ
case MAG
if !${Me.Sitting}
EQExecute /sit
}
}
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!
-
mekaniak
- a hill giant

- Posts: 290
- Joined: Thu Sep 18, 2003 3:21 pm
Post
by mekaniak » Fri Aug 11, 2006 3:00 pm
function fightclub, thats cute

Keep up the good work.
I love the Power Glove, it's so bad
Say hello to M.C. Smurf!
[quote]<mekaniak> adios guys.
<dont_know_at_all> idiot
* mekaniak is now known as mekaniak_dinner
<Jacensolo> me?
<dont_know_at_all> not this time
[/quote]
[quote]
<dont_know_at_all> A_Enchanter_00, how the fuck should i know? it's your code[/quote]
I love quoting IRC chat.