Page 2 of 3

Posted: Fri Apr 29, 2005 1:37 am
by Some Guy
You auto eat/drink when those are below 2900ish. (Somewhere between 2900 and 3000).
You can force eat/drink below 6000.

Posted: Fri Apr 29, 2005 8:23 am
by A_Druid_00
Twen wrote:is there a command to tell what your hunger and thirst currently is?and at what value do you auto eat?
If you read the description in the first post it tells you that it eats/drinks when your hunger/thirst falls below 5000. Some Guy is right that EQ auto-consumes at around 3000.

ver 2.3

Posted: Mon May 02, 2005 2:40 pm
by onetimehero
I removed a bit of redundant code, stripped out the loading of items into an array for no apparent reason 8-). This is untested btw...somebody try it and tell me where it's broken.

Code: Select all

|Feedme.inc v2.3
#Event SetFeedMe "[MQ2] SetFeedMe#*#" 

Sub FeedMeDeclares 
/declare DoFeedMe int outer 1 

/squelch /alias /feedme     /echo SetFeedMe 
/return 

Sub FeedMe 
/if (${Me.Casting.ID}) /return 
/if (${DoFeedMe}==1) { 
  /if (${Me.Hunger}<=5000) /call Consume Food 
  /if (${Me.Thirst}<=5000) /call Consume Drink 
} 
/return 

Sub Consume(string what) 
/declare mypack         string local 
/declare myslot         string local 
/declare i              int    local 
/declare foodcount      int    local 
/declare food 		string local

/autoinventory 
/if (${Cursor.ID}) /return 
/varset foodcount ${Ini[feedme.ini,${what}].Count[${what}]} 
/for i 1 to ${foodcount} 
/varset food ${Ini[feedme.ini,${what},${what}${i}]}
/if (${FindItemCount[${food}]}>0) { 
  /varset mypack ${FindItem[${food}].InvSlot.Pack} 
  /varset myslot ${FindItem[${food}].InvSlot} 
  /if (${mypack}) { 
    /if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup 
    :WaitForBagOpen 
    /nomodkey /ctrl /itemnotify ${myslot} leftmouseup 
    /if (!${Cursor.ID}) /goto :WaitForBagOpen 
    /nomodkey /itemnotify ${mypack} leftmouseup 
    /nomodkey /itemnotify ${mypack} rightmouseup 
    /nomodkey /itemnotify ${mypack} leftmouseup 
  } else { 
    /nomodkey /itemnotify ${myslot} rightmouseup 
  } 
} else { 
  /next i 
} 
/return 


Sub Event_SetFeedMe(string Line) 
/if (!${Line.Arg[3].Length}) { 
  /if (${DoFeedMe}==1) { 
    /varset DoFeedMe 0 
    /echo Auto Force Feeding is now OFF 
  } else { 
    /varset DoFeedMe 1 
    /echo Auto Force Feeding is now ON 
  } 
} 
/if (${Line.Arg[3].Equal[ON]} || ${Line.Arg[3].Equal[TRUE]} || ${Line.Arg[3].Equal[1]}) { 
  /varset DoFeedMe 1 
  /echo Auto Force Feeding is now ON 
} 
/if (${Line.Arg[3].Equal[OFF]} || ${Line.Arg[3].Equal[FALSE]} || ${Line.Arg[3].Equal[0]}) { 
  /varset DoFeedMe 0 
  /echo Auto Force Feeding is now OFF 
} 
/return 
Not that A_Druid_00's code is broken...i'm just bored.

Posted: Tue May 03, 2005 9:21 am
by A_Druid_00
Thanks man, I never really got into carrying over strings from sub to sub. It's always nice to see where my code can be improved.

One question about finding stuff in the ini every time the sub is called. Wouldn't that cause the sub to access the ini every time it needs to consume? I used an array in order to get around that and reduce any disk access associated with this inc. If that's not the case, boy am I a dummy :)

