Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: "eat" command should work with hot dogs

  1. #1
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default "eat" command should work with hot dogs

    Hot dogs from the Clan Hotdog Stand are not real items. Therefore, when you say "eat 1 optimal dog", the item finder says "optimal dog does not match any items". However, the "eat" command has special code that allows it to eat non-items from Chez Snootee.

    It would nice if similar code could be added to eat a hot dog from your Clan's Hot Dog stand.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  2. #2

    Default

    Right below the code for Chez, something like
    Code:
    			if ( ClanLoungeRequest.isHotDog( parameters ) )
    			{
    				RequestThread.postRequest( ClanLoungeRequest.buyHotDogRequest( parameters ) );
    				return false;
    			}
    should be added. "parameters" is the wrong parameter for isHotDog() though, and if it's being split into name and quantity there, maybe it could be before the other two blocks as well (instead of after), which would require a bit of refactoring. There's also the fact that eating multiple fancy hot dogs isn't allowed, but eating multiple boring hot dogs needs to be possible.

  3. #3
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Right. Also, it would be nice if there was more checking on whether you've already eaten a fancy hot dog today, whether the hot dog is currently available from your current clan's hot dog stand, and so on. Some of those functions probably already exist in ClanLoungeRequest.

    If you look at the function that the UseItemCommand calls for Chez in RestaurantCommand (if I recall correctly), we could make a eatHotDog function which does all those checks, generates the expected error message, and so on. If no errors, it then submits the request.

    But yeah - the core functionality exists. We just need to make a method which does the argument checking and calls it.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Revision 13046 should do this. It has all sorts of checks - access to Clan VIP lounge, availability of a particular hot dog, fullness, milk, etc. etc.

    In order to get the "available in clan" check to work, I removed the "when building hot dog list, don't add fancy dogs if you've already eaten one today" from visiting the hot dog stand. I never did like that, anyway, but I bet that fancy hot dogs will show up on the Food panel of the Item Manager now, even if you've eaten one. If so, I will fix that in a different way.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #5
    Senior Member Fluxxdog's Avatar
    Join Date
    Nov 2009
    Posts
    1,501

    Default

    Side question: Is there any way to get the eat[silent]() functions to consume a dog?
    Last edited by Fluxxdog; 11-16-2013 at 10:33 AM.
    --
    The worst crime you can commit against another human being is to make them think.

  6. #6
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    If sushis are anything to go by then no. Sushi.ash does a cli_execute("eat") on the chosen sushi.

  7. #7
    Senior Member Winterbay's Avatar
    Join Date
    Feb 2010
    Posts
    5,033

    Default

    Actually, that's not true. It uses "make". If eat now works for hot dogs perhaps eat() may as well.
    My scripts:
    Best sushi for Profit
    Winterbay's Helpful Automatic Monsterbasher (WHAM)

    Scripts maintained by me:
    Autobasement
    Smashlib

    A small programmer joke:
    Wife: Honey, please go to the market and buy 1 bottle of milk. If they have eggs, bring 6.
    The man came back with 6 bottles of milk.
    Wife: Why did you buy 6 bottles of milk.
    Man: Because they had eggs...

    The 6 Stages of Debugging: 1 )That can't happen. 2) That shouldn't happen. 3) Hmmm, weird. 4) Why does that happen? 5) Oh, I see. 6 )How did that ever work?

    All programs can be optimized, and all programs have bugs; therefore all programs can be optimized to one line that doesn’t work. /Bob Fitch, Blizzard

  8. #8
    Senior Member Fluxxdog's Avatar
    Join Date
    Nov 2009
    Posts
    1,501

    Default

    Well, it's just that I tried it but eat($item[optimal dog]) doesn't work because $item[optimal dog] doesn't exist. IIRC, negative items like the dogs and Crimbo food aren't made in to $item[]s, right? Always wondered why that was.
    --
    The worst crime you can commit against another human being is to make them think.

  9. #9
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,131

    Default

    Well, it's just that I tried it but eat($item[optimal dog]) doesn't work because $item[optimal dog] doesn't exist. IIRC, negative items like the dogs and Crimbo food aren't made in to $item[]s, right? Always wondered why that was.
    Originally Posted by Fluxxdog View Post
    This Feature Request might interest you. I'm not sure if it will eventually lead to negative items being available in ASH, but it does point out a hitch in that idea:

    Peche a la Frog: desc_item.php?whichitem=-1_food
    As Jus Gezund Heit: desc_item.php?whichitem=-2_food
    Bouillabaise Coucher Avec Moi: desc_item.php?whichitem=-3_food

    Petite Porter: desc_item.php?whichitem=-1_booze
    Scrawny Stout: desc_item.php?whichitem=-2_booze
    Infinitesimal IPA: desc_item.php?whichitem=-3_booze

    So, which ones are items -1, -2, and -3, respectively?

    The other hitch is that if I put those in, there will immediately be requests (Theraze, I am looking at you) to put in sushi as negative pseudo-items as well - even though KoL itself has no publicized item descriptions for them. And I don't want to simply make up numbers.

    If you want the "eat" command to consider sushi, make a new Feature Request. As you point out, "make" works.
    If you want a way to eat hot dogs or sushi via eat(), well, I expect not, when you can simply use cli_execute( "eat optimal dog" ).
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  10. #10
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,734

    Default

    Meh, I don't really eat sushi. It's why I added the brute guessing code to TheSea. So don't expect the request from me unless someone else asks for it first, which is how that whole pseudo-mess happened before. Heh.

Similar Threads

  1. Feature - Implemented Let "acquire" CLI command work for multiple items
    By adeyke in forum Bug Reports
    Replies: 1
    Last Post: 11-22-2013, 07:31 PM
  2. Replies: 0
    Last Post: 05-26-2012, 04:02 AM
  3. Replies: 0
    Last Post: 03-25-2012, 06:20 PM
  4. Bug - Fixed "login" command does not work in --CLI
    By muczachan in forum Bug Reports
    Replies: 6
    Last Post: 11-08-2011, 05:52 PM
  5. CLI "using" command -- how does it work?
    By aqualectrix in forum Scripting Discussion
    Replies: 3
    Last Post: 03-08-2010, 09:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •