Page 3 of 5 FirstFirst 12345 LastLast
Results 51 to 75 of 109

Thread: Cook Guild Matters

  1. #51
    Join Date
    Dec 2011
    Posts
    496
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Took a few simple edits to get it to work, if I'd put some effort into it I could have easily made it flawless, but I really couldn't be bothered as I was baby sitting it anyway. Just got 99 Cooking with it. Here's the edit.
    Simba Code:
    program CookGuildMatters;
    {$i SRL/SRL/Misc/Smart.simba}
    {$i SRL/srl.simba}


    {========================= Cook Guild Matters ==============================}

    // Hehe, here we go. This script was created because I couldn't,
    // and still have trouble working with the msi scripts.
    // The MSI cooker doesn't support cooking guild either, so I was out of luck.
    // Now I'm just trying something out and hoping for the best.
    // So here we go!
    // I can't say how much I'll be updating, but it's working decently well.
    // For my needs, it fits.

    //*************Gotta Start with an Urn in the Inventory for now...************

    {-----------------------------Setup!-----------------------}
    //1. Fill out the Form Below
    //2. It's lengthy because I am a fan of choice.
    //3. Position Yourself Pretty Much Anywhere In the Cooking Room of the Guild
    //4. I think you should be good?
    //5. AntiRandom is included in the Antiban
    //6. Oh yeah! Set Your Graphics Settings!

    {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Known Issues:
      -Fashionable people rarely will don the colors of the range and cause a derp
      -Crowds Stacked on the Range can be dangerous as well}


    Procedure DeclarePlayers;
    begin
      HowManyPlayers :=1;
      NumberofPlayers(1);
      CurrentPlayer :=0;

      Players[0].Name := ''; //Insert Username in ''
      Players[0].Pass := ''; // insert password in ''
      Players[0].Nick := ''; // Nickname = 3-4 lowercase letters of character name
      Players[0].Active:= True; //I think you want to use this.
      Players[0].Pin := ''; // Leave Blank if none
    end;
    Const

    //******************* Fill in Stuff Under Here*******************************
      SRLStats_Username = '';            //Would Much Appreciate
      SRLStats_Password = '';                     //To See Exp Gains

      Tab = 2; //What Bank Tab is Your Stuff in? Keep it all in one. Looking for a #
      RawCol = 4; //Replace With the Raw Food's Column ****** Note counts from 0 up so
      RawRow = 0; //Replace With Raw Food Row          ****** ex: row 1 would be 0
      UseUrns = True ; //Want to Use Urns?  True/False
      UrnCol = 6; //Same Deal Here As With Raw Food
      UrnRow = 0; //Keep Going
      UrnType = 'Decorated'; //Valid Inputs are (cracked, fragile, cooking, strong, decorated)
      RawColor= 8355717;    //Insert a good raw food color
      CookedColor = 3162454; //Insert A *Good* Cooked Food Color
      FoodExp = 210;// How much exp does cooking 1 of your food give?
      FoodName = 'Shark';//Just for stat purposes (Lobster, Tuna, Swordfish, etc.) Fish only for the moment!

    //****************************STOP********************************************
    //*****************************************************************************
    var
      x, y, Rounds, ExpGained, Cooked, UrnsTeled, UrnTypeExp: integer;
      CUrn: boolean;
      str, coo, Urn: TStringArray;

    Procedure AntiBanning;
    var
      r: integer;
    begin
      FindNormalRandoms;

      r:= Random(120);
      if (r <= 6) then
        Debugln('Antiban Time!');
      case r of
        1, 2, 3: HoverSkill('cooking', false);
        4: ExamineInv;
        5: PickUpMouse;
        6: Wait(2000 + Random(2000));
      end;
      if (r < 6) then
        Debugln('Antiban Done!');
    end;

    Procedure CheckUrn;
      begin
        if FindColorTolerance(x, y, 5006162, 576, 203, 584, 239, 4) then
          begin
            Mouse(x, y, 5, 5, true); //Clicks the urn found
            Wait(2000+random(150));
            FindColorTolerance(x, y, 1907518, 204, 386, 320, 460, 4);  //Finds Full Urn
            Mouse(x, y, 5, 5, true);
            Writeln('Urn Sent! Yay XP');
            CUrn:= False;
            Inc(UrnsTeled)
            Wait(1000+random(100));
          end else
            Curn:= True;        //This is why an urn is needed on startup >.<
      end;

    Procedure GuildBank;
    begin
      OpenBankNPC;
      Wait(100+random(50));
      if BankScreen then
        begin
          Deposit(2, 28, true);
          if UseUrns then
            begin
              if CUrn = True then
                begin
                  Withdraw(RawCol, RawRow, 27);
                  CloseBank;
                  Writeln('Withdrew Uncooked Food');
                end else
                  begin
                    WithdrawEx(UrnCol, UrnRow, 1, Urn);
                    CUrn:= True;
                    Wait (50+random(50));
                    WithDrawEx(RawCol, RawRow, 27, ['aw', 'ster']);
                    CloseBank;
                    Writeln('Withdrew Urn and Uncooked Food');
                  end;
            end else
              begin
                Withdraw(RawCol, RawRow, 28);
                CloseBank;
                Writeln('Withdrew Uncooked Food');
              end;
          end;
    end;
    Procedure RangeCook;
    var
      rangeFound: boolean;
      rangeFail, t, s: integer;

    begin
      s:= Random(2);
      if FindColorTolerance(x, y, RawColor, 607, 213, 645, 241, 7) then
        InvMouse(3 + s, 1)
      else
        begin
        GuildBank;
        InvMouse(3 + s, 1);
        end;
      wait(500+random(100));
      repeat
        if FindObjTPAMulti(x, y, [2175214, 1318291, 1581998], 10, -1, 5, 5, 12, ['aw', 'ang']) then
            begin
            Writeln('Range Found!');
            rangeFound:= true;
            MMouse(x, y, 3, 3);
            ClickMouse2(false);
            WaitOptionMulti(['ange', 'aw Shark'], 2000);
            MarkTime(t);
            repeat
              Wait(200+random(100));
              if FindColorTolerance(x, y, RawColor, 224, 401, 294, 455, 4) then
                Mouse(x, y, 5, 5, true);
              if TimeFromMark(t) > 5000 then
                begin
                  Writeln('Some Reason It did not start cooking?');
                  TerminateScript;
                end;
            until FindColorTolerance(x, y, RawColor, 224, 401, 294, 455, 4)
            rangeFail:= 0;
        end else
            begin
              Writeln('Range Not Found! Trying Again');
              AntiBanning;
              Inc(rangeFail);
              Writeln('Range Fail Count + : ' + ToStr(RangeFail) + ' total');
              if rangeFail > 3 then                       //3 Strikes
                begin
                  Writeln('Range Fail > 3 Calls For Termination');
                  TerminateScript;
                end;
            end;
      until(rangeFound);

    end;
    Procedure CookProcess;

    var
      lastCooked: boolean;
      cookCycle: integer;

    begin

      repeat                       //Searches last inv spot for cooked item color
      LevelUp;

     if FindColorTolerance(x, y, CookedColor, 700, 439, 716, 459, 4) then
        begin
          Writeln('Finishing Cooking!');
          cookCycle:= 0;
          lastCooked:= true;
        end else
            begin
              AntiBanning;
              Wait(3000 + Random(250));
              Inc(cookCycle);
              Debugln('Cycle' + ToStr(cookcycle));
              if cookCycle >= 30 then
                begin
                  Writeln('Not good! We are not cooking for some reason.');
                  FindNormalRandoms;
                  Exit;
                end;
            end;
      until(lastCooked);

      inc(Rounds);
      Writeln('Round: ' + ToStr(Rounds) + ' Completed!' );
    end;

    Procedure Report;

    Var
       timeRun, h, m, s, u: integer;

    begin
      Case UrnType of
        'cracked': u:= 400;
        'fragile': u:= 550;
        'cooking': u:= 950;
        'strong': u:= 1050;
        'decorated': u:= 1547;
      else
        u:= 0;
      end;

      UrnTypeExp:= u; //Add Form for Other Types later
      Cooked:= Rounds * 27;
      ExpGained:= (Cooked * FoodExp) + (UrnsTeled * UrnTypeExp);
      timeRun:= GetTimeRunning;
      ConvertTime(timeRun, h, m, s);

      Writeln('~~~~~~~~~~~~~~~~Cook Guild Matters~~~~~~~~~~~~');
      Writeln('Time Run: ' + ToStr(h) + 'h, ' + ToStr(m) + 'm, ' + ToStr(s) + 's');
      Writeln('Exp Gained: ' + IntToStr(ExpGained));
      Writeln('Exp/Hour: ' + IntToStr((ExpGained * 3600) / (timeRun / 1000)));
      Writeln('# Food Cooked: ' + IntToStr(Cooked));
      Writeln('# Cooked/Hour: ' + IntToStr((Cooked * 3600) / (timeRun / 1000)));
      if UseUrns then
        Writeln('Urns Teled:' + IntToStr(UrnsTeled));

      Stats_Commit;
      stats_IncVariable('Cooking EXP (Gained)', (FoodExp * 27));
      stats_IncVariable((FoodName + ' Cooked'), 27);

    end;
    Procedure Setup;
    begin
      Smart_Server := 1;
      Smart_Members :=True;
      Smart_Signed :=True;
      Smart_SuperDetail :=False;

      ClearDebug;
      SetupSRL;
      SetupSRLStats(438, SRLStats_Username, SRLStats_Password);
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;

      MakeCompass('w');
      SetAngle(0);
      OpenBankNPC;
      Wait(300+random(50));
      BankTab(Tab);
      if not ExistsItem(1) then
        CUrn := False;
    end;

    begin
      Setup;
      repeat
        if UseUrns then
          CheckUrn;
        GuildBank;
        RangeCook;
        CookProcess;
        Report;
      until(AllPlayersInactive);
    end.
    Nearly maxed, woowweee.

  2. #52
    Join Date
    Feb 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    1.4 seems to be working quite good, doing about 300k+/h with Rocktails.

    We'll see what happens when more people starts showing up here in the guild.
    Scripting Level 1/99

  3. #53
    Join Date
    Feb 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Stil messes up from time to find range.

    You have to babysit it sometimes.
    Scripting Level 1/99

  4. #54
    Join Date
    Oct 2011
    Posts
    438
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    ^^rather then doubleposting please next time use the edit button and edit your first post...

    Script works great, with a few slight modifications it works next to flawless. only thing i couldnt get working was urns. whatever i did messed it up real bad lol but not to worry i hate running back and forth to the ge to buy more =) thanks. using this script to 99 will post a screen shot once i hit it.

  5. #55
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    for those of you who might possibly be burning things semi-often and getting a burnt fish in the last spot, try changing line 198 to
    Code:
    if not(FindColorTolerance(x, y, RawColor, 700, 439, 716, 459, 4)) then
    CookedColor -> RawColor and Not() the whole function.
    Last edited by Turpinator; 05-06-2012 at 09:50 PM.

  6. #56
    Join Date
    Nov 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    mouse cant find option Cook All

    if FindColorTolerance(x, y, RawColor, 224, 401, 294, 455, 4) then
    Mouse(x, y, 5, 5, true);
    if TimeFromMark(t) > 5000 then
    begin
    Writeln('Some Reason It did not start cooking?');
    TerminateScript;
    end;
    until FindColorTolerance(x, y, RawColor, 224, 401, 294, 455, 4)
    rangeFail:= 0;

  7. #57
    Join Date
    Jan 2012
    Posts
    127
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    for those who has a problem with finding the range, change line 150 to:

    Simba Code:
    if FindObj(x, y, 'ange', 5856605, 5) then

    in addition, if banking twice for each trip the problem is that the script can't find the colour of the raw food in the inv. then add before line 141 this line to make a delay before searching:

    Simba Code:
    wait(500+random(100));

    please +rep if this info helped you
    Last edited by Bulls; 05-08-2012 at 05:28 PM.

  8. #58
    Join Date
    Feb 2012
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How do i find the colour of the food i wish to cook?

    In this case i am trying to cook roctails.

  9. #59
    Join Date
    Jan 2012
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smithsservice View Post
    How do i find the colour of the food i wish to cook?

    In this case i am trying to cook roctails.



    click on this icon and then on the food you want to cook

  10. #60
    Join Date
    Feb 2012
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Not sure?;

    Recently starting using this bot, worked great for an hour or so, then for some reason it would withdraw the food, click the rocktail but wouldnt click on the range, when the range was right next to me heres what i got told.

    Range Fail Count + : 1 total
    Range Not Found! Trying Again
    Range Fail Count + : 2 total
    Range Not Found! Trying Again
    Range Fail Count + : 3 total
    Range Not Found! Trying Again
    Range Fail Count + : 4 total
    Range Fail > 3 Calls For Termination

  11. #61
    Join Date
    Jan 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    It withdraws raw food from bank, banks them again, then it goes to the range(For every time it banks). And after a little while it gives this error:


    Range Not Found! Trying Again
    Range Fail Count + : 1 total
    Range Not Found! Trying Again
    Range Fail Count + : 2 total
    Range Not Found! Trying Again
    Range Fail Count + : 3 total
    Range Not Found! Trying Again
    Range Fail Count + : 4 total
    Range Fail > 3 Calls For Termination
    Successfully executed.

  12. #62
    Join Date
    May 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Bulls View Post
    for those who has a problem with finding the range, change line 150 to:

    Simba Code:
    if FindObj(x, y, 'ange', 5856605, 5) then

    in addition, if banking twice for each trip the problem is that the script can't find the colour of the raw food in the inv. then add before line 141 this line to make a delay before searching:

    Simba Code:
    wait(500+random(100));

    please +rep if this info helped you
    + REP on the finding of the Range, but it still seems to bank twice even after I added the line above where you said.

  13. #63
    Join Date
    Sep 2007
    Location
    Oklahoma, U.S.
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's not supposed to continue if the raw food color still isn't found after the second bank. This thing's supposed to crash and burn at the first sign of trouble.

    My goals try to take steps up the slope of achievement. Right now it's a low "work for a while and just time out if something doesn't go right". So long as I'm not stuck in an infinite loop, everything's fine. I'm getting exp without doing anything. I'm not getting banned. That's a win in my book.

    Anywho, Version 1.41 is about to be uploaded. It actually adds something lol.

  14. #64
    Join Date
    Nov 2011
    Location
    behind you
    Posts
    202
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    too bad i got 99 cook :/
    you can buy me, my work, my goals, even you can buy my spirit, but Theres something youll never buy. my indomitable thirst of life.

  15. #65
    Join Date
    May 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Works perfectly, as far as I can tell, thanks to Bulls' double banking fix.

  16. #66
    Join Date
    Jan 2012
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i got some trouble with the latest version. it just keeps going to the bank, taking all urns, and then rebanking all of them. then taking them all again etc...
    i tried to figure out the problem, but since im pretty bad at scripting i didnt find anything suspicious :/

    nvm, i just figured, i was too stupid and forgot to change my bank to the new script, so the urns are in slot 2 and the raw rocktails in slot 1 :P good script
    Last edited by LIM; 05-19-2012 at 05:06 PM.

  17. #67
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    can someone tell me the color id for a raw shark? it wont let me use the color picker tool on my mac

  18. #68
    Join Date
    May 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The new version worked successfully for a few thousand fish, but now I keep getting this error after it withdraws and cooks one trip of fish without using urns:

    Cooking Urn Not Found: Using No-Urn Mode
    Withdrew Uncooked Food
    Found Raw Food in Inv
    Range Found!
    Terminating due to the following reason:Could Not Click The Menu
    Successfully executed.

  19. #69
    Join Date
    Sep 2007
    Location
    Oklahoma, U.S.
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well that error means that the little menu in the chat box isn't being found.

    Does it select the option for using the fish on the range at least?
    Does the menu with the picture of your fish show up in the chat box?
    Are you running SMART with the correct settings?

  20. #70
    Join Date
    May 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It fully completes the first load perfectly, cooking all of the fish. The error seems to come up after only cooking the first few and then finishes the rest after the script has already stopped.
    Last edited by karlwithak; 05-23-2012 at 04:26 AM.

  21. #71
    Join Date
    May 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    can someone tell me the code for uncooked and cooked shark?

  22. #72
    Join Date
    May 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 0pwnstar0 View Post
    can someone tell me the code for uncooked and cooked shark?
    Try
    raw: 5329237
    cooked: 5465468

  23. #73
    Join Date
    Sep 2007
    Location
    Oklahoma, U.S.
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by karlwithak View Post
    It fully completes the first load perfectly, cooking all of the fish. The error seems to come up after only cooking the first few and then finishes the rest after the script has already stopped.
    Ah...., if it's starting the cooking then that probably means you chose a color that is still there after it starts cooking. The script detects that you started by the disappearance of the raw color from a certain box of coordinates.

    Here's some possible solutions on the matter. I suppose it kind of depends on what you're cooking.

    1. Lower the tolerance in the options line ~55. It might just be that the tolerance is too high, and the cooked shade is still recognized as raw.

    2. Pick a different color. This solution might work better. The color "HAS" to disappear after it's cooked.

    3. Change the script. Doubt you'll be taking this avenue. If you do, good for you.

  24. #74
    Join Date
    May 2012
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Whatmatters View Post
    Ah...., if it's starting the cooking then that probably means you chose a color that is still there after it starts cooking. The script detects that you started by the disappearance of the raw color from a certain box of coordinates.

    Here's some possible solutions on the matter. I suppose it kind of depends on what you're cooking.

    1. Lower the tolerance in the options line ~55. It might just be that the tolerance is too high, and the cooked shade is still recognized as raw.

    2. Pick a different color. This solution might work better. The color "HAS" to disappear after it's cooked.

    3. Change the script. Doubt you'll be taking this avenue. If you do, good for you.
    I have increased the wait time and that has seemed to greatly decrease the chances of the error occurring. However, if I let it run for a while, the error seems to still come up later (about an hour or two, which I can live with).

  25. #75
    Join Date
    Jan 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Terminating due to the following reason:Could Not Click The Menu

    That's what I get after like 30 seconds of starting

Page 3 of 5 FirstFirst 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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