This does it!
As it is currently set up it will do the following...
1. summon 7 dimensional holes
2. summon food until you have 40
3. summon drink until you have 40
4. move 20 food and 20 drink to the dimensional hole in the 8th bag
5. hand all 7 dimensional holes to the first party member on your list.
Now, I could have made it summon other items, but I didn't. Feel free to modify it for your needs.
It could easily be made to check for how many group members there are an summon bags and food and drink for them all. I don't need that, so its up to you. Enjoy!
Thanks go out to Lax, RedOne, Bardomatic, Fearless, Slither, and others who I can't recall right at this moment.
This includes examples on how to do a "Do While" loop, use a "Switch" (which is very similar to "Select Case", locate items in inventory slots, or inside bags and how to pick them up. It also shows how to give something to a party member, and from that you can figure out how to give to just about anyone. Again, enjoy!
Code: Select all
#include spell_routines.inc
function main()
{
EQExecute /memspellset Summon
wait 3000 ${Me.SpellReady[Dimensional Pocket]}
call Baggage
speak Done summoning bags
call FoodDrink
speak Done summoning Food and Drink
call MoveFood
speak Food and drink moved
target ${Group.Member[1]}
wait 3
call GiveIt
if !${Me.Sitting}
Me:Sit
echo END Bag script
}
function Baggage()
{
if ${FindItemCount[=Dimensional Pocket]}<7
{
do
{
wait ${Me.SpellReady[Dimensional Pocket]}
wait ${Math.Rand[15]:Inc[5]}
echo Spell Ready:${Me.SpellReady[Dimensional Pocket]} && Mana:${Me.PctMana}>20
echo bag count is ${FindItemCount[=Dimensional Pocket]}
if ${Me.CurrentMana}>40
{
echo summoning bag
call Cast "Dimensional Pocket"
if ${Cursor(exists)}
{
EQExecute /autoinventory
Me:Sit
echo waiting for spell ready
wait 20 !${Cursor.ID}
wait ${Math.Rand[20]:Inc[65]}
}
}
else
{
call Meditate
}
}
while (${FindItemCount[=Dimensional Pocket]}<7)
}
}
function FoodDrink(int ForD=1)
{
variable string CastMe
variable string CastItem
do
{
if ${ForD}==1 && ${FindItemCount[=Summoned: Black Bread]}<40
{
CastMe:Set[Summon Food]
echo I am ready to cast ${CastMe}
CastItem:Set[Summoned: Black Bread]
}
else
{
CastMe:Set[Summon Drink]
echo I am ready to cast ${CastMe}
CastItem:Set[Summoned: Globe of Water]
}
do
{
wait ${Me.SpellReady[${CastMe}]}
wait ${Math.Rand[10]:Inc[10]}
if ${Me.CurrentMana}>5
{
call Cast "${CastMe}"
if ${Cursor(exists)}
{
EQExecute /autoinventory
wait 20 !${Cursor.ID}
}
}
else
{
call Meditate
}
echo I have ${FindItemCount[=Summoned: Black Bread]} Summoned: Food and ${FindItemCount[=Summoned: Globe of Water]} Summoned Drink
}
while (${FindItemCount[=${CastItem}]}<40)
if ( ${FindItemCount[=Summoned: Black Bread]}>=40 && ${FindItemCount[=Summoned: Globe of Water]}>=40 )
return
ForD:set[${Math.Calc[${ForD+1}]
}
while (${ForD}<=2)
}
function MoveFood()
{
variable string SearchItem
variable int PickItUp
variable int ThisBag
variable int Count=1
do
{
if ${Count}==1
{
PickItUp:Set[${FindItem[=Summoned: Black Bread].InvSlot}]
SearchItem:Set[Summoned: Black Bread]
}
else
{
PickItUp:Set[${FindItem[=Summoned: Globe of Water].InvSlot}]
SearchItem:Set[Summoned: Globe of Water]
}
echo ${SearchItem} is in slot ${PickItUp}
if ${PickItUp}>29
{
echo ${Math.Calc[(${PickItUp}-1)/10].Int}
switch ${Math.Calc[(${PickItUp}-1)/10].Int}
{
case 25
ThisBag:Set[22]
break
case 26
ThisBag:Set[23]
break
case 27
ThisBag:Set[24]
break
case 28
ThisBag:Set[25]
break
case 29
ThisBag:Set[26]
break
case 30
ThisBag:Set[27]
break
case 31
ThisBag:Set[28]
break
case 32
ThisBag:Set[29]
break
}
echo ${ThisBag} holds it
waitframe
echo opening bag#${Math.Calc[${ThisBag}-21].Int} with ${SearchItem} in it
NoModKey EQItemNotify ${ThisBag} RightMouseUp
wait 5 ${Window[pack${ThisBag}].Open}
NoModKey shift EQItemNotify ${PickItUp} LeftMouseUp
wait 5
echo closing bag with food
NoModKey EQItemNotify ${ThisBag} RightMouseUp
}
else
{
echo ${ThisBag} should be zero
shift EQItemNotify ${PickItUp} LeftMouseUp
}
echo opening Dimensional Pocket in Inventory packslot 8
NoModKey EQItemNotify 29 RightMouseUp
wait 5 ${Window[pack8].Open}
if ${Count}==1
{
echo my count is ${Count}
echo I have ${Cursor.Name}
NoModKey shift EQItemNotify 321 LeftMouseUp
}
else
{
echo my count is ${Count}
echo i have ${Cursor.Name}
NoModKey shift EQItemNotify 322 LeftMouseUp
}
wait 5
echo closing bag with food
NoModKey EQItemNotify 29 RightMouseUp
echo ${SearchItem} before
SearchItem:Set[Summoned: Glob of Water]
echo ${SearchItem} after
}
while ${Count:Inc}<=2
}
function GiveIt(int n=1)
{
variable int Count
for (Count:Set[0] ; ${Count}<=7 ; Count:Inc)
{
NoModKey EQItemNotify ${Math.Calc[22+${Count}]} LeftMouseUp
wait 5 ${Cursor(exists)}
Spawn[${Group.Member[${n}]}]:LeftClick
wait ${Window[TradeWnd].Open}
wait 10
}
Window[TradeWnd].Child[TRDW_Trade_Button]:LeftMouseUp
}
function atexit()
{
echo done giving ${Group.Member[1]} bags food and drink
}
function Meditate()
{
echo resting for mana
if !${Me.Sitting}
Me:Sit
wait 9999 ${Me.PctMana}==100
echo done resting for mana
}