Edit: Never mind, I am a dummy. I wasn't even using the array at all even though I was loading it.

Someone confirm this works without any issues and I'll update the main post.

Posted: Wed May 04, 2005 1:10 pm
by Synicasm
Had a minor problem with this last night and carrying a Large Sewing kit .

By default...
When you rt click on some carried Tradeskill containers they will open in the newer trade skill combine window ( the one with the recipies listed ).
When the macro tries to open the contaier via the following in the code ...

Code: Select all

/if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup 
it will freak out and continue to loop the errors for sometime untill a /endmacro or a /mqpause etc gets parsed.

The quickest and easiest fix is to open the container using the newer combine window ( with the recipe list etc. ) and there is a button at the bottom to change the window to be opened with ctrl Rt click. Once that is set the problem goes away.

Posted: Wed May 04, 2005 2:12 pm
by A_Druid_00
If you work out a fix for it, post it and I'll update the main post. I personally had my tradeskill containers set up to open up just like bage by default.

Posted: Wed Jun 27, 2007 7:32 am
by discip1e
can i change the "i" to anything else, perchance?

or does it need to be that for any reason?

Posted: Wed Jun 27, 2007 9:37 pm
by jacensolo
You should be able to change "i" to whatever you want, provided it doesn't match any other variable names and you change all the instances of "i". Just out of curiosity, why do you want to change "i"?

Posted: Thu Jun 28, 2007 3:37 am
by MareDK
Synicasm wrote:Had a minor problem with this last night and carrying a Large Sewing kit .

By default...
When you rt click on some carried Tradeskill containers they will open in the newer trade skill combine window ( the one with the recipies listed ).
When the macro tries to open the contaier via the following in the code ...

Code: Select all

/if (!${Window[${InvSlot[${mypack}].Name}].Open}) /nomodkey /itemnotify ${mypack} rightmouseup 
it will freak out and continue to loop the errors for sometime untill a /endmacro or a /mqpause etc gets parsed.

The quickest and easiest fix is to open the container using the newer combine window ( with the recipe list etc. ) and there is a button at the bottom to change the window to be opened with ctrl Rt click. Once that is set the problem goes away.
well you could make a check if it is a combine container before opening and then I think it is CTRL + rightclick to open it and passing the new tradeskill window

Posted: Thu Jun 28, 2007 4:03 am
by Chyld989

Code: Select all

/if (${Window[TradeskillWnd].Open}) /nomodkey /notify TradeskillWnd ExperimentButton leftmouseup 
/delay 5s !${Window[TradeskillWnd].Open}
Put this code (taken directly from packs.inc) after it opens the bag; if it's open to the tradeskill window it'll go to the regular one, and if it's already on the regular one it will go ahead like it's supposed to.

Posted: Thu Jun 28, 2007 7:40 am
by discip1e
jacensolo wrote:You should be able to change "i" to whatever you want, provided it doesn't match any other variable names and you change all the instances of "i". Just out of curiosity, why do you want to change "i"?
having a problem with bags closing after food is consumed. Was thinking maybe it's a spell_routines conflict. Was gonna try this first.

Posted: Thu Jun 28, 2007 4:08 pm
by jacensolo
The "i" isn't the problem. It's set as a local variable in both, so no possible conflict. Which version of FeedMe are you using?

Posted: Thu Jun 28, 2007 9:10 pm
by discip1e
jacensolo wrote:The "i" isn't the problem. It's set as a local variable in both, so no possible conflict. Which version of FeedMe are you using?
The one on page 1

Posted: Thu Jun 28, 2007 9:19 pm
by discip1e
is there another version I am not wary of. . .mebbe posted elsewhere?

Posted: Thu Jun 28, 2007 10:16 pm
by jacensolo
I use the version posted above by onetimehero. Well, I did a week or 2 ago. Then I donated, now I use MQ2FeedMe, the plugin. Works perfectly.