Hunter Macro (v1.3 UPDATED 06-07-2004 12:51pm PST)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Aug 07, 2004 12:46 pm

The issue is that all < and > in the code have not been corrected. Instead you have < for < and > for >. Go through and edit and fix them and it will work.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

nepooc
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sun Dec 07, 2003 2:18 am

works great but

Post by nepooc » Sat Aug 07, 2004 6:51 pm

Everything works great, its a nice ass mac =) however when something attacks me first , frontside, i riposte before i start attacking and it says target does not have full health , and does not attack it leaving the mob free to beat me to death, was wondering if there was a fix to that, thx =)

Chant3r
orc pawn
orc pawn
Posts: 10
Joined: Sun Apr 18, 2004 3:27 pm

Post by Chant3r » Sun Aug 08, 2004 2:02 pm

Well problem for me is I do not know code so I will have to wait til it gets fixed I had a previous version that pwned all and I love it .
Chant3r

If I were you I would hate me too

Pickled
a lesser mummy
a lesser mummy
Posts: 34
Joined: Tue Sep 16, 2003 11:29 am

Post by Pickled » Wed Aug 11, 2004 7:34 am

:shock:

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Wed Aug 11, 2004 9:12 am

Been working with this a bit in the tutorial... hehe yeah I've made a few brand new toons to play with it. Thing is, it will target mobs/NPCs that are not close to it nor on its ini settings for the zone. It is possible that it is targeting some of them due to Class, vs name. Reason I say this is that I have warrior in my ini for gloomingdeep mines, and that is meant for the gloomingdeep warriors, but since I just have warrior it seems to target ANY warrior. Now this would not be so much an issue except that it targeted Absor who was over 250units away and there were spiders and rats much closer.

Perhaps I need to put in the ini Gloomingdeep Warrior instead?
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Wed Aug 11, 2004 9:49 am

Well problem for me
-me +the rest of us :roll:
is I do not know code
You're well on your way to learning!
so I will have to wait til it gets fixed
or until some bright day in the far-off future when 99% of all text editors have a simple search-and-replace feature.

robdawg
a ghoul
a ghoul
Posts: 114
Joined: Tue Mar 23, 2004 11:54 am
Contact:

...

Post by robdawg » Wed Aug 11, 2004 1:14 pm

okay i fixed all the "<" and ">".

sorry I have been neglecting this script I have updates that have been down for like 2 weeks but just never posted them.

dont worry I will get some nice updates for you all very soon.
ROBDAWG

