Results 1 to 13 of 13

Thread: Help with cooking script

  1. #1
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with cooking script

    This quick script contains no anti randoms or anti bans, as i am unsure of how they work. I will put these on before i use the script.
    I am getting an error for one of the SRL scripts Math.scar and i will post the error message after the script.
    It also has a line "\\logout" which I will replace with a logout function later.
    The script withdraws the Tuna that was in the first slot, after depositing and walks to the range nearby and cooks the tuna. Walks back and repeats until a variable is met, which is set up the top.
    Also need to get a way to drop fish, i figure use a find bitmap function to find it and drop.


    Code:
    //start in al karid bank
    {.include SRL/SRL.scar}
    const
    trips=10 //how many trips you want to do
    
    program Cooker;
    Var cooksym, banksym, count, x, y:integer;
    Tpoint:TPoint;
    
    procedure bank;
    begin
    OpenBankFast('akb')
    wait(500)
    deposit(1, 28, true)
    wait(500)
    withdraw(1, 1, 28)
    wait(500)
    end;
    
    
    procedure walktorange;
    begin
    findbitmap(cooksym, x, y)
    mouse(x, y, 5, 5, true)
    wait(6000)
    end;
    
    procedure cook;
    begin
    TPoint:=itemcoords(1)
    mouse(TPoint.x, TPoint.y, 5, 5, True)
    FindRange(x, y)
    mouse(x, y, 5, 5, true)
    wait(500)
    mouse(256, 664, 5, 5, false)
    wait(250)
    mouse(236, 708, 5, 5, True)
    wait(75000)
    end;
    
    procedure walktobank;
    begin
    findbitmap(banksym, x, y)
    mouse(x, y, 5, 5, true)
    wait(6000)
    
    end;
    
    
    begin
    banksym:=LoadSymbolBitmapcolor('Bank')
    cooksym:=LoadSymbolBitmapColor('Cook')
    repeat
    bank
    walktorange
    cook
    walktobank
    inc(count)
    until(count=trips)
    //LOGOUT
    end.
    error code was from math.scar
    Quote:
    Line 51: [Error] (330:11): Unknown identifier 'CreateTPAFromBMP' in script C:\Program Files\SCAR 3.22\includes\SRL\SRL\Core\Math.scar
    it is the most recent version of SRL i believe downloaded it the other day. Scar 3.22.

  2. #2
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    move your plugins..
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  3. #3
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Also use FindSymbol(X, Y, 'cook'), not FindBitmap.

  4. #4
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What does "move your plugins" mean? i am here asking for help because i don't know how to use scar that well, so giving advise like that is plain STUPID!

    marpis, thanks for that advise i have modified it in my copy of the script.

    Still need to know how to set up anti ban/randoms and get the math.scar to work, i am currently asking in IRC again, but I am not holding my breath

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    if you read a tut on getting srl, then they should have said something about moving your plugins..

    any ways, just go to tools > options > SRL Download > Move Plugins.

    after that, you should be done

    to add anti randoms + anti ban:

    SCAR Code:
    procedure AntiBan;
    begin
      FindNormalRandoms;
      case random(32) of
        0: Gametab(1+random(13));
        1: wait(1000 + random(3000));
        4: RandomMovement;
        5: HoverSkill('cooking', false);
        6: RandomRClick;
        7: ExamineInv;
      end;
      gametab(tab_inv);
      FindNormalRandoms;
    end;

    just add that in the beginingish of your script, and call it while waiting for the fish to be cooked
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  6. #6
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Beautiful, thats how you should answer... lol

    Right, tried moving the plugins, but it hasen't done anything that i have seen. I tried manually moving the file that is inside folder saying move to plugins dir. which in inside the SRL folder... made no difference.. I still get the same error message. could it be the version of SCAR I am using (3.22 - the newest), has freddy taken out that function perhaps?

    thanks for the antiban stuff anti random stuff...

  7. #7
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Beautiful, thats how you should answer... lol

    Right, tried moving the plugins, but it hasen't done anything that i have seen. I tried manually moving the file that is inside folder saying move to plugins dir. which in inside the SRL folder... made no difference.. I still get the same error message. could it be the version of SCAR I am using (3.22 - the newest), has freddy taken out that function perhaps?

    thanks for the antiban stuff anti random stuff...

    Edit:sorry about double post here, Connection issues, didn't think computer sent last post, so i resent when computer internet worked again.

  8. #8
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    It could be because you have your heading all wrong :P
    SCAR Code:
    //start in al karid bank
    {.include SRL/SRL.scar}
    const
    trips=10 //how many trips you want to do

    program Cooker;
    Var cooksym, banksym, count, x, y:integer;
    Tpoint:TPoint;
    Needs to be
    SCAR Code:
    //start in al karid bank
    program Cooker;
    {.include SRL/SRL.scar}

    Var cooksym, banksym, count, x, y:integer;
    Tpoint:TPoint;

    const
    trips=10 //how many trips you want to do

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  9. #9
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Whilst that is probably good advise for how i should write the script, It hasen't fixed that problem I am having I think it lies with the SRL script.

  10. #10
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Changing your script to what I posted *might* fix your problem

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  11. #11
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did change it, and it didn't fix it, i don't get infromation and not even try it.

  12. #12
    Join Date
    Dec 2009
    Location
    Newcastle, Australia
    Posts
    888
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks to the wonderful people in IRC chat, i have found the issue, and have fixed my script. thank you guys.

    Code:
    //start in al karid bank
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/Cooking.scar}
    
    Var cooksym, banksym, count, x, y:integer;
    Tpoint:TPoint;
    
    const
    trips=10; //how many trips you want to do
    
    procedure AntiBan;
    begin
      FindNormalRandoms;
      case random(32) of
        0: Gametab(1+random(13));
        1: wait(1000 + random(3000));
        4: RandomMovement;
        5: HoverSkill('cooking', false);
        6: RandomRClick;
        7: ExamineInv;
      end;
      gametab(tab_inv);
      FindNormalRandoms;
    end;
    
    procedure bank;
    begin
    OpenBankFast('akb')
    wait(500)
    deposit(1, 28, true)
    wait(500)
    withdraw(6, 1, 28)
    wait(500)
    end;
    
    
    procedure walktorange;
    begin
    findbitmap(cooksym, x, y)
    mouse(x, y, 5, 5, true)
    wait(6000)
    end;
    
    procedure cook;
    begin
    TPoint:=itemcoords(1)
    mouse(TPoint.x, TPoint.y, 5, 5, True)
    FindRange(x, y)
    mouse(x, y, 5, 5, true)
    wait(500)
    mouse(256, 664, 5, 5, false)
    wait(250)
    mouse(236, 708, 5, 5, True)
    wait(25000)
    Antiban
    Wait(20000)
    Antiban
    Wait(20000)
    end;
    
    procedure walktobank;
    begin
    findbitmap(banksym, x, y)
    mouse(x, y, 5, 5, true)
    wait(6000)
    end;
    
    
    
    
    begin
    banksym:=LoadSymbolBitmapcolor('Bank')
    cooksym:=LoadSymbolBitmapColor('Cook')
    repeat
    bank
    antiban
    walktorange
    cook
    walktobank
    inc(count)
    antiban
    until(count=trips)
    //LOGOUT
    end.

  13. #13
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Oh my bad, I read that wrong :/ Glad you could get it running

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


Thread Information

Users Browsing this Thread

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

Posting Permissions

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