mandrack
New member
- Joined
- Feb 11, 2005
- RedCents
- 0¢
| bard kiting macro Macro
| bardwarp.mac
| Author :Mandrack , thanks rawbdog for the routine which i modified
| to have it kite instead of stand and fight.
| assumes you have twist and moveutils and a warp running
| Version : V 0.50 2005-02-20
| Useage : /macro bardwarp
| Description : This macro will run your character around kiting any mobs
| in your
| RV_MobArray. Then it will attempt to loot all items in your
| RV_LootArray. lots of things to do on this betaversion but it gets the
| job done so far
|------------------------------------------------------------------------------------
#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 10000000
|------------------------------------------------------------
|How far is the fast movement range?
|------------------------------------------------------------
/declare RV_FastRange int outer 14
|------------------------------------------------------------
|How far is the maximum combat range?
|------------------------------------------------------------
/declare RV_RangeMax int outer 12
|------------------------------------------------------------
|How far is the minimum combat range?
|------------------------------------------------------------
/declare RV_RangeMin int outer 10
|------------------------------------------------------------
|What is the minimum Z Value of mobs I should target?
|------------------------------------------------------------
/declare RV_MinZRange int outer -800
|------------------------------------------------------------
|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
|------------------------------------------------------------
|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 RunTime global
| /declare HealthMin global
| /declare HealthMax global
| /declare DBLevel global
| /varset RunTime 1
| /varset MinLevel ${Calc[${Me.Level}-5]}
| /varset MaxLevel ${Calc[${Me.Level}+6]}
|------------------------------------------------------------
:Start
/doevents
/call GMCheck
/call GetTarget
/call Hpcheck
: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 1s
/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_TargetSub 1 to ${RV_MobArray.Size}
/for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100
/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)&&(!${RV_HurtTarget})) {
/echo Mob NOT a Full Health, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/call Hpcheck
/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 Hpcheck
/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}]}
/warp FRONT target
/keypress forward
/keypress back
/delay 1
/return
}
/next RV_CurrentRadius
/delay 2
/next RV_TargetSub
/if (${Int[${Target.Distance}]}>200) /warp FRONT target
/if (!${Target.ID}) {
/delay 5
/varcalc RV_FailCounter ${RV_FailCounter}+1
/echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
/if (${FailCounter}>=${FailMax}) {
/echo Waiting for Respawns, Resetting Failure Counter...
/delay 60s
/varset FailCounter 0
}
/goto :Acquire
}
/return
|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob
/if (${Int[${Target.Distance}]}>100) /warp FRONT target
/keypress forward
/keypress back
/varset RV_MyXLOC ${Int[${Me.X}]}
/varset RV_MyYLOC ${Int[${Me.Y}]}
/varset RV_ObstacleCount 0
/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
}
/face fast
/varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
/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_ObstacleCount}>=15) {
/call CheckObstacle
/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
/attack off
/keypress num_lock
/circle on 50
/twist 3 4 5 5
:CombatLoop
/doevents
| /if (${Me.AltAbilityReady[199]}) /alt activate 199
|/call MoveToMob
/call Hpcheck
/call SpecialIT
/if (${Int[${Target.Distance}]}>600) /warp FRONT target
|/keypress forward
|/keypress back
/if (!${Target.ID}) {
/varset RV_TargetDead 1
/varset RV_Fighting 0
/delay 5
/target radius 30 corpse
/delay 5
/if (!${Target.ID}) {
/call Hpcheck
/call ResetSub
/return
}
/face fast
}
/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
/face fast
/call Hpcheck
/keypress forward
/keypress back
/delay 5
/loot
/delay 5
/if (!${Corpse.Items}) {
|/echo NO LOOT! Cheap Bastard!
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 5
/if (${RV_LootAllItems}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 5
} else {
/for LootCheck 1 to ${RV_LootArray.Size}
/if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 5
}
/next LootCheck
}
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/delay 5
}
/next LootSlot
/return
|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
/cleanup
/cleanup
/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 3
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 1s
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/keypress jump
/return
|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt
/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
/Keypress instant_camp
/endmacro
}
/return
|--------------------------------------------------------------------------------
|SUB: HP CHECK
|--------------------------------------------------------------------------------
Sub Hpcheck
/if (${Me.PctHPs}
0) {
/twist off
/warp succor
| uses succor to stand and heal for now.
/circle off
/delay 1
/Twist 1 2 3 4
/delay 5m
/if (${Me.PctHPs} >90) {
/twist 1 2 3 4
goto start
}
}
/return
|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName)
/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"]}) {
/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}" Zone Information Read Successfully from ${FileName}...
/delay 1s
/return
Sub Event_Died
/delay 10
/sit
/delay 10
/camp desktop
/end
/return
|Will add a new routine to chant down mobs which are around later tonight
|or tommorrow.
|
| bardwarp.mac
| Author :Mandrack , thanks rawbdog for the routine which i modified
| to have it kite instead of stand and fight.
| assumes you have twist and moveutils and a warp running
| Version : V 0.50 2005-02-20
| Useage : /macro bardwarp
| Description : This macro will run your character around kiting any mobs
| in your
| RV_MobArray. Then it will attempt to loot all items in your
| RV_LootArray. lots of things to do on this betaversion but it gets the
| job done so far
|------------------------------------------------------------------------------------
#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 10000000
|------------------------------------------------------------
|How far is the fast movement range?
|------------------------------------------------------------
/declare RV_FastRange int outer 14
|------------------------------------------------------------
|How far is the maximum combat range?
|------------------------------------------------------------
/declare RV_RangeMax int outer 12
|------------------------------------------------------------
|How far is the minimum combat range?
|------------------------------------------------------------
/declare RV_RangeMin int outer 10
|------------------------------------------------------------
|What is the minimum Z Value of mobs I should target?
|------------------------------------------------------------
/declare RV_MinZRange int outer -800
|------------------------------------------------------------
|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
|------------------------------------------------------------
|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 RunTime global
| /declare HealthMin global
| /declare HealthMax global
| /declare DBLevel global
| /varset RunTime 1
| /varset MinLevel ${Calc[${Me.Level}-5]}
| /varset MaxLevel ${Calc[${Me.Level}+6]}
|------------------------------------------------------------
:Start
/doevents
/call GMCheck
/call GetTarget
/call Hpcheck
: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 1s
/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_TargetSub 1 to ${RV_MobArray.Size}
/for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100
/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)&&(!${RV_HurtTarget})) {
/echo Mob NOT a Full Health, picking another...
/varset RV_InvalidTargetID ${Target.ID}
/call Hpcheck
/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 Hpcheck
/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}]}
/warp FRONT target
/keypress forward
/keypress back
/delay 1
/return
}
/next RV_CurrentRadius
/delay 2
/next RV_TargetSub
/if (${Int[${Target.Distance}]}>200) /warp FRONT target
/if (!${Target.ID}) {
/delay 5
/varcalc RV_FailCounter ${RV_FailCounter}+1
/echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
/if (${FailCounter}>=${FailMax}) {
/echo Waiting for Respawns, Resetting Failure Counter...
/delay 60s
/varset FailCounter 0
}
/goto :Acquire
}
/return
|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob
/if (${Int[${Target.Distance}]}>100) /warp FRONT target
/keypress forward
/keypress back
/varset RV_MyXLOC ${Int[${Me.X}]}
/varset RV_MyYLOC ${Int[${Me.Y}]}
/varset RV_ObstacleCount 0
/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
}
/face fast
/varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
/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_ObstacleCount}>=15) {
/call CheckObstacle
/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
/attack off
/keypress num_lock
/circle on 50
/twist 3 4 5 5
:CombatLoop
/doevents
| /if (${Me.AltAbilityReady[199]}) /alt activate 199
|/call MoveToMob
/call Hpcheck
/call SpecialIT
/if (${Int[${Target.Distance}]}>600) /warp FRONT target
|/keypress forward
|/keypress back
/if (!${Target.ID}) {
/varset RV_TargetDead 1
/varset RV_Fighting 0
/delay 5
/target radius 30 corpse
/delay 5
/if (!${Target.ID}) {
/call Hpcheck
/call ResetSub
/return
}
/face fast
}
/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
/face fast
/call Hpcheck
/keypress forward
/keypress back
/delay 5
/loot
/delay 5
/if (!${Corpse.Items}) {
|/echo NO LOOT! Cheap Bastard!
/return
}
/varset LootTotal ${Corpse.Items}
/for LootSlot 1 to ${LootTotal}
/itemnotify loot${LootSlot} leftmouseup
/delay 5
/if (${RV_LootAllItems}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 5
} else {
/for LootCheck 1 to ${RV_LootArray.Size}
/if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
/echo Keeping a ${Cursor.Name}... WOOT!
/autoinventory
/delay 5
}
/next LootCheck
}
/if (${Cursor.ID}) {
/echo Destroying a ${Cursor.Name}...
/destroy
/delay 5
}
/next LootSlot
/return
|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
/cleanup
/cleanup
/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 3
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 1s
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/keypress jump
/return
|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt
/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
/Keypress instant_camp
/endmacro
}
/return
|--------------------------------------------------------------------------------
|SUB: HP CHECK
|--------------------------------------------------------------------------------
Sub Hpcheck
/if (${Me.PctHPs}
0) { /twist off
/warp succor
| uses succor to stand and heal for now.
/circle off
/delay 1
/Twist 1 2 3 4
/delay 5m
/if (${Me.PctHPs} >90) {
/twist 1 2 3 4
goto start
}
}
/return
|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName)
/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"]}) {
/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}" Zone Information Read Successfully from ${FileName}...
/delay 1s
/return
Sub Event_Died
/delay 10
/sit
/delay 10
/camp desktop
/end
/return
|Will add a new routine to chant down mobs which are around later tonight
|or tommorrow.
|


