DOTing for a Beastlord Hunter Script

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

Jeegan
orc pawn
orc pawn
Posts: 14
Joined: Tue Aug 24, 2004 3:14 pm

Post by Jeegan » Thu Sep 02, 2004 12:06 pm

Ok, here is the entire code for the macro, the only things I am having trouble with are the DOT casting and the curing poison and getting the avoid mob array to work, but that one is the least important to me. I get no errors, but I don't cast the DOT nor do I cure poison when I get poisoned. Any advice would be greatly apprecated. Thanks.

Code: Select all

| Hunter Macro
| Hunter.mac
| Author      : robdawg
| Version     : v1.2 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
#include Skill_Routines.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 combat range?
   |------------------------------------------------------------
   /declare RV_Range            int outer 10
   |------------------------------------------------------------
   |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  1
   |------------------------------------------------------------
   |Should I display stats?
   |------------------------------------------------------------
   /declare RV_DisplayStats     int outer  1

   |------------------------------------------------------------
   |Loot Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterMob.ini "${Zone.Name}" Mob
   /if (!${Defined[RV_MobArray]}) {
      /echo Mob Array Creation Error, ending macro...
      /endmacro
   }

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

   |------------------------------------------------------------
   |Avoid Mob Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterAvoidMob.ini "${Zone.Name}"
   /if (!${Defined[RV_AvoidList]}) {
      /echo No Avoid List 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_DOTimer          timer outer 0
   
   /declare RV_FastRange        int outer
   /declare RV_RangeMax         int outer
   /declare RV_RangeMin         int outer
   /declare RV_PetSpellName string outer "Spirit of Khaliz"
   /declare RV_Slow string outer "Sha's Advantage"
   /declare RV_NumberOfBuffs int outer 2
   /declare RV_MyBuffs[${RV_NumberOfBuffs}] string outer
   /declare RV_NumberOfPetBuffs int outer 3
   /declare RV_PetBuffs[${RV_NumberOfPetBuffs}] string outer
   /varcalc RV_FastRange ${RV_Range}+3
   /varcalc RV_RangeMax ${RV_Range}+1
   /varcalc RV_RangeMin ${RV_Range}-1

|Buffs to be kept up on self
/varset RV_MyBuffs[1] "Inner Fire"
/varset RV_MyBuffs[2] "Strengthen"

|Buffs to be kept up on pet   
/varset RV_PetBuffs[1] "Inner Fire"
/varset RV_PetBuffs[2] "Strengthen"
/varset RV_PetBuffs[3] "Spirit of Lightning"

   /pet hold

   :Start
   /doevents
   /call GMCheck
   /call MaintainBuffs
   /call Heal
   /call Mana
   /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
   /if (${RV_DisplayStats}) /call DisplayStats
   /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
      /varset RV_Fighting 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 100 to ${RV_MaxRadius} step 100
      /for RV_TargetSub 1 to ${RV_MobArray.Size}
         /squelch /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 RVOVE Max Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /varset RV_HasTarget 1
            /varset RV_MyTargetName ${Target.CleanName}
            /echo Acquired ${Target.CleanName} 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}>=${RV_FailMax}) {
         /echo Waiting for Respawns, Resetting Failure Counter...
         /delay 10s
         /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
   /pet attack

   :CombatLoop
   /doevents
   /attack on

   /call MoveToMob
   /call SpecialIt

   /if (!${Target.ID}) {
      /attack off
      /keypress forward
      /keypress back
     
      /varset RV_TargetDead 1
      /varset RV_Fighting 0
      /delay 1s
      /target radius 30 corpse
      /delay 1s
      /if (!${Target.ID}) {
         /call ResetSub
         /return
      }
      /face fast
   }
   /if (!${RV_TargetDead}) {
      /goto :CombatLoop
   }

/return

|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt

   /declare TempID    int inner  0
   /doevents

   /if ((${Target.Distance}<11)&&(${Me.AbilityReady["Kick"]})) {
   /call Kick
   }

   /if ((${Me.Gem["Sicken"]})&&(${Me.SpellReady["Sicken"]})&&(!${RV_DOTimer}==0)) {
   /cast "Sicken"
   /varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*10]}
   }

/return

|--------------------------------------------------------------------------------
|SUB: Death
|--------------------------------------------------------------------------------
#event Dead "Returning to home point, please wait..."

Sub Event_Dead
   /load attack
   /sit
   /endmacro

/return

|--------------------------------------------------------------------------------
|SUB: Cure Poison
|--------------------------------------------------------------------------------
#event CurePoison "You have been poisoned"

Sub Event_CurePoison
   /target me
   /cast "Cure Poison"

