Moderator: MacroQuest Developers


Code: Select all
/if (!${Defined[mokduration]}) /declare mokduration int outer 200Code: Select all
/if (!${Defined[mokretrylimit]}) /declare mokretrylimit int outer 5Code: Select all
|** mokaddon.inc (for AFCleric.mac)
NEEDS THESE FOUR LINES ADDED TO AFCleric.mac:
1)beginning of mac, before Sub Main put:
#include mokaddon.inc
2)beginning of mac, in the declares section put:
/declare mokaddon int outer 1
3)middle of Sub Healgroup, right below the line that is < /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet>
/if (${mokaddon}==1) /if (${Target.ID}==${tanknameid}) /call AutoMOK
4)end of Sub Healgroup, right above the /return line put:
/if (${mokaddon}==1) /call AutoMOK
Configuration/variable definitions:
mokspell is item that casts MOK. To use a spell instead, replace <"Chestplate of Stability" item> with <"Mark of Kings" spell> or whatever you're using
mokmaxrange is max distance a mob can be to cast MOK
mokduration (seconds x10) before cleric will re-MOK a given mob
mokmaxcount is max number of mobs, within mokaddrange radius. If more than specified number of mobs within specified radius, cleric will skip MOK and just heal
mokmaxhealth is max HP mob can have to trigger MOK, mokminhealth is minimum
mokminmana is min mana cleric must have before casting MOK
mokretrylimit is number of casts before giving up MOK
Once you've added those 4 lines to the main macro, then reviewed/edited variables in this inc as above, your GTG
FaNTuM's mokaddon.inc v1.0 **|
Sub AutoMOK
|EDIT THESE VARIABLES AS NEEDED
/if (!${Defined[mokspell]}) /declare mokspell string outer "Order" spell
/if (!${Defined[mokmaxrange]}) /declare mokmaxrange int outer 100
/if (!${Defined[mokduration]}) /declare mokduration int outer 200
/if (!${Defined[mokmaxcount]}) /declare mokmaxcount int outer 3
/if (!${Defined[mokaddrange]}) /declare mokaddrange int outer 50
/if (!${Defined[mokmaxhealth]}) /declare mokmaxhealth int outer 90
/if (!${Defined[mokminhealth]}) /declare mokminhealth int outer 5
/if (!${Defined[mokminmana]}) /declare mokminmana int outer 75
/if (!${Defined[mokretrylimit]}) /declare mokretrylimit int outer 5
|END EDITING
|Internal use defines
/if (!${Defined[mokretrycount]}) /declare mokretrycount int outer 0
/if (!${Defined[mokmobida]}) /declare mokmobida int outer 0
/if (!${Defined[mokmobidb]}) /declare mokmobidb int outer 0
/if (!${Defined[mokmobidc]}) /declare mokmobidc int outer 0
/if (!${Defined[mokmobidd]}) /declare mokmobidd int outer 0
/if (!${Defined[mokmobide]}) /declare mokmobide int outer 0
/if (!${Defined[moktemptargetid]}) /declare moktemptargetid int outer 0
/if (!${Defined[moktemptargetname]}) /declare moktemptargetname string outer NULL
/if (${Me.PctMana}<${mokminmana}) /return
|Nuke mod routine, delete for mokversion
/if ((!${Me.SpellReady[Order]})&&(!${Me.SpellReady[Condemnation]})) /return
/if (!${Me.SpellReady[Order]}) /if (${Me.SpellReady[Condemnation]}) /varset mokspell "Condemnation" spell
/if (!${Me.SpellReady[Condemnation]}) /if (${Me.SpellReady[Order]}) /varset mokspell "Order" spell
|End Nuke mod routine. See also mokspell variable setting if removing nukemod, and announce line below
/if (${NearestSpawn[${Math.Calc[${mokmaxcount}+1]}, NPC].Distance}<${mokaddrange}) /return
/if (${moktemptargetid}!=0) /if ((!${Spawn[${moktemptargetid}].ID})||(${String[${Spawn[${moktemptargetid}].Name}].NotEqual[${moktemptargetname}]})) {
/varset moktemptargetid 0
/varset mokretrycount 0
/varset moktemptargetname NULL
}
/if ((!${Spawn[${mokmobida}].ID})||(${Spawn[${mokmobida}].Type.Equal[corpse]})) /varset mokmobida 0
/if ((!${Spawn[${mokmobidb}].ID})||(${Spawn[${mokmobidb}].Type.Equal[corpse]})) /varset mokmobidb 0
/if ((!${Spawn[${mokmobidc}].ID})||(${Spawn[${mokmobidc}].Type.Equal[corpse]})) /varset mokmobidc 0
/if ((!${Spawn[${mokmobidd}].ID})||(${Spawn[${mokmobidd}].Type.Equal[corpse]})) /varset mokmobidd 0
/if ((!${Spawn[${mokmobide}].ID})||(${Spawn[${mokmobide}].Type.Equal[corpse]})) /varset mokmobide 0
/target id ${tanknameid}
/if (${Target.ID}==${tanknameid}) {
/assist
/delay 5 ${Target.Type.Equal[NPC]}
/if (${Target.ID}==${tanknameid}) {
/assist
/delay 5 ${Target.Type.Equal[NPC]}
}
/if (${Target.Type.NotEqual[npc]}) /return
/if ((${Target.ID}==${mokmobida})||(${Target.ID}==${mokmobidb})||(${Target.ID}==${mokmobidc})||(${Target.ID}==${mokmobidd})||(${Target.ID}==${mokmobidd})) /return
/if (!${Target.LineOfSight}) /return
/if (${Target.Distance}>${mokmaxrange}) /return
/if (${Target.Type.Equal[NPC]}) /delay 3
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=${mokmaxhealth})&&(${Target.PctHPs}>=${mokminhealth})) {
/if (${Target.ID}!=${moktemptargetid}) {
/varset moktemptargetid ${Target.ID}
/varset moktemptargetname ${Target.Name}
/varset mokretrycount 0
}
/if (${mokretrycount}>=${mokretrylimit}) /return
/call Cast ${mokspell} 2s
|Nuke mod line insertion, remove for original mokaddon
/if (${announce}==1) /g Nuke down on %T
|End Nuke mod line insertion
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
/varset moktemptargetid 0
/varset moktemptargetname NULL
/varset mokretrycount 0
/if (${mokmobida}==0) {
/varset mokmobida ${Target.ID}
/timed ${mokduration} /varset mokmobida 0
} else /if (${mokmobidb}==0) {
/varset mokmobidb ${Target.ID}
/timed ${mokduration} /varset mokmobidb 0
} else /if (${mokmobidc}==0) {
/varset mokmobidc ${Target.ID}
/timed ${mokduration} /varset mokmobidc 0
} else /if (${mokmobidd}==0) {
/varset mokmobidd ${Target.ID}
/timed ${mokduration} /varset mokmobidd 0
} else /if (${mokmobide}==0) {
/varset mokmobide ${Target.ID}
/timed ${mokduration} /varset mokmobide 0
}
/return
}
/if ((${Macro.Return.Equal["CAST_NOTREADY"]})||(${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_INTERRUPTED"]})||(${Macro.Return.Equal["CAST_CANCELLED"]})) /return
/varcalc mokretrycount ${mokretrycount}+1
}
}
/return
http://www.macroquest2.com/phpBB2/viewtopic.php?t=9272vanemon wrote:after oow patch i get now the message lom, oom as soon as i start the macro - same on the modified one with the *.ini file.
anyone else that has the same problems or knows how to fix it pplz?