Results 1 to 5 of 5

Thread: Part Made Script - Big one

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Part Made Script - Big one

    This is my script, its not complete yet (duh).
    It is for softening clay in edgeville and this is my first script baically (havent coded in about a year).
    I will finnish script, add proggy, antiban, antirandoms.


    Thoughts?

    SCAR Code:
    program EdgevilleClaySoftener;
    {.include srl/srl.scar}

    const
    username='';
    password='';

    var
    BankBooth=3691620;
    EmptyBucket, FullBucket, SoftClay, HardClay, x, y: Integer;
    x := MMCX;
    y := MMCY;

    Procedure login;
    begin
    mouse(410,459,4,6,true);
    Wait(250+Random(400));
    mouse(378,546,4,6,true);
    Wait(250+Random(400));
    TypeSend(username);
    Wait(250+Random(400));
    TypeSend(password);
    Wait(1250+Random(700));
    mouse(316,351,4,6,true);
    End;

    Procedure Start;
    Begin
    if not(loggedIn) then login;
    Wait(1250+Random(1400));
    makecompass('n');
    CheckInvenAtStart;
    End;

    Procedure CheckInvenAtStart;
    Begin
    If (findbitmap(SoftClay, x, y))Then
     writeln('Please start with only hard clay. (no soft clay)');
    If (findbitmap(EmptyBucket, x, y))Then
    writeln('Please start with full buckets. (no empty ones)');
    If not (findbitmap(HardClay, x, y))Then
     writeln('Please start with 14 hard clay.');
    If not (findbitmap(FullBucket, x, y))Then
    writeln('Please start with 14 full buckets.');

    End;

    Procedure DeclareBitmaps;
    Begin
      EmptyBucket := BitmapFromString(15, 11, 'beNqrccsOkq6Kk4v3l' +
           'ACiZB9JZAQUaSgvT4+Pjw0L87UWBqJ0fymISjTFEJFoN3G44iB7Ea' +
           'A4UASP4pTY2KiQkGBfX08LIYgIHsXhzqJAk4EIqAvIBiI0xXCHQZy' +
           'RFB2dmZRYkJEOdAnE8bgUZ6ck56alluRkVxUV5kcbF8eZAg0HOsnO' +
           'gN9Smw+IjNV5gEhHiRuIirIyKwryO/LteosdgSrLEswqk81rUi3rM' +
           '6zyQ2XQEFBZV6EDUCVEMURlU5ZNa44tUAoiC1cAZEwocwKinqYmoP' +
           'uBBgJVoqmBKJhc4Qwl21o76uuAJgONBXqhr6UFTRkQTa1yBSKgMqD' +
           'sDADEXp6P');
      FullBucket := BitmapFromString(14, 11, 'beNqrcauKk/O1FrYz4D' +
           'dW56mqnoWMGsrL0+PjY8PCXEwEPS2EgMhSmw9NDRzBVQbZi+BSA0E' +
           'psbFRISHBvr5AA/GrBCKgmUAE1IJfGdD2pOjozKTEgox0oHeACJfK' +
           '7JTk3LTUkpzsqqLC4jjTaDdxoGKgs4EhAPQdMBCASEeJG4iKsjIrC' +
           'vJbc2yBqCzBrDLZvCbVsj7DKj9UBg01ZdlAEFAN0ExkxUBBoPaOfL' +
           'uuQofeYke4MqADciKM8qONcakHsoGCTZWVHfV1QCmgm4Few6oexC4' +
           'p7mtpmQEAWEG3Yg==');
      HardClay := BitmapFromString(7, 5, 'beNqbmDC5NnhafciMxjAgY2' +
           'JVYF9FQGeJ7/z2qEWd0UByVnM4UAqoACi7emLCyv74Zb1xEKm5rRF' +
           'A2S0zUtdPTYZLLemOAcrumpe5bVb6pmkpECkQAgCuBjVU');
      SoftClay := BitmapFromString(12, 14, 'beNp9z7EKgDAMRdHd1n6R' +
           'g+AgCIIiFHRxcHBxcBD8fSORZ0hK4U7JoSWtG6si1l9L4xBPaMsA8' +
           '7X9k0zOVWBb55NJtvdeZZncHkOpJDOaqyw7pxJZyUwaJcGuGJCVzO' +
           '45cFaCwSQZRX9lDD9Cd+XBe/sD/Ap+hw==');
    End;

    Procedure Soften;
    Begin
    If (findbitmap(FullBucket, x, y))Then
    Mouse(x, y, 5, 5, true);
    Wait(200+Random(400));
    If (findbitmap(SoftClay, x, y))Then
    Mouse(x, y, 5, 5, true);
    Wait(600+Random(400));
    Mouse(254, 438, 5, 5, false);
    Wait(200+Random(400));
    Mouse(245, 780, 5, 5, true);
    End;

    Procedure WalkToWell;
    Begin
    SymbolAccuracy := 0.5;
    if (FindSymbol(x, y, 'water source')) then
    begin
      Mouse(x, y, 5, 5, True);
      SymbolAccuracy := 0.8;
      wait(500+Random(1000));
    end;
    End;
    Procedure FindWell;
    Begin
    If (findbitmap(EmptyBucket, x, y))Then
    Mouse(x, y, 5, 5, true);
    if (FindColorSpiralTolerance(x, y, 2900815, MMX1, MMY1, MMX2, MMY2, 5)) then
    MMouse(x, y, 5, 5);
    if(IsUpText('ell'))then
    Mouse(x, y, 5, 5, true);

    End;



    ////////////////////////// Main Loop /////////////////////
    Begin
    SetupSRL;
    ActivateClient;
    ClearDebug;
    Start;
    DeclareBitmaps;
    repeat
    Soften;
    WalkToWell;
    FindWell;
    until(false)

    End.


    Tell me how much it will epically fail
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  2. #2
    Join Date
    Sep 2008
    Location
    Aussie mate
    Posts
    411
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    umm learn standards, read tuts on radial walk/DTM's (instead of bitmaps) and try to use

    SCAR Code:
    MMouse
    along with

    SCAR Code:
    Mouse
    ~Joel~~
    IM BACK!!!!!!!!!!!!!!!!!

  3. #3
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am adding standards and everything else for a good script when its working.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  4. #4
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You don't need to make your own login method. SRL has done that for you. You should make a procedure called DeclarePlayers; like this :
    SCAR Code:
    Players[0].Name := 'username';
    Players[0].Pass := 'password';
    Players[0].Nick := 'nic' // Three letters of your username. NOT THE FIRST LETTER!!!
    Then when your script starts, just make sure you call DeclarePlayers before you call a thing in SRL called LoginPlayer.

    Just as a note, SRL also has a logout function... Logout; (I never would have guessed that name )

    I see that you are beggining to learn colors/DTMs instead of bitmaps, this is good because those are more relieable and most of all, take up less memory therefore making the script faster.

    When you use DTMs and bitmaps especially, make sure that you free them or they will just sit in your computer's memory until you re-boot. This will cause your computer to run out of memory (memory leak). Here is how to free a DTM:
    SCAR Code:
    FreeDTM(someDTM);

    Your standards are still off a bit in some places, it's almost like you don't keep it constant throughout the whole script.
    This:
    SCAR Code:
    Procedure FindWell;
    Begin
    If (findbitmap(EmptyBucket, x, y))Then
    Mouse(x, y, 5, 5, true);
    if (FindColorSpiralTolerance(x, y, 2900815, MMX1, MMY1, MMX2, MMY2, 5)) then
    MMouse(x, y, 5, 5);
    if(IsUpText('ell'))then
    Mouse(x, y, 5, 5, true);
     
    End;
    ...should be changed to something like this and in other places too:
    SCAR Code:
    Procedure FindWell;
    begin
    if (findbitmap(EmptyBucket, x, y)) then
      Mouse(x, y, 5, 5, true);
    if (FindColorSpiralTolerance(x, y, 2900815, MMX1, MMY1, MMX2, MMY2, 5)) then
      MMouse(x, y, 5, 5);
    if(IsUpText('ell'))then
      Mouse(x, y, 5, 5, true);
    end;

    Well, that's all I can think of at the moment, so ya....


    EDIT: Thought of another thing : When you get more advanced, you will want SRL to check for and solve random events. This is done by calling FindTalk; and FindNormalRandoms; You can read tutorials of the SRL manual to find out about these and other random solving functions/procedures.

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  5. #5
    Join Date
    Feb 2007
    Location
    @ SRL
    Posts
    402
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Man this is an EPIC fail, sorry for being so negative and rude, but it's very late here and i just saw this.

    Read through a few of the learner tutorials.. That'll help you alot.
    The game has an unexplainable attraction that convinces the player they are having fun, despite the fact that all they are doing is performing repetitive tasks to increase their statistics. "The game is actually a graphical nightmare and its gameplay is simple at best. Yet something, perhaps by subliminal means, forces the player - against his will - to play the game, and to believe that they are having fun".

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with the last part of my script
    By Tom_Gower in forum OSR Help
    Replies: 4
    Last Post: 11-07-2008, 10:00 PM
  2. need help with part of script!
    By vikrant60 in forum OSR Help
    Replies: 6
    Last Post: 05-09-2008, 10:52 AM
  3. Need help with small part of script!
    By vikrant60 in forum OSR Help
    Replies: 3
    Last Post: 04-28-2008, 07:28 AM
  4. Part of my first script[Problem]
    By Dude in forum First Scripts
    Replies: 7
    Last Post: 08-20-2007, 05:42 PM

Posting Permissions

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