[url=http://www.seathound.com]Seat Hound[/url]
[url=http://www.sportsrumormill.com]Sports Rumor Mill[/url]
[url=http://www.packerforum.com]Packer Forum[/url]

hytiek
Contributing Member
Contributing Member
Posts: 54
Joined: Mon Jun 14, 2004 5:45 pm

Post by hytiek » Fri Aug 20, 2004 10:43 pm

Found a problem with using ${Zone.Name} with zones that have a comma in them, best bet is to change it to ${Zone.ShortName} and update your INI file accordingly.

cheers

obie411
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Aug 25, 2004 8:29 am

Post by obie411 » Thu Aug 26, 2004 10:49 am

Robdawg Am having problems where do the ini files go it find it at the start but then says it cannot find the File ? And the area I tried adding are as follows...
[Everfrost Peaks]
Mob1=bear
Mob2=skeleton
Mob3=spider
Mob4=wolf
Mob5=cougar

[Everfrost Peaks]
Loot1=pelt
Loot2=bone chips
Loot3=silk

Am I adding the zones right ?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 26, 2004 1:50 pm

Taking bets on obie411, not high odds really.

Is he or isn't he a new arrival care of RapePeoplesGoodsoffExploits.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Thu Aug 26, 2004 2:39 pm

aChallenged1 wrote:Taking bets on obie411, not high odds really.

Is he or isn't he a new arrival care of RapePeoplesGoodsoffExploits.
Does this make sense to anyone else?
Is there a point to this reply? Cause for the life of me I cant see it.

This is a long time pent-up, so I appologize if anyone else is offended...
aChallenged1, please, SHUT YOUR FUCKING PIE HOLE.

kk thanks.

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Thu Aug 26, 2004 3:05 pm

chill: you don't wonder how aChallenged got so many posts in such a short time?
Joined: 29 Jun 2004
the guy has managed to post at least 3 uninformative posts for every 1 useful one he does. He's turned post whoring into an artform.

As for his comment... I think he was trying to say the guy was from RPG Expert. I also thought that joke was pretty dead. I suppose I could be wrong.

obie411: make sure that the name of the zone in your ini file exactly matches the value returned by ${Zone.Name}. Not sure if EFP is "Everfrost Peaks" or "The Everfrost Peaks".

Also, make sure the code you're using has brackets converted (as mentioned previoiusly by wardave)

the ini files go in your /macro directory.. the same place all of your .mac files are.

Runamuck
orc pawn
orc pawn
Posts: 17
Joined: Fri Aug 27, 2004 3:14 pm

Post by Runamuck » Mon Aug 30, 2004 4:18 pm

Ok sorry to ask but I am baffled.

[MQ2]"The Field of Bone" Is not a valid section for FILE: Huntermob.ini, ending macro.


[Eastern Plains of Karana]
Mob1=Spider
Mob2=Lion
Mob3=Griffawn

[East Commonlands]
Mob1=Spiderling

[The Feerrott]
Mob1=Spider

[Field of Bone]
Mob1=Pup

I also tried [The Field of Bone]


Thats my ini?

Is there so way to find the definant zone name? I tried the ${Zone.Name}


But not real sure how to execute that.

Runamuck
orc pawn
orc pawn
Posts: 17
Joined: Fri Aug 27, 2004 3:14 pm

Post by Runamuck » Mon Aug 30, 2004 4:32 pm

I got it to work and figured out the other problem with Zone name lol. This thing cracks me up.

cerberuss
orc pawn
orc pawn
Posts: 16
Joined: Tue Oct 07, 2003 4:19 pm

Post by cerberuss » Fri Sep 03, 2004 11:50 pm

ok im trying to get this to work in everfrost killing just the 3 ice giants i want me char to run into slow range stop then send pet in and once mob is dead go up and loot any help with this would be great thanks.

Code: Select all


| Hunter Macro 
| Hunter.mac 
| Author      : robdawg 
| Version     : v1.3 2004-05-13 10:06pm PST 
| Useage      : /macro Hunter 
| Description : This macro will run your character around killing any mobs in your 
|      RV_MobArray.  Then it will attempt to loot all items in your 
|      RV_LootArray.  This is definitely a work in progress and I am sure 
|      someone can think of plenty of upgrades for this. 
|------------------------------------------------------------------------------------ 
#include spellcast.inc 

#turbo 10 

Sub Main 

   |------------------------------------------------------------ 
   |How many times should aquire target fail before delaying? 
   |------------------------------------------------------------ 
   /declare RV_FailMax          int outer  3 
   |------------------------------------------------------------ 
   |How far would you like to target a mob? 
   |------------------------------------------------------------ 
   /declare RV_MaxRadius        int outer  3000 
   |------------------------------------------------------------ 
   |How far is the fast movement range? 
   |------------------------------------------------------------ 
   /declare RV_FastRange        int outer  40 
   |------------------------------------------------------------ 
   |How far is the maximum combat range? 
   |------------------------------------------------------------ 
   /declare RV_RangeMax         int outer  80 
   /declare RV_Range         int outer  60 
   /declare RV_Fuzzy         int outer  20 
   |------------------------------------------------------------ 
   |How far is the minimum combat range? 
   |------------------------------------------------------------ 
   /declare RV_RangeMin         int outer  60 
   |------------------------------------------------------------ 
   |What is the minimum Z Value of mobs I should target? 
   |------------------------------------------------------------ 
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------ 
   |What is the maximum Z Value of mobs I should target? 
   |------------------------------------------------------------ 
   /declare RV_MaxZRange        int outer  1000 
   |------------------------------------------------------------ 
   |Should I loot all items? 
   |------------------------------------------------------------ 
   /declare RV_LootAllItems     int outer  0 
   /declare RV_FindAllCorpses   int   outer  1 
   |------------------------------------------------------------ 
   |Loot Array Information. 
   |------------------------------------------------------------ 
   /call ReadINI HunterMob.ini "${Zone.Name}" 
   /if (!${Defined[RV_MobArray]}) { 
      /echo Mob Array Creation Error, ending macro... 
      /endmacro 
   } 

   |------------------------------------------------------------ 
   |Mob Array Information. 
   |------------------------------------------------------------ 
   /call ReadINI HunterLoot.ini "${Zone.Name}" 
   /if (!${Defined[RV_LootArray]}) { 
      /echo No Loot Array Created... 
   } 

   |------------------------------------------------------------ 
   |Variables that you don't need to worry about. 
   |------------------------------------------------------------ 
   /declare RV_FailCounter      int outer  0 
   /declare RV_MyTargetID       int outer  0 
   /declare RV_MyTargetName     string outer 
   /declare RV_MyTargetDead     int outer  0 
   /declare RV_InvalidTargetID  int outer  0 
   /declare RV_HasTarget        int outer  0 
   /declare RV_RandomWait       int outer  0 
   /declare RV_LootSlot         int outer  0 
   /declare RV_CheckLook        int outer  0 
   /declare RV_Fighting         int outer  0 
   /declare RV_TargetDead       int outer  0 
   /declare RV_MyXLOC           int outer  0 
   /declare RV_MyYLOC           int outer  0 
   /declare RV_ObstacleCount    int outer  0
   /declare RV_NumberOfBuffs int outer 3 
   /declare RV_MyBuffs[${RV_NumberOfBuffs}] string outer 
   /declare RV_NumberOfPetBuffs int outer 3 
   /declare RV_PetBuffs[${RV_NumberOfPetBuffs}] string outer 
   /declare RV_SummonPetRange   int outer  150 
   /declare RV_CastNow          int outer  1 
   /declare RV_PetSpellName string outer "Aeldorb's Animation" 

|Buffs to be kept up on self 
/varset RV_MyBuffs[1] "Voice of Quellious" 
/varset RV_MyBuffs[2] "Arcane Rune" 
/varset RV_MyBuffs[3] "Shield of Maelin" 


|Buffs to be kept up on pet    
/varset RV_PetBuffs[1] "Night`s Dark Terror" 
/varset RV_PetBuffs[2] "Speed of Vallon"
/varset RV_PetBuffs[3] "Uproar"
   /fastdrop on 
   /lootn never 
   /call maintainbuffs
 
   :Start 
   /doevents 
   /call GMCheck 
   /call GetTarget 

   :KillAdds 
   /if (${RV_HasTarget}) /call MoveToMob 
   /if (${RV_HasTarget}) /call CombatSub 
   /if (${RV_HasTarget}) /call MoveToMob 
   /if (${RV_HasTarget} && (${Defined[RV_LootArray]} || ${RV_LootAllItems})) /call LootMob 
   /call ResetSub 

   /varset RV_RandomWait ${Math.Rand[5]} 
   /varcalc RV_RandomWait ${RV_RandomWait}+1 
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming 
   /delay ${RV_RandomWait}s 
    
   /if (${Target.ID}) { 
      /echo Looks like something is attacking us, killing it... 
      /delay 1s 
      /varset RV_HasTarget 1 
      /goto :KillAdds 
   } 
    
   /goto :Start 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: Aquire Target 
|-------------------------------------------------------------------------------- 
Sub GetTarget 

   /declare RV_CurrentRadius   int local 
   /declare RV_TargetSub   int local 
   :Acquire 
   /for RV_CurrentRadius 200 to ${RV_MaxRadius} step 200 
      /for RV_TargetSub 1 to ${RV_MobArray.Size} 
         /target radius ${RV_CurrentRadius} nopcnear notid ${RV_InvalidTargetID} npc "${RV_MobArray[${RV_TargetSub}]}" 
         /varset RV_MyTargetID ${Target.ID} 
         /varset RV_MyTargetDead 0 
         /if (${Target.ID}) { 
            /if (${Int[${Target.PctHPs}]}>100) { 
               /echo Mob NOT a Full Health, picking another... 
               /varset RV_InvalidTargetID ${Target.ID} 
               /call ResetSub 
               /goto :Acquire 
            } 
            /if (${Int[${Target.Z}]}<${RV_MinZRange}) { 
               /echo Mob is BELOW Min Z Range, picking another... 
               /varset RV_InvalidTargetID ${Target.ID} 
               /call ResetSub 
               /goto :Acquire 
            } 
            /if (${Int[${Target.Z}]}>${RV_MaxZRange}) { 
               /echo Mob is ABOVE Max Z Range, picking another... 
               /varset RV_InvalidTargetID ${Target.ID} 
               /call ResetSub 
               /goto :Acquire 
            } 
            /varset RV_HasTarget 1 
            /varset RV_MyTargetName ${Target.Name} 
            /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]} 
            /return 
         } 
      /next RV_TargetSub 
      /delay 2 
   /next RV_CurrentRadius 

   /if (!${Target.ID}) { 
      /delay 2s 
      /varcalc RV_FailCounter ${RV_FailCounter}+1 
      /echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s) 
      /if (${RV_FailCounter}<=${FailMax}) { 
         /echo Waiting for Respawns, Resetting Failure Counter... 
         /if (${RV_FindAllCorpses}==1) { 
            /echo Trying to find unlooted corpses... 
            /for RV_CurrentRadius 200 to ${RV_MaxRadius} step 200 
               /for RV_TargetSub 1 to ${RV_MobArray.Size} 
               /target corpse radius ${RV_CurrentRadius} nopcnear "${RV_MobArray[${RV_TargetSub}]}" 
               /if (${Target.ID}) { 
                  /call LootMob 
                  /call ResetSub 
               } 
               /next RV_TargetSub 
               /delay 2 
            /next RV_CurrentRadius 
         } else { 
            /delay 30s 
         } 
         /varset RV_FailCounter 0 
      /goto :Acquire 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: Moving 
|-------------------------------------------------------------------------------- 
Sub MoveToMob 

   /varset RV_MyXLOC ${Int[${Me.X}]} 
   /varset RV_MyYLOC ${Int[${Me.Y}]} 
   /declare RV_DistanceTimer timer 15 
    
   /doevents 
    
   :MovementLoop 

   /if ((!${RV_Fighting})&&(!${RV_TargetDead})&&(${Target.PctHPs}<100)) { 
      /echo Mob not at full health, picking another... 
      /varset RV_InvalidTargetID ${Target.ID} 
      /varset RV_HasTarget 0 
      /call ResetSub 
      /return 
   } 

   /if (${Target.ID}) { 
      /face fast 
   } 
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) { 
      /keypress forward hold 
   } 
   /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) { 
      /keypress forward 
   } 
   /if (${Int[${Target.Distance}]}<${RV_RangeMin}) { 
      /keypress back 
   } 
   /if (!${RV_DistanceTimer}) { 
      /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 
      /goto :Movementloop 
   } 
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop 

