Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33

Thread: Simple Request

  1. #26
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    well how could i do an if inv full?

  2. #27
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by hello to you all View Post
    hey just wanted to ask a couple questions...

    did you ever create a battlescape script?

    2. where do you find all the methods to create scripts?
    for 2, i find reading tutorials and relating to other scripts previously made helps with the idea process, and as ILuffyewz said, lot of handy functions in the SRL include help us out a lot and save us plenty of time.

    E:
    SCAR Code:
    if invfull then // IF your inventory is full THEN...
      writeln('inventory is full') //write (' ') in the debug box.
    else // IF your inventory is NOT full then...
      writeln('inventory is not full, too bad, go cry you little - non full inventory - noob!'); //write (' ') in the debug box.

    ofcourse you need to include srl as well as call SetupSRL; in your mainloop ^^. btw ill get you some nice tuts if your interested in learning how to script.
    Last edited by Heavenguard; 07-31-2010 at 08:22 PM.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  3. #28
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    well im usually over at Rscheata.net coding with java... so im not new to scripting.... its just a change of scene so yeah tutorials would be good.

  4. #29
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    And if you want to see how InvFull works, it's in Inventory.scar. (It checks to see if every inventory spot has a black outline in it, and if it does, the inventory is full.)

  5. #30
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ill just copy and paste this from my old notes thread.

    1. Unmatched Scar Scripting Tutorial for Beginners (Hands On) by WhoCares357 : This Tutorial Teaches you the basics of the basics. It is what I have read to learn how SCAR works, and how its standards are to be. This is the #1 guide I can point you out to if your new to SCAR and wish to start learning how to use it. WhoCares357 is a great teacher, I promise you will be inspired by him. He is the reason I started making notes.

    2. Coh3n’s All-In-One SCAR Scripting Tutorial! Coh3n is probably one of the most useful people you will find in this world. This tutorial shows the basics to the advanced. Everything is explained Skillfully but in a quick and Easy-to-Understand way. I Highly recommend that after you first learn the full basic's of Scar from WhoCares357's Tutorial , you should read this.

    3. This tutorial helps you solve errors you obtain while scripting. Its by JAD. It explains the most common errors that you will 100% encounter while learning how to script. Jad's Thread on fixing the most Annoying but Common Errors. After scripting for a while, you'll have no problem fixing errors in Scar by yourself.

    4. If you still have problems scripting, or run into an error that you know you cant fix, don't hesitate to ask anyone on this site for help. Just go to the Scripting Help Forum and post your problem. Everyone on this site is helpful, they'll resolve your problem in no time, and you'll learn more then you thought you could from all of them.

    and I doubt ull use this.. but this was a Notes thread I had made when I was learning scar [my first code lang] for the first time. Heavenguards Notes For those Tutorial Readers.

    Hope I helped bro.
    Last edited by Heavenguard; 07-31-2010 at 08:31 PM.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  6. #31
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by antti mies View Post
    Here is my like 2 months old script that buys diamonds in the crafting shop and uses chisel two times on them to make diamond bolt tips. Then you sell the tips to shop for profit. I made a couple hundred mil using this script and got 1b crafting and fletching xp. I hope it still works.
    Btw start in the same tile as the shop.
    SCAR Code:
    program Crafter;
    var
      x1, ShopX, ShopY: Integer;


    procedure FindClient;
    var
      I: Integer;
    begin
      for I := 0 to 600 do
      begin
        if (GetColor(I, 420) = 2437688) then x1 := I;
        if x1 > 0 then
        begin
          WriteLn('Clientti loyty (X='+IntToStr(x1)+')');
          Exit;
        end;
      end;
    end;


    procedure C(x, y: Integer; Left: Boolean);
    begin
      MoveMouse(x-258+x1, y);
      Wait(70);
      ClickMouse(x-258+x1, y, Left);
      Wait(70);
    end;

    function ShopScreen: Boolean;
    begin
      Result := (GetColor(222+x1, 41) = 2070783);
    end;


    procedure CloseShop;
    var
      I: Integer;
    begin
      while ShopScreen do
      begin
        MoveMouse(697-258+X1, 37);
        Wait(30);
        ClickMouse(697-258+X1, 37, True);
        while ShopScreen and (I < 350) do
        begin
          Wait(10);
          Inc(I);
        end;
        if I < 350 then Exit;
        I := 0;
      end;
    end;



    function OpenShop: Boolean;
    var
      x, y, I, II, III, A: Integer;
      NewX: Integer;
    begin
      repeat
        if IsFKeyDown(10) then TerminateScript;
        MoveMouse(ShopX-257+X1, ShopY);
        while (CountColorTolerance(255463, 315-258+X1, 5, 360-258+X1, 15, 35) < 7) do
        begin
          Wait(10);
          A := A + 1;
          if A = 150 then
          begin
            ClickMouse(790-258+X1, 263, True);
            Wait(80);
            ClickMouse(790-258+X1, 263, True);
            Wait(80);
            MoveMouse(ShopX-257+X1, ShopY);
          end;
          if A = 300 then
          begin
            for A := 300 to 400 do
            begin
              NewX := ShopX+A-300;
              MoveMouse(NewX-257+X1, ShopY);
              Wait(100);
              if (CountColorTolerance(255463, 315-258+X1, 5, 360-258+X1, 15, 35) > 6) then Break;
              NewX := ShopX-A+300;
              MoveMouse(NewX-257+X1, ShopY);
              Wait(100);
              if (CountColorTolerance(255463, 315-258+X1, 5, 360-258+X1, 15, 35) > 6) then Break;
            end;
            if A < 400 then ShopX := NewX
            else TerminateScript;
          end;
        end;
        ClickMouse(ShopX-257+X1, ShopY, False);
        III := 0;
        while (III < 50) do
        begin
          if FindColor(x, y, 65535, ShopX-280+X1, ShopY-30, ShopX-255+X1, ShopY+80) then
          begin
            ClickMouse(ShopX, Y+20, True);
            Break;
          end;
          Inc(III);
          Wait(5)
        end;
        if III > 49 then Continue;
        //Wait(100);
        //ClickMouse(ShopX-258+X1, ShopY+42, True);
        I := 0;
        repeat
          Wait(10);
          I := I+1;
        until(ShopScreen or (I > 200));
      until(ShopScreen);
      MoveMouse(445-258+X1, 130);
      Wait(50);
      ClickMouse(445-258+X1, 130, False);
      while not FindColor(x, y, 65536, 445-258+X1, 130, 450-257+X1, 135) do Wait(5);
      ClickMouse(435-258+X1, 216, True);
      Wait(50);
      CloseShop;
      repeat
        Wait(10);
        II := II+1
      until(((GetColor(960-258+X1, 450) <> 3357765) and (GetColor(920-258+X1, 450) <> 3357765))) or (II > 200);
    end;


    procedure Clicks;
    var
      x, y: Integer;
    begin
      MoveMouse(970, 445);
      Wait(50);
      repeat
        if IsFKeyDown(10) then TerminateScript;
        MoveMouse(953-258+X1, 445);
        Wait(10);
        ClickMouse(953-258+X1, 445, True);
        Wait(40);
        MoveMouse(931-258+X1, 445);
        Wait(10);
        ClickMouse(931-258+X1, 445, True);
        Wait(40);
      until(GetColor(960-258+X1, 450) = 3357765) or (GetColor(920-258+X1, 450) = 3357765);
      ClickMouse(790-258+X1, 263, True);
      Wait(10);
      ClickMouse(790-258+X1, 263, True);
      Wait(10);
      ClickMouse(790-258+X1, 263, True);
      Wait(15);
    end;

    begin
      Wait(3000);
      FindClient;
      //GetMousePos(ShopX, ShopY);
      ShopX := 517;
      ShopY := 167;
      repeat
        Clicks;
        OpenShop;
      until(false);
    end.

    Battle Scape has pretty sad mods though... I got banned for winning 1b in a stake... Luckily got myself unbanned though and had like over 3b at one point

    that script gets stuck after right clicking on the diamonds... it doesnt buy them... anyone able to fix it up?

  7. #32
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by hello to you all View Post
    that script gets stuck after right clicking on the diamonds... it doesnt buy them... anyone able to fix it up?
    forgot to reply, im now doing it

    ~shut

    EDIT: just tried, and it seems to work perfectly, just done 10k diamond bolt tips
    Last edited by Shuttleu; 08-01-2010 at 06:31 PM.

  8. #33
    Join Date
    Jul 2006
    Posts
    189
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    you have fixed it to make it work?

    or it already was working for you?

Page 2 of 2 FirstFirst 12

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
  •