Results 1 to 6 of 6

Thread: not running but correct and complete

  1. #1
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default not running but correct and complete

    ok i got a script made but when i want it to run Nothing Happends cuse it says

    Successfully compiled
    Successfully executed

    which is a good thing but bad cuse it just compiles and i know it will work but no glory. the sad thing is i know it is somthing eazy or posted somewhere on a help guide i just cant find it

    so how do i make it run after it compiles nicely

  2. #2
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You have to declare for SCAR to start these procedures you have made.

    SCAR Code:
    program whatever;

    Procedure 1;
    begin
    //whatever you tell it to do in here
    end;

    Procedure 2;
    begin
    //whatever is in this script
    end;

    begin
    Procedure 1;
    Procedure 2;
    repeat
    Procedure 1;
    procedure2;
    end;
    end.
    I like my coffee black just like my metal.

  3. #3
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If it is working properly it should run automatically. Post your script.


    As a side note, I don't believe scar is technically ever compiled, since compiling means that a program reads the source code and out puts some sort of machine code. Scar is actually interpreted, since it is a scripting language.

  4. #4
    Join Date
    Nov 2006
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well i did not finnish writing the end loop... lol that would do it

    well it is now going to the rs screen then executing
    ill keep on thinking on how to fix it and then if i cant think of what to do ill post it. i got to remake 2 Procedures or walking to the store and add some more things but i just wana get it working before that

    eddit 11:20
    ok Somthing is cassing it not to run but makeing to work so if you wana take a look at it have at it and post what i need to fix
    i need to make and add an oak buyer and an oak bankers and add some ant randoms trips progys ext i may even rewrite the way i walk to the store but im hiting the sack to night

    SCAR Code:
    program Buyoakvorrock;
    {.include SRL/SRL.scar}

                     //TRENCH COAT\\
             //Living by Natural Selection\\
    // starts at east vorrock bank walks to general shop buys logs walks back to bank
     {----------Const---------}


    Const
    Shopkeeper1 = 3048062;     //color of Shop keeper
    Shopkeeper2 = 4219692;     //color of Shop keeper
    Shopkeeper3 = 9145494;     //color of Shop keeper
    Shopassistant1 = 666;      //color Shop assistant
    Shopassistant2 = 666;      //color Shop assistant
    Shopassistant3 = 666;      //color Shop assistant
    Mspeed = 20;               // Mouse speed
    Log=     4551315;                  // color of logs you want to buy oak willow e.x.t
    Shopkeepname=  'Shop keeper';
    Shopassistant= 'Shop assistant';

    Var
     rvbbitm,mittlebitm,Xmod,Ymod: Integer;




         {============START============}
                 {MAP Bitmaps}
      procedure LoadBmps;
    Begin
    rvbbitm := BitmapFromString(17, 17, 'z78DA33301812C09008111' +
           '2809BA9ABAB9B31161219E050438CF9AE6040BBE018357FF0D842' +
           '7CAA18B565D496515B68610B0083584EEE');


    mittlebitm := BitmapFromString(31, 23, 'z78DA33301805A360E0' +
           '811B116070BA9616EA07D6B5C4C711ADDD3C14CD1F8A2EA74FCA1' +
           'CBA2EA7AE5DF42F0DA8EBF2812AC186969B475D3EEAF291E072CA' +
           '4BB3A158AA0C94CBA9DB961B5AA13DEAF25100010055683B92');
    end;

      //====Walk to Shop====//


       procedure click1;
    begin
      if(FindBitMapIn(rvbbitm, x, y, 5, 5, 755, 25))then
       begin
         MoveMouse(x+random(10),y+random(20))
       Wait(700+random(230));
      end;
    end;

     Procedure arrow;
     Begin
      If(FindSymbol ( x, y, 'arrow' ) ) Then
       Begin
        Repeat
         Wait ( 500 + random ( 150 ) );
        Until ( FindSymbol ( x, y, 'arrow' ) )
         Mouse ( x, y, 5, 5, true )
        FFlag ( 0 );
        end;
        end;


     procedure click2;
    begin
      if(FindBitMapIn(mittlebitm, x, y, 5, 5, 755, 25))then
       begin
         MoveMouse(x+random(10),y+random(20))
       Wait(500+random(230));
      end;
    end;

     Procedure WalkToShop;
     Begin
      If(FindSymbol ( x, y, 'shop' ) ) Then
       Begin
        Repeat
         Wait ( 200 + random ( 100 ) );
        Until ( FindSymbol ( x, y, 'Shop' ) )
         Mouse ( x, y, 5, 5, true )
        FFlag ( 0 );
        end;
        end;

        //Trade with shop keeper//

    Procedure Tradeshop;

    Begin
    MouseSpeed:= Mspeed;
     If(FindColorSpiralTolerance(x,y,Shopkeeper1,MSX1,MSY1,MSX2,MSY2,15)) Or
       (FindColorSpiralTolerance(x,y,Shopkeeper2,MSX1,MSY1,MSX2,MSY2,10)) Or
       (FindColorSpiralTolerance(x,y,Shopkeeper3,MSX1,MSY1,MSX2,MSY2,15)) Or
       (FindColorSpiralTolerance(x,y,Shopassistant1,MSX1,MSY1,MSX2,MSY2,10)) Or
       (FindColorSpiralTolerance(x,y,Shopassistant2,MSX1,MSY1,MSX2,MSY2,15)) Or
       (FindColorSpiralTolerance(x,y,Shopassistant3,MSX1,MSY1,MSX2,MSY2,10)) Then
     If IsupTextMulti('Talk','xam','alk-to') Then
    Begin
        Mouse(X, Y, 0, 0, False);
        ChooseOption(X, Y, 'Trade');

    end;
    end;
       //to buy logs //


    // Walk back//
     Procedure walkback1;
     begin
     RadialWalk( 6579563 , 93, 453, 40, Xmod, Ymod);
    RadialRoadWalk(6579563, 93, 453, 40, Xmod, Ymod);
            Wait ( 500 + random ( 350 ) );
    end;

      Procedure walkback2;
      begin
    RadialWalk( 6579563 , 99, 459, 58, Xmod, Ymod);
    RadialRoadWalk(6579563, 99, 459, 58, Xmod, Ymod);
              Wait ( 600 + random ( 150 ) );
     end;

       Procedure walkbank;
     Begin
      If(FindSymbol ( x, y, 'bank' ) ) Then
       Begin
        Repeat
         Wait ( 400 + random ( 300 ) );
        Until ( FindSymbol ( x, y, 'bank' ) )
         Mouse ( x, y, 5, 5, true )
        FFlag ( 0 );
          OpenBank;
        end;
        end;



    Procedure loop;
    begin
     LoadBmps;
     click1;
     arrow;
     WalkToShop;
     Tradeshop;
    walkback1;
    walkback2;
    walkbank;
    end;

    begin
    loop;
    end.

  5. #5
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    i do believe that you are required to use setupsrl;
    Also this should only occur once during the script unless u unload it LoadBmps;

    I dont want to fix your script completely because you wont learn all to much, but if you fix it and want me to check it post it ehre and ill tell you if your right or were your going wrong
    In scar to loop you use
    SCAR Code:
    repeat
     procedure1;
     procedure2;
    until false

  6. #6
    Join Date
    May 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also read a Tut on standards urs a rather....err unique? but it's ok seeing as ur kinda new at this i assume

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Is this correct?
    By NCDS in forum OSR Help
    Replies: 1
    Last Post: 12-23-2008, 03:14 AM
  2. is this correct?
    By jones2644 in forum OSR Help
    Replies: 2
    Last Post: 07-05-2008, 10:37 PM
  3. Correct Way to Write this Until...
    By TheGodfather in forum OSR Help
    Replies: 7
    Last Post: 03-04-2007, 09:12 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
  •