Ninjadvloot.inc v1.3

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

drzoon
a hill giant
a hill giant
Posts: 239
Joined: Tue May 04, 2004 5:38 pm

Post by drzoon » Tue Jan 17, 2006 11:31 am

A_Druid_00 wrote:Are you 100% sure about that? I swear in my testing the confirmation box was popping up.
Well I didn't test it rigorously, but I did destroy a couple of things with /destroy, while I had "destroy confirmation" on. With /destroy they just disappeared, but when I clicked the item onto the destroy button in inventory, it popped up with the confirmation box. I'll test again at home tonight and make sure.

toomanynames
a grimling bloodguard
a grimling bloodguard
Posts: 1844
Joined: Mon Apr 11, 2005 11:10 am

Post by toomanynames » Mon Mar 06, 2006 9:31 am

AD00, is this snippet current?

I'm asking because the looting for me is sparatic at best. Sometimes he'll open the corpse and loot, other times he'll just open wait a bit then close the corpse, etc. Sometimes he'll loot the items, sometimes not (even same items with =Keep in INI file).

I'm can't seem to get it consistant though so I am still troubleshoot this. The "loot bot" is a background session and I'm thinking this has something to do with it, are there special tweaks I should make to take this into consideration (e.g. if the session is getting 5fps while in background).

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Mon Mar 06, 2006 9:38 am

Is your FPS that low? That very may well be the problem if so.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Yunto?
a grimling bloodguard
a grimling bloodguard
Posts: 502
Joined: Sat Nov 19, 2005 12:05 pm

Post by Yunto? » Mon Mar 06, 2006 9:40 am

toomanynames wrote:AD00, is this snippet current?

I'm asking because the looting for me is sparatic at best. Sometimes he'll open the corpse and loot, other times he'll just open wait a bit then close the corpse, etc. Sometimes he'll loot the items, sometimes not (even same items with =Keep in INI file).

I'm can't seem to get it consistant though so I am still troubleshoot this. The "loot bot" is a background session and I'm thinking this has something to do with it, are there special tweaks I should make to take this into consideration (e.g. if the session is getting 5fps while in background).
It work 100% for me, and my loot bot gets somewhere between 5 and 7 fps. It only renders once every 3 seconds in the background. Dont think its your fps.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Mar 06, 2006 9:52 am

I may have tweaked some things in my autobot version of it toomanynames. I haven't kept this post up to date, since it's in the general section. I was feeling generous the day I posted this inc here in snippets.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

outlander
a hill giant
a hill giant
Posts: 232
Joined: Mon Feb 14, 2005 11:40 am

Post by outlander » Tue May 09, 2006 12:54 pm

If using /makecamp from MQ2MoveUtils you will want to add /target clear right before the /return of Sub LootMobs

/makecamp will only return you to camp if your target is clear, previously if the loot code left the body you would still have it targeted and therefor would not return to camp.

(you can thank A_Druid_00 for this bit)
If you don't want the target clear spam then change that to
/squelch /target clear

And yet a different version that will only clear the target if you have a target.
/if (${Taret.ID}) /squelch /target clear

Kiniktoo
a ghoul
a ghoul
Posts: 97
Joined: Sun May 16, 2004 8:18 pm

Post by Kiniktoo » Tue Jun 27, 2006 9:50 am

this is weird, i cant get it to /call lootcorpse in my macro.

everything is spelled right, it just wont call.


the weird part is there is no error message

mystikule
a snow griffon
a snow griffon
Posts: 353
Joined: Sat Jul 17, 2004 9:23 pm

Post by mystikule » Tue Jun 27, 2006 5:17 pm

Code: Select all

/call [b]L[/b]oot[b]C[/b]orpse
Pretty sure sub calling is case sensitive.

User avatar
eqsolro
a ghoul
a ghoul
Posts: 113
Joined: Fri Sep 13, 2002 4:20 pm
Location: Germany

Post by eqsolro » Wed Jun 28, 2006 9:25 am

Nope, i use

Code: Select all

			/call lootcorpse
works perfect.


You have

Code: Select all

  #include ninjadvloot.inc 
at start of mac? and you have the newest ninjadvloot.inc version ?
-----------------------------------
LAX and Devs for government
-----------------------------------

Dont tell my husband, that i use his mailadress.
Dont tell my husband, that i play EverQuest.
Dont tell my husband, that i use MacroQuest2.
Dont tell my husband, that i donated for MQ2.
Dont tell my husband, that i bought a new PC.
Dont tell my husband, that i payed a Menstripper. ( you never seen 6 middladys crying? i was 1 :) ... )

An dont tell my husband, that i used his fucking CreditCard for all above :)

cheers ...

*** And her Husband now that all :) ***
We are back after 5 Years of NO EQ :)

Moeymoejoe
a snow griffon
a snow griffon
Posts: 363
Joined: Sun Jul 18, 2004 10:17 pm

Post by Moeymoejoe » Wed Aug 02, 2006 8:02 pm

Fix to handle items with one comma in the name "Bloodstained Journal, Vol 5". All i do is strip out the first comma when accessing the ini file.

Code: Select all

Sub LootCorpse
/declare i          int    local
/declare LootList   string local
/declare CurrentItem 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}
/varset CurrentItem ${If[${Corpse.Item[${i}].Name.Find[,]},${Corpse.Item[${i}].Name.Arg[1,,]}${Corpse.Item[${i}].Name.Arg[2,,]},${Corpse.Item[${i}].Name}]}
  /if (${Corpse.Item[${i}].ID} && !${Select[${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"]},Ignore,Keep,Destroy]}) {
    /if (${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${CurrentItem}" Ignore
    /if (!${Corpse.Item[${i}].NoDrop}) /ini "loot.ini" "${Corpse.Item[${i}].Name.Left[1]}" "${CurrentItem}" Keep
  }
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"].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]}","${CurrentItem}"].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]}","${CurrentItem}"].Equal[Keep]}) /call LootItem ${i} Keep right
  /if (${Ini[Loot.ini,"${Corpse.Item[${i}].Name.Left[1]}","${CurrentItem}"].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

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Aug 02, 2006 8:21 pm

very nice work
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Kiniktoo
a ghoul
a ghoul
Posts: 97
Joined: Sun May 16, 2004 8:18 pm

Post by Kiniktoo » Mon Aug 21, 2006 9:11 pm

sorry for being retarded.

i cant figure out the code to turn this into a mac.

as in, set hotbutton 1 to /mac ninja and it loots.

toomanynames
a grimling bloodguard
a grimling bloodguard
Posts: 1844
Joined: Mon Apr 11, 2005 11:10 am

Post by toomanynames » Mon Aug 21, 2006 9:22 pm

Code: Select all

sub Main
/call SetupAdvLootVars
/call LootCorpse
/return
that should work I think
[quote="DKAA"]You cant. Only the server knows.[/quote]

Kiniktoo
a ghoul
a ghoul
Posts: 97
Joined: Sun May 16, 2004 8:18 pm

Post by Kiniktoo » Mon Aug 21, 2006 9:30 pm

the current macro has ended. no actions

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Mon Aug 21, 2006 9:54 pm

ninja.mac

Code: Select all

#include Ninjadvloot.inc 

SubMain
/call SetupAdvLootVars 
:Loop
/if (${Target.Type.NotEqual[NPC]}) /call LootCorpse 
/goto :Loop
/return