• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

Melee Defense Trainer (Shaman Version) ***BETA*** (1 Viewer)

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.

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:
I take a different approach rather than delay the full time your calculating here... Lets say you know you will always be casting 1 second after you start casting. we'll make it wait that one second then delay 10 seconds or until your no longer casting a spell. As soon as you finish casting the spell (any spell) it will then stop the delay.

Rich (BB code):
Change: 
/delay ${Math.Calc[${Spell["${spHEAL}"].CastTime}+1s]}
to
/delay 1s
/delay 10s (!${Me.Casting.ID})
Now for your haste event try this:
Rich (BB code):
#event offHASTE "Your Alacrity spell has worn off of #0#."

Sub Event_offHASTE(string target_name)
	/tar ${target_name}
	/echo Casting Haste on ${target_name}
	/cast ${spHASTE}
	/delay ${Math.Calc[${Spell["${spHASTE}"].CastTime}+1s]}
/return
 
Thanks z166204 for your post. I orginally had it set to a static time delay before I started to use the ingame spell delay for the spell and that worked great. But the reason why I went with the Math.Calc over a static is some healing spells have a shorter or longer delay than the one currently posted above... and I'm trying to make it so you only have to change the haste and healing spell values under my declares and the rest is auto based off just that info. Basically looking for portablity to other classes and helps teach me how to make and implement code for more hefty projects :) As for the event tagging I finally got that one right... I assumed it just read the line of code and stored it. Then I can pick and choose what info i want with the #1# tags (Not specifically from left to right). I had the number for the spell and toon name reversed :)

On a note... yes I know i'm trying to reinvent the wheel persay... but cutting and pasteing someone elses code and not fully understanding why that code works. Really doesn't teach me much. True... its probably the faster and less strainful way, but i'm getting tired of having to rely on others for thier mac or not finding one just specific to the task im looking to automate :)
 
One drawback with using the set delay you are obtaining with math equations is what happens if you fizzle a spell and pet/person is low on health? your going to end up waiting the full spell cast time of the spell you calculated. meanwhile if it detected you were no longer casting a spell it would then continue the macro and re-enter that cast phase again.
 
simply look at it this way, copy and paste is fine, but when you get it working go back through the macro and try to figure out why it works the way it does. thats the easiest way that I've learned with macros :)
 
Melee Defense Trainer (Shaman Version) ***BETA***

Users who are viewing this thread

Back
Top