Redemption Denied
Member
- Joined
- May 4, 2006
- RedCents
- 40¢
Ok... the first version of this was garbage and probably so is this one... but like I said before i'm slowly learning.
The problem i'm having... Im 100% sure is syntax and grouping in the Math.Calc part. The #event offHASTE "Your Alacrity spell has worn off of #1#"... im looking to have it detect the spell name and the person who it worn off... (originally had #2# inplace of Alacrity). Ran into issues it saying the spell was value 1 and the toon name was value 2. Not a big thing but i'll come back to it after I get the calc function to work.
Before I broke this horribly with the math update I just made. Worked before but needed the cast timer rounded up... kept getting double "you cant do that command" spam... so I figured the time is a little off. So I added +1s and it just broke after that. If possible can someone point or show me what im doing wrong.
The problem i'm having... Im 100% sure is syntax and grouping in the Math.Calc part. The #event offHASTE "Your Alacrity spell has worn off of #1#"... im looking to have it detect the spell name and the person who it worn off... (originally had #2# inplace of Alacrity). Ran into issues it saying the spell was value 1 and the toon name was value 2. Not a big thing but i'll come back to it after I get the calc function to work.
Before I broke this horribly with the math update I just made. Worked before but needed the cast timer rounded up... kept getting double "you cant do that command" spam... so I figured the time is a little off. So I added +1s and it just broke after that. If possible can someone point or show me what im doing wrong.
Rich (BB code):
|---------------------------------------------------
| MDTrainer.mac - Redemption Denied {RD}
|
| OBJECTIVE:
| ***CURRENT*** To {Spell} Haste the person that is powerleveling melee skills when the word haste is either in group chat or via a /tell and keep both the pet and PC healed when needed or called for in chat.
|
| APPLICATION:
| To be used in conjuction with some form of auto ablility plugin (such as MQ2Autoskills, MQ2Melee, etc...) or macro plus the standard attack in-game function on the skilling PC side.
|
| INSTRUCTIONS:
| Under the --[DECLARES]-- section replace the xxxx in the "xxxx" field to what value is appropriate to your needs and abilities.
|
| /declare spHEAL string outer "xxxxx" - Name of the Healing Spell you want to use.
| /declare spHASTE string outer "xxxxx" - Name of the Haste Spell you want to use.
|
| TO DO LIST:
| 1. Make the macro to use an .ini file and be editable on the fly by it. (I hate having to stop a macro to change something aka. spell name, pc, pet, etc...)
| 2. Need to work on a spell check routine and auto mem routine.
| 3. Need to design auto invite using an approved PC list. (Just incase friends want to join in the leveling :))
| 4. Clean up the code (To many repeats of the same line of code... not efficent) and allow scaleablility.
| 5. Design a GM function or Player Check routine incase of AFK use.
|-------------------------[PREPROCESSES}------------
#chat chat
#chat tell
#chat group
|-------------------------[EVENTS]------------------
#event offHASTE "Your Alacrity spell has worn off of #1#"
Sub Main
|-------------------------[DECLARES]----------------
/declare spHEAL string outer "Tnarg`s Mending"
/declare spHASTE string outer "Alacrity"
|-------------------------
Rich (BB code):
--------------------
:mainloop
/doevents
/call Checkstanding
/call Checkhealth_pet
/call Checkhealth_pc
/goto :mainloop
/return
|-------------------------[SUBS]--------------------
sub Checkstanding
/if (${Me.Standing} && !${Me.Combat} && !${Me.Casting.ID}) {
/sit
/g Medding
}
/return
sub Checkhealth_pet
/if (${Me.Pet.PctHPs}<=25) {
/tar ${Me.Pet}
/g Healing Pet --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
/return
sub Checkhealth_pc
/if (${Group.Member[0].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[0].Name.NotEqual[NULL]}) {
/if (${Group.Member[0].PctHPs}<=25) {
/tar ${Group.Member[0]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/if (${Group.Member[1].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[1].Name.NotEqual[NULL]}) {
/if (${Group.Member[1].PctHPs}<=25) {
/tar ${Group.Member[1]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/if (${Group.Member[2].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[2].Name.NotEqual[NULL]}) {
/if (${Group.Member[2].PctHPs}<=25) {
/tar ${Group.Member[2]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/if (${Group.Member[3].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[3].Name.NotEqual[NULL]}) {
/if (${Group.Member[3].PctHPs}<=25) {
/tar ${Group.Member[3]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/if (${Group.Member[4].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[4].Name.NotEqual[NULL]}) {
/if (${Group.Member[4].PctHPs}<=25) {
/tar ${Group.Member[4]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/if (${Group.Member[5].Name.Equal[NULL]}) {
/return
}
/if (${Group.Member[5].Name.NotEqual[NULL]}) {
/if (${Group.Member[5].PctHPs}<=25) {
/tar ${Group.Member[5]}
/g Healing --> %T <--
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
}
/return
Sub Event_offHASTE(Line,1)
/tar ${1}
/echo Casting Haste on ${1}
/cast ${spHASTE}
/delay ${Math.Calc[${Spell["${spHASTE}"].CastTime}+1s]}
/return
Sub Event_Chat(ChatChannel,ChatSender, ChatText)
/if (${ChatText.Equal[heal]}) {
/tar ${ChatSender}
/echo Casting Heal on ${ChatSender}
/cast ${spHEAL}
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
}
Sub Event_Chat(ChatChannel,ChatSender, ChatText)
/if (${ChatText.Equal[haste]}) {
/tar ${ChatSender}
/echo Casting haste on ${ChatSender}
/cast ${spHASTE}
/delay ${Math.Calc[${Spell["${spHASTE}"].CastTime}+1s]}
}
/return
Last edited: