Help with this Macro

jumpmenow

New member
Joined
Dec 5, 2006
Messages
18
Reaction score
0
Points
0
I have been using this mac without fail for over two years and now everytime I load it up I immediately CTD. Can anyone look at it and see if you can tell me what the problem is?

Code:
| Shambot Version 1.0c    by Ranma 
| ported for Druid use:    by Unknownerrors 
| 
| Anit much changed, hacked out a few of the chat commands as druid do have half the buff shammie's do 
| the ones listed do work 
| 
_______________________________________________________________| 
| 
| I started with the Excellent Base routine by Hubba and have 
| added a lot of additional feature and abilities 
| 
| Usage: 
| 1. Target player you like to assist (main tank is good) 
| 2. Start the script with: /mac <scriptname> [main assist] [chat channel] [controller] 
| 3. Parameters are optional defaults are built in 
| 
| 
| Features: commands work in tell or group 
| 
| The following commands will target the sender and cast the spells 
| requested on the sender: [thorns] [Nines] [Str] [Sow] [Invis] [REGEN] 
| 
| The following commands: [buff] [buff me] will rebuff a person 
| 
| The following commands: [Buff them] will rebuff another group 
| 
| The following commands: [Follow me] [end follow] [stop] are for moving Druid 
| 
| The [add] or [Snare] command are good in combat when there are adds 
| Target the add and it will be Debuffed and Snared 
| 
| During combat he will only do requests for heals and detrimentals 
| 
| 
| [gate now] will memorize Succor and port the grp to safe point. 
| 
| Added a chat channel to echo all non command word tells to controller 
| added a vtell to controller on incomming tells 
| 
| Use "help" for more help ( !help is incomplete! ) 
|_______________________________________________________________| 
| 
| -!- Basis of this script is Version: v0.5c by Hubba 
| Awesome script, I hope you like what I have added 
| 
|_______________________________________________________________| 
| -!- This Script Uses spell_routines.inc by Rusty 
| -!- Exptrack snippet from exptracker.mac by Raebis, with tweaks from Phoenix (not tested) 
| -!- Wait4Rez snippet from wait4rez.mac by fantum409 
| 
|_______________________________________________________________| 

#chat group 
#chat tell 

#Event   ToggleVariable   "[MQ2] Toggle #1#" 
#Event   ToggleVariable   "[MQ2] Toggle #1# #2#" 
#Event   OutDoor          "#*#outdoors#*#" 
#Event   OutDoor          "You can not summon a mount here." 
#Event   Zoning           "You have entered#*#" 
#Event   Hungry           "#*#are hungry#*#" 
#Event   Enrageon         "#*#ENRAGED#*#" 
#Event   Enrageoff        "#*#no longer enraged#*#" 
#Event   Thirsty          "#*#are thirsty#*#" 
#Event   ImDead           "You have been slain by#*#" 
#Event   Invited          "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to 

cancel#*#" 

#include Spell_Routines.inc 

Sub Main 

