• 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 --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

Autodestroy sub (1 Viewer)

nyghteyes

What is a macro??
Joined
Mar 21, 2006
RedCents
1,437¢
Looking for anyone with knowledge how to make a subroutine autodestroy the inventoried item if trying to loot a lore item.

all the items Im trying to get around are lore and having a problem with my mac checking corpses its already looted and getting stuck there

mac is based off of Armysoldiers FHlooter
 
mq2mousecontrol I think is the program that is built to autodestroy and item soon as it hits the cursor if it is on a list. So you just would need to check that the cursor is looting the items by mouse clicking then /autoinventory it
 
At the top of your macro put
Rich (BB code):
#include Ninjadvloot.inc

Then save this in note pad as Ninjadvloot.inc



Rich (BB code):
| Ninjadvloot.inc v1.3 
#Event ALCantLoot         "#*#may not loot this corpse#*#" 

Sub SetupAdvLootVars 
/declare ALDontLoot      int    outer 
/declare CorpseRotTimer  timer  outer 
/call ALLoadVar Settings LootMobs      TRUE  bool 
/call ALLoadVar Settings CorpseRadius  100   int 
/call ALLoadVar Settings MobsTooClose  50    int 
/call ALLoadVar Settings CorpseRotTime 440s  string 
/call ALLoadVar Settings ReportLoot    FALSE bool 
/call ALLoadVar Settings LootChannel   echo  string 
/if (!${Defined[${AlertList}]}) /declare AlertList int outer 1 
/squelch /alert clear 25 
/return 

Sub ALLoadVar(IniSection,IniVar,IniValue,VarType) 
/if (!${Defined[${IniVar}]} && ${Defined[VarType]}) /declare ${IniVar} ${VarType} outer 
/declare IniString string local ${Ini[Loot.ini,${IniSection},${IniVar},NOTFOUND]} 
/varset ${IniVar} ${IniString} 
/if (${IniString.Equal["NOTFOUND"]}) { 
  /if (${IniString.Equal["NOTFOUND"]}) /varset ${IniVar} ${IniValue} 
  /ini "Loot.ini" "${IniSection}" "${IniVar}" "${${IniVar}}" 
} 
/return 

