This is 3 macros for a trio group. made for a: warrior, enchanter, and cleric for Plane of Nightmare.
It camps like up to 4-5 mobs for now, and loots the about nothing that drops. May change it later.
Needed plugins: melee, moveutils
Needed incs: ninjaloot (posted at bottom), spell_routines
Before starting the macro:
Go to about loc 1284, 1243 on all of them, and then start them should go fine.
Check/change (if needed) spells used through cleric/ench macros, and check abilities/discs used on warrior macro.
Warrior Macro:
Code: Select all
|Xantan's Trilogger#4 - do with it what you want.
|This is the Warrior macro
|PoN 1284 1243
#Event dead "#*#Returning to Bind Location#*#"
#Event arrive "#*#Arrived at MoveTo Location#*#"
#event wait "#*#Med#*#"
#turbo
#include Spell_Routines.inc
#include ninjaloot.inc
Sub Main
/declare slow int outer 0
/declare wait int outer 1
/if (!${Me.Standing}) /stand up
/call NLPresetup
/delay 5
/moveto 2
/delay 2
/makecamp on 1281.74 1216.33
/delay 5
/makecamp return
/delay 4s
/moveto 5
/makecamp leash 150
/makecamp radius 7
/makecamp unpause
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
:MainLoop
/call pull
/delay 6
/call mobcheck
/delay 6
/doevents
/delay 1
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/goto :MainLoop
Sub pull
/delay 1
/if (${Me.PctHPs} < 99) /return
/delay 1
/tar npc warrior radius 510
/delay 2
/if (!${Target.ID} || ${Target.Type.NotEqual[NPC]} ) {
/delay 2s
/return
}
/delay 1
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} ) {
/if (!${Me.Standing}) /stand up
/delay 2
/face
/delay 9
/if (${Target.Distance}>95) /makecamp off
/delay 1
/moveto id
/varset slow 1
:waitlook2
/if (${Target.Distance}<14) /goto :pastw8
/delay 2
/doevents
/delay 1
/goto :waitlook2
:pastw8
/varset slow 0
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/doability "Bellow"
/delay 1
/call makecamp
/delay 5
/call mobcheck
/delay 5
/return
}
/return
Sub fight
:fightloop
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} ) {
/delay 4
/goto :fightloop
}
/call loot
/delay 1
/call makecamp
/delay 1
/call mobcheck
/delay 1.5s
/varset wait 1
/return
Sub loot
/makecamp off
/delay 1
/call NLAutoloot
/delay 3s
/return
Sub makecamp
/tar pc enchanter
/delay 1
/makecamp on 1281.74 1216.33
/delay 1
/makecamp return
:waitlook
/if (${Target.Distance}<50) {
/delay 1s
/return
}
/delay 1
/goto :waitlook
/return
Sub mobcheck
:mobcheck
/if (${Target.ID}) /keypress esc
/delay 1
/target npc radius 25
/target npc radius 25
/delay 1
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/attack on
/stick on 10.4
/call fight
/delay 4
/return
}
/delay 23
/if (${Target.ID}) /keypress esc
/target npc radius 45
/target npc radius 45
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/attack on
/stick on 10.4
/call fight
/delay 4
/return
}
/return
Sub Event_dead
/exit
/endmacro
/delay 10s
/return
Sub Event_arrive
/if (${Slow}) /call makecamp
/return
Sub Event_wait
/if (${wait}) {
/varset wait 0
/gsay kk medding
/call makecamp
/call mobcheck
/delay 3s
/call mobcheck
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 15s
/call mobcheck
/delay 15s
/call mobcheck
/delay 15s
}
/returnCode: Select all
|Xantan's Trilogger#4 - do with it what you want.
|This is the Cleric macro
|PoN 1284 1243
#turbo
#Event dead "#*#Returning to Bind Location#*#"
#event nomana "Insufficient Mana to cast this spell!"
#event exp "You gain#*#"
#include Spell_Routines.inc
Sub Main
/declare Nuke string outer
/declare SpellToCast string outer
/varset Nuke "Furor"
:loop
/if ( ${Me.PctHPs}<=25 ) /call die
/call buff
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 5
/call assist
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 5
/doevents
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/goto :loop
Sub buff
/if ( ${Me.PctHPs}<=25 ) /call die
/varset SpellToCast Temperance
/if (${Me.PctMana} > 90 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff2
/return
Sub buff2
/if ( ${Me.PctHPs}<=25 ) /call die
/tar pc cleric
/call cast "${SpellToCast}" gem5 15s
/tar pc enchanter
/call cast "${SpellToCast}" gem5 15s
/tar pc warrior
/call cast "${SpellToCast}" gem5 15s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
Sub assist
/if ( ${Me.PctHPs}<=25 ) /call die
/doevents
/tar pc warrior
/delay 1
/if ( ${Target.PctHPs}<=95 ) {
/call fight
/return
}
/delay 1
/tar pc enchanter
/delay 1
/if ( ${Target.PctHPs}<=74 ) /call heal2
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 1
/tar pc cleric
/delay 1
/if ( ${Target.PctHPs}<=74 ) /call heal2
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 1
/return
Sub fight
:fightloop
/doevents
/tar pc warrior
/delay 1
/if ( ${Target.PctHPs}>=98) /return
/doevents
/tar pc warrior
/if ( ${Target.PctHPs}<=43 ) /call heal
/if ( ${Me.PctHPs}<=25 ) /call die
/if ( ${Target.PctHPs}>=54 && ${Me.PctMana} > 52 && ${Me.PctHPs}>=60 ) {
/call nuke
/tar pc warrior
/if ( ${Target.PctHPs}<=43 ) /call heal
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 1
/goto :b
}
:b
/delay 1
/tar pc cleric
/delay 1
/if ( ${Target.PctHPs}<=60 ) /call heal2
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 1
/tar pc enchanter
/if ( ${Target.PctHPs}<=60 ) /call heal2
/if ( ${Me.PctHPs}<=25 ) /call die
/delay 2
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 2
/goto :fightloop
/return
Sub nuke
/varset SpellToCast Reckoning
/tar pc warrior
/delay 1
/assist
/delay 4
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/delay 2
/call cast "${SpellToCast}" gem1 8s
/delay 1
/return
}
/delay 1
/return
Sub heal
/call cast "Complete Heal" gem3 20s
/doevents
/delay 8
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 3
/return
Sub heal2
/call cast "Remedy" gem2 15s
/doevents
/delay 6
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 2
/return
Sub Event_nomana
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 10s
/return
Sub Event_dead
/exit
/endmacro
/delay 10s
/return
Sub Event_exp
/if (${Me.PctMana} < 55) {
/gsay ${Me.PctMana}% Mana --> Med
/return
}
/return
Sub die
/call cast "Divine Barrier" gem8 20s
/delay 2
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 10s
/returnCode: Select all
|Xantan's Trilogger#4 - do with it what you want.
|This is the Enchanter macro
|PoN 1284 1243
#turbo
#Event dead "#*#Returning to Bind Location#*#"
#event nomana "Insufficient Mana to cast this spell!"
#Event slow "#*# slows down."
#include Spell_Routines.inc
Sub Main
/declare SpellToCast string outer
/declare slow int outer 1
:loop
/doevents
/call buff
/call assist
/delay 4
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/goto :loop
Sub buff
/call pet
/varset SpellToCast Clarity
/if (${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff2
/varset SpellToCast Aanya's Quickening
/if (${Me.PctMana} > 80 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff3
/varset SpellToCast Arch Shielding
/if (${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call cast "${SpellToCast}" gem8 15s
/return
Sub buff2
/tar pc enchanter
/call cast "${SpellToCast}" gem5 15s
/tar pc cleric
/call cast "${SpellToCast}" gem5 15s
/delay 1
/return
Sub buff3
/tar pc enchanter
/call cast "${SpellToCast}" gem6 15s
/tar pc warrior
/call cast "${SpellToCast}" gem6 15s
/delay 1
/return
Sub assist
/doevents
/tar pc warrior
/delay 1
/if ( ${Target.PctHPs}<=98 ) {
/call fight
/delay 1
/return
}
/delay 1
/return
Sub fight
/tar pc warrior
/if ( ${Target.PctHPs}<=98 ) {
/delay 1
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 2
/assist
/delay 4
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) /goto :fightloop
/delay 4
/return
}
/delay 1
/doevents
/tar pc warrior
/if ( ${Target.PctHPs}>=97 ) /return
/delay 1
/tar npc radius 70
/if ( ${Target.PctHPs}<=94 ) /goto :fightloop
/if ( ${Target.PctHPs}>=93 ) /return
/delay 1
/return
:fightloop
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/call cast "Tashani" gem3 10s
/delay 4
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 1s
/varset slow 1
/delay 4
:shiftless
/if (${slow}) /call cast "Shiftless Deeds" gem7 10s
/delay 1
/doevents
/delay 3s
/if (!${slow}) /goto :pastshiftless
/goto :shiftless
:pastshiftless
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 2s
/call cast "Gasping Embrace" gem2 10s
/delay 1s
:fightloop2
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/if (${Me.PctMana} > 22 && ${Target.ID} && ${Target.PctHPs}>=6 ) /call cast "Discordant Mind" gem1 10s
/delay 1
/if (${Me.PctMana} > 10 && ${Target.ID} && ${Target.PctHPs}<=38 ) /call cast "Paralyzing Earth" gem4 20s
/if ( ${Target.ID} && ${Target.PctHPs}<=25 ) /call root
/delay 9
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 9
/goto :fightloop2
/return
}
}
/return
Sub root
:fightloop2
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/if (${Me.PctMana} > 10 && ${Target.ID} && ${Target.PctHPs}<=34 ) /call cast "Paralyzing Earth" gem4 20s
/if (${Me.PctMana} > 22 && ${Target.ID} && ${Target.PctHPs}>=6 ) /call cast "Discordant Mind" gem1 10s
/delay 1
/if (${Me.PctMana} > 45 && ${Target.ID} && ${Target.PctHPs}<=10 ) /call cast "Paralyzing Earth" gem4 20s
/delay 10
/goto :fightloop2
/return
}
/return
Sub Event_nomana
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 9s
/return
Sub Event_dead
/exit
/endmacro
/delay 10s
/return
Sub pet
/tar ${Me.Pet}
/delay 2
/if (${Target.ID} && ${Target.Type.NotEqual[Pet]}) {
/keypress esc
/tar ${Me.Pet}
/if (${Target.ID}) /return
/varset SpellToCast Zumaik's Animation
/delay 1
/call cast "${SpellToCast}" gem8 20s
/return
}
/tar pet radius 40
/if (${Target.ID}) /return
/varset SpellToCast Zumaik's Animation
/delay 1
/call cast "${SpellToCast}" gem8 20s
/return
Sub Event_slow
/varset slow 0
/return
Sub OLD THINGS TO KNOW OR ETC
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
/return
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {Code: Select all
|-NinjaLoot.inc v1.2 by Mystikule
#Event NotYourKill "You may not loot this Corpse at this time."
#Event SetAutoLoot "[MQ2] SetAutoLoot#*#"
#Event Autolootstatus "[MQ2] Autoloot Status#*#"
Sub NLPresetup
|- Make any undefined declares
/if (!${Defined[LootINIFile]}) /declare NLLootINIFile string outer "loot.ini"
/if (!${Defined[NLVersion]}) /declare NLVersion string outer 1.2
/if (!${Defined[NLlootdist]}) /declare NLlootdist int outer 100
/if (!${Defined[NLlootmode]}) /declare NLlootmode string outer
|- Check version in ini and skip aliases if current
/if (${Ini[${NLLootINIFile},Loot,Version].Equal[${NLVersion}]}) /call LoadAliases
|- Declare corpseskip ID arrays
/declare NLCorpseskip[20,2] int outer
/declare NLTempCorpse[20] int outer
|- If empty ini build it up
/if (!${Ini[${NLLootINIFile},Loot,AutoLootMode].Length}) /call BuildINI
|- Load variables from ini
/if (${Ini[${NLLootINIFile},Loot,AutoLootMode].Length}) /varset NLlootmode ${Ini[${NLLootINIFile},Loot,AutoLootMode]}
/if (${Ini[${NLLootINIFile},Loot,AutoLootDistance].Length}) /varset NLlootdist ${Ini[${NLLootINIFile},Loot,AutoLootDistance]}
|- Echo NL status upon load
/echo Ninjaloot.inc Loaded.
/echo Ninjaloot Usage:
/echo /autoloot <all|drop|nditem|off> <radius#>
/echo /lootstatus <displays Autoloot status>
/echo Autoloot Status
/if (${NLlootmode.Equal[ALL]}) /docommand /lootnodrop never
/if (${NLlootmode.Equal[DROP]}) /docommand /lootnodrop always
/if (${NLlootmode.Equal[NDITEM]}) /docommand /lootnodrop always
/if (${NLlootmode.Equal[OFF]}) /docommand /lootnodrop always
/return
Sub NLAutoloot
/doevents SetAutoLoot
/doevents Autolootstatus
/if (${NLlootmode.Equal[OFF]}) /return
/if (!${Defined[lootslot]}) /declare lootslot int local
/if (!${Defined[loottotal]}) /declare loottotal int local -1
/if (!${Defined[w]}) /declare w int local
/if (!${Defined[e]}) /declare e int local
/delay 2
/call Updatecorpse
|- Check for avialable corpses to loot
/for e 1 to 20
/varset NLTempCorpse[${e}] ${NearestSpawn[${e},NPC Corpse radius ${NLlootdist}].ID}
/next e
/for e 1 to 20
/if (${NLTempCorpse[${e}]}<=0) {
/echo Autoloot: No More Corpses Found
/return
}
|- Check if corpse is listed in Skip array
/for w 1 to 20
/if (${NLTempCorpse[${e}]}==${NLCorpseskip[${w},1]}) {
/echo Autoloot: Skipping ${NLTempCorpse[${e}]}; Per Skip List
/next e
}
/next w
|- Test Z distance
/if (${Spawn[${NLTempCorpse[${e}]}].DistanceZ}>50) {
/call Addcorpse
/echo Autoloot: Skipping ${NLTempCorpse[${e}]}; Z Plane out of limits
/next e
/delay 2
}
|- Make sure Spawnid is a corpse
/if (${Spawn[${NLTempCorpse[${e}]}].Type.NotEqual[Corpse]}) {
/echo Autoloot: Skipping ${NLTempCorpse[${e}]}; Not a corpse!
/next e
}
|- Check if corpse is players corpse
/if (${Spawn[${NLTempCorpse[${e}]}].Deity.ID}!=0) {
/echo Autoloot: Skipping ${NLTempCorpse[${e}]}; Is a PLAYERS corpse!
/next e
}
|-Target corpse and begin looting
/delay 2
/squelch /target id ${NLTempCorpse[${e}]}
/delay 1s ${Target.ID}==${NLTempCorpse[${e}]}
/echo Autoloot: Looting ${Target.CleanName}
/delay 5s ${Target.ID}==${NLTempCorpse[${e}]}
/if (${Target.ID}!=${NLTempCorpse[${e}]}) /next e
|- Get 5 seconds (max) closer; warning, no detecting being stuck!
/face fast ${If[${Me.Underwater},,nolook]}
/if (${Me.Buff[Summon Drogmor].ID} || ${Me.Buff[Summon Horse].ID}) /dismount
/keypress forward hold
/delay 5s ${Target.Distance}<5
/keypress forward
|- Check for full inventory
/if (!${Me.FreeInventory}) {
/beep
/echo Autoloot: ** INVENTORY FULL !
/varset NLlootmode OFF
/echo Autoloot: ** AutoLooting is now OFF!
/return
}
/delay 1s
/loot
/delay 3
/delay 1s ${Window[LootWnd].Open}
|- Check if unable to loot at this time
/doevents NotYourKill
|- Corpse with no items
/delay 3
/if (!${Corpse.Items}) {
/delay 2
/echo Autoloot: NO LOOT! Cheap Bastard!
/notify LootWnd DoneButton leftmouseup
/delay 1s !${Corpse.Open}
/next e
}
/delay 3
|- Get total count of items on corpse
/varset loottotal ${Math.Calc[${Corpse.Items}]}
/delay 2
:autoxplootlag
/delay 3
/if (${loottotal}!=${Corpse.Items}) {
/delay 3
/varset loottotal ${Corpse.Items}
/goto :autoxplootlag
}
|- Check items on Corpse
/delay 3
/for lootslot 1 to ${loottotal}
/delay 1s ${InvSlot[loot${lootslot}].Item.ID}!=0
/delay 2
|- Check if item is LORE
/if (${InvSlot[loot${lootslot}].Item.Lore}) {
/echo Autoloot: Lore ITEM Found
/if (${FindItem[${InvSlot[loot${lootslot}].Item.Name}].InvSlot}) {
/echo Autoloot: Skipping; Found Loreitem in Characters Inventory
/if (${lootslot}>=${loottotal}) {
/delay 2
/call Itemsleft
/next e
}
/next lootslot
}
/if (${FindItem[${InvSlot[loot${lootslot}].Item.Name}].InvSlot.Pack}) {
/echo Autoloot: Skipping; Found Loreitem in Characters Bags
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/delay 2
/next e
}
/next lootslot
}
}
|- Handling of NODROP items on corpse
/if (${InvSlot[loot${lootslot}].Item.NoDrop}) {
/echo Autoloot: NO DROP ITEM Found
/delay 2
/if (!${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Length}) {
/ini "${NLLootINIFile}" "${InvSlot[loot${lootslot}].Item.Name.Left[1]}" "${InvSlot[loot${lootslot}].Item.Name}" NDITEM
/echo Autoloot: Adding ${InvSlot[loot${lootslot}].Item.Name} to ${NLLootINIFile} defaulting as NDITEM
}
/delay 2
/if (${NLlootmode.Equal[DROP]}) {
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/next lootslot
/delay 2
}
/if (${NLlootmode.Equal[NDITEM]}) {
/if (${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Equal[NDKeep]}) {
/call LootItem ${lootslot} KEEP
/if (${lootslot}>=${loottotal}) {
/delay 2
/call Itemsleft
/next e
}
/next lootslot
}
/if (${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Equal[NDDestroy]}) {
/call LootItem ${lootslot} DESTROY
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
/delay 2
}
/delay 2
/next lootslot
}
/if (${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Equal[NDITEM]}) {
/echo Autoloot: Skipping ${InvSlot[loot${lootslot}].Item.Name} per NDITEM flag
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/next lootslot
}
}
/if (${NLlootmode.Equal[ALL]}) {
/call LootItem ${lootslot} KEEP
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/delay 2
/next lootslot
}
}
|- Loot droppable items and Keep/Destroy by ini flags
/if (!${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Length}) {
/ini "${NLLootINIFile}" "${InvSlot[loot${lootslot}].Item.Name.Left[1]}" "${InvSlot[loot${lootslot}].Item.Name}" Keep
/echo Autoloot: Adding ${InvSlot[loot${lootslot}].Item.Name} to ${NLLootINIFile} defaulting as Keep
}
/if (${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Equal[Keep]}) {
/call LootItem ${lootslot} KEEP
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/next lootslot
}
/if (${Ini[${NLLootINIFile},"${InvSlot[loot${lootslot}].Item.Name.Left[1]}","${InvSlot[loot${lootslot}].Item.Name}"].Equal[Destroy]}) {
/call LootItem ${lootslot} Destroy
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/next lootslot
}
/if (${lootslot}>=${loottotal}) {
/call Itemsleft
/next e
}
/next lootslot
/next e
/return
Sub Itemsleft
|-Link remaining items on corpse
/if (${Corpse.Items}) {
/notify LootWND LW_BroadcastButton leftmouseup
/keypress enter chat
/call Addcorpse
}
/notify LootWnd DoneButton leftmouseup
/delay 1s !${Corpse.Open}
/return
Sub Addcorpse
/if (!${Defined[e]}) /declare e int local
/for e 20 downto 2
/varset NLCorpseskip[${e},1] ${NLCorpseskip[${Math.Calc[${e}-1]},1]}
/varset NLCorpseskip[${e},2] ${NLCorpseskip[${Math.Calc[${e}-1]},2]}
/next e
/varset NLCorpseskip[1,1] ${Target.ID}
/varset NLCorpseskip[1,2] ${Math.Calc[${MacroQuest.Running}+1800000]}
/return
Sub addnotmykill
/if (!${Defined[e]}) /declare e int local
/for e 20 downto 2
/if (${NLCorpseskip[${e},1]}!=0) /next e
/varset NLCorpseskip[${e},1] ${Target.ID}
/varset NLCorpseskip[${e},2] ${Math.Calc[${MacroQuest.Running}+180000]}
/return
Sub Updatecorpse
/if (!${Defined[e]}) /declare e int local
/for e 1 to 20
/if (!${Spawn[${NLCorpseskip[${e},1]}].ID}) /varset NLCorpseskip[${e},1] 0
/if (${NLCorpseskip[${e},2]}<=${MacroQuest.Running} && ${NLCorpseskip[${e},1]}!=0) /varset NLCorpseskip[${e},1] 0
/next e
/return
Sub LootItem(int lootslot, string handling)
/if (${handling.Equal[KEEP]}) /echo Autoloot: Keeping a ${InvSlot[loot${lootslot}].Item.Name}... WOOT!
/if (${handling.Equal[DESTROY]}) /echo Autoloot: Destroying a ${InvSlot[loot${lootslot}].Item.Name}... Bubbye!
:retryloot
/itemnotify loot${lootslot} leftmouseup
/if (!${Cursor.ID} && ${NLlootmode.Equal[DROP]}) {
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox No_Button leftmouseup
/goto :retryloot
}
/if (!${Cursor.ID} && ${NLlootmode.NotEqual[DROP]}) {
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
/goto :retryloot
}
:NLLootItem
/delay 1
/if (${handling.Equal[KEEP]}) /autoinventory
/delay 1
/if (${handling.Equal[DESTROY]}) /destroy
/delay 1
/if (${Cursor.ID}) /goto :NLLootItem
/return
Sub LoadAliases
/ini "${NLLootINIFile}" Loot Version "${NLVersion}"
/squelch /alias /autoloot /echo SetAutoLoot
/squelch /alias /lootstatus /echo Autoloot Status
/return
Sub BuildINI
|- Build a retarded ini, but it makes it alpha ordered
/echo Building INI file
/ini "${NLLootINIFile}" Loot AutoLootMode OFF
/ini "${NLLootINIFile}" Loot AutoLootDistance 100
/ini "${NLLootINIFile}" A A NULL
/ini "${NLLootINIFile}" B B NULL
/ini "${NLLootINIFile}" C C NULL
/ini "${NLLootINIFile}" D D NULL
/ini "${NLLootINIFile}" E E NULL
/ini "${NLLootINIFile}" F F NULL
/ini "${NLLootINIFile}" G G NULL
/ini "${NLLootINIFile}" H H NULL
/ini "${NLLootINIFile}" I I NULL
/ini "${NLLootINIFile}" J J NULL
/ini "${NLLootINIFile}" K K NULL
/ini "${NLLootINIFile}" L L NULL
/ini "${NLLootINIFile}" M M NULL
/ini "${NLLootINIFile}" N N NULL
/ini "${NLLootINIFile}" O O NULL
/ini "${NLLootINIFile}" P P NULL
/ini "${NLLootINIFile}" Q Q NULL
/ini "${NLLootINIFile}" R R NULL
/ini "${NLLootINIFile}" S S NULL
/ini "${NLLootINIFile}" T T NULL
/ini "${NLLootINIFile}" U U NULL
/ini "${NLLootINIFile}" V V NULL
/ini "${NLLootINIFile}" W W NULL
/ini "${NLLootINIFile}" X X NULL
/ini "${NLLootINIFile}" Y Y NULL
/ini "${NLLootINIFile}" Z Z NULL
/return
Sub Updateini
/ini "${NLLootINIFile}" "Loot" "AutoLootMode" "${NLlootmode}"
/ini "${NLLootINIFile}" "Loot" "AutoLootDistance" "${NLlootdist}"
/return
Sub Event_SetAutoLoot(string Line)
|- Set the new loot distance, if supplied
/if (${Line.Arg[4].Length}) /varset NLlootdist ${Line.Arg[4]}
|- Set the mode
/if (${Line.Arg[3].Equal[ALL]}) {
/varset NLlootmode ALL
/echo ** AutoLoot ON - Will loot ALL items
/echo ****CAUTION**** Turning off requestor for NODROP items!!! ****CAUTION****
/echo ** AutoLoot distance is ${NLlootdist} ft.
/docommand /lootnodrop never
/call Updateini
/return
}
/if (${Line.Arg[3].Equal[DROP]}) {
/varset NLlootmode DROP
/echo ** AutoLoot ON - Will loot only DROPABLE items
/echo ** AutoLoot distance is ${NLlootdist} ft.
/docommand /lootnodrop always
/call Updateini
/return
}
/if (${Line.Arg[3].Equal[NDITEM]}) {
/varset NLlootmode NDITEM
/echo ** AutoLoot ON - Will loot only SPECIFIED NO-DROP items
/echo ** AutoLoot distance is ${NLlootdist} ft.
/docommand /lootnodrop always
/call Updateini
/return
}
/if (${Line.Arg[3].Equal[OFF]}) {
/varset NLlootmode OFF
/echo ** AutoLoot OFF - Will NOT loot any items
/call Updateini
/return
}
/echo Syntax:
/echo /autoloot <all|drop|nditem|off> <radius#>
/echo Defaulting to OFF
/varset NLlootmode OFF
/call Updateini
/return
Sub Event_Autolootstatus
/if (${NLlootmode.Equal[ALL]}) {
/echo ** AutoLoot ON - Will loot ALL items
/echo ****CAUTION**** Turning off requestor for NODROP items!!! ****CAUTION****
/echo ** AutoLoot distance is ${NLlootdist} ft.
}
/if (${NLlootmode.Equal[DROP]}) {
/echo ** AutoLoot ON - Will loot only DROPABLE items
/echo ** AutoLoot distance is ${NLlootdist} ft.
}
/if (${NLlootmode.Equal[NDITEM]}) {
/echo ** AutoLoot ON - Will loot only SPECIFIED NO-DROP items
/echo ** AutoLoot distance is ${NLlootdist} ft.
}
/if (${NLlootmode.Equal[OFF]}) {
/echo ** AutoLoot OFF - Will NOT loot any items
}
/return
Sub Event_NotYourKill
/echo Autoloot: Adding corpse to unable to loot list
/call addnotmykill
/return 