| The spell will be memmed in the listed order. 
| Gem1 = Puravida
| Gem2 = Adrenaline Surge Rk. II
| Gem3 = Pure Life Rk. II
| Gem4 = Ironwood Skin Rk. II
| Gem5 = Viridifloral Bulwark
| Gem6 = Reaping Flames
| Gem7 = Torrential Hail
| Gem8 = Ensnare
| Gem9 = 
| Gem10 = 

   |------------------------------------------------------------ 
   |chat channel and controller 
   |------------------------------------------------------------ 

   |/declare CChannel      outer "somechat" 
   |/declare ChatController outer "sometoon" 
  
   |------------------------------------------------------------ 
   |spells update as needed. 
   |------------------------------------------------------------ 

   /declare SpellSnare              outer "Ensnare" 
   /declare SpellNines              outer "Ironwood Skin Rk. II" 
   /declare SpellDeBuff             outer "Hand of Ro" 
   /declare SpellColdDD             outer "Winter's Frost" 
   /declare SpellFireDD             outer "Wildfire" 
   /declare SpellMagicDot           outer "Swarm of Fireants" 
   /declare SpellHeal               outer "Puravida" 
   /declare SpellRoot               outer "Savage Roots" 
   /declare SpellDS                 outer "Viridifloral Bulwark" 
   /declare SpellSOW                outer "Flight of Eagles" 
   /declare SpellFireDot            outer "Immolation of Ro" 
   /declare SpellGATE               outer "Gate" 
   /declare SpellFOOD               outer "Summon Food" 
   /declare SpellDRINK              outer "Summon Drink" 
   /declare SpellSTR                outer "Mammoth's Strength" 
   /declare SpellInvis              outer "Foliage Shield" 
   /declare SpellMregen             outer "Mask of the Forest" 
   /declare SpellREGEN              outer "Blessing of Oak" 
   /declare SpellPet                outer "Nature Walkers Behest" 
   /declare SpellPOK                outer "Circle of Knowledge" 
   /declare SpellWoS                outer "Circle of The slaughter" 
   /declare Spellblood              outer "Circle of The Bloodfeilds" 
   |------------------------------------------------------------ 
   |mount type 
   |------------------------------------------------------------ 

   /declare Mount              outer "Ornate Barding" 

   |------------------------------------------------------------ 
   |grp buffs 
   |------------------------------------------------------------ 
   /declare SpellGrpBuff[4] string outer 
   /varset SpellGrpBuff[1] "Protection of Seasons" 
   /varset SpellGrpBuff[2] "Legacy of Viridiflora Rk. II" 
   /varset SpellGrpBuff[3] "Ironwood Skin Rk. II" 
   |/varset SpellGrpBuff[4] "Mask of the Forest" 


   |------------------------------------------------------------ 
   |single buffs 
   |------------------------------------------------------------ 
   /declare SpellSingleBuff[4] string outer 
   /varset SpellSingleBuff[1] "Mammoth's Strength" 
   /varset SpellSingleBuff[2] "Protection of the Seasons" 
   /varset SpellSingleBuff[3] "Viridifloral Bulwark" 
   /varset SpellSingleBuff[4] "Ironwood Skin" 
   |------------------------------------------------------------ 
   |combat stuff. 
   |------------------------------------------------------------ 

   /declare AssistAt      int   outer 99 
   /declare CombatAt      int   outer 97 

   /declare DebuffAt      int   outer 85 

   /declare CastMagicDotAt    int   outer 80 
   /declare CastFireDotAt    int   outer 80 
   /declare DotMana       int   outer 40 

   /declare SnareAt        int   outer 80 
   /declare RootMana    int   outer 15 

   /declare ColdDDAt        int   outer 40 
   /declare FireDDAt        int   outer 90 
   /declare NukeMana      int   outer 50 

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

   |------------------------------------------------------------ 
   |tweak heals 
   |------------------------------------------------------------ 

   /declare CasterHeals   int   outer 60 
   /declare MeleeHeals    int   outer 50 
   /declare TankHeal      int   outer 55 

   |------------------------------------------------------------ 
   |to do list 
   |------------------------------------------------------------ 

   /declare DoSnare            outer TRUE 
   /declare DoDebuff           outer TRUE 
   /declare DoMagicDot        outer TRUE 
   /declare DoFireDot         outer TRUE 
   /declare DoBuffs            outer TRUE 
   /declare DoSow              outer TRUE 
   /declare DoColdDD           outer FALSE 
   /declare DoFireDD           outer FALSE 
   /declare DoHeal             outer TRUE 

   /squelch /alias malo /echo toggle malo 
   /squelch /alias slow /echo toggle slow 
   /squelch /alias fastslow /echo toggle fastslow 
   /squelch /alias root /echo toggle root 
   /squelch /alias dot /echo toggle dot 
   /squelch /alias nuke /echo toggle nuke` 
   /squelch /alias nukeat /echo toggle nukeat    
   /squelch /alias buffs /echo toggle buffs 
   /squelch /alias sow /echo toggle sow 
   /squelch /alias assistat /echo toggle assistat 
   /squelch /alias dotat /echo toggle dotat 
   /squelch /alias rootat /echo toggle rootat 
   /squelch /alias combatat /echo toggle combatat 
   /squelch /alias healmeleeat /echo toggle healmeleeat 
   /squelch /alias healcastersat /echo toggle healcastersat 
   /squelch /alias healtankat /echo toggle healtankat 
   /squelch /alias assist /echo toggle assist 
   /squelch /alias healat /echo toggle healat 
   /squelch /alias status /echo toggle show 
   /squelch /alias show /echo toggle show    
   /squelch /alias help /echo toggle help 
   /squelch /alias verbose /echo toggle verbose    
    
   /declare TargetArray[4] string outer 
   /declare MobSnared        outer FALSE 
   /declare MobDebuffed         outer FALSE 
   /declare MobRooted      outer FALSE 
   /declare MobMagicDoted       outer FALSE 
   /declare MobFireDoted       outer FALSE 
   /declare CombatOn       outer TRUE 
   /declare Engaged          outer FALSE 
   /declare LowMana         outer FALSE 

   /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} 

    
   /call MemSpells 
    

   |------------------------------------------------------------ 
   |Target a player for main assist 
   |------------------------------------------------------------ 
    
      /if (${Defined[Param0]}) { 
          /varset M_Assist ${Param0} 
          /echo Assist set to ${M_Assist} 
      } else { 
          /if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) { 
              /echo Your Do not have a main assist, make sure its a player character! 
              /endmacro 
          } 
          /varset M_Assist ${Target.CleanName} 
          /echo Assist set to ${M_Assist} 
      } 

      /assist off 

      /if (${Defined[Param1]}) /varset CChannel ${Param1} 
      /leaveall 
      /join ${CChannel} 
      /1 I am here! 
      /echo Joined channel ${CChannel} 

      /if (${Defined[Param2]}) /varset ChatController ${Param2} 
      /vtell ${ChatController} 005 
      /tell ${ChatController} I am here! 
      /echo My master is ${ChatController} 


   |------------------------------------------------------------ 
   |Main loop 
   |------------------------------------------------------------ 


:Main_Loop 

   |- Check for Standing if less than sitat then sit 
   /if ( ${Me.State.Equal[Stand]} && ${Me.PctMana}<${SitAt}) /sit 

   |- Summon Mount if outdoors 
   |/if (!${Me.Mount.ID} && ${OutDoors}) /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 
    
   |- Check for mobs and do combat stuff 
    |/call GetTarget 
   |/if (${CombatOn}) /call Combat        

   |- Group Heals 
   /call Check_grpHPs 

   |- Check for Standing if less than sitat then sit 
   /if ( ${Me.State.Equal[Stand]} && ${Me.PctMana}<${SitAt}) /sit 

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

   /goto :Main_Loop 
/return 

   |------------------------------------------------------------ 
   |Main loop is over. 
   |moving on to Subs 
   |------------------------------------------------------------ 
  






   |------------------------------------------------------------ 
   |meming spells from list. 
   |------------------------------------------------------------ 

Sub MemSpells 

   /echo Memming spells. Hang on. 
   /if ( !${Me.Gem[${SpellSnare}]} ) { 
      /memspell 1 ${SpellSnare} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellDeBuff}]} ) { 
      /memspell 2 ${SpellDeBuff} 
      /delay 25 
  } 
   /if ( !${Me.Gem[${SpellColdDD}]} ) { 
      /memspell 3 ${SpellColdDD} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellFireDD}]} ) { 
      /memspell 4 ${SpellFireDD} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellMagicDot}]} ) { 
      /memspell 5 ${SpellMagicDot} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellFireDot}]} ) { 
      /memspell 6 ${SpellFireDot} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellHeal}]} ) { 
      /memspell 7 ${SpellHeal} 
      /delay 25 
   } 
   /if ( !${Me.Gem[${SpellGate}]} ) { 
      /memspell 8 ${SpellGate} 
      /delay 30 
   } 
   /if ( !${Me.Gem[${SpellRoot}]} ) { 
      /memspell 9 ${SpellRoot} 
      /delay 30 
   } 

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

/return 

   |------------------------------------------------------------ 
   |combat sub 
   |------------------------------------------------------------ 

Sub Combat 
   |/if (${CombatOn} && !${MobDebuffed} && ${DoDebuff} && ${Target.ID}==${TargetArray[4]}) /call DeBuff 
   |/if (${CombatOn} && !${MobSnared} && ${DoSnare} && ${Target.ID}==${TargetArray[4]}) /call Snare 
   |} 

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

   |/if (${CombatOn} && ${DoFireDot} && !${MobFireDoted} && ${Me.PctMana}>=${RootMana} && |${Target.PctHPs}<=${CastFireDotAt}) { 
      |/call cast ${SpellMagicDot} gem6 
      |/varset MobFireDoted TRUE 
   |} 
  |/if (${CombatOn} && ${DoMagicDot} && !${MobMagicDoted} && ${Me.PctMana}>=${RootMana} |&&${Target.PctHPs}<=${CastMagicDotAt}) { 
       |/call cast ${SpellMagicDot} gem5 
      |/varset MobMagicDoted TRUE 
   |} 
   |/if (${CombatOn} && ${DoColdDD} && ${Me.PctMana}>=${NukeMana} && ${Target.PctHPs}<=${ColdDDAt}) { 
      |/call cast ${SpellColdDD} gem3 
   |} 
   |/if (${CombatOn} && ${DoFireDD} && ${Me.PctMana}>=${NukeMana} && ${Target.PctHPs}<=${FireDDAt}) { 
      |/call cast ${SpellFireDD} gem4 
   |} 
   |/if (${CombatOn} && ${DoRoot} && ${Me.PctMana}>=${RootMana} && ${Target.PctHPs}<=${RootAt}) { 
      |/call cast ${SpellRoot} gem9 
      |/varset MobRooted TRUE 
   |} 

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

|- EndCombat 

   /target ${TargetArray[3]} 
    
   /if (!${Target.Name.Equal[${TargetArray[3]}]} || !${Target.ID}) { 
      /varset MobSnared FALSE 
      /varset MobDebuffed FALSE 
      /varset MobMagicDoted FALSE 
      /varset MobFireDoted FALSE 
      /varset CombatOn FALSE 
      /varset Engaged FALSE    
      
      /varset TargetArray[1] NULL 
      /varset TargetArray[2] NULL 
      /varset TargetArray[3] NULL 
      /varset TargetArray[4] NULL 

  } 
/return 

   |------------------------------------------------------------ 
   |debuff sub 
   |------------------------------------------------------------ 

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

   |------------------------------------------------------------ 
   |Snare sub 
   |------------------------------------------------------------ 

Sub Snare 
   /if (${Target.PctHPs}<=${CombatAt} && ${Target.ID}==${TargetArray[4]}) { 
      /if (${Me.CurrentMana}<${Spell[${SpellSnare}].Mana}) { 
         /echo Shit ! I don't have mana to Malo %T 
      } else { 
      :Snare_Loop 
         /call cast ${SpellSnare} gem1 6s 
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Snare_Loop 
         /if (${Macro.Return.Equal["CAST_IMMUNE"]}) { 
            /if (${Verbose}) 
          
            /varset MobSnared TRUE 
         } 
         /if (${Macro.Return.Equal["CAST_RESISTED"]}) { 
            /if (!${FastSlow}) { 
               /if (${Verbose})  
                /goto :Snare_Loop 
             } 
            /varset MobSnared TRUE 
          } 
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
            /if (${Verbose})  
            /varset MobSnared TRUE 
          } 

      } 
   } 
/return 



   |------------------------------------------------------------ 
   |getting target 
   |------------------------------------------------------------ 


Sub GetTarget 
   /assist ${M_Assist} 
   /delay 3 
   /if (${Target.Type.Equal[NPC]}) /if (${Target.Distance}<=${AssistAt} && ${Target.ID}!=${TargetArray[4]} && ${Target.PctHPs}<=${CombatAt}) { 
      /varset TargetArray[1] ${Target.CleanName} 
      /varset TargetArray[2] ${Target.Level} 
      /varset TargetArray[3] ${Target.Name} 
      /varset TargetArray[4] ${Target.ID} 
      /varset CombatOn TRUE 


      /varset MobSnared FALSE 
      /varset MobDebuffed FALSE 
      /varset MobMagicDoted FALSE 
      /varset MobFireDoted FALSE    

      /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]} 
      /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]} 

      /echo EXP: ${Exper}:${Me.PctExp}% - AAXP: ${AAExp}:${Me.PctAAExp}% - ${Math.Calc[${Macro.RunTime}/60]} minutes 
      /popup EXP: ${Exper}:${Me.PctExp}% - AAXP: ${AAExp}:${Me.PctAAExp}% - ${Math.Calc[${Macro.RunTime}/60]} minutes 
      /varset Exper ${Me.PctExp} 
      /varset AAExp ${Me.PctAAExp} 
   } 
/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}) /return 
      /if ( !${Me.Buff[${SpellGrpBuff[${i}]}].ID} ) { 
         /target pc ${M_Assist} 
         /delay 3 
         /echo *** Hang on ! Rebuffing ${SpellGrpBuff[${i}]} 
         /call cast ${SpellGrpBuff[${i}]} gem5 5s 
      } 
   /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[Berserker]} || ${Group.Member[${i}].Class.Name.Equal[Shaman]} || ${Group.Member[${i}].Class.Name.Equal[Warrior]} || ${Group.Member[${i}].Class.Name.Equal[Rogue]} || ${Group.Member[${i}].Class.Name.Equal[Shadowknight]} || ${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}) 
         /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}) 
         /call cast ${SpellHeal} gem6 4s 
      } 
   } 

   /if (${Group.Member[${i}].Name.Equal[${M_Assist}]} && ${Group.Member[${i}].PctHPs}<=${TankHeal}) { 
      /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 
      } 
   } 

   /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 
   } else /if (${Math.Calc[${Me.MaxMana}*${BuffMana}/100]} <= ${Me.CurrentMana} && ${LowMana}) { 
      /varset LowMana FALSE 
   } 
/return 

   |------------------------------------------------------------ 
   |are we hungry? 
   |------------------------------------------------------------ 

Sub Event_Hungry 
   /if (${Engaged}) /return    
   /echo I am Hungry 
    
   /declare i int local 1 
   /for i 1 to 8 
      /autoinventory 
      /delay 1 
      /call cast ${SpellFOOD} gem5 5s 
   /next i 
   /autoinventory 
  
/return 

   |------------------------------------------------------------ 
   |are we thristy? 
   |------------------------------------------------------------ 

Sub Event_Thirsty 
   /if (${Engaged}) /return    
   /echo I am Thirsty    
   /declare i int local 1 
   /for i 1 to 8 
      /autoinventory 
      /delay 1 
      /call cast ${SpellDRINK} gem5 5s 
   /next i 
   /autoinventory 
  /return 


   |------------------------------------------------------------ 
   |ENRAGE ON 
   |------------------------------------------------------------ 


Sub Event_Enrageon 
    /if (${PetOn}) { 
       /echo Mob is ENRAGED! 
       /pet back off 
    } 
/return 

   |------------------------------------------------------------ 
   |ENRAGE OFF 
   |------------------------------------------------------------ 

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

   |------------------------------------------------------------ 
   |outdoors check 
   |------------------------------------------------------------ 

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

   |------------------------------------------------------------ 
   |zoning 
   |------------------------------------------------------------ 

Sub Event_Zoning 
   /varset TargetArray[1] ${Target.CleanName} 
   /varset TargetArray[2] ${Target.Level} 
   /varset TargetArray[3] ${Target.Name} 
   /varset TargetArray[4] ${Target.ID} 
   /varset CombatOn TRUE 
        

      /varset MobSnared FALSE 
      /varset MobDebuffed FALSE 
      /varset MobMagicDoted FALSE 
      /varset MobFireDoted FALSE 
/return 

   |------------------------------------------------------------ 
   |Group invites 
   |------------------------------------------------------------ 


Sub Event_Invited 
   /invite 
/return 

   |------------------------------------------------------------ 
   |On death. 
   |------------------------------------------------------------ 

Sub Event_ImDead 
   /echo Bummer ! 
   :Zone_Loop 
      /if ( ${Me.Bound.ID} != ${Zone.ID} ) /goto :Zone_Loop 
   /delay 5s 
   /consent group 
   /delay 5 
   
   
   /call Wait4Rez 
   /delay 20 
   /call MemSpells 
   /if (${Me.State.Equal[Stand]}) /sit 

| We do some short meditate before we start again. 

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

   |------------------------------------------------------------ 
   |Wait4Rezz 
   |------------------------------------------------------------ 

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 

   |------------------------------------------------------------ 
   |Loot 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 

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

      /if (!${ChatType.Equal[GROUP]} && !${ChatType.Equal[TELL]}) /return 
     /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]}) { 
         /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]}) { 
         /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]}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellNuke} gem9 
            } 
      /return 
      } 
        
      /if (${ChatText.Equal[dot]}) { 
         /assist ${ChatSender} 
         /if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=100) { 
            /call cast ${SpellDot} gem8 5s 
            } 
      /return 
      } 

      /if (${Engaged}) /return    



   |------------------------------------------------------------ 
   |Buff requests. 
   |------------------------------------------------------------ 

      /if (${ChatText.Equal[nines]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellNines} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellNines} gem4 4s 
        }    
         /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} gem4 4s 
        }    
        /return 
        }    
      /if (${ChatText.Equal[Thorns]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellDS} is incomming to you ${ChatSender}!!! 
             /call cast ${SpellDS} gem4 4s 
        }    
        /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[Invis]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /tell ${ChatSender} ${SpellInvis} is incomming to you ${ChatSender}!!! 
             /alt activate 518 
        }    
        /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} gem4 4s 
        }    
        /return 
        }    
      /if (${ChatText.Equal[gate us]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /call cast ${SpellGATE} gem4 4s 
        }    
        /return 
        }    
      /if (${ChatText.Equal[pok]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             /call cast ${SpellPOK} gem4 4s 
        }    
        /return 
        }    
      /if (${ChatText.Equal[WOS]}) { 
         /target pc ${ChatSender} 
         /if (${Target.Type.Equal[PC]} && ${Target.Distance}<=100) { 
             
             /call cast ${SpellWoS} gem4 4s 
        }    
        /return 
        } 
   |------------------------------------------------------------ 
   | Auto following 
   |------------------------------------------------------------ 

 /if (${ChatText.Equal[Follow me]} || ${ChatText.Equal[Follow]}) { 
    /delay 5 
    /if (!${Spawn[${ChatSender}].ID}) { 
       /e ${ChatSender}  is not in zone for me to follow! 
       /return 
    } 
    /varset follname ${ChatSender} 
    /varset following 1 
    /tell ${ChatSender} I am following you!!! 
    /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 follow 
   |------------------------------------------------------------ 

 /if (${ChatText.Equal[End follow]} || ${ChatText.Equal[stop]}) { 
    /varset following 0 
    /keypress forward 
    /keypress back 
    /timed 50 /face pc ${follname} 
    /tell ${ChatSender} I Stopped following you!!! 
    /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.. 
       :Hold_Single_Rebuff 
          /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... 
       :Hold_Single_Rebuff 
          /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 
 } 
   |------------------------------------------------------------ 
   |buff another 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... 
       :Hold_Group_Rebuff 
          /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 
 } 

/return
 
???

Does this happen as soon as you load it? or how far do you get before the crash?
 
Crashing

As soon as i hit load it says hang on meming spells then I get a crash window. Wont go past that.
 
I looked at the AFCleric mac, and Nils' code /memspell ${NukeOneGem} "${NukeOne}" looks to only be different in that it has "" around the spell variable. If adding "" doesn't help perhaps saving the spell set you want and /MemSpellSet ${MySpellSet} instead of checking each gem individually.