Commit 2fe5626b authored by Red Bot's avatar Red Bot

Merge branch 'patch-3' into 'master'

Logical error found in last commit candidate.    Issue resolved.

See merge request !8
parents 9d72a757 a4bf031b
|---------------------------------------------------------------------------------
|
| KeepToonBuffed.mac by TreeHuginDruid -- Last Edited 5/8/2017
| KeepToonBuffed.mac by TreeHuginDruid -- Last Edited 5/15/2017
|
| This macro is designed to allow an out of group PowerLeveling toon
| to be able to target members of a low level group, heal,
......@@ -14,6 +14,7 @@
#turbo 80
#Event SpellBlocked "#*#Your #1# spell did not take hold on #2#. (Blocked by #3#.)#*#"
#Event SpellBlocked "#*#Your #1# spell did not take hold on #2#.#*#"
|---------------------------------------------------------------------------------
Sub Main
......@@ -26,7 +27,7 @@ Sub Main
|==================== DO NOT ALTER THESE VALUES ====================
/declare MacroName string outer KeepToonBuffed
/declare KeepToonBuffVer string outer 1.7.5
/declare KeepToonBuffVer string outer 1.8.0
/declare IniFileName string outer ${MacroName}_${Me.CleanName}.ini
/call CreateIni
......@@ -36,6 +37,9 @@ Sub Main
/call LoadIni General Debug bool TRUE
/call LoadIni General AdminDebug bool FALSE
/call LoadIni General DebugINI bool FALSE
/call LoadIni General FollowGroup int 0
/call LoadIni General FollowDist int 30
/declare MyMDist int outer ${FollowDist}-5
/call LoadIni General SpellSetName string NULL
| ################## Set up [Mana] values
......@@ -60,6 +64,8 @@ Sub Main
/call LoadIni Buffs TargetBuffName string NULL TargetBuffName
/call VersionControl
/call CheckPlugin MQ2Cast
/call CheckPlugin MQ2Moveutils
|==================== DO NOT ALTER THESE VALUES ====================
|---------------------------------------------------------------------------------
......@@ -69,9 +75,10 @@ Sub Main
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
/if (${Defined[SpellSetName]}) {
/if (${Defined[SpellSetName]} || ${SpellSetName.NotEqual[null]}) {
/echo Memming spellset (${SpellSetName}).
/memspellset ${SpellSetName}
/memspellset ${SpellSetName}
/delay 5s
}
|---------------------------------------------------------------------------------
......@@ -80,12 +87,12 @@ Sub Main
/if (${HealsOn}) /call CheckMyHealth
/if (${HealsOn}) /call CheckTargetHealth
/if (${BuffssOn}) /call MaintainTargetBuffs
/if (${Me.PctMana}<=${MinManaPct} && !${Me.CombatState.Equal[COMBAT]}) /call CheckMana
|Internal half second delay to allow for manual moving, prevents constant sit loop if only 1 toon being buffed.
/delay 5
/if (${FollowGroup}) /call FollowAround
|Internal second delay to allow for manual moving, prevents constant sit loop if only 1 toon being buffed.
/delay 10
/if (${Me.Standing} && !${Me.Casting.ID} && !${Me.CombatState.Equal[COMBAT]} && !${Me.Moving} && !${Me.Mount.ID}) /sit
/goto :loop
/return
......@@ -101,7 +108,7 @@ Sub CreateIni
/echo Creating ini file ${IniFileName}
/declare i int local 1
/for i 1 to 5
/ini ${IniFileName} "${a.Arg[${i},|]}" "|===================================" "==================================|"
/ini ${IniFileName} "${a.Arg[${i},|]}" "|===================================" "==================================|"
/next i
/echo Please edit your ini file ${IniFileName} and restart Shambot
......@@ -164,7 +171,7 @@ Sub CheckMyHealth
/delay 15
/casting "${HealSpell}" gem8
/call CheckCasting
/call CheckGlobalCooldown
/call CheckGlobalCooldown
}
}
......@@ -251,14 +258,14 @@ Sub MaintainTargetBuffs
}
|--------------------------------------------------------------------------------
/if (${Debug}) /echo Attempting to cast (${TargetBuffName[${i}]}) on (${MyBuffTargetName[${j}]}).
/if (${Debug}) /echo Attempting to cast (${TargetBuffName[${i}]}) on (${MyBuffTargetName[${j}]}).
/casting "${TargetBuffName[${i}]}" gem8
/call CheckCasting
/call CheckGlobalCooldown
/doevents
/doevents
}
/next i
/next j
/return
......@@ -282,12 +289,10 @@ Sub CheckMana
:KeepMeddingForMana
/if (!${Me.CombatState.Equal[COMBAT]} && (${Me.PctMana}<${MinManaMedPct})) {
/echo Mana now at (${Me.PctMana}%) ...
/if (${Me.AltAbilityReady[Cannibalization]}) {
/call Cast "Cannibalization" alt
}
/call CheckMyHealth
/call CheckTargetHealth
/call MaintainTargetBuffs
/if (${Me.AltAbilityReady[Cannibalization]}) /call Cast "Cannibalization" alt
/call CheckMyHealth
/call CheckTargetHealth
/call MaintainTargetBuffs
/delay 6s
/doevents
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
......@@ -303,6 +308,25 @@ Sub CheckMana
/return
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
| SUB: Follow Around
|---------------------------------------------------------------------------------
Sub FollowAround
/if (${Target.ID}!=${Spawn[=${MyBuffTargetName[1]}].ID} && ${MyBuffTargetName[1].NotEqual[null]}) {
/squelch /target id ${Spawn[=${MyBuffTargetName[1]}].ID} pc targetable
/delay 15
}
/if (${Target.Distance} > ${FollowDist}) {
/echo *** Moving closer to (${MyBuffTargetName[1]}). ***
/if (${Me.Sitting} && !${Me.Mount.ID}) /stand
/moveto id ${Spawn[=${MyBuffTargetName[1]}].ID} mdist ${MyMDist}
}
/return
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
| SUB: Check Casting
|---------------------------------------------------------------------------------
......@@ -334,7 +358,7 @@ Sub CheckGlobalCooldown
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
| Sub: Version COntrol
| Sub: Version Control
|---------------------------------------------------------------------------------
Sub VersionControl
......@@ -349,14 +373,30 @@ Sub VersionControl
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
| SUB: Event_SpellBlocked
| SUB: Check Plugin
|---------------------------------------------------------------------------------
Sub Event_SpellBlocked(string line, string MySPell, string BuffToon, string BlockingSPell)
/echo Your ${MySPell} spell did not take hold on ${BuffToon} (Blocked by ${BlockingSPell}.)
/echo You are wasting mana in a casting loop!
/beep
Sub CheckPlugin(string pluginname)
/if (!${Bool[${Plugin[${pluginname}]}]}) {
/squelch /plugin ${pluginname}
/echo ${pluginname} not detected! This macro requires it! Loading ...
}
/return
|---------------------------------------------------------------------------------
|---------------------------------------------------------------------------------
| SUB: Event_SpellBlocked
|---------------------------------------------------------------------------------
Sub Event_SpellBlocked(string line, string MySPell, string BuffToon, string BlockingSPell)
/if (${Defined[${BlockingSPell}]}) {
/echo Your ${MySPell} spell did not take hold on ${BuffToon} (Blocked by ${BlockingSPell}.)
} else {
/echo Your ${MySPell} spell did not take hold on ${BuffToon} (Perhaps he/she is max buffed?)
}
/beep
/echo You are wasting mana in a casting loop!
/return
|---------------------------------------------------------------------------------
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment