• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [01Jul07]

Re: Crystane's working macro's reworked.

In the variable section is a line

Rich (BB code):
/declare announce int outer 1

set it to

Rich (BB code):
/declare announce int outer 0

and all the spam from announcements should stop.

else use search for /tell and put | in front of those lines like army mentioned.

Have fun.
 
Re: Crystane's working macro's reworked.

Being spammed with tells was annoying to me as well when I used this macro, but I did still want to know how the clerics mana was holding, etc. What I did was have the Cleric autojoin a private channel, along with the MT and other bots. Then I replace every /tell MT (or whatever) with a simple /1 (or whatever number your channel winds up to be). Works really well for me as I have done the same with my Shammy and his mac and can watch reports on all the toons no matter which screen I am looking at.
 
Re: Crystane's working macro's reworked.

Crys would it be possible to get a 1 cast section put into afnuke for solstists frozen sword at start of battle ? otherwise I love the mac
 
Re: Crystane's working macro's reworked.

Heya am about to release an repaired,
expanded and improved Shaman macro.

My Shaman is currently low lvl and permanently casting with that macro, therefor I see little use to implement
a Meleecombat part into the macro. I would like to get some feedback and backround knowledge on how good a
Shaman is in Meleecombat and if his Melee-Dps is worth to be used versus his Casting-Dps.

Crystane....
 
Re: Crystane's working macro's reworked.

I run a 65 sham botted and found the melee just wasn't worth it, Slow, Cripple, one poison dot, two disease dots and nuke up to a variable (useually 2) works fine for me.
 
Re: Crystane's working macro's reworked.

woot so i dont have to try and make shmbot work now?....5000+line macs scare me

my sham is also 65 and prob will be for a long time yet and casts non stop also q/slow/patch/cani...i guess i need a mana pool or canni V to take advantage of dots ... I'm sure uber shams melee worth a shit but not in my book atm

/e cant wait for crystanes new addition
 
Re: Crystane's working macro's reworked.

Yeah Shaman melee isn't usually worth much, you'd be better of buffing the groups melee characters with Spirit of Puma or Panther.

Zepher
 
Re: Crystane's working macro's reworked.

Thx for all the replies and PM's, I got lotsa info.
Looks usually Shm isnt worth to Melee unless he is End-Game geared and then he can solo or tank and usually offtanks in Highend Grps if the Healing is covered.

And yeah Nyghteyes, the typos in the Shmbot.mac I started from are horror, some lines I had to type right under the lines in question on my own to find the typos.
So far I found and counted 18 and I got it running, but
I couldnt troubleshoot the healing, buff and pet portions of the mac yet. Also I will implement an on/off switchable melee combat part at some time.

Atm I have to get a working version of MQ, before I can do any further after the patch. Also if I cant sell my Plat soon for a Gamecard I may have to delay my troubleshooting and testing due to loosing a keypart in the Grp and waiting on the Paycheck at the end of the month. So wish me GL with those 2 things.
 
Re: Crystane's working macro's reworked.

Sorry for the delay, am too sleepy atm.
Will get some hours sleep and then do the final troubleshoot and release my stuff.
 
Re: Crystane's working macro's reworked.

It is done updates for July are out to enjoy.
Also my Version of Shmbot is out on release too.

One Feature I would like to explain is my new Anchorsub.
If enabled it moves a toon back to a set Anchor.
(sets with starting the mac)
Also built into it, if enabled and your toon ends combat far off camp: he will look for a closeby Grpmember, which might be played legit or is in sight vs the Anchor. Then he will follow him till getting close to the Anchor. Be careful with that feature.

As always enjoy Crystane,

I like Red Cents and monthly votes and want to thank that way for all the votes I got so far in the past.
 
Re: Crystane's working macro's reworked.

Working on an upgrade to prevent the Tank or the Healer to rebuff the same time a mob is possibly incomming. So they are ready to tank and heal when a mob is incomming.

Crystane.

Also would like some feedback on my present features for Pally, Healer and Shm what you find working or annoying.

I know the spam from /stick, the way I use it gets annoying. But I didnt find a way yet to turn that off yet.
 
Re: Crystane's working macro's reworked.

Pls check out the updates for Pallytank, Healer and Shmbot.

I implemented checks that the Pally and the Healer will not just rebuff when a Mob is incomming. Therefor
the tank and healer are more reliable and ready now on a pull.

Pallytank should also pick up mobs now wich are inside the camp allrdy and aggroed on any Grpmember, in case the puller has no target for the tank to assist for presently.

Further Pallytank will use stunpush now to keep mobs off walls and within a certain Range to the Anchor.

Enjoy, Crystane.
 
Re: Crystane's working macro's reworked.

Hi Redguide members got a question. Experimented and got Healer mac working. But when I type /mac healer 40 complete heal or /mac healer 40% complete heal I get a can't find spell complete heal in book. But I got it memed. Works super though. Just like to adjust when he casts CH
 
Re: Crystane's working macro's reworked.

I think it's Complete Healing and not Complete Heal.

Yes, I know it's lame but something that stupid will mess shit up.

plink
 
Re: Crystane's working macro's reworked.

Crystane,question on casting Quiescence. I'm not sure if you have HoT spells on timer or such, sometimes he'll cast Q 3 times in a row. Also theres alot of times he will steadily cast cani even when I bring a mob in sometimes wont break the canni loop till mob is near dead. These are the only 2 things that holding me back on this uber mac of yours.
 
Re: Crystane's working macro's reworked.

I got around that by adding in a timed varset, works great, also check your heal points if it is too close to the big heal point i had issues as well
 
Re: Crystane's working macro's reworked.

is there anyway for the shmbot.mac to slow adds in camp, other than just the main assist's target.
 
Re: Crystane's working macro's reworked.

Hey Crys, its prolly me, but I tried to use this and all the slow options in mac and ini are TRUE but it wont assist slow for me =(. Also I changed avatar to Spirit of the leopard, it casts fine but it chain casts it hehe. Any ideas?
Thanks for the hard work.
Basically I just want it to use Leopard and slow and cripple the mobs. If it does all that other stuff kewl. =)
 
Re: Crystane's working macro's reworked.

Rip,
Just a possibility but make sure you are in group with the shaman, and designate the ma if you havent.
also, if one of the spells you chose is chain casting, make sure that spell is not in the nuke gem slot. That would cause it to cast from the % you set all the way till dead or min mana amount.

Without seeing your mac, this is all i could think off on short notice.
 
Re: Crystane's working macro's reworked.

Thanks mister , I designated the MA and was in group.
Ill post the mac If someone could look at it and let me know that be uber.
The main thing Im looking for is for it to auto assist and slow the mob, keep MA and pet buffed with Leopard and normal buffs also pet doesnt attack.
I have a cleric to auto heal so dont need it to heal.
This is just crystal's mac I unzipped just updated spells is about all.
It buffs and and heals, but wont slow mobs.

If it too much trouble dont bother. I was just thinking one of you code buffs could see it in a few secs, takes me for ever to figure out what does what. =)


Rich (BB code):
| Once the macro is running any echo command change will automatically be written
| to the Ini file and saved.
| Requires Spell_Routines.inc
| [07-01-06]	Crystane: Fixes in Logic and Features. Credits to the original Authors.
| 		Repaired: Way tooooooo many typo's like missing ( or } or my special Friend "." in Events.
|		Added: 	Most of all a keepup for Grpbuffs. Want to rebuff the Grp? Simple click off the Grpbuff on the Shm.
|		Added:  Meleecombat

|		New Anchorsub features Moveing to Anchor or if far out to follow a Grpmember to camp (if enabled)
|		Look for variables Anchor and GrpMbrAnchor

#Event OutDoor "#*#outdoors#*#" 
#Event OutDoor "You can not summon a mount here." 
#Event Zoning "You have entered#*#" 
#Event Enrageon "#*#become ENRAGED#*#" 
#Event Enrageoff "#*#no longer enraged#*#"
#Event ImDead "You have been slain by#*#"
#Event Paused "[MQ2] pause#*#"
#Event AstChange "[MQ2] astchange#*#"
#Event Rootchg "[MQ2] root#*#"
#Event Dotchg "[MQ2] dot#*#"
#Event Nukechg "[MQ2] nuke#*#"
#Event Malochg "[MQ2] malo#*#"
#Event Slowchg "[MQ2] slow#*#"
#Event Cripplechg "[MQ2] cripple#*#"
#Event Healchg "[MQ2] healchg#*#"
#Event Verbchg "[MQ2] verbchg#*#"
#Event Atkchg "[MQ2] atk#*#"
#Event SOWchg "[MQ2] sow#*#"
#Event Mountchg "[MQ2] mount#*#"
#Event Sitatchg "[MQ2] sitat#*#"
#Event Petchg "[MQ2] pet#*#"
#Event AutoSit "[MQ2] autosit#*#"
#Event DoBuffsChg "[MQ2] dobuffs#*#"
#Event PetChg "[MQ2] chgpet#*#"
#Event AddMaster "[MQ2] addmaster#*#"
#Event Shrink "[MQ2] shrink#*#"
#Event HoTchg "[MQ2] hotchg#*#"

#Event DoMeleeChg "[MQ2] domelee"
#Event Anchorchg "[MQ2] Anchor"

#Event RaidBuff "[MQ2] raidbuffchg#*#"
#Event WornOff	"Your #1# spell has worn off of #2#."
#Event MissSpellComp "You are missing #1#."
#Event Toofaraway		"Your target is too far away, get closer!"
#Event CantSeeTarget		"You cannot see your target."
#Event AttackingSelf		"Try attacking someone other than yourself#*#"
#Event EXP                      "You gain experience#*#"
#Event EXP                      "You gain party experience#*#"

#chat tell 
#include Spell_Routines.inc
#include shmbot.inc

Sub Main 

| The spell will be memmed in the listed order. 
| Gem1 = Canni 
| Gem2 = Slow 
| Gem3 = Malos 
| Gem4 = Spirit of the Leopard 
| Gem5 = Pet and buffs 
| Gem6 = Heal, Nuke 
| Gem7 = HoT 
| Gem8 = DoT 
| Gem9 = root, cripple, gate 

| ########### Make changes in spells as you need. 
| ########### Obs! This is mainly for a 65+ shaman with Cannibalization ability 
| ########### Set Cannibalization to False if you don't have the ability 
| ########### 
  
| ########### Your Spell List - update as needed  

   /declare SpellSlow		outer "Balance of the Nihil" 
   /declare SpellDoT1           outer "Breath of Wunshi" 
   /declare SpellDoT2           outer "Bane of Nife" 
   /declare SpellPet           outer "True Spirit" 
   /declare SpellDeBuff        outer "Malos" 
   /declare SpellCanni         outer "Cannibalize IV" 
   /declare SpellCripple	outer "Cripple"

   /declare SpellHoT           outer "Breath of Trushar" 
   /declare SpellHeal          outer "Daluda`s Mending" 
   /declare SpellRoot          outer "Petrifying Earth" 
   /declare SpellNuke          outer "Velium Strike" 

   /declare SpellATK           outer "Spirit of the Leopard" 
   /declare SpellHASTE         outer "Swift like the Wind" 
   /declare SpellFOCUS         outer "Focus of Soul" 
   /declare SpellCHA           outer "Charisma" 
   /declare SpellDEX           outer "Strength of the Diaku" 
   /declare SpellSTR           outer "Strength of the Diaku" 
   /declare SpellAGI           outer "Agility of the Wrulan" 
   /declare SpellSoS		   	 outer "Spirit of Sense"
   /declare SpellSTA           outer "Endurance of the Boar" 
   /declare SpellREGEN         outer "Blessing of Replenishment" 
   /declare SpellPE            outer "Primal Essence" 
   /declare SpellPR            outer "Talisman of the Tribunal" 

   /declare SpellSOW           outer "Spirit of Bih`Li" 
   /declare SpellLEV           outer "Levitation" 
   /declare SpellINV           outer "Invisibility" 
   /declare SpellSHRINK        outer "Tiny Terror" 
   /declare SpellGROW          outer "Grow" 
   /declare SpellSEE           outer "Acumen of Dar Khura" 

   /declare SpellGATE          outer "Gate" 
   /declare SpellFOOD          outer "Summon Food" 
   /declare SpellDRINK         outer "Summon Drink" 

| ########### Mount Type 

   /declare Mount              outer "small white drum" 


| ########### My Pet Buff Spell List 

   /declare SpellPetBuff[4] string outer 
   /varset SpellPetBuff[1] "Swift like the Wind" 
   /varset SpellPetBuff[2] "Strength of the Diaku" 
   /varset SpellPetBuff[3] "Ferine Avatar" 
   /varset SpellPetBuff[4] "Focus of Soul" 

| ########### Other Pet Buff Spell List 

   /declare SpellPetBuffo[4] string outer 
   /varset SpellPetBuffo[1] "Swift like the Wind" 
   /varset SpellPetBuffo[2] "Strength of the Diaku" 
   /varset SpellPetBuffo[3] "Primal Essence" 
   /varset SpellPetBuffo[4] "Focus of Soul" 

| ############ Group Buff List. 

   /declare SpellGrpBuff[6] string outer 
   /varset SpellGrpBuff[1] "Blessing of Replenishment"
   /varset SpellGrpBuff[2] "Focus of the Seventh"
   /varset SpellGrpBuff[3] "Talisman of Alacrity"
   /varset SpellGrpBuff[4] "Talisman of the Wrulan"
   /varset SpellGrpBuff[5] "Talisman of the Boar"
   /varset SpellGrpBuff[6] "Talisman of the Diaku"
    
| ############ Single Buff List.    

   /declare SpellSingleBuff[6] string outer 
   /varset SpellSingleBuff[1] "Blessing of Replenishment" 
   /varset SpellSingleBuff[2] "Focus of Soul" 
   /varset SpellSingleBuff[3] "Swift like the Wind" 
   /varset SpellSingleBuff[4] "Agility of the Wrulan" 
   /varset SpellSingleBuff[5] "Endurance of the Boar" 
   /varset SpellSingleBuff[6] "Strength of the Diaku"  

| ############ Combat Variables 

   /declare DoMelee	  outer FALSE

   /declare AssistAt      int   outer 100 
   /declare CombatAt      int   outer 98 

   /declare CastDoTat     int   outer 75
   /declare DotMana       int   outer 40 

   /declare Rootat        int   outer 40 
   /declare RootMana      int   outer 40 

   /declare NukeAt        int   outer 90 
   /declare NukeMana      int   outer 50 

   /declare SitAt         int   outer 80 
   /declare BuffMana      int   outer 30 
   /declare MinMana       int   outer 15 
    
   /declare following     int   outer 0 
   /declare follname      string outer NULL 

| ############ Heal Priority. 

   /declare CasterHeals   int   outer 30 
   /declare MeleeHeals    int   outer 50 
   /declare TankHeal      int   outer 25
   /declare HoTAt			  int   outer 35 
	/declare CanniHealat	int outer 78

| ############ To Do List 

   /declare DoMalo             outer TRUE    
   /declare DoSlow             outer TRUE 
   /declare DoCripple		outer TRUE
   /declare FastCripple		outer FALSE
   /declare FastSlow           outer FALSE 
   /declare DoRoot             outer FALSE 

   /declare SummonPet          outer FALSE
   /declare BuffPet            outer TRUE 
  
   /declare DoDoT              outer TRUE 
   /declare DoBuffs            outer TRUE 
   /declare DoSow              outer TRUE 
   /declare DoNuke             outer FALSE 
   /declare DoHeal             outer TRUE 
   /declare HoTTank				 outer TRUE
   /declare Cannibalization    outer TRUE 
   /declare Verbose            outer FALSE
   /declare RaidBuff				 outer FALSE

   | This is a delay for how long Avatar will hold. (1min) 
   /declare AvatarDelay       outer 690
   /declare HoTDelay				outer 350

| ############# Melee and Anchor
| Anchor defines if your toon moves back to an Anchor.
| GrpMbrAnchor defines if your toon is allowed to follow a Grpmember to camp in case of MovetoAnchor.

	/declare Anchor			outer TRUE
	/declare Leashdistance		int outer 28
	/declare GrpMbrAnchor		outer TRUE

	/declare RV_MyXLOC            int outer  0
	/declare RV_MyYLOC            int outer  0
	/declare AnchorX        int outer ${Me.X.Int}
	/declare AnchorY        int outer ${Me.Y.Int}
	/declare AnchorZ	int outer ${Me.Z.Int}
	/varcalc AnchorZ	${AnchorZ}+10

	/declare stickmode	outer FALSE
	/declare amlostmode	outer FALSE
	/declare GrpLosState 	outer FALSE
	/declare gmember	int outer    
	/declare LosGrpMbr	int outer
	/declare CombatStickMode outer FALSE
	/declare ToofarawayCount	int outer 0
	/declare CantSeeTargetCount	int outer 0
	/declare AttackingSelfCount	int outer 0

| ########### ! No Changes From Here Is Needed ! 

/squelch /alias /pause /echo pause
/squelch /alias /autoassist /echo astchange
/squelch /alias /root /echo root
/squelch /alias /dot /echo dot
/squelch /alias /nuke /echo nuke
/squelch /alias /malo /echo malo
/squelch /alias /slow /echo slow
/squelch /alias /cripple /echo cripple
/squelch /alias /heal /echo healchg
/squelch /alias /verbose /echo verbchg
/squelch /alias /attack /echo atk
/squelch /alias /sow /echo sow
/squelch /alias /mount /echo mount
/squelch /alias /sitat /echo sitat
/squelch /alias /autosit /echo autosit
/squelch /alias /dobuff /echo dobuffs
/squelch /alias /chgpet /echo chgpet
/squelch /alias /addmaster /echo addmaster
/squelch /alias /shrink /echo shrink
/squelch /alias /hot /echo hotchg
/squelch /alias /raidbuff /echo raidbuffchg
/squelch /alias /melee /echo domelee  

   /declare TargetArray[4] string outer 
   /declare MobMaloed      outer FALSE 
   /declare MobSlowed      outer FALSE 
   /declare MobCrippled    outer FALSE
   /declare PetOn          outer FALSE 
   /declare MobRooted      outer FALSE 
   /declare MobDoTed1       outer FALSE 
   /declare MobDoTed2       outer FALSE 
   /declare CombatOn       outer FALSE
   /declare Engaged        outer FALSE  
   /declare LowMana        outer FALSE
   /declare AutoSit	   outer TRUE 
   /declare distancetosit  int outer 40 

   /declare M_Assist       string outer 
   /declare OutDoors       outer TRUE    

   /declare Exper float outer 
   /declare AAExp float outer 
        
   /varset Exper ${Me.Exp} 
   /varset AAExp ${Me.AAExp} 

   /declare ATKBuffed0 timer outer 0 
   /declare ATKBuffed1 timer outer 0 
   /declare ATKBuffed2 timer outer 0 
   /declare ATKBuffed3 timer outer 0 
   /declare ATKBuffed4 timer outer 0 
   /declare ATKBuffed5 timer outer 0 
   /declare HoTOn		  timer outer 0
   
   /declare IsPaused outer FALSE
   /declare DoATK outer TRUE
   /declare DoHaste outer FALSE
   /declare DoSOW outer FALSE
   /declare UseMount outer TRUE
   

| ############### Target a player as Main Assist 
    
/if (!${Ini[ShamBot.ini,General,Made].Equal[TRUE]}) {
	/call CreateIni
} else {
	/call LoadIni
}
	

/if (!${Ini[ShamBot.ini,General,M_Assist].Length}) {
	/if (${Defined[Param0]}) {  
		/varset M_Assist ${Param0} 
		/echo Assist set to ${M_Assist} 
	} else { 
		/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) { 
			/echo You Do not have a main assist, make sure its a player character! 
			/endmacro 
		}
		/varset M_Assist ${Target.CleanName} 
		/echo Assist set to ${M_Assist}
		/ini "ShamBot.ini" "General" "M_Assist" ${M_Assist}
	}
} 
/assist off 
/delay 1
/cleanup
/call MemSpells 
    
/echo --------------****Crystane's ShamBot Enjoy****----------------
/echo Assisting ${M_Assist} @ ${CombatAt}% mob HP.
/echo Do Malo - ${DoMalo}
/echo Do Slow - ${DoSlow}
/echo Fast Slow - ${FastSlow}
/echo Doing Cripple - ${DoCripple}
/echo Fast Cripple - ${FastCripple}
/echo Cast Root - ${DoRoot}
/echo Cast Nuke - ${DoNuke}
/echo Cast DoT - ${DoDoT}
/echo Use Pet - ${SummonPet}
/echo Buff Pet - ${BuffPet}
/echo Buff Group - ${DoBuffs}
/echo Heal Group - ${DoHeal}
/echo Avatar Chain - ${DoATK}
/echo Use Mount - ${UseMount}
/echo Meleecombat - ${DoMelee}
/echo MoveToAnchor - ${Anchor}
/echo Verbose - ${Verbose}
/echo ----------------------------------------------------    

| ###############    
| ############### Main Loop Starts 
| ###############  

:Main_Loop 
   /doevents
   /if (${IsPaused}) /goto :Main_Loop
    
   /if (${NearestSpawn[NPC].Distance}>=100 && !${Cannibalization}) {
   	/if (${Me.State.Equal[Stand]} && ${Me.PctMana}<${SitAt}) /sit
   } else /stand
   
   |- Summon Mount if outdoors 
   /if (!${Me.Mount.ID} && ${OutDoors} && ${UseMount}) /call cast ${Mount} item 4s 
    
   |- Check for low mana state 
   /call Check_Mana 

   |- Check for new events in chat etc etc... 
   /doevents 
    
   |- Do we move? 
   :Hold_Main 
   /if (${Me.Moving}) /goto :Hold_Main 
    
   |- Holding when invis.
   :Hold_Inv
   /if (${Me.Invis}) /goto :Hold_Inv

   |- Holding when Casting manual
   :HoldForManCast
   /if (${Me.Casting.ID}) /goto :HoldForManCast
   
   |- Pet 
   /if (${SummonPet} && !${Me.Pet.ID}) /call PET 
    
   |- Buff Sow 
   /if (${DoSOW}) /call SOW 
    
   |- Check for mobs and do combat stuff 
   /if (${TargetArray[1].Equal[NULL]} || ${NearestSpawn[NPC].Distance}<=100 ) {
	/if ((${Target.Name.NotEqual[${M_Assist}]} && ${Target.ID}!=${TargetArray[4]}) || !${Target.ID}) /target ${M_Assist}
	/delay 3
	/call GetTarget 
   }
   /if (${CombatOn} && ${Target.ID}) /call Combat

   /if ((${Target.Type.Equal[PC]} || !${Target.ID}) && ${SpawnCount[npc radius 40 zradius 15]}<1) {
	/call CheckAnchor
	/if (${Me.Combat}) {
		/echo No Target, resetting. Combat off.
		/keypress Ctrl+c
		/notify ActionsWindow ACP_MeleeAttackButton Leftmouseup
	}
   }

   |- Group Heals 
   /if (${DoHeal}) /call Check_grpHPs 

   |- Check for Standing if less than sitat then sit 
   /if (${NearestSpawn[NPC].Distance}>=100 && !${Cannibalization}) {
   	/if (${Me.State.Equal[Stand]} && ${Me.PctMana}<${SitAt}) /sit
   } else /stand

   |- Canni 
   /if (${Cannibalization}) /call LOM 

   |- Group Buffs if more than BuffMana mana 
   /if (${Me.PctMana}>=${BuffMana} && ${DoBuffs}) /call GrpBuffs 

   |- Buff Avatar 
   /if (${Me.SpellReady[${SpellATK}]} && ${DoATK}) {
	/call Cast_Avatar 
	/doevents MissSpellComp
   }
    
   |- Group Heals 
   /if (${DoHeal}) /call Check_grpHPs  

   /goto :Main_Loop 
/return 

| ###############    
| ############### Main Loop Ends 
| ############### 

  
| ############### Mem Spells in Spell List 

Sub MemSpells 

   /echo Memming spells. Hang on. 
   /if ( !${Me.Gem[${SpellCanni}]} ) { 
      /memspell 1 ${SpellCanni} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellSlow}]} ) { 
      /memspell 2 ${SpellSlow} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellDeBuff}]} ) { 
      /memspell 3 ${SpellDeBuff} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellATK}]} ) { 
      /memspell 4 ${SpellATK} 
      /delay 20 
   } 
   /if ( !${Me.Gem[${SpellPet}]} ) { 
      /memspell 5 ${SpellPet} 
      /delay 20 
   } 
   /if ( !${Me.Gem[${SpellHeal}]} && ${DoHeal}) { 
      /memspell 6 ${SpellHeal} 
      /delay 25 
   }
   /if ( !${Me.Gem[${SpellNuke}]} && !${DoHeal} && ${DoNuke} ) { 
      /memspell 6 ${SpellNuke} 
      /delay 25 
   }
   /if ( !${Me.Gem[${SpellHoT}]} ) { 
      /memspell 7 ${SpellHoT} 
      /delay 20 
   } 
   /if ( !${Me.Gem[${SpellDoT1}]} ) { 
      /memspell 8 ${SpellDoT1} 
      /delay 30 
   } 
   /if ( !${Me.Gem[${SpellRoot}]} ) { 
      /memspell 9 ${SpellRoot} 
      /delay 30 
   } 

   |/if ( ${Window[SpellBookWnd].Open} ) /windowstate SpellBookWnd close 
   /echo Spells are memmed. 
/if (${Window[SpellBookWnd].Open}) /cleanup
/return 

| ################### Check target and do stuff like slow, dot, pet attack etc. 

Sub Combat 
/if (${Target.Type.NotEqual[NPC]}) /return
   /if (${CombatOn} && !${MobMaloed} && ${DoMalo} && ${Target.ID}==${TargetArray[4]}) /call DeBuff 
   /if (${CombatOn} && !${MobSlowed} && ${DoSlow} && ${Target.ID}==${TargetArray[4]}) /call Slow 
   /if (${CombatOn} && !${MobCrippled} && ${DoCripple} && ${Target.ID}==${TargetArray[4]}) /call Cripple
   /if (${CombatOn} && !${PetOn} && ${Target.ID}==${TargetArray[4]}) { 
      /pet attack 
      /varset PetOn TRUE 
      /varset Engaged TRUE  
   } 

   |- Check for new events in chat etc etc... 
   /doevents 

   /if (${CombatOn} && ${DoDoT} && !${MobDoTed1} && ${Me.PctMana}>=${RootMana} && ${Target.PctHPs}<=${CastDoTat}) { 
      /call cast ${SpellDoT1} gem8 1s
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset MobDoTed1 TRUE
   } 
   /if (${CombatOn} && ${DoDoT} && !${MobDoTed2} && ${Me.PctMana}>=${RootMana} && ${Target.PctHPs}<=${CastDoTat}) { 
      /call cast ${SpellDoT2} gem8 1s
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset MobDoTed2 TRUE
   } 
   /if (${CombatOn} && ${DoNuke} && ${Me.PctMana}>=${NukeMana} && ${Target.PctHPs}<=${NukeAt}) { 
      /call cast ${SpellNuke} gem6 6s
   } 
   /if (${CombatOn} && ${DoRoot} && ${Me.PctMana}>=${RootMana} && ${Target.PctHPs}<=${RootAt}) { 
      /call cast ${SpellRoot} gem9 6s
      /varset MobRooted TRUE 
   } 


/if (${DoMelee}) {
	/if (${Me.Mount.ID}) /dismount
	/if ((${Target.ID}) && (${Target.Type.Equal[NPC]})) {
		/doevents
		/if (${Target.Type.Equal[Corpse]}) /squelch /target clear
		/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Target.Distance}>${Target.MaxRangeTo}) {
			/if (!${CombatStickMode}) {
				/squelch /stick ${Target.MaxRangeTo}-2
				/delay 3
				/varset CombatStickMode TRUE
			}
			/if (!${Me.Combat}) {
				/echo Combatloop switching Combat on.
				/keypress Ctrl+c
				/notify ActionsWindow ACP_MeleeAttackButton Leftmouseup
			}
		}
	}   
	/if (${CombatStickMode} && ${Target.Distance}<=${Target.MaxRangeTo} && ${Target.PctHPs}>25) {
		/squelch /stick off
		/varset CombatStickMode FALSE
	}
	/if (!${Target.ID} || ${Target.Type.Equal[PC]} || ${Target.Type.Equal[Corpse]}) {
	        /squelch /stick off
		/varset CombatStickMode FALSE
		/if (${Me.Combat}) {
			/echo No Target, resetting. Combat off.
			/keypress Ctrl+c
			/notify ActionsWindow ACP_MeleeAttackButton Leftmouseup
		}
	/keypress forward
	/keypress back
	}
}
/return

Sub EndCombat 
	/squelch /stick off
	/varset CombatStickMode FALSE   

   /if (!${Target.Name.Equal[${TargetArray[3]}]} || !${Target.ID}) { 
      /varset MobRooted FALSE 
      /varset MobMaloed FALSE 
      /varset MobSlowed FALSE 
      /varset MobCrippled FALSE
      /varset PetOn FALSE 
      /varset MobDoTed1 FALSE 
	/varset MobDoTed2 FALSE 
      /varset CombatOn FALSE 
      /varset Engaged FALSE    
      /varset TargetArray[1] NULL 
      /varset TargetArray[2] NULL 
      /varset TargetArray[3] NULL 
      /varset TargetArray[4] NULL 

  } 
/return 
  
Sub CheckAnchor   
/if (${Math.Distance[${AnchorY},${AnchorX}]}>${Leashdistance} && ${Anchor} && ${DoMelee}) {
	/squelch /stick off
	/call MoveToAnchor   
}
/return

Sub MoveToAnchor
	/squelch /target clear
	/squelch /stick off
	/varset CombatStickMode FALSE
	/if (${SpawnCount[npc radius 40 zradius 15]}>0) {
		/echo Skipping movetoAnchor and engageing next mob
		/return
	}
	/declare iCount int local
	/varset iCount 0
	/varset stickmode FALSE
	/varset GrpLosState FALSE	
	/echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}.
	/varset RV_MyXLOC ${Int[${Me.X}]}
	/varset RV_MyYLOC ${Int[${Me.Y}]}
	/declare RV_DistanceTimer timer 25
  :AnchorMoveLoop
      /if (${iCount}>2) {
          /face nolook loc ${AnchorY},${AnchorX}
          /delay 1s 
	  /face fast nolook loc ${AnchorY},${AnchorX}
      	  /keypress back
	/return
	}

      /doevents
      /face nolook loc ${AnchorY},${AnchorX}
      /delay 1s
      /face fast nolook loc ${AnchorY},${AnchorX}
        /if (${Me.Running}) {
		/keypress Ctrl+m
		/notify ActionsWindow AMP_WalkButton Leftmouseup
	}
	/if (${Math.Distance[${AnchorY},${AnchorX}]}>${Leashdistance} && ${LineOfSight[${AnchorY},${AnchorX},${AnchorZ}:${Me.Y.Int},${Me.X.Int},${Math.Calc[${Me.Z.Int}+10]}]}) {
	/if (!${Me.Moving}) /keypress forward hold
	/face fast nolook loc ${AnchorY},${AnchorX}
	/echo Dist > ${Leashdistance} and LoS to Anchor.
	/goto :AnchorMoveCont
	}
	/if (${GrpMbrAnchor} && ${Math.Distance[${AnchorY},${AnchorX}]}>75 && !${LineOfSight[${AnchorY},${AnchorX},${AnchorZ}:${Me.Y.Int},${Me.X.Int},${Math.Calc[${Me.Z.Int}+10]}]}) {
		/call CheckGrpLoSight
		/if (${GrpLosState}) {
			/echo Dist(${Math.Distance[${AnchorY},${AnchorX}]}) > 75 and only LoS to a Grpmember.
			/target ID ${LosGrpMbr}
			/delay 3
			/target ID ${LosGrpMbr}
			/delay 3
			/delay 3s ${Target.ID}==${LosGrpMbr}
			/if (${PullerID}==${Target.ID}) /tell ${Puller} I am lost, I will follow you to camp.
			/face nolook
			/delay 1s
			/if (!${stickmode}) {
				/stick
				/varset stickmode TRUE
			}
			:ContFollow
			/if (${Math.Distance[${AnchorY},${AnchorX}]}<=50 || !${Target.ID} || ${SpawnCount[npc radius 50 zradius 20]}>0) {
				/if (${PullerID}==${Target.ID}) /tell ${Puller} Stopping to chase ya, thx.
				/squelch /target clear
				/keypress back
				/face nolook loc ${AnchorY},${AnchorX}
				/varset GrpLosState FALSE
				/if (${Math.Distance[${AnchorY},${AnchorX}]}>${Leashdistance} && ${Math.Distance[${AnchorY},${AnchorX}]}<55 && ${SpawnCount[npc radius 50 zradius 20]}<1) {
					/face fast nolook loc ${AnchorY},${AnchorX}
					/keypress forward hold
					/delay 2s (${Math.Distance[${AnchorY},${AnchorX}]}<${Leashdistance} || ${Math.Distance[${AnchorY},${AnchorX}]}>50)
					/keypress forward
					/keypress back
				}
				/goto :AnchorMoveCont
			}
			/goto :ContFollow
		} else {
			/if (${SpawnCount[npc radius 50 zradius 20]}>0) /goto :AnchorMoveCont
			/echo Dist > ${Leashdistance} and Nothing in Sight, trying to run and avoid obstacles.
			/face fast nolook loc ${AnchorY},${AnchorX}
			/if (!${Me.Moving}) /keypress forward hold
			/goto :AnchorMoveCont
		}
	}
	/if (${Math.Distance[${AnchorY},${AnchorX}]}<=${Leashdistance}) {
		/echo I am here, no sweat.
		/call AnchorVarReset
		/keypress back
		/return
	}
     :AnchorMoveCont
        /if (${GameState.Equal[CHARSELECT]}) /end
	/delay 1s ${Math.Distance[${AnchorY},${AnchorX}]}<${Leashdistance}
	/if (${Me.Moving}) /keypress back
      /if (!${RV_DistanceTimer} && !${stickmode} && ${Math.Distance[${AnchorY},${AnchorX}]}>${Leashdistance}) {
        /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) {
		/call HitObstacle
        	/varset RV_MyXLOC ${Int[${Me.X}]}
        	/varset RV_MyYLOC ${Int[${Me.Y}]}
        	/varset RV_DistanceTimer 15
        } 
       }   
	/call AnchorVarReset
      /varcalc iCount ${iCount}+1
      /goto :AnchorMoveLoop
  /return

Sub AnchorVarReset
	/if (!${Me.Running}) {
		/keypress Ctrl+m
		/notify ActionsWindow AMP_RunButton Leftmouseup
	}
	/if (${stickmode}) {
		/varset stickmode FALSE
		/stick loose
	}
	/if (${GrpLosState}) {
		/varset GrpLosState FALSE
	}
/return

Sub CheckGrpLoSight
/for gmember 1 to ${Group}
/if (${LineOfSight[${Group.Member[${gmember}].Y},${Group.Member[${gmember}].X}:${Me.Y},${Me.X}]} && !${GrpLosState}) {
	/varset GrpLosState TRUE
	/varset LosGrpMbr ${Group.Member[${gmember}].ID}
}
/next gmember
/return


  sub HitObstacle 
     /keypress forward 
     /keypress back hold 
     /delay 5 
     /keypress back 
     /if (${Math.Rand[2]}) { 
        /keypress strafe_right hold 
        /delay 3 
        /keypress strafe_right 
     } else { 
        /keypress strafe_left hold 
        /delay 3 
        /keypress strafe_left 
     } 
     /keypress forward hold 
  /return

| ############### Debuff 

Sub DeBuff 
:DeBuff_Loop 
   /if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) { 
      /if (${Me.CurrentMana}<${Spell[${SpellDeBuff}].Mana}) { 
|         /echo *** Shid ! I don't have mana to Malo %T 
      } else { 
         /call cast ${SpellDeBuff} gem3 6s 
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :DeBuff_Loop 
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset MobMaloed TRUE 
      } 
   } 
/return 
  
| ############### Slowing 

Sub Slow 
   /if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) { 
      /if (${Me.CurrentMana}<${Spell[${SpellSlow}].Mana}) { 
|         /echo Shid ! I don't have mana to Malo %T 
      } else { 
      :Slow_Loop 
         /call cast ${SpellSlow} gem2 6s 
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Slow_Loop 
         /if (${Macro.Return.Equal["CAST_IMMUNE"]}) { 
            /if (${Verbose}) /gsay *** %T is IMMUNE to my slow ! 
            /varset MobSlowed TRUE 
         } 
         /if (${Macro.Return.Equal["CAST_RESISTED"]}) { 
            /if (!${FastSlow}) { 
               /if (${Verbose}) /gsay *** %T RESISTED slow ! Trying again asap 
                /if (${DoHeal}) /call Check_grpHPs 
                /goto :Slow_Loop 
            } 
	    /varset MobSlowed TRUE 
         } 
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
            /if (${Verbose}) /gsay *** %T is SLOWED 
            /varset MobSlowed TRUE 
          } 

      } 
   } 
/return 

Sub Cripple 
   /if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) { 
      /if (${Me.CurrentMana}<${Spell[${SpellCripple}].Mana}) { 
         /echo Shid ! I don't have mana to Cripple %T 
      } else { 
      :Slow_Loop 
         /call cast ${SpellCripple} gem7 6s 
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Slow_Loop 
         /if (${Macro.Return.Equal["CAST_IMMUNE"]}) { 
            /if (${Verbose}) /gsay *** %T is IMMUNE to my Cripple ! 
          
            /varset MobCrippled TRUE 
         } 
         /if (${Macro.Return.Equal["CAST_RESISTED"]}) { 
            /if (!${FastCripple}) { 
               /if (${Verbose}) /gsay *** %T RESISTED slow ! Trying again asap 
                /if (${DoHeal}) /call Check_grpHPs 
                /goto :Slow_Loop 
             } 
            /varset MobCrippled TRUE 
          } 
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
            /if (${Verbose}) /gsay *** %T is Crippled 
            /varset MobCrippled TRUE 
          } 

      } 
   } 
/return 

Sub GetTarget 
/if ((${Spawn[${M_Assist}].NearestSpawn[npc radius 40 zradius 15].ID}) && (${Me.TargetOfTarget.ID}) && ((${Me.TargetOfTarget.Type.Equal[PC]} && ${Target.Type.Equal[NPC]}) || (${Me.TargetOfTarget.Type.Equal[NPC]} && ${Target.Type.Equal[PC]}))) {
   /assist ${M_Assist} 
   /delay 3 
   /assist ${M_Assist} 
   /delay 3 
	/if (${Target.PctHPs}<=${CombatAt}) {
		/varset CombatOn TRUE 
	}
}

/if (${Target.Type.Equal[NPC]}) /if (${Target.Distance}<=${AssistAt} && ${Target.ID}!=${TargetArray[4]}) { 
      /varset TargetArray[1] ${Target.CleanName} 
      /varset TargetArray[2] ${Target.Level} 
      /varset TargetArray[3] ${Target.Name} 
      /varset TargetArray[4] ${Target.ID} 
        
	/varset PetOn FALSE 
	/varset MobRooted FALSE 
	/varset MobMaloed FALSE 
	/varset MobSlowed FALSE 
	/varset MobCrippled FALSE
	/varset MobDoTed1 FALSE 
	/varset MobDoTed2 FALSE 

} 
/return 

| ################### Buff the group with buffs from the SpellGrpBuff array 


Sub GrpBuffs 
   /declare i int local 1 
   /for i 1 to ${SpellGrpBuff.Size} 
      /doevents 
      /if (${Spell[${SpellGrpBuff[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff
      /if (${Me.Book[${SpellGrpBuff[${i}]}]}==0) /goto :skipbuff
      /if (!${Me.Buff[${SpellGrpBuff[${i}]}].ID} && ${Spell[${SpellGrpBuff[${i}]}].Stacks}) { 
	/target pc ${M_Assist} 
	/delay 3 
	/target pc ${M_Assist} 
	/delay 3 
	/echo *** Hang on ! Rebuffing ${SpellGrpBuff[${i}]} 
         /call cast ${SpellGrpBuff[${i}]} gem5 5s 
      } 
   :skipbuff
   /next i 
/return 



|################### Check if any group member needs heal 
Sub Check_grpHPs 
   /declare i int local 1 
    
   /for i 1 to ${Group} 

   /if (${Group.Member[${i}].Class.Name.Equal[Cleric]} || ${Group.Member[${i}].Class.Name.Equal[Druid]} || ${Group.Member[${i}].Class.Name.Equal[Wizard]} || ${Group.Member[${i}].Class.Name.Equal[Magician]} || ${Group.Member[${i}].Class.Name.Equal[Necromancer]} || ${Group.Member[${i}].Class.Name.Equal[Enchanter]}) /if (${Group.Member[${i}].PctHPs}<=${CasterHeals}) { 
      /target pc ${Group.Member[${i}]} 
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=100) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 
    
   /if (${Group.Member[${i}].Class.Name.Equal[Warrior]} || ${Group.Member[${i}].Class.Name.Equal[Monk]} || ${Group.Member[${i}].Class.Name.Equal[Rouge]} || ${Group.Member[${i}].Class.Name.Equal[Ranger]} || ${Group.Member[${i}].Class.Name.Equal[Beast]} || ${Group.Member[${i}].Class.Name.Equal[Shadow Knight]} || ${Group.Member[${i}].Class.Name.Equal[Paladin]}) /if (${Group.Member[${i}].PctHPs}<=${MeleeHeals} && ${Group.Member[${i}].Name.NotEqual[${M_Assist}]}) { 
      /target pc ${Group.Member[${i}]}
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=100) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 

   /if (${Group.Member[${i}].Name.Equal[${M_Assist}]} && ${Group.Member[${i}].PctHPs}<=${TankHeal}) { 
      /target pc ${M_Assist} 
      /if (${Me.CurrentMana}<${Spell[${SpellHeal}].Mana}) { 
         /echo *** Shid ! I don't have mana to heal ${Group.Member[${i}]} 
      } else /if (${Target.Distance}<=100) { 
         /if (${Verbose}) /gsay *** ${SpellHeal} on %T 
         /call cast ${SpellHeal} gem6 4s 
      } 
   }
   
   /if (${Group.Member[${i}].Name.Equal[${M_Assist}]} && ${Group.Member[${i}].PctHPs}<=${HoTAt} && ${HoTOn}<=6) {
   	/target pc ${Group.Member[${i}]}
   	/if (${Me.CurrentMana}>${Spell[${SpellHoT}].Mana}) {
   		/call cast ${SpellHoT} gem4 4s
   		/if (${Macro.Return.Equal["CAST_OUTOFRANGE"]}) /varset HoTOn 60
   		/if (${Macro.Return.Equal["CAST_SUCESS"]}) /varset HoTOn ${HoTDelay}
   		/return
   	}
   }

   /next i 
/return 

| ################### Check Mana level and report it 

Sub Check_Mana 
   /if (${Math.Calc[${Me.MaxMana}*${MinMana}/100]} >= ${Me.CurrentMana} && !${LowMana}) { 
      /varset LowMana TRUE 
      /if (${Verbose}) /gsay I am LOM... 
   } else /if (${Math.Calc[${Me.MaxMana}*${BuffMana}/100]} <= ${Me.CurrentMana} && ${LowMana}) { 
      /varset LowMana FALSE  
   } 
/return 

| ################## Canni 5 

Sub Cannibalization 
   /call CheckMyHPs 
   /if (${Me.CurrentHPs} < 2424) { 
      /call CheckMyHPs 
   } else {
   	/if (${NearestSpawn[NPC].Distance}>=75) {
   			/if (${Me.Buff[${SpellHoT}].ID} || (${Me.CurrentHPs}>3000 && ${Me.SpellReady[${SpellHeal}]}) ) { 
   		   	/if (${Verbose}) /gsay *** Doing Cannibalization ! 
      			/aa act Cannibalization 
      			/delay 3s
   			}
      }
		/return
   }
   		 
 /return 

| ################## This will NOT check self HPs, Only check HoT or recast HoT 

Sub CheckMyHPs 
	/if (!${Me.Gem[${SpellHoT}]} && !${Me.Gem[${SpellHeal}]}) {
		/if (!${Me.Book[${SpellHoT}]} && !${Me.Book[${SpellHeal}]}) /echo Warning, no Healspell avail.
		/if (!${Me.Book[${SpellHoT}]}) {
			/memspell 7 ${SpellHeal} 
      			/delay 25
		} else {
			/memspell 7 ${SpellHoT} 
      			/delay 25
		}
	}
	/if (!${Me.Gem[${SpellHoT}]} && ${Me.PctHPs}<${CanniHealat}) {
		/target ${Me.CleanName}
		/delay 3
		/target myself
		/delay 3
		/delay 3s ${Target.CleanName.Equal[${Me.CleanName}]}
		:Healagain
		/if (${Target.CleanName.Equal[${Me.CleanName}]}) /call cast ${SpellHeal} gem7 3s
		/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Healagain
		/return
	}
   /if (${Me.CurrentMana}<${Spell[${SpellHoT}].Mana}) { 
      /echo *** Shit, I don't have mana to cast ${SpellHoT} 
   } else { 
	/target ${Me.CleanName}
	/delay 3
	/target myself
	/delay 3
	/delay 3s ${Target.CleanName.Equal[${Me.CleanName}]}
	/if (!${Me.Buff[${SpellHoT}].ID} && ${Target.CleanName.Equal[${Me.CleanName}]}) /call cast ${SpellHoT} gem7 3s 
   } 
/return 

| ################## This will Check to see if I am Low on Mana 

Sub LOM 
   /if (${Me.CurrentHPs} < ${Math.Calc[${Me.MaxHPs}/2]}) /call CheckMyHPs 
	/if (${Me.PctHPs}<${CanniHealat}) /call CheckMyHPs
   /if (${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-5]} && ${Me.SpellReady[${SpellCanni}]}) /call cast ${SpellCanni} gem1 6s 
   /if (${Me.AltAbility[Cannibalization]}>0 && ${Me.AltAbilityReady[Cannibalization]} && ${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-1200]} && ${Me.MaxHPs} > 2424) /call Cannibalization 

/return    

| ################## This will Check to see if I have SOW 

Sub SOW 
   /if (!${Me.Buff[Spirit of Eagle].ID} && !${Me.Buff[Flight of Eagles].ID} && !${Me.Buff[Spirit of Bih`Li].ID} && ${DoSow} && ${OutDoors}) { 
      /target pc ${M_Assist} 
      /call cast "Spirit of Bih`Li" gem5 17s 
   } 
/return 

| ################## Summon pet and buff with spells from SpellPetBuff array 

Sub Pet 
   /if (!${Me.Pet.ID} && ${SummonPet} && ${Spell[${SpellPet}].Mana}<=${Me.CurrentMana}) { 
      /call cast ${SpellPet} gem5 25s 
      /declare i int local 
   	/if (${BuffPet}) {
      	/for i 1 to ${SpellPetBuff.Size} 
   	  		/if (!${Me.PetBuff[${SpellPetBuff[${i}]}]} && ${Spell[${SpellPetBuff[${i}]}].Mana}<=${Me.CurrentMana}) { 
    	  		/pet target 
      		/delay 2 
      		/call cast ${SpellPetBuff[${i}]} gem5 9s
      	/next i 
   		}
   	}
   }
/pet taunt
/return 


| ################### Casting Avatar on all melee classes in group 

Sub Cast_Avatar 
   /declare i int local 
   /for i 1 to ${Group} 
   /if (${Group.Member[${i}].ID}) { 
      /if (${ATKBuffed${i}}==0) /if (${Group.Member[${i}].Class.Name.Equal[Beastlord]} || ${Group.Member[${i}].Class.Name.Equal[Shadow Knight]} || ${Group.Member[${i}].Class.Name.Equal[Bard]} || ${Group.Member[${i}].Class.Name.Equal[Ranger]} || ${Group.Member[${i}].Class.Name.Equal[Rogue]} || ${Group.Member[${i}].Class.Name.Equal[Paladin]} || ${Group.Member[${i}].Class.Name.Equal[Monk]} || ${Group.Member[${i}].Class.Name.Equal[Warrior]}) { 
         /target pc ${Group.Member[${i}]} 
         /if (${Me.CurrentMana}>${Spell[${SpellATK}].Mana}) { 
            /call cast ${SpellATK} gem4 0s 
            /if (${Macro.Return.Equal["CAST_OUTOFRANGE"]}) /varset ATKBuffed${i} 200 
            /if (${Macro.Return.Equal["CAST_SUCCESS"]}) /varset ATKBuffed${i} ${AvatarDelay} 
            /return 
         } 
      } 
   } 
   /next i 
   /return 

| ##################  ENRAGE ON 

Sub Event_Enrageon 
/echo Mob is ENRAG....
/if (${Me.Combat}) {
	/echo No Target, resetting. Combat off.
	/keypress Ctrl+c
	/notify ActionsWindow ACP_MeleeAttackButton Leftmouseup
}
/if (${PetOn}) { 
/pet back off 
} 
/return 

| ##################  ENRAGE OFF 

Sub Event_Enrageoff 
/if (${PetOn}) { 
/echo Mob is no longer Enraged! 
/pet attack  
} 
/return 

| ################## Outdoors 

Sub Event_OutDoor 
   /echo This is an indoor zone. Sorry. 
   /varset OutDoors FALSE 
/return 

| ##################  Zoning 

Sub Event_Zoning 
   /echo I zoned, time to shrink 
   /if (${Verbose}) /gsay Shrinks incomming Now 
   /delay 10 
   /call cast ${SpellSHRINK} gem5 5s 
   /call cast ${SpellSHRINK} gem5 5s 

   /varset TargetArray[1] ${Target.CleanName} 
   /varset TargetArray[2] ${Target.Level} 
   /varset TargetArray[3] ${Target.Name} 
   /varset TargetArray[4] ${Target.ID} 
   /varset CombatOn TRUE 
        
   /varset MobRooted FALSE 
   /varset MobMaloed FALSE 
   /varset MobSlowed FALSE 
   /varset MobCrippled FALSE
   /varset PetOn FALSE 
   /varset MobDoTed1 FALSE 
   /varset MobDoTed2 FALSE 

/return 

| ################## I Died 

Sub Event_ImDead 
   /echo Bummer ! 
   :Zone_Loop 
   /if ( !${Me.Gem[${SpellCanni}]} ) { 
	/memspell 1 ${SpellCanni} 
	/delay 25 
	/goto :Zone_Loop
   }
   /if (${Window[SpellBookWnd].Open}) /cleanup
   /delay 5s 
   /consent group 
   /delay 5 
   /call Wait4Rez 
   /delay 20 
   /if (${Me.State.Equal[Stand]}) /sit 
   /call MemSpells 

| We do some short meditate before we start again. 

   :Meditate 
      /delay 1s 
      /if (${Me.CurrentMana} < 300) /goto :Meditate 
   /return 

| ################## This part is taken from wait4res. 

Sub Wait4Rez 
   :waitforrez 
      /if (!${Window[ConfirmationDialogBox].Open}) { 
         /delay 5s ${Window[ConfirmationDialogBox].Open} 
         /goto :waitforrez 
      } 
      /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button  leftmouseup 
      :zonein 
         /delay 5 
         /squelch /target mycorpse 
         /delay 5 
         /if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein 
         /if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
            /delay 3s 
            /call Loot_Corpse 
         } else /goto :zonein 
   /return 

| #################  Looting Corpse 

Sub Loot_Corpse 
   /declare LootTotal int local 0 
   /declare LootSlot int local 
   /squelch /target mycorpse 
   /if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) { 
      /echo ** Can't target my corpse. 
      /return 
   }    
|   /corpse 
   /delay 1s 
   /loot 
   /delay 1s 
   /if (${Me.State.NotEqual[BIND]}) { 
      /echo ** Massive lag right now... Aborting looting. 
      /return 
   } 
   :LootLag 
      /if (${LootTotal}!=${Corpse.Items}) { 
         /varset LootTotal ${Corpse.Items} 
         /delay 5 
         /goto :LootLag 
      } 
   /for LootSlot 1 to ${LootTotal} 
   :LootItem 
      /itemnotify loot${LootSlot} rightmouseup 
      /delay 3 
      /if (${Corpse.Item[${LootSlot}].ID}) { 
         /delay 2 
         /goto :LootItem 
      } 
   /next LootSlot 
   /delay 5 
   /echo ** Done looting my corpse. 
   /notify LootWnd DoneButton leftmouseup 
   /return 

| ################# 
| ################# Tells n Hells 
| ################# 

Sub Event_Chat(string ChatType,string ChatSender,string ChatText) 

   /declare i 	int 	local
   /if (!${ChatType.Equal[GROUP]} && !${ChatType.Equal[TELL]}) /return 
   /if (!${Group.Member[${Sender}]}) /return  
   |- Authenticate if valid controller
	/declare authorized bool local FALSE
	/for i 1 to 20
		/if (${Ini[ShamBot.ini,Masters,Controller${i}].Equal[${Sender}]}) /varset authorized TRUE
	/next i
	/if (${authorized} && ${ChatText.Left[1].Equal[/]}) {
      /echo ** User ${Sender} Authenticated!
      /echo Action --> "${ChatText}"
      /if (${Me.AFK}) /delay 2s
      	/tell ${Sender} Command received, performing: ${ChatText}
    		/docommand ${ChatText}
  	}

  	/if (${RaidBuff}) {
  		/declare focus					string local
		/declare stamina				string local
		/declare sense					string local
		/declare all3					string local
		| Lets Check a few things before we buff
		/if (!${Spawn[${Sender}].ID}) {
			/echo ${Sender} is out of zone Ignoring!
			/return
		}
	
		/if (${Spawn[${Sender}].GM}) {
			/echo ${Sender} is a GM! Fuck Him!
			/return
		}
	
		/if (${Spawn[${Sender}].Guild.NotEqual[${Me.Guild}]} {
			/echo Unauthorized Reqest...Ignoring!
			/return
		}
	
		/if (!${Spawn[${Sender}].LineOfSight}) {
			/echo ${Sender} is not in Line of sight...Ignoring
			/return
		}
		| Ok they're cool...let's find out what they want! And add it to a Queue
		/varset RequestedBuff ${ChatText}
		| Pick out what they want and how many things they want
		| Do they want focus?
		/if (${RequestedBuff.Find[focus]} || ${RequestedBuff.Find[wunsh]} || ${RequestedBuff.Find[wunshi]}) {
			/varset focus TRUE
		} else /varset focus FALSE
		| Do they want stamina?
		/if (${RequestedBuff.Find[sta]} || ${RequestedBuff.Find[forti]} || ${RequestedBuff.Find[fort]}) {
			/varset stamina TRUE
		} else /varset stamina FALSE
		| Do they want sense?
		/if (${RequestedBuff.Find[sense]} || ${RequestedBuff.Find[sta]}) {
		/varset sense TRUE
		} else /varset sense FALSE
		| Are they being gay and just asking for all shaman buffs?
		/if (${RequestedBuff.Find["shaman buffs"]} || ${RequestedBuffs.Find[buffs]}) {
			/varset all3 TRUE
		}
		| Lets Give it to them
		/if (${all3}) {
			/varset focus 		TRUE
			/varset stamina 	TRUE
			/varset sense 		TRUE
		}
		/if (${focus}) {
			/varset focus FALSE
			/call cast ${SpellFOCUS} gem5 6s
		}
		/if (${stamina}) {
			/varset stamina FALSE
			/call cast ${SpellSTA} gem5 6s
		}
		/if (${sense}) {
			/varset sense FALSE
			/call cast ${SpellSoS} gem5 6s
		}
	/return
}        
| ################# Heal Requests 
  
     /if (${ChatText.Equal[heal]} || ${ChatText.Equal[heal me]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellHeal} is incomming !! 
             /call cast ${SpellHeal} 
             } 
      /return 
      } 

      /if (${ChatText.Equal[hot]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellHoT} is incomming !! 
             /call cast ${SpellHoT} 
             } 
      /return 
      } 

| ################# Mob Requests      

      /if (${ChatText.Equal[slow]} || ${ChatText.Equal[add]} && ${authorized}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellDebuff} gem3 6s 
            /call cast ${SpellSlow} gem2 6s 
            /tell ${ChatSender} %T is ${SpellDeBuff} and slowed with ${SpellSlow} 
            } 
      /return 
      } 

      /if (${ChatText.Equal[root]} && ${authorized}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellRoot} gem9 5s 
            /tell ${ChatSender} %T is Rooted with ${SpellRoot} 
            } 
      /return 
      } 


      /if (${ChatText.Equal[nuke]} && ${authorized}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellNuke} gem9  
            } 
      /return 
      } 
        
      /if (${ChatText.Equal[dot]} && ${authorized}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellDoT1} gem8 5s 
            } 
      /return 
      } 

      /if (${Engaged}) /return    

| ################# Buff Requests 

      /if (${ChatText.Equal[avatar]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellATK} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellATK} gem4 4s 
        }    
         /return 
      }  
    
      /if (${ChatText.Equal[PR]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellPR} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellPR} gem4 4s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[haste]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellHASTE} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellHASTE} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[focus]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellFOCUS} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellFOCUS} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[cha]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellCHA} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellCHA} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[lev]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellLEV} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellLEV} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[sow]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellSOW} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellSOW} gem5 5s 
        }    
         /return 
      }  
      /if (${ChatText.Equal[grow]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellGROW} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellGROW} gem5 5s 
        }    
         /return 
      } 
  
      /if (${ChatText.Equal[shrink]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellSHRINK} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellSHRINK} gem5 5s 
        }    
         /return 
      }  


      /if (${ChatText.Equal[see]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellSEE} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellSEE} gem5 5s 
        }    
         /return 
      } 


      /if (${ChatText.Equal[str]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellSTR} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellSTR} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[dex]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellDEX} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellDEX} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[sta]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellSTA} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellSTA} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[agi]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellAGI} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellAGI} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[regen]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellREGEN} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellREGEN} gem5 5s 
        }    
         /return 
      }  

      /if (${ChatText.Equal[pe]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellPE} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellPE} gem5 5s 
        }    
         /return 
      } 

| ################# Follow me 

 /if (${ChatText.Equal[Follow me]} || ${ChatText.Equal[Follow]} && ${authorized}) { 
    /delay 5 
    /if (!${Spawn[${ChatSender}].ID}) { 
       /e ${ChatSender}  is not in zone for me to follow! 
       /return 
    } 
    /varset follname ${ChatSender}  
    /varset following 1 
    /if ( ${Me.Mount.ID} ) /dismount 
       :targetfoll 
          /target pc ${follname} 
          /delay 1s ${Target.Name.Equal[${follname}]} 
          /if (${Target.Name.Equal[${follname}]}) { 
          /goto :Loop 
    } else /goto :targetfoll 

    :Loop 
    /face fast 
    /if (${Target.Distance}>40) /keypress forward hold 
    /if (${Target.Distance}<39) /keypress back 
    /if (!${Target.ID}) /varset following 0 
    /doevents 
    /if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) { 
       /goto :Loop 
    } else { 
       /keypress forward 
       /keypress back 
    } 
 } 


| ################# Stop Following me 

 /if (${ChatText.Equal[End follow]} || ${ChatText.Equal[stop]}) { 
    /varset following 0 
    /keypress forward 
    /keypress back 
    /timed 50 /face pc ${follname} 
    /return  
 } 

| ################# Single Rebuff 

/if (${ChatText.Equal[buff me]}) { 
   /echo Request for Single Buff 
   /declare i int local 1 
   /for i 1 to ${SpellSingleBuff.Size} 
   /if (${Spell[${SpellSingleBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
      /tell ${ChatSender} ${ChatSender} Sorry I am getting LOM        
      /echo DAMN.. LOM... Cannibalizing to rebuff 
       :Hold_Single_Rebuff 
          /Call LOM 
          /if (${Spell[${SpellSingleBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
             /goto :Hold_Single_Rebuff              
           } 
    } 
   /target pc ${ChatSender} 
   /delay 3 
   /echo *** Hang on ! Buffing ${SpellSingleBuff[${i}]} 
   /tell ${ChatSender} Buffing ${SpellSingleBuff[${i}]} now... 
   /call cast ${SpellSingleBuff[${i}]} gem5 5s      
   /next i 
   /return 
} 

| ################# Single Rebuff other 

 /if (${ChatText.Equal[buff]}) { 
    /echo Request for Single Buff other 
    /assist ${ChatSender} 
    /declare i int local 1 
    /for i 1 to ${SpellSingleBuff.Size} 
    /if (${Spell[${SpellSingleBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
       /tell ${ChatSender} ${ChatSender} Sorry I am getting LOM        
       /echo DAMN.. LOM... Cannibalizing to rebuff 
       :Hold_Single_Rebuff 
          /Call LOM 
          /if (${Spell[${SpellSingleBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
             /goto :Hold_Single_Rebuff              
           } 
    } 
    /delay 3 
    /echo *** Hang on ! Rebuffing ${SpellSingleBuff[${i}]} 
    /tell ${ChatSender} Buffing ${SpellSingleBuff[${i}]} now... 
    /call cast ${SpellSingleBuff[${i}]} gem5 7s      
    /next i 
    /return 
 } 

| ################# Group Rebuff other group 

 /if (${ChatText.Equal[buff them]}) { 
    /assist ${ChatSender} 
    /declare i int local 1 
    /for i 1 to ${SpellGrpBuff.Size}        
    /if (${Spell[${SpellGrpBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
       /tell ${ChatSender} ${ChatSender}, Sorry I am getting LOM                  
       /echo DAMN.. LOM... Cannibalizing to rebuff 
       :Hold_Group_Rebuff 
          /Call LOM 
          /if (${Spell[${SpellGrpBuff[${i}]}].Mana} > ${Me.CurrentMana}) { 
          /goto :Hold_Group_Rebuff              
          } 
    } 
    /delay 3 
    /echo *** Hang on ! Rebuffing ${SpellGrpBuff[${i}]} 
    /tell ${ChatSender} Buffing ${SpellGrpBuff[${i}]} now... 
    /call cast ${SpellGrpBuff[${i}]} gem5 7s      
    /next i 
    /return 
 } 


| ################# Other Pet Buffing 

 /if (${ChatText.Equal[buff pet]}) { 
    /echo Request for Pet Buffs 
    /target id ${Spawn[pc ${ChatSender}].Pet.ID} 
    /delay 3 
    /tell ${ChatSender} Targetting your pet, %T for buffs... 
    /declare i int local 1 
    /for i 1 to ${SpellPetBuffo.Size} 
    /if (${Spell[${SpellPetBuffo[${i}]}].Mana} > ${Me.CurrentMana}) { 
       /tell ${ChatSender} ${ChatSender} Sorry I am getting LOM 
       /echo DAMN.. LOM... Cannibalizing to rebuff 
       :Hold_Pet_Rebuff 
          /Call LOM 
          /if (${Spell[${SpellPetBuffo[${i}]}].Mana} > ${Me.CurrentMana}) { 
             /goto :Hold_Pet_Rebuff 
          }        
    } 
    /delay 3 
    /echo *** Hang on ! Rebuffing ${SpellPetBuffo[${i}]} 
    /tell ${ChatSender} buffing ${SpellPetBuffo[${i}]} now... 
    /call cast ${SpellPetBuffo[${i}]} gem5 5s      
    /next i 
    /return 
 } 

| ################### Go Home 

| /if (${ChatText.Equal[gate now]} && ${ChatType.Equal[TELL]}) { 
|    /call cast ${SpellGATE} gem9  
|    /return 
|    } 

 /if (${ChatType.Equal[TELL]}) { 
    /tell ${M_Assist} [${ChatSender}]:${ChatText} 
|    /vtell ${ChatController} 001 
    /return 
    } 


/return 

| ################## Echo Changes

Sub Event_MissSpellComp(string, MissComp)
/if (${MissComp.Arg[1].Equal[Emerald]}) {
	/varset DoATK FALSE
	/echo Disableing ${SpellATK}, missing components. (${MissComp})
}
/return

Sub Event_Paused
	/if (${IsPaused}) {
		/varset IsPaused FALSE
		/echo ShamBot is now RESUMING!
	} else {
		/varset IsPaused TRUE
		/echo ShamBot is now PAUSED!
	}
/return

Sub Event_AstChange(string Line) 
	/if (${Line.Arg[3].Length}) /varset M_Assist ${Line.Arg[3]} 
	/if (${Line.Arg[4]} > 0) /varset CombatAt ${Line.Arg[4]}  
	/echo ** Assisting: ${M_Assist} @${CombatAt}% target health 
	/ini "ShamBot.ini" "General" "M_Assist" "${M_Assist}"
	/ini "ShamBot.ini" "Combat" "CombatAt" "${CombatAt}"
/return

Sub Event_Rootchg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset DoRoot FALSE
		/echo No longer Rooting!
		/return
	} else {
		/varset DoRoot TRUE
		/if (${Line.Arg[3].Length}) {
			/varset Rootat ${Line.Arg[3]}
		}		
		/if (${Line.Arg[4].Length}) {
			/varset RootMana ${Line.Arg[4]}
		}
		/echo Now Rooting @ ${Rootat}% NPC Health!
		/echo Minimum Mana to root is ${RootMana}%.
	}
	/ini "ShamBot.ini" "Combat" "Rootat" ${Rootat}
	/ini "ShamBot.ini" "Combat" "RootMana" ${RootMana}
	/ini "ShamBot.ini" "ToDo" "DoRoot" ${DoRoot}
/return
	
Sub Event_Dotchg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset DoDoT FALSE
		/echo No longer DoT'ing!
		/return
	} else {
		/varset DoDoT TRUE
		/if (${Line.Arg[3].Length}) {
			/varset CastDoTat ${Line.Arg[3]}
		}		
		/if (${Line.Arg[4].Length}) {
			/varset DotMana ${Line.Arg[4]}
		}
		/echo Now DoT'ing @ ${Dotat}% NPC Health!
		/echo Minimum Mana to cast DoT is ${DotMana}%.
	}
	/ini "ShamBot.ini" "Combat" "Dotat" ${CastDoTat}
	/ini "ShamBot.ini" "Combat" "DotMana" ${DotMana}
	/ini "ShamBot.ini" "ToDo" "DoDoT" ${DoDoT}
/return

Sub Event_Nukechg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset DoNuke FALSE
		/echo No longer Nukeing!
		/return
	} else {
		/varset DoNuke TRUE
		/if (${Line.Arg[3].Length}) {
			/varset NukeAt ${Line.Arg[3]}
		}		
		/if (${Line.Arg[4].Length}) {
			/varset NukeMana ${Line.Arg[4]}
		}
		/echo Now Nukeing @ ${Rootat}% NPC Health!
		/echo Minimum Mana to Nuke is ${NukeMana}%.
	}
	/ini "ShamBot.ini" "Combat" "Rootat" ${NukeAt}
	/ini "ShamBot.ini" "Combat" "RootMana" ${NukeMana}
	/ini "ShamBot.ini" "ToDo" "DoRoot" ${DoNuke}
/return
	

Sub Event_Malochg
	/if (${DoMalo}) {
		/varset DoMalo FALSE
		/echo No longer casting Malo!
	} else {
		/varset DoMalo TRUE
		/echo Now casting Malo!
	}
	/ini "Shambot.ini" "ToDo" "DoMalo" ${DoMalo}
/return

Sub Event_Slowchg(string Line)
	/if (${DoSlow}) {
		/varset DoSlow FALSE
		/echo Switched Slow off!
	} else {
		/varset DoSlow TRUE
		/echo Switched Slow on!
	}
	/if (${Line.Arg[3].Equal[fast]} && !${FastSlow}) {
			/varset FastSlow TRUE
			/echo Fast Slow is now ON! (Only attempting to slow ONCE!)
		} else {
			/varset FastSlow FALSE
			/echo Fast Slow is now OFF!
	}
	/ini "ShamBot.ini" "ToDo" "DoSlow" ${DoSlow}
	/ini "ShamBot.ini" "ToDo" "FastSlow" ${FastSlow}
/return

Sub Event_Cripplechg(string Line)
	/if (${DoCripple}) {
		/varset DoCripple FALSE
		/echo No longer casting Cripple!
	} else {
		/varset DoCripple TRUE
		/echo Now casting Cripple!
		/if (${Line.Arg[3].Equal[fast]} && !${FastCripple}) {
			/varset FastSlow TRUE
			/echo Fast Cripple is now ON! (Only attempting to Cripple ONCE!)
		} else {
			/varset FastCripple FALSE
			/echo Fast Cripple is now OFF!
		}
	}
	/ini "ShamBot.ini" "ToDo" "DoCripple" ${DoCripple}
	/ini "ShamBot.ini" "ToDo" "FastCripple" ${FastCripple}
/return

Sub Event_Healchg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset DoHeal FALSE
		/echo Healing is now OFF!
	} else {
		/varset DoHeal TRUE
		/echo Now HEALING!
		/if (${Line.Arg[3].Equal[caster]}) {
			/varset CasterHeals ${Line.Arg[4]}
			/echo Now Healing Casters at ${CasterHeals}% HP!
		}
		/if (${Line.Arg[3].Equal[melee]}) {
			/varset MeleeHeals ${Line.Arg[4]}
			/echo Now Healing Melee at ${MeleeHeals}% HP!
		}
		/if (${Line.Arg[3].Equal[tank]}) {
			/varset TankHeal ${Line.Arg[4]}
			/echo Now Healing the Tank at ${TankHeal}% HP!
		}
	}
	/ini "ShamBot.ini" "ToDo" "DoHeal" ${DoHeal}
	/ini "ShamBot.ini" "HealsPri" "CasterHeals" ${CasterHeals}
	/ini "ShamBot.ini" "HealsPri" "MeleeHeals" ${MeleeHeals}
	/ini "ShamBot.ini" "HealsPri" "TankHeal" ${TankHeal}
/return

Sub Event_Verbchg
	/if (${Verbose}) {
		/varset Verbose FALSE
		/echo Verbose is now OFF!
	} else {
		/varset Verbose TRUE
		/echo Verbose is now ON!
	}
	/ini "ShamBot.ini" "ToDo" "Verbose" ${Verbose}
/return

Sub Event_Atkchg
	/if (${DoATK}) {
		/varset DoATK FALSE
		/echo No longer casting FA on melee in group!
	} else {
		/varset DoATK TRUE
		/echo Now casting FA on melee in group!
	}
	/ini "ShamBot.ini" "ToDo" "DoATK" ${DoATK}
/return

Sub Event_SOWchg
	/if (${DoSOW}) {
		/varset DoSOW FALSE
		/echo No longer casting SOW!
	} else {
		/varset DoSOW TRUE
		/echo Now casting SOW!
	}
	/ini "ShamBot.ini" "ToDo" "DoATK" ${DoATK}
/return

Sub Event_Mountchg
	/if (${UseMount}) {
		/varset UseMount FALSE
		/echo No longer using a mount!
	} else {
		/varset UseMount TRUE
		/echo Now using a mount!
	}
	/ini "ShamBot.ini" "General" "UseMount" ${UseMount}
/return

Sub Event_DoMeleeChg
	/if (${DoMelee}) {
		/varset DoMelee FALSE
		/echo No longer doing meleecombat!
	} else {
		/varset DoMelee TRUE
		/varset UseMount FALSE
		/echo Doing Meleecombat also now, but disableing the use of a Mount!
	}
	/ini "ShamBot.ini" "General" "DoMelee" ${DoMelee}
	/ini "ShamBot.ini" "General" "UseMount" ${UseMount}
/return

Sub Event_sitatchg(string Line)
	/if (${Line.Arg[3].Length}) {
		/varset SitAt ${Line.Arg[3]}
	}
	/ini "ShamBot.ini" "Combat" "SitAt" ${SitAt}
/return

Sub Event_AutoSit
	/if ${AutoSit} {
		/varset AutoSit FALSE
		/echo No longer Sitting!
	} else {
		/varset AutoSit TRUE
		/echo Now AUTOSITTING!
	}
	/ini "ShamBot.ini" "ToDo" "AutoSit" ${AutoSit}
/return
	
Sub Event_DoBuffsChg
	/if (${DoBuffs}) {
		/varset DoBuffs FALSE
		/echo No longer Buffing the group!
	} else {
		/varset DoBuffs TRUE
		/echo Now Buffing the group!
	}
	/ini "ShamBot.ini" "ToDo" "DoBuffs" ${DoBuffs}
/return

Sub Event_Anchorchg
	/if (${Anchor}) {
		/varset Anchor FALSE
		/echo No longer moveing to Anchor!
	} else {
		/varset Anchor TRUE
		/echo Moveing to Anchor when suitable!
	}
	/ini "ShamBot.ini" "General" "Anchor" ${Anchor}
/return

Sub Event_PetChg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset SummonPet FALSE
		/echo No lonnger using a PET!
	} else {
		/if (${Line.Arg[3].Equal[buff]}) {
			/varset SummonPet TRUE
			/varset BuffPet TRUE
			/echo Now using a PET and BUFFING it!
		}
		/if (${Line.Arg[3].Equal[nobuff]}) {
			/varset SummonPet TRUE
			/varset BuffPet FALSE
			/echo Now using a PET but NOT BUFFING it!
		}
		/varset SummonPet TRUE
	}
	/ini "ShamBot.ini" "ToDo" "SummonPet" ${SummonPet}
	/ini "ShamBot.ini" "ToDo" "BuffPet" ${BuffPet}
/return

Sub Event_AddMaster(string Line)
  /declare index int local
  /if (${Line.Arg[3].Length}) {
    /for index 1 to 20
      /if (${Ini[ShamBot.ini,Masters,Controller${index}].Equal[Nobody]}) {
        /ini "ShamBot.ini" "Masters" "Controller${index}" "${Line.Arg[3]}"
        /echo ** ${Line.Arg[3]} added as a controller...
        /goto :FallOut
      }
    /next index
    /echo ** Master controller slots all filled! Get rid of some!
  } else {
    /echo ** Huh?
  }
  :FallOut
/return  

Sub Event_Shrink
	/target pc ${M_Assist}
	/if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) {
		/echo Shrinkin j00 mother fuckers!
		/call cast ${SpellSHRINK} gem5 5s
		/cass cast ${SpellSHRINK} gem5 5s
	}
/return

Sub Event_HoTchg(string Line)
	/if (${Line.Arg[3].Equal[off]}) {
		/varset HoTTank FALSE
		/echo No longer using HOT to help heal Tank!
	} else {
		/varset HoTTank TRUE
		/if (${Line.Arg[3].Length}) {
			/varset HoTAt ${Line.Arg[3]}
			/echo HOT is now ON!
			/echo Now Casting HOT at ${HoTAt}% Tank HP!
			/return
		}
		/echo Now Casting HOT on the Tank at ${HoTAt}% HP!
	}
	/ini "ShamBot.ini" "HealsPri" "HoTAt" ${HoTAt}
	/ini "ShamBot.ini" "ToDo" "HoTTank" ${HoTTank}
/return
		
Sub Event_RaidBuff
	/if (${RaidBuff} {
		/varset RaidBuff FALSE
		/echo Raid Buffing Mode is now OFF!
	} else {
		/varset RaidBuff TRUE
		/echo Raid Buffing Mode is now ON!
	}
/return

Sub Event_WornOff(line, TempSpellname)
/if (${TempSpellname.Equal[${SpellDoT1}]}) /varset MobDoTed1 FALSE
/if (${TempSpellname.Equal[${SpellDoT2}]}) /varset MobDoTed2 FALSE
/if (${TempSpellname.Equal[${SpellSlow}]}) /varset MobSlowed FALSE
/if (${TempSpellname.Equal[${SpellCripple}]}) /varset MobCrippled FALSE
/return

Sub Event_Toofaraway
/varcalc ToofarawayCount ${ToofarawayCount}+1
/if (${ToofarawayCount}>4) {
	/varset ToofarawayCount 0
	/varset CombatStickMode TRUE
	/if (${Target.ID} && ${Target.Type.Equal[NPC]}) /stick ${Target.MaxRangeTo}-3
	/delay 8 ${Target.Distance}<${Target.MaxRangeTo}-1
}
/return

Sub Event_CantSeeTarget
/varcalc CantSeeTargetCount ${CantSeeTargetCount}+1
/if (${CantSeeTargetCount}>3) {
	/varset CantSeeTargetCount 0
	/if (${Target.ID} && ${Target.Type.Equal[NPC]}) /face nolook
}
/return

Sub Event_AttackingSelf
/varcalc AttackingSelfCount ${AttackingSelfCount}+1
/if (${AttackingSelfCount}>4) {
	/varset AttackingSelfCount 0
	/squelch /target clear
	/call GetTarget 
}
/return

Sub Event_EXP
/call EndCombat
/call CheckAnchor
/return
 
Re: Crystane's working macro's reworked.

Rip if you group doesnt have Laa "hott" the shaman will never assist.
 
Re: Crystane's working macro's reworked.

oh hehe thanks! He doesnt have that, so guess that solves my problem. =)
 
Re: Crystane's working macro's reworked.

Have a newb question that I need to ask, hope someone will just give me quick explanation. I would like to know what the file Botevents.inc is for? The Reason I ask is that I just updated Crystanes Pally macro for a Level 75 Pally and was curious If I needed to update the Botevents.inc as well. I am thinking I do, since there are newer spells than what is in the current file, but first,I would like to know what the file is used for. Thanks in advance.
Pallytank.mac sure is a nice little macro............
 
Re: Crystane's working macro's reworked.

Have a question here. I was using the pallytank macro this weekend and when pally engages mob there would be an instance that occured occasionaly that the pally would stop tanking the mob and WARP 20-30 feet away. What the hell would be causing this? Does it have something to do with leash ? or if puller is too far from pally will the pally warp to puller's current location ?
Any help appreciated??
 
Re: Crystane's working macro's reworked.

You sure its not the part of the macro that turns the pally around and does a stun command to move the mob closer to the anchor? It sometimes looks like warping on the screen. Just a thought.
 
Re: Crystane's working macro's reworked.

Nah, I'm certain that this was a warp. The Pally was fighting the mob at the anchor spot and then he warped 20-30 feet away up onto the side of a wall that we were next too and there is no way I set camp on a the wall. In fact , this happened a few times in the course of 3 hours or so and it was obvious that he warped. Do you think it could be because the puller got out of range or something ? I have no clue how this happening.....
Thanks
 
Re: Crystane's working macro's reworked.

I've used all three macros since first post. My pally has never warped and as far as I can see there is no warp command in the pally mac.
 
Re: Crystane's working macro's reworked.

hmmm, ok . I guess I will just write if off as some weird hiccup or lag issue
 
Re: Crystane's working macro's reworked.

Heya all,

I had a big break from EQ and stuff. Am back now and working updates of my Macro's. Will post what I did so far. Some stuff may look a bit offscratch still.
I will have to fix the lousy style at some time and make them look less complicated. Thx for your patience all.

Crystane.
 
Re: Crystane's working macro's reworked.

Crystane said:
Heya all,

I had a big break from EQ and stuff. Am back now and working updates of my Macro's. Will post what I did so far. Some stuff may look a bit offscratch still.
I will have to fix the lousy style at some time and make them look less complicated. Thx for your patience all.

Crystane.

NP i use the cleric one to this day. Works awesome. Ive tweeked it a bit of course with the recent patches but all in all it 99% still original codeing. I cant wait for the update to see what ya implemented
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

love the shammy mac , but am also wondering , if you can include spirit of panther or leopard buff after it slows mob perhaps?. ive tried adding it to the nuke line but i get the message need to target a group member first 8( also is there a way to start the macro with target being person shammy is to assist? its not a big deal to open ini and change it with new tank but would be nice to be able to do it on the fly . thanks for your time love the macs., :drink
 
Last edited:
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

I need the cleric macro but its not up , can you add the zip plz?
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

love lhe wiz mac but for some reason it's not meming concussion. I don't have ancient concussion and i don't have the concussion pants is there somewhere to set what spell to use for concussion that i misserd i looked through the code and didn't see any variable to set.
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

what will it take to tone down the casting on the pally macro. currently mine is using way to much mana per fight.

maybe limit how often it casts the big knockback stun and challenge spells

also i noticed the pally trying to fix push when there is nothing to fix.
ie standing on top of anchor.
he spends more time standing directly under the mob than out front tanking it like the stickrange is way to short

also i would like to know how to include clickies in the self buffs

i guess it seems like i'm picking the macro apart but thats because i've been looking for a good pally tank macro for a long time and cant seem to get anything i write myself to work
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

Yeah I agree with all your comments regarding Pally macro Jacen.
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

Wishes granted on Healer and Shmbot.mac

I will look into the Pallytank, am not happy with it myself in total,
but on the other hand turn the Anchorpush feature OFF if its not doing
good for ya folks.
The rate of casting spells is high yeah, to keep best aggro possible,
I will look to implement a customizable recastdelay and put it into variable
section.
Selfbuff clickies is a good comment, not implemented yet but am looking into it.
On the Stickrange...... the stickrange used in the macro comes straight from a readout what your toons max range is to still hit the mob its tanking minus 3 or so. I know for some reason on some slow machines or laggy connections its not working so good. What the reason is for you folks is beyond my skills.
Be assured the stickdistance is calculated for every mob and not a preset value.
Btw push from pets and other toons tremendously affects the stick and anchorpush feature.

Hope this clears up some of the issues,

Enjoy, Crystane.
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

Ahhh, thanks Crystane............
 
Re: Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [11-03-06]

Hello,

I was using the shaman macro and it interupts my HoT casting everytime it tries to cast it. I am using Halycon Breeze. Thanks
 
Crystane's working macro's reworked. (Pally,Clr,Wiz,Shm) [01Jul07]

Users who are viewing this thread

Back
Top
Cart