- Joined
- Sep 26, 2007
- Messages
- 137
- Reaction score
- 0
- Points
- 0
Just before the patch I decided I needed an .inc file to work with Pete's bot.mac that would let me tell one of my toons to come loot an item for a quest. With MQ2 down I've had lots of time to look here and MQ2's forums, but I've not found any mac's or inc's that work to loot a specific linked item on command.
While I can't load MQ2 to be able to mess with eqbc to figure to make it work, I thought I would put this out here and see if anyone has done something simular and knows how to make this work. What I've worked out so far will tell the toon I want it to loot something, but will run into problems trying to move to the sender and find the corpse to loot.
So when I type "/bc mytoon loot link" the event should pickup "Character name" "loot" and "link" my problem is it doesn't pickup the Sender.
This would pickup the sender, but how would I pick out the link without messing up the code for bot.mac.
While I can't load MQ2 to be able to mess with eqbc to figure to make it work, I thought I would put this out here and see if anyone has done something simular and knows how to make this work. What I've worked out so far will tell the toon I want it to loot something, but will run into problems trying to move to the sender and find the corpse to loot.
Code:
#event Quest_Loot "[MQ2] #1# loot #2#"
Sub Event_Quest_Loot(string cname, string text, string lootit)
/declare lootitem string outer
/declare lootcount int outer
/varset lootitem ${lootit.Right[-56]}
/varset lootitem ${lootitem.Left[-1]}
/if (${String[${cname}].Equal[${Me.CleanName}]} && ${String[${text}].Equal[loot]}) {
/target ${Sender}
/moveto ID
/delay 20s ${Spawn[${Sender}].Distance}<15
/target ${NearestSpawn[1, corpse radius 100]}
/moveto ID
/delay 2s
/loot
/delay 10s ${Corpse.Open}
/delay 2s
/varset lootcount ${Corpse.Items}
/for x 1 to ${lootcount}
/if (${String[${Corpse.Item[${x}]}].Equal[${lootitem}]}) {
/shift /itemnotify loot${x} leftmouseup
/delay 10s ${Window[ConfirmationDialogBox].Open}
/notify ConfirmationDialogBox Yes_Button leftmouseup
/delay 10s ${Cursor.ID}
/delay 1s
:storeit
/autoinv
/delay 2s
/if (${Cursor.ID}) /goto :storeit
}
/next x
}
/keypress esc
/return
/endm
Code:
#event EQBC "<#1#> #2#"
#event EQBC "[#1#(msg)] #2#"
Sub Event_EQBC(EQBCSay,EQBCSender,EQBCCommand)