/return

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

   /declare LootSlot    int inner  0
   /declare LootCheck   int inner  0
   /declare LootTotal   int inner  0
   
   /face fast
   
   /keypress forward
   /keypress back
   
   /fastdrop on
   /lootn never
   /delay 2s
   /loot
   /delay 2s
   /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!
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
               /autoinventory
               /delay 1s
            }
         /next LootCheck
      }
      /if (${Cursor.ID}) {
         /echo Destroying a ${Cursor.Name}...
         /destroy
         /delay 1s
      }
   /next LootSlot
   
   /notify LootWnd DoneButton leftmouseup
   /delay 2
   
/return

|--------------------------------------------------------------------------------
|SUB: Healing
|--------------------------------------------------------------------------------
Sub Heal
   
/declare TempID    int inner  0

   /if ((${Int[${Me.PctHPs}]}<=30)&&(${Me.Gem["Minor Healing"]})&&(${Me.SpellReady["Minor Healing"]})) {
      /varset TempID ${Target.ID}
      /keypress Esc
      /keypress F1
      :HealLoop
      /echo Casting Heal Spell because of low health...
      /cast "Minor Healing"
      /delay 3s
      /if (${Me.PctMana}<5) /call Mana
      /if (${Me.PctHPs}<85) /goto :HealLoop      
      /keypress Esc
   }   

/return

|--------------------------------------------------------------------------------
|SUB: Mana Regen
|--------------------------------------------------------------------------------
Sub Mana
   
   /if (${Me.PctMana}<=10) {
        /book
   :ManaLoop
        /delay 1
        /if (${Me.PctMana}<65) /goto :ManaLoop
           }
   /stand

/return

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

   /call MaintainBuffs
   /keypress esc
   /keypress esc
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
   /doevents

/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
         /doevents
      }
      /varcalc iCount ${iCount}+1
   /next MyBuffLoop

   /varset iCount 1

   |If we don't have pet, make one     
   /if ( !${Me.Pet.ID} ) {
         /echo Creating new pet
         /call Cast ${RV_PetSpellName}
         /delay 1s
         /doevents
   }
   /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

|--------------------------------------------------------------------------------
|SUB: Obstacle Avoidance
|--------------------------------------------------------------------------------
Sub HitObstacle

   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[100]}+1>50) {
     /keypress strafe_right hold
   } else {
     /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
   
/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,ArrayType)

   /echo Attempting to Read Section "${SectionName}" Zone Information 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"]}&&${nValues}>0) {
      /echo Declaring Mob Array...
      /declare RV_MobArray[${nValues}]   string outer
      /declare RV_MobStats[${nValues}]   string outer
   }
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   /if (${FileName.Equal["HunterAvoidMob.ini"]}&&${nValues}>0) {
      /echo Declaring AvoidMob Array...
      /declare RV_AvoidList[${nValues}]  string outer 
   }
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HunterMob.ini"]}) {
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_MobStats[${nArray}] 0
      }
      /if (${FileName.Equal["HunterLoot.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
      /if (${FileName.Equal["HunterAvoidMob.ini"]}) {
         /varset RV_AvoidList[${nArray}] ${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]}
         /echo ${RV_AvoidList[${nArray}]}
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
   
/return

|--------------------------------------------------------------------------------
|SUB: Display Stats
|--------------------------------------------------------------------------------
Sub DisplayStats

   /declare nArray  int local
   
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo ${Int[${RV_LootStats[${nArray}]}]} ${RV_LootArray[${nArray}]}'s
      /next nArray
   }
   
/return

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Thu Sep 02, 2004 3:39 pm

ok.... first, if you're using spellcast.inc ... change any cases of

/cast "Spell"

to

/call Cast "Spell"

Code: Select all

/if ((${Me.Gem["Sicken"]})&&(${Me.SpellReady["Sicken"]})&&(!${RV_DOTimer}==0))
The last part should either be (${RV_DOTimer}==0)) or (!${RV_DOTimer})). Both will do the same thing, but double negative will make it cast ONLY when it's already on (which will be never since it'll never start)

Code: Select all

/varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*10]}
should be

Code: Select all

/varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*10]}m
Spell duration is in ticks. so you take it * 10 because there are 10 ticks in a minute. but you have to put the m on there cause else it'll read it as deciseconds instead of minutes. I think there's an easier way but I don't remember right now.

[Edit] The things I changed were right, but they shouldn't break the macro being wrong. I have no idea, but try the changes and see if it does anything.

Jeegan
orc pawn
orc pawn
Posts: 14
Joined: Tue Aug 24, 2004 3:14 pm

Post by Jeegan » Thu Sep 02, 2004 5:00 pm