Sub LootCorpse 
/declare i          int    local 
/declare LootList   string local 
/call CheckCursor 
/loot 
/delay 3s ${Corpse.Open} 
/doevents CantLoot 
/if (${Target.ID}==${ALDontLoot} && ${Spawn[${ALDontLoot}].ID}) /squelch /alert add 25 id ${ALDontLoot} 
/delay 3s ${Corpse.Items} || ${Target.ID}==${ALDontLoot} 
/if (${Corpse.Open} && ${Corpse.Items}) { 
 /declare loottotal  int    local 
  :ALlootlag 
  /varset loottotal ${Corpse.Items} 
  /delay 1s ${loottotal}!=${Corpse.Items} 
  /if (${loottotal}!=${Corpse.Items}) /goto :ALlootlag 
  /for i 1 to ${loottotal} 
  /if (${Corpse.Item[${i}].ID} && !${Select[${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"]},Ignore,Keep,Destroy]}) { 
    /if (${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${Corpse.Item[${i}]}" Ignore 
    /if (!${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${Corpse.Item[${i}]}" Keep 
  } 
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].NotEqual[Destroy]} && !${Me.FreeInventory} && (!${FindItemCount[=${Corpse.Item[${i}].Name}]} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && !${Corpse.Item[${i}].FreeStack})) || (${Corpse.Item[${i}].Lore} && ${FindItem[${Corpse.Item[${i}]}].ID}) || ${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Ignore]}) /varset LootList ${LootList}${Corpse.Item[${i}]}, 
  /if ((!${Corpse.Item[${i}].Lore} || !${FindItem[${Corpse.Item[${i}]}].ID}) && (${Me.FreeInventory} || (${FindItemCount[=${Corpse.Item[${i}].Name}]} && ${Corpse.Item[${i}].Stackable} && ${Corpse.Item[${i}].FreeStack})) && ${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Keep]}) /call LootItem ${i} Keep right 
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${Corpse.Item[${i}]}"].Equal[Destroy]}) /call LootItem ${i} Destroy left 
  /next i 
  /if (${Corpse.Items}) { 
    /if (${ReportLoot}) /${LootChannel} ${LootList} left on corpse. 
    /if (${Target.ID}) /squelch /alert add 25 id ${Target.ID} 
    /varset CorpseRotTimer ${CorpseRotTime} 
  } 
} 
:clickdoneffs 
/nomodkey /notify LootWnd LW_DoneButton leftmouseup 
/delay 5s !${Corpse.Open} 
/if (${Corpse.Open}) /goto :clickdoneffs 
/return 

Sub LootItem(int i,DoWhat,WhichButton) 
/declare CorpseItemID int local ${Corpse.Item[${i}].ID} 
/nomodkey /itemnotify loot${i} ${WhichButton}mouseup 
/delay 5s ${Window[ConfirmationDialogBox].Open} || !${Corpse.Item[${i}].NoDrop} 
/if (${Window[ConfirmationDialogBox].Open}) /nomodkey /notify ConfirmationDialogBox Yes_Button leftmouseup 
/delay 5s ${Cursor.ID} || ${WhichButton.NotEqual
} /if (${DoWhat.Equal[Destroy]} && ${Cursor.ID}==${CorpseItemID}) /destroy /delay 3s !${Corpse.Item[${i}].ID} && !${Cursor.ID} /return Sub LootMobs /if (!${LootMobs} || ${SpawnCount[npc radius ${MobsTooClose} zradius 100 noalert ${AlertList}]} || !${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} || ${Me.Combat} || (${Cursor.NoDrop} && !${Me.FreeInventory})) /return /if (!${CorpseRotTimer}) /squelch /alert clear 25 /declare i int local /declare CorpseList string local | /for i 1 to ${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} /varset CorpseList ${CorpseList}${NearestSpawn[${i},corpse radius ${CorpseRadius} noalert 25].ID}| /next i /declare DeadCount int local ${SpawnCount[corpse radius ${CorpseRadius} zradius 100 noalert 25]} /if (${Me.Mount.ID}) /dismount /for i 1 to ${DeadCount} /if (${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID} && ${Spawn[${CorpseList.Arg[${i},|]}].ID}) /squelch /alert add 25 id ${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID} /if (!${Spawn[${CorpseList.Arg[${i},|]}].Deity.ID}) { /if (${Target.ID}!=${Spawn[${CorpseList.Arg[${i},|]}].ID}) /target id ${Spawn[${CorpseList.Arg[${i},|]}].ID} /if (!${Me.Standing}) /stand /delay 2s ${Target.ID}==${Spawn[${CorpseList.Arg[${i},|]}].ID} && ${Me.Standing} /if (${Spawn[${CorpseList.Arg[${i},|]}].Distance}>10) /moveto loc ${Spawn[${CorpseList.Arg[${i},|]}].Y} ${Spawn[${CorpseList.Arg[${i},|]}].X} /delay 10s ${Spawn[${CorpseList.Arg[${i},|]}].Distance}<10 /if (${Spawn[${CorpseList.Arg[${i},|]}].Distance}<15) /call LootCorpse /stick off } /next i /return Sub Event_ALCantLoot /varset ALDontLoot ${Target.ID} /return Sub CheckCursor :ALauto_inv /if (${Cursor.ID}) { /if (${Cursor.NoDrop} && !${Me.FreeInventory}) /return /timed 5 /autoinventory /delay 2s !${Cursor.ID} /goto :ALauto_inv } /return​
 
Autodestroy sub

Users who are viewing this thread

Back
Top