/return 

|-------------------------------------------------------------------------------- 
|SUB: Combat 
|-------------------------------------------------------------------------------- 
Sub CombatSub 

   /echo Attacking Mob NOW! 
   /varset RV_Fighting 1 
   /varset RV_TargetDead 0 
   /cast "Forlorn Deeds"
   /pet attack 
   :CombatLoop 
   /if (${Me.PctMana}<50&&${Target.PctHPs}<70) { 
      /delay 4s 
   } 
    
   /doevents 
   /if (!${Target.ID}) { 
      |/keypress forward 
      |/keypress back 
      /varset RV_TargetDead 1 
      /varset RV_Fighting 0 
      /delay 1s 
      /echo Finding bodies... 
      /target radius ${Math.Calc[${RV_Range}+${RV_Fuzzy}+20]} corpse 
      /delay 1s 
      /if (!${Target.ID}) { 
         /call ResetSub 
         /return 
      } 
      /face fast 
   } 
   /call MoveToMob 
   /call SpecialIT 
  
   /if (!${RV_TargetDead}) { 
      /goto :CombatLoop 
   } 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: Looting 
|-------------------------------------------------------------------------------- 
Sub LootMob 

   /declare LootSlot    int inner  0 
   /declare LootCheck   int inner  0 
   /declare LootTotal   int inner  0 
    
   /varset RV_ObstacleCount 0 
   :LootMoveLoop 
   /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1 
   /face fast 
   /if (${Int[${Target.Distance}]}<=5) { 
      /keypress forward hold 
      /delay 5 ${Target.Distance}>5
      /keypress forward 
   } 
   /if (${Math.Calc[${RV_ObstacleCount}%5]}==0) { 
      /call CheckObstacle 
      /goto :LootMoveLoop 
   } 

   /if (${Int[${Target.Distance}]}<=5) /goto :LootMoveLoop 
    
   /delay 1s 
   /loot 
   /delay 1s 
   /if (!${Corpse.Items}) { 
      /echo NO LOOT! Cheap Bastard! 
      /return 
   } 

   /varset LootTotal ${Corpse.Items} 
   /for LootSlot 1 to ${LootTotal} 
      /itemnotify loot${LootSlot} leftmouseup 
      /delay 1s 
      /if (${RV_LootAllItems}) { 
         /echo Keeping a ${Cursor.Name}... WOOT! 
         /autoinventory 
         /delay 1s 
      } else { 
         /for LootCheck 1 to ${RV_LootArray.Size} 
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) { 
               /echo Keeping a ${Cursor.Name}... WOOT! 
               /autoinventory 
               /delay 1s 
            } 
         /next LootCheck 
      } 
      /if (${Cursor.ID}) { 
         /echo Destroying a ${Cursor.Name}... 
         /destroy 
         /delay 1s 
      } 
   /next LootSlot 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: Reset 
|-------------------------------------------------------------------------------- 
Sub ResetSub 

   /keypress esc 
   /keypress esc 
   /keypress esc 
   /keypress esc 
    
   /varset RV_HasTarget 0 
   /varset RV_TargetDead 0 
   /varset RV_Fighting 0 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: Obstacle Check 
|-------------------------------------------------------------------------------- 
Sub CheckObstacle 

   /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_ObstacleCount 0 
  
/return 

|-------------------------------------------------------------------------------- 
|SUB: Obstacle Avoidance 
|-------------------------------------------------------------------------------- 
Sub HitObstacle 
   /echo Obstacle hit, moving around it... 
   /keypress forward 
   /keypress back hold 
   /delay ${Math.Calc[${Math.Rand[5]}+5]} 
   /keypress back 
   /if (${Math.Rand[2]}) { 
     /keypress strafe_right hold 
   } else { 
     /keypress strafe_left hold 
   } 
   /delay ${Math.Calc[${Math.Rand[15]}+5]} 
   /keypress strafe_right 
   /keypress strafe_left 
/return 

|-------------------------------------------------------------------------------- 
|SUB: Special Combat 
|-------------------------------------------------------------------------------- 
Sub SpecialIt 
   /if ((${Int[${Me.PctHPs}]}<75)&&(${Me.Gem["Drain Spirit"]})&&(${Me.SpellReady["Drain Spirit"]})) { 
      /keypress forward 
      /keypress back 
      /echo Casting Drain Spirit because of low health... 
      /cast "Forlorn Deeds" 
      /delay 4s 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: GM Check 
|-------------------------------------------------------------------------------- 
Sub GMCheck 

   /if (${Spawn[gm].ID}) { 
      /beep 
      /beep 
      /beep 
      
      /echo GM has entered the zone! 
      /echo FUCK HIM but ending the macro... 

      /keypress forward 
      /keypress back 

      /quit 
      /endmacro 
   } 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: Reading from an INI File 
|-------------------------------------------------------------------------------- 
Sub ReadINI(FileName,SectionName) 

   /echo Attempting to read section "${SectionName}" from ${FileName}... 
   /delay 1s 
    
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) { 
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro... 
      /delay 1s 
      /return 
   } 
   /declare nValues     int local  1 
   /declare nArray      int local  0 
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]} 

   :CounterLoop 
   /if (!${KeySet.Arg[${nValues},|].Length}) { 
      /varcalc nValues ${nValues}-1 
      /goto :MakeArray 
   } 
   /varcalc nValues ${nValues}+1 
   /goto :CounterLoop  

   :MakeArray 
   /if (!${nValues}) /return 
   /if (${FileName.Equal["HunterMob.ini"]}) { 
      /echo Declaring Mob Array... 
      /declare RV_MobArray[${nValues}] string outer 
   } 
   /if (${FileName.Equal["HunterLoot.ini"]}) { 
      /echo Declaring Loot Array... 
      /declare RV_LootArray[${nValues}] string outer 
   } 
   /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["HunterMob.ini"]}) /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]} 
      /if (${FileName.Equal["HunterLoot.ini"]}) /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]} 
   /next nArray 
    
   /echo "${SectionName}" read from ${FileName}... 
   /delay 1s 
    