Ok, it looks like the timer might be working. I have it working with Drowsy, but it's not casting Sicken still. Will the timer only work with one spell at a time, as in I need multiple timers, one per spell? Thanks for all the help, BTW. I am just a total n00b at programming, as I have never done any before. So I am kinda of just learning as I go.

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Thu Sep 02, 2004 7:28 pm

Wouldn't having both spellcast and spell_routines create a problem since they both have Sub Cast ?

missingfiles
a hill giant
a hill giant
Posts: 224
Joined: Wed Jun 09, 2004 1:15 pm

Post by missingfiles » Thu Sep 02, 2004 7:51 pm

would it be possible to create a timer aray and each instance casted it would set an aditional timer?

cast Dot
set timer(0)
cast dot
set timer(1)
etc

Im assuming you would need to use a generic sub function called after each cast maby this would be a good idea for a sniplet.

Jeegan
orc pawn
orc pawn
Posts: 14
Joined: Tue Aug 24, 2004 3:14 pm

Post by Jeegan » Thu Sep 02, 2004 9:21 pm

Got another question, now that I am 22 with my BL, I have to setup two sets of spells lists for buffs and fighting, is there an easy way to load the buff set when I need to buff and then reload the attack set afterwards? I tried using /load then the set name but it won't wait for the spells to finish meming without a delay afterwards, but with a delay afterwards, everytime it does a buff check, it waits for the delay before resuming, which is 30s. Any ideas?

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Thu Sep 02, 2004 10:55 pm

Terramantian wrote:

Code: Select all

/varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*10]}
should be

Code: Select all

/varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*10]}m
Spell duration is in ticks. so you take it * 10 because there are 10 ticks in a minute. but you have to put the m on there cause else it'll read it as deciseconds instead of minutes. I think there's an easier way but I don't remember right now.
seems (ticks x 10)m is wrong... e.g. (6 ticks x 10)m will result in 60m. I think should rather be (6 ticks x 60) = 360 decisecons to suit the timer decisecon parameter.

so I think it should be:

Code: Select all

/varset RV_DOTimer ${Math.Calc[${Spell[Sicken].Duration}*60]}

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Thu Sep 02, 2004 11:15 pm

Jeegan wrote:Got another question, now that I am 22 with my BL, I have to setup two sets of spells lists for buffs and fighting, is there an easy way to load the buff set when I need to buff and then reload the attack set afterwards? I tried using /load then the set name but it won't wait for the spells to finish meming without a delay afterwards, but with a delay afterwards, everytime it does a buff check, it waits for the delay before resuming, which is 30s. Any ideas?
I had the same problem as well, but was too much into hunting while I logged into EQ and I used to worked around it by pausing the macro and manually loading the spell set...

:idea: But i think this would work... I'll test it on my macro later when i get home...

Code: Select all

/loadspells "spellset" 
/delay 20
/for i 1 to 8
     /delay 30 ${Me.Gem[${i}].ID}
/next i
What it does is to have a short delay after the issuing the mem spell command to allow the memspell to clear all the gems if they are not the correct spells. Might need to tweak this delay a bit. And then to check each gem to see if a spell if mem'ed and move on to next if mem'ed. The delay 30 might need to tweak a bit as well to see what is the longest mem time of a spell.

And finally, I am not sure if the Gem parameter starts with 0 or 1. I am assuming that it starts with a 1 in my code.

:cool: And I can implement this into my macro to save me from pausing... hehe.. thanks for bringing this up...

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Thu Sep 02, 2004 11:40 pm

One more thing, regarding the cure poison part:

Code: Select all

|SUB: Cure Poison 
|-------------------------------------------------------------------------------- 
#event CurePoison "You have been poisoned" 

Sub Event_CurePoison 
   /target me 
   /cast "Cure Poison" 

/return 
I am not sure if the events need to be declared in the beginning or would it make any difference. I usually define my events in the beginning of the macro. And try to put a short delay like /delay 5, after the /target to allow the target to be accquired before casting.

One thing i spoted is that you might need to put #*# at the beginning and end of the curepoison delcaration.

Code: Select all

#event CurePoison "#*#You have been poisoned#*#" 
I myself is also learning as it goes... :smile:

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Thu Sep 02, 2004 11:42 pm

Sorry, yes! I was copying from another script of mine... but yeah it's s not m, copied it wrong. Still shouldn't affect it not casting at all though.. is it now?

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Thu Sep 02, 2004 11:44 pm

Terramantian wrote:Sorry, yes! I was copying from another script of mine... but yeah it's s not m, copied it wrong. Still shouldn't affect it not casting at all though.. is it now?
I think what would happen is the spell would cast once. and the wait until the timer expire before it can cast again. so if he kept start/restart the macro, it would seems to work... ^_^