• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Macro Question (1 Viewer)

smokinghot

Member
Joined
Mar 24, 2005
RedCents
Im reworking a macro, and am having a problem maybe somone can help with.

THe problem is that after I get done autolooting, if i have an add attacking me, my charactor will just stand there until he dies. Its odd because its suppose to warp to succor, and twist heal song when i get below a certian point.

THis is where I think there is an error.

Rich (BB code):
Sub KillMob
/if (${Target.PctHPs}<95) /squelch /target clear
/if (${Int[${Target.PctHPs}]}<100) /squelch /target clear
/if (!${Target.ID}) /return
/look
/echo Killing a ${Target.CleanName}.
/stick 125 behind moveback
:distancecheck
/if (${Target.Distance}>=200) /goto :distancecheck
/if (${Target.PctHPs}<95) /squelch /target clear
/if (${Int[${Target.PctHPs}]}<100) /squelch /target clear
/if (!${Target.ID}) /return
/if (${Me.PctHPs}<=50) {

/twist 8 2 3 4 1
} else {
/twist 8 2 3 4 5
}
/delay 12s
/if (${Me.TargetOfTarget.Name.NotEqual[${Me}]}) /squelch /target clear
/if (${Target.State.Equal[DEAD]}) /keypress esc 
/if (${Target.ID}) /goto :KillStart
/twist reset
/delay 5
/target id ${RV_MyTargetID} corpse
/call Lootmob
/return


or

Rich (BB code):
|-------------------------------------------------------------------------------
|SUB: Aquire Target
|-------------------------------------------------------------------------------
Sub GetTarget
 
/declare RV_CurrentRadius int local
/declare RV_TargetSub int local
/varset RV_InvalidTargetID 1
:Acquire
/doevents
/for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100
/for RV_TargetSub 1 to ${RV_MobArray.Size}
/squelch /target radius ${RV_CurrentRadius} nopcnear 150 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) {
/varset RV_InvalidTargetID ${Target.ID}
/call ResetSub
		/squelch /target clear
/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...
/look
/twist 1 8
/varset RV_FailCounter 0
}
/goto :Acquire
}
/return
 
Sub Resetsub
/varset RV_HasTarget 0 
/varset RV_TargetDead 0 
/varset RV_Fighting 0 
/return

Sub Resetsub
   /varset RV_HasTarget 0 
   /varset RV_TargetDead 0 
   /varset RV_Fighting 0 
/return

Any ideas??

Thanks,
S
 
I would think the problem was in the loot code. Can you post that? You could also /echo Done Looting just before returning from that sub. This would just confirm if the problem is after you exit the loot sub, it will not fix the problem...
 
Rich (BB code):
|-------------------------------------------------------------------------------
|SUB: Read loot table from the 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 (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) { 
      /varcalc nValues ${nValues}-1 
      /goto :MakeArray 
   } 
   /varcalc nValues ${nValues}+1 
   /goto :CounterLoop  

   :MakeArray 
   /if (!${nValues}) /return 
   /if (${FileName.Equal["Mob.ini"]}&&${nValues}>0) { 
      /echo Declaring Mob Array... 
      /declare RV_MobArray[${nValues}]   string outer 
      /declare RV_MobStats[${nValues}]   string outer 
   } 
   /if (${FileName.Equal["Loot.ini"]}&&${nValues}>0) { 
      /echo Declaring Loot Array... 
      /declare RV_LootArray[${nValues}]  string outer 
      /declare RV_LootStats[${nValues}]  string outer 
   } 
   /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["Mob.ini"]}) { 
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset RV_MobStats[${nArray}] 0 
      } 
      /if (${FileName.Equal["Loot.ini"]}) { 
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset RV_LootStats[${nArray}] 0 
      } 
   /next nArray 
    
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
   /delay 1s 
    
/return

Rich (BB code):
|--------------------------------------------------------------------------------
|SUB: Looting based on FishingLoot.ini.
|--------------------------------------------------------------------------------
Sub LootMob 
   /declare LootChance  int inner  0
   /declare LootSlot    int inner  0 
   /declare LootCheck   int inner  0 
   /declare LootTotal   int inner  0 
    
   /face fast 
    
   /keypress forward 
   /keypress back 
    

/stick 12 moveback
:Distance
/if (${Target.Distance}<=10) { 
/stick off
/loot
} else {
/goto :Distance 
}
/loot
   /delay 1.5s 
   /if (!${Corpse.Items}) { 
      /echo NO LOOT! Cheap Bastard! 
|/shift /notify InventoryWindow IW_Money1 leftmouseup
|/destroy
/delay 1
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/delay 1
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/delay 1
/notify LootWnd DoneButton leftmouseup 
/cleanup
      /return 
   } 

   /varset LootTotal ${Corpse.Items} 
   /for LootSlot 1 to ${LootTotal} 
      /itemnotify loot${LootSlot} leftmouseup 
      /delay 5
       
         /for LootCheck 1 to ${RV_LootArray.Size} 
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) { 
               /echo Keeping a ${Cursor.Name}... WOOT! 
		/autoinv 
		/delay 1s
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1 
               
		

               /delay 5
            
	}
         /next LootCheck 
      } 
     /if (${Cursor.ID}) { 
        /echo Destroying a ${Cursor.Name}... 
	 /destroy
         /delay 5 
      } 
   /next LootSlot 
|/shift /notify InventoryWindow IW_Money1 leftmouseup
|/destroy
/delay 1
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/delay 1
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/delay 1
   /notify LootWnd DoneButton leftmouseup 
   /delay 2 
    /cleanup
/return 

-------
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 (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) { 
      /varcalc nValues ${nValues}-1 
      /goto :MakeArray 
   } 
   /varcalc nValues ${nValues}+1 
   /goto :CounterLoop  

   :MakeArray 
   /if (!${nValues}) /return 
   /if (${FileName.Equal["Mob.ini"]}&&${nValues}>0) { 
      /echo Declaring Mob Array... 
      /declare RV_MobArray[${nValues}]   string outer 
      /declare RV_MobStats[${nValues}]   string outer 
   } 
   /if (${FileName.Equal["Loot.ini"]}&&${nValues}>0) { 
      /echo Declaring Loot Array... 
      /declare RV_LootArray[${nValues}]  string outer 
      /declare RV_LootStats[${nValues}]  string outer 
   } 
   /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["Mob.ini"]}) { 
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset RV_MobStats[${nArray}] 0 
      } 
      /if (${FileName.Equal["Loot.ini"]}) { 
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset RV_LootStats[${nArray}] 0 
      } 
   /next nArray 
    
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
   /delay 1s 
    
/return
 
Something in there must be stuck in a loop. If I were you, I would add in a bunch of /echo's to parts of the macro, so that you can find out where it's getting stuck...not just one, but several per sub, probably one before and after every loop.
 
Macro Question

Users who are viewing this thread

Back
Top