/return 

|-------------------------------------------------------------------------------- 
|SUB: MaintainBuffs 
|-------------------------------------------------------------------------------- 
Sub MaintainBuffs 
/declare PetBuffLoop    int inner  0 
/declare MyBuffLoop    int inner  0 
/declare iCount int 1 
/declare tmp 
/doevents 
   /for MyBuffLoop 1 to ${RV_NumberOfBuffs} 
      /if (!${Me.Buff[${RV_MyBuffs[${iCount}]}].ID}) { 
         /target ${Me} 
         /call Cast ${RV_MyBuffs[${iCount}]} 
         /delay 1s 
         /if (${iCount}==5) /delay 20s 
         /doevents 
      } 
      /varcalc iCount ${iCount}+1 
   /next MyBuffLoop 

   /varset iCount 1 

   |If we have pet, make one      
   /if ( !${Me.Pet.ID} ) { 
         /echo Creating new pet 
         /call Cast ${RV_PetSpellName} 
         /delay 1s 
         /target ${Me.Pet.Name} 
         /call Cast "Tiny companion"  
   } 
    
      
   /if ( ${Me.Pet.Distance}<${RV_SummonPetRange}) { 
        /echo Summoning pet. Its range is ${Me.Pet.Distance} 
        /call Cast "Summon Companion" 
        /delay 1s    
   } 
   /for PetBuffLoop 1 to ${RV_NumberOfPetBuffs} 
      /if (!${Me.PetBuff[${RV_PetBuffs[${iCount}]}]}) { 
         /target ${Me.Pet.Name} 
         /call Cast ${RV_PetBuffs[${iCount}]} 
         /delay 1s 
         /doevents 
      } 
      /varcalc iCount ${iCount}+1 
   /next PetBuffLoop 
/keypress esc 
/return