Once again, for a ench/cleric/warrior.
Great loots and xp till 46-ish actually.
Fully afkable if wanted - though I do not reccomend that, tested all macros extensively and works great. I know its not the best code, but I'm just leveling up to 50 off macros, then.. I may post my don macros then. ^^ (probably in vip though)
Note: you may need a few dlls for this to work properly.
mq2moveutils, mq2melee .. not sure what else =/
Note2: you may want to scim through and read the gemslots for spells if you are having problems.
Heres my warrior macro:
this macro pulls to the group and loots. I'll post the includes required at the bottom.
Code: Select all
|Xantan's Trilogger#3 - do with it what you want.
|This is the Warrior
#turbo
#include Spell_Routines.inc
#include ninjaloot.inc
Sub Main
/call NLPresetup
/delay 10
/moveto 2
/makecamp on -580 50.62
/delay 1s
/makecamp return
/delay 7s
/moveto 3
/makecamp leash 145
/makecamp radius 8.2
/makecamp unpause
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
:MainLoop
/call pull
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 1
/if (${Me.PctHPs} < 98) /call mobcheck
/delay 1
/goto :MainLoop
Sub pull
/makecamp off
/delay 2
/if (${Me.PctHPs} < 99) /return
/delay 2
/if (!${Me.Standing}) /stand
/delay 2
/keypress esc
/target npc gem radius 96
/target npc geo radius 96
/delay 1
/if (!${Target.ID}) {
/delay 2s
/call pull2
/return
}
/delay 1
/if (${Target.ID}) {
/stand up
/delay 2
/face
/delay 1.2s
/moveto id
:waitlook2
/if (${Target.Distance}<13) /goto :pastw8
/delay 1
/goto :waitlook2
:pastw8
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/call makecamp
/delay 2s
/call mobcheck
/delay 4
/return
}
/return
Sub pull2
/makecamp off
/moveto loc -663 40
/delay 5.5s
/moveto loc -660 -70.70
/delay 7.5s
/moveto loc -593 -68.9
/delay 5s
/target npc gem radius 25
/target npc geo radius 25
/if (!${Target.ID}) {
/delay 2s
/call pull3
/return
}
/delay 1
/if (${Target.ID}) {
/face
/delay 4
/moveto id
:waitlook2
/if (${Target.Distance}<13) /goto :pastw82
/delay 1
/goto :waitlook2
:pastw82
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/moveto loc -660 -70.70
/delay 5.8s
/moveto loc -663 40
/delay 8s
/call makecamp
/delay 3s
/call mobcheck
/delay 4
/return
}
/return
Sub pull3
/makecamp off
/moveto loc -590.35 -144.99
/delay 5.5s
/target npc gem radius 25
/target npc geo radius 25
/if (!${Target.ID}) {
/delay 1s
/call pull4
/return
}
/delay 1
/if (${Target.ID}) {
/face
/delay 4
/moveto id
:waitlook2
/if (${Target.Distance}<13) /goto :pastw82
/delay 1
/goto :waitlook2
:pastw82
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/moveto loc -593 -68.9
/delay 5.6s
/moveto loc -660 -70.70
/delay 5.6s
/moveto loc -663 40
/delay 8s
/call makecamp
/delay 2s
/call mobcheck
/delay 4
/return
}
/return
Sub pull4
/makecamp off
/moveto loc -654.23 -162.68
/delay 5.5s
/target npc gem radius 25
/target npc geo radius 25
/if (!${Target.ID}) {
/delay 1s
/call pull5
/return
}
/delay 1
/if (${Target.ID}) {
/face
/delay 4
/moveto id
:waitlook2
/if (${Target.Distance}<13) /goto :pastw82
/delay 1
/goto :waitlook2
:pastw82
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/moveto loc -590.35 -144.99
/delay 5.6s
/moveto loc -593 -68.9
/delay 5.6s
/moveto loc -660 -70.70
/delay 5.6s
/moveto loc -663 40
/delay 8s
/call makecamp
/delay 2s
/call mobcheck
/delay 4
/return
}
/return
Sub Pull5
/makecamp off
/moveto loc -654.51 -271.19
/delay 7.6s
/moveto loc -546.17 -266.17
/delay 7.1s
/target npc gem radius 25
/target npc geo radius 25
/if (!${Target.ID}) {
/delay 1s
/call pull6
/return
}
/delay 1
/if (${Target.ID}) {
/face
/delay 4
/moveto id
:waitlook2
/if (${Target.Distance}<13) /goto :pastw82
/delay 1
/goto :waitlook2
:pastw82
/doability "Kick"
/delay 1
/doability "Taunt"
/delay 1
/doability "Disarm"
/delay 1
/moveto loc -654.51 -271.19
/delay 8.1s
/moveto loc -654.23 -162.68
/delay 6.3s
/moveto loc -590.35 -144.99
/delay 6s
/moveto loc -593 -68.9
/delay 6s
/moveto loc -660 -70.70
/delay 6s
/moveto loc -663 40
/delay 7.9s
/call makecamp
/delay 1s
/call mobcheck
/delay 4
/return
}
/return
Sub pull6
/makecamp off
/delay 2
/moveto loc -654.51 -271.19
/delay 8.3s
/moveto loc -654.23 -162.68
/delay 6.4s
/moveto loc -590.35 -144.99
/delay 6.1s
/moveto loc -593 -68.9
/delay 6.1s
/moveto loc -660 -70.70
/delay 6.1s
/moveto loc -663 40
/delay 8.1s
/call makecamp
/delay 2
/call mobcheck
/delay 2
/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 7s
/return
Sub loot
/makecamp off
/delay 2
/call NLAutoloot
/delay 4.2s
/return
Sub makecamp
/tar pc enchanter
/makecamp on -580 50.62
/delay 2
/makecamp return
:waitlook
/if (${Target.Distance}>170) /call pull6
/if (${Target.Distance}>103) /call makecamp2
/if (${Target.Distance}<30) {
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
}
/delay 1
/goto :waitlook
/return
Sub makecamp2
/makecamp off
/moveto loc -660 -70.70
/delay 7s
/moveto loc -663 40
/delay 8.3s
/makecamp on -580 50.62
/delay 1
/makecamp return
/delay 1
/return
Sub mobcheck
:mobcheck
/if (${Target.ID}) /keypress esc
/delay 1
/target npc gem radius 33
/target npc geo radius 33
/delay 1
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/attack on
/stick on 9
/call fight
/delay 1.2s
/goto :mobcheck
}
/delay 20
/target npc gem radius 40
/target npc geo radius 40
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} && ${Target.Type.NotEqual[Pet]} ) {
/attack on
/stick on 9
/call fight
/delay 1.2s
/goto :mobcheck
}
/returnCode: Select all
|Xantan's Trilogger#3 - do with it what you want.
|This is the Enchanter
#turbo
#Event dead "#*#Returning to Bind Location#*#"
#event nomana "Insufficient Mana to cast this spell!"
#include Spell_Routines.inc
Sub Main
/declare SpellToCast string outer
:loop
/doevents
/call buff
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/call assist
/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 Alacrity
/if (${Me.PctMana} > 80 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff3
/varset SpellToCast Greater Shielding
/if (${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call cast "Greater Shielding" gem8 15s
/return
Sub buff2
/tar pc enchanter
/call cast "${SpellToCast}" gem5 15s
/tar pc cleric
/call cast "${SpellToCast}" gem5 15s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
Sub buff3
/tar pc enchanter
/call cast "${SpellToCast}" gem6 15s
/tar pc warrior
/call cast "${SpellToCast}" gem6 15s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
Sub assist
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/tar pc warrior
/delay 1
/doevents
/tar pc warrior
/delay 1
/if ( ${Target.PctHPs}<=98 ) {
/delay 3s
/call fight
/delay 1
/return
}
/delay 1
/return
Sub fight
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 3
/tar pc
/if ( ${Target.PctHPs}<=98 ) {
/delay 2
/if (!${Me.Standing}) /stand up
/delay 3
/assist
/delay 1s
/attack off
/delay 2s
/if ( ${Target.PctHPs}<=99 ) /goto :fightloop
/delay 1
/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]} ) {
/call cast "Tashani" gem3 10s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/if ( ${Target.PctHPs}<=40 ) /goto :fightloop2
/delay 3s
/if ( ${Target.PctHPs}<=50 ) /goto :fightloop2
/call cast "Languid Pace" gem7 10s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 5s
/if ( ${Target.PctHPs}<=50 ) /goto :fightloop2
/call cast "Suffocate" gem2 10s
/delay 4s
:fightloop2
/if (${Target.ID} && ${Target.Type.NotEqual[PC]} && ${Target.Type.NotEqual[Corpse]} ) {
/if (${Me.PctMana} > 42 && ${Target.ID} && ${Target.PctHPs}>=20 ) /call cast "Anarchy" gem1 10s
/if (${Me.PctMana} > 10 && ${Target.ID} && ${Target.PctHPs}<=38 ) /call cast "Root" gem4 8s
/delay 5s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 2s
/goto :fightloop2
/return
}
}
/return
Sub Event_nomana
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 12s
/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 Aanya's Animation
/delay 1
/call cast "${SpellToCast}" gem8 20s
/return
}
/tar pet radius 40
/if (${Target.ID}) /return
/varset SpellToCast Aanya's Animation
/delay 1
/call cast "${SpellToCast}" gem8 20s
/return
Sub OLD THINGS TO KNOW OR ETC
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
/returnCode: Select all
|Xantan's Trilogger#3 - do with it what you want.
|This is the Cleric
#turbo
#Event dead "#*#Returning to Bind Location#*#"
#event nomana "Insufficient Mana to cast this spell!"
#include Spell_Routines.inc
Sub Main
/declare Nuke string outer
/declare SpellToCast string outer
/varset Nuke "Furor"
:loop
/if ( ${Me.PctHPs}<=20 ) /call die
/doevents
/call buff
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/call assist
/goto :loop
Sub buff
/if ( ${Me.PctHPs}<=20 ) /call die
/varset SpellToCast Valor
/if (${Me.PctMana} > 90 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff2
/varset SpellToCast Symbol of Pinzarn
/if (${Me.PctMana} > 96 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff3
/varset SpellToCast Guard
/if (${Me.PctMana} > 97 && ${Me.Book[${SpellToCast}]}&&${Me.Buff[${SpellToCast}].Duration}<10 && ${Spell[${SpellToCast}].Stacks}) /call buff4
/return
Sub buff2
/if ( ${Me.PctHPs}<=20 ) /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 buff3
/if ( ${Me.PctHPs}<=20 ) /call die
/tar pc cleric
/call cast "${SpellToCast}" gem6 15s
/tar pc enchanter
/call cast "${SpellToCast}" gem6 15s
/tar pc warrior
/call cast "${SpellToCast}" gem6 15s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
Sub buff4
/if ( ${Me.PctHPs}<=20 ) /call die
/tar pc cleric
/call cast "${SpellToCast}" gem4 15s
/tar pc enchanter
/call cast "${SpellToCast}" gem4 15s
/tar pc warrior
/call cast "${SpellToCast}" gem4 15s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/return
Sub assist
/if ( ${Me.PctHPs}<=20 ) /call die
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/tar pc warrior
/delay 1
/doevents
/tar pc warrior
/delay 1
/if ( ${Target.PctHPs}<=90 ) {
/if ( ${Me.PctHPs}<=20 ) /call die
/call heal
/delay 2s
/tar pc warrior
/if ( ${Target.PctHPs}<=99 ) {
/if ( ${Me.PctHPs}<=20 ) /call die
/call fight
/return
}
}
/delay 1
/tar pc enchanter
/delay 1
/if ( ${Target.PctHPs}<=72 ) /call heal
/if ( ${Me.PctHPs}<=20 ) /call die
/delay 1
/tar pc cleric
/delay 1
/if ( ${Target.PctHPs}<=72 ) /call heal
/if ( ${Me.PctHPs}<=20 ) /call die
/delay 1
/return
Sub fight
/keypress esc
:fightloop
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/tar pc warrior
/delay 1
/doevents
/tar pc warrior
/if ( ${Target.PctHPs}<=75 ) /call Heal
/if ( ${Me.PctHPs}<=20 ) /call die
/if ( ${Target.PctHPs}>=98 ) /return
/delay 1
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/tar pc cleric
/delay 1
/if ( ${Target.PctHPs}<=69 ) /call Heal2
/if ( ${Me.PctHPs}<=20 ) /call die
/delay 1
/tar pc enchanter
/if ( ${Target.PctHPs}<=65 ) /call Heal2
/if ( ${Me.PctHPs}<=20 ) /call die
/delay 1
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/goto :fightloop
/return
Sub heal
/call cast "Healing" gem3 12s
/doevents
/delay 3s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 1s
/return
Sub heal2
/call cast "Greater Healing" gem2 12s
/doevents
/delay 3s
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 1s
/return
Sub Event_nomana
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/delay 12s
/return
Sub Event_dead
/exit
/endmacro
/delay 10s
/return
Sub die
/call cast "Divine Barrier" gem8 20s
/returnCode: 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 Heres the ini for looting, change it how you want, but this is what I used.
loot.ini
Code: Select all
[Loot]
AutoLootMode=DROP
AutoLootDistance=31
[A]
A=NULL
Amber=Keep
A Faded Salil's Writ Page=Keep
[B]
B=NULL
Bottle of Karsin Acid=NDITEM
Black Pearl=Keep
[C]
C=NULL
Chipped Black Saphire=Keep
Chipped Diamond=Keep
Chipped Saphire=Keep
Chipped Star Ruby=Keep
Chipped Opal=Destroy
Chipped Pearl=Destroy
Chipped Cat's Eye Agate=Destroy
Chipped Malachite=Destroy
Chipped Topaz=Destroy
Chipped Amber=Destroy
Crystallized Sulfur=Keep
Chipped Black Pearl=Keep
Chipped Ruby=Keep
Chipped Black Sapphire=Keep
Chipped Onyx=Destroy
Chipped Star Rose Quartz=Destroy
Chipped Fire Emerald=Keep
Chipped Peridot=Destroy
Chipped Lapis Lazuli=Destroy
Chipped Carnelian=Destroy
Chipped Wolf's Eye Agate=Keep
Chipped Fire Opal=Keep
Chipped Sapphire=Keep
Chipped Bloodstone=Destroy
Chipped Turquoise=Destroy
Chipped Jasper=Destroy
Chipped Emerald=Destroy
[D]
D=NULL
[E]
E=NULL
Emerald=Keep
[F]
F=NULL
Flawless Aquamarine=Keep
[G]
G=NULL
Golden Pendant=Destroy
Gold Ring=Destroy
[H]
H=NULL
[I]
I=NULL
Ivory=Keep
[J]
J=NULL
Jade=Keep
Jade Ring=Keep
Jade Earring=Destroy
[K]
K=NULL
Klezendian Crystal=NDITEM
[L]
L=NULL
[M]
M=NULL
Medium Gear #3=NDITEM
Medium Gear #1=NDITEM
Medium Gear #2=NDITEM
Mithril Earring=Destroy
Medium Reinforced Rod=NDITEM
[N]
N=NULL
[O]
O=NULL
Opal=Keep
[P]
P=NULL
Pearl=Keep
Peridot=Keep
Pearl Ring=Destroy
[Q]
Q=NULL
[R]
R=NULL
Rune of Sorcery=Keep
Rune of Arrest=Keep
Rune of Concussion=Keep
Rune of Banding=Keep
Rune of Contortion=Keep
Rune of Howling=Keep
Rune of Solusek Ro=Keep
Rune of Consumption=Keep
Rune of the Catalyst=Keep
Rune of the Cyclone=Keep
[S]
S=NULL
Sunshard Dust=Destroy
Silver Amulet=Destroy
Salil's Writ Pg. 60=Keep
Salil's Writ Pg. 90=Keep
Shimmering Velium Ruby=Destroy
Salil's Writ Pg. 64=Keep
[T]
T=NULL
Topaz=Keep
[U]
U=NULL
[V]
V=NULL
[W]
W=NULL
Words of Duress=Keep
Words of Quivering=Keep
Words of Cazic-Thule=Keep
Words of Neglect=Keep
Words of Abatement=Keep
Words of Duration=Keep
Words of Detention=Keep
Words of the Suffering=Keep
Words of Dark Paths=Keep
Words of Motion=Keep
Words of Resolve=Keep
[X]
X=NULL
[Y]
Y=NULL
[Z]
Z=NULL
Edit: you can find spell routines.inc in the snippets section if you don't already have it.



