Results 1 to 10 of 10

Thread: NeitizVial v1.4

  1. #1
    Join Date
    Mar 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    NeitizVial v1.4

    Hello,

    This is my first really working script i made.
    I recommend using Scarscape for it, since i didn't test it using the 'normal' RS. You can download ScarScape here:

    http://www.sythe.org/showthread.php?t=300215

    // NEITIZVIAL v1.4 \\
    // ONLY TESTED WITH SCARSCAPE! \\
    // I recommend using ScarScape \\
    // Steps: \\
    // 1. Start at the Neitiznot \\
    // bank.
    // 2. Have the vials in your \\
    // first bank slot. \\
    // Enter your user,pass&nick \\
    // In the SetUp procedure, \\
    // Enter the number of vials \\
    // You want to be filled, and \\
    // your PIN (if you have one) \\
    // Then run the script: ENJOY! \\

    // Updates: \\
    // v1.0 \\
    // - Basic script. \\
    // v1.1 \\
    // - Added DeclarePlayers \\
    // - Added more colors \\
    // v1.2 \\
    // - Fixed Random-problems \\
    // v1.3 \\
    // - Fixed a little bug \\
    // - More ways to find the \\
    // bank added \\
    // v1.4 \\
    // - Bugfix \\
    // - Rewrite of the banking \\
    // procedure



    I am only 12 years old, so please, don't expect too much from it. However it filled 2500 vials for me without any problems

    SCAR Code:
    program NeitizVial;
    //       NEITIZVIAL v1.4       \\
    // ONLY TESTED WITH SCARSCAPE! \\
    // I recommend using ScarScape \\
    // Steps:                      \\
    // 1. Start at the Neitiznot   \\
    // bank.
    // 2. Have the vials in your   \\
    // first bank slot.            \\
    // Enter your user,pass&nick   \\
    // In the SetUp procedure,     \\
    // Enter the number of vials   \\
    // You want to be filled, and  \\
    // your PIN (if you have one)  \\
    // Then run the script: ENJOY! \\

    // Updates:                    \\
    // v1.0                        \\
    // - Basic script.             \\
    // v1.1                        \\
    // - Added DeclarePlayers      \\
    // - Added more colors         \\
    // v1.2                        \\
    // - Fixed Random-problems     \\
    // v1.3                        \\
    // - Fixed a little bug        \\
    // - More ways to find the     \\
    // bank added                  \\
    // v1.4                        \\
    // - Bugfix                    \\
    // - Rewrite of the banking    \\
    // procedure

    {.include SRL/SRL.scar}
    var
    x,y,loads,loadsleft: integer;
    pin: string;
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'nickname';
      Players[0].Pass := 'ilikepie';
      Players[0].Nick := 'ick';
      Players[0].Active := True;
    end;
    procedure RandomCheck;
     begin
     FindNormalRandoms;
     if FindFight then RunAway('w',False,1,1000);
     end;
    procedure SetUp;
    begin
     SetupSRL;
     DeclarePlayers;
     pin := '0000'; // YOURPIN
     loadsleft := 1000; // number of vials
     loads := 0; // dont touch
     writeln('WELCOME TO MY VIAL FILLER :D');
     writeln('Starting in some secs =]');
     Wait(500+random(500));
     ActivateClient;
     if not LoggedIn then LogInPlayer;
     writeln('Set up.')
    end;
    procedure BankStuff;
    var
    findsymb,findthebank: integer;
     begin
     if not LoggedIn then TerminateScript;
     findsymb := 0;
     findthebank := 0;
     repeat
     writeln('Lets find the bank.');
     if FindSymbol(x,y,'bank') then
     begin
     Mouse(x,y,5,5,True);
     Wait(700);
     SetRun(True);
     GameTab(4);
     MakeCompass('n');
     SetAngle(True);
     findsymb := 1
     end else
     begin
     SendArrowWait(3,random(300+random(700)));
     end;
     until(findsymb=1)
     Flag;
     writeln('We should be in the bank now... opening.');
     RandomCheck;
     Wait(1000);
     repeat
     if FindColorSpiral(x,y,3300201,5,5,513,337) or
        FindColorSpiral(x,y,3370376,5,5,513,337) then
      begin
      MMouse(x,y,1,1);
      end;
      until(IsUpText('se'));
      repeat
      if IsUpText('se') then
      begin
      Mouse(x,y,1,1,True);
      findthebank := 1;
      end;
      until(findthebank=1)
      Wait(1000);
      repeat
      Wait(2000);
      if PinScreen then InPin(pin);
      writeln('PIN found.');
      until(BankScreen);
      writeln('The bank should be open!');
      writeln('Fixing, depositing and withdrawing...');
      FixBank;
      DepositAll;
      Wait(500);
      Withdraw(1,1,28);
      CloseBank;
      writeln('Bankstuff done.')
      end;
    procedure WalkFill;
     var
     findwater,findwsource: integer;
     begin
     if not LoggedIn then TerminateScript;
     findwater := 0;
     findwsource := 0;
     repeat
     if FindSymbol(x,y,'water source') then
      begin
      writeln('Found water symbol, walking.')
      Mouse(x,y,5,5,True);
      Flag;
      writeln('Should be at source now...');
      findwsource := 1;
      end;
     until(findwsource=1)
     MouseItem(1,True);
     repeat
     if FindColorSpiral(x,y,10982277,5,5,513,337) then
      begin
      MMouse(x,y,1,1);
      writeln('Source?')
      if IsUpText('se') then Mouse(x,y,1,1,True);
      writeln('Yep, filling.')
      Wait(3000+random(1000));
      BoredHuman;
      writeln('Bored.')
      RandomCheck;
      Wait(4000+random(1000));
      RandomCheck;
      findwater := 1;
      loads := loads + 28;
      writeln('FILLED MORE VIALS :D Now filled: ' + IntToStr(loads) + '.');
      end;
      until(findwater=1)
     end;
    begin
    SetUp;
    repeat
    BankStuff;
    WalkFill;
    if loads=loadsleft then
     begin
     writeln('Finally =] DONE!');
     writeln('Vials filled in total: ' + IntToStr(loads) + '.');
     writeln('Thanks for using my script.');
     writeln('Script made in 2 hours');
     LogOut;
     TerminateScript;
     end;
     until(false);
    end.

  2. #2
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put the script into scar tags so instead of [ code] use [ scar]
    easier to look at.
    Otherwise looks ok, try adding DTM's and DDTM's for failsafes and maybe radial walking?

    ~Spaz

  3. #3
    Join Date
    Mar 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Changed.

    I never used DTM's, and i can't find a good tutorial for it. And what does radial walking mean? (Sorry, my English isn't very good :$ )

  4. #4
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok standards are ew. i wont standardise your script but look into those.
    As for DTM's there soooooo easy.
    Ill outline the easy parts:
    1. get a pic of the thing u want, aka a vial
    2. In scar, tools -> DTM editor -> Edit -> Load image
    3. Find the most prominent color, Meaning is the vial is full use the blue color.
    4. Then Click the edges of the vial. So top, bottom right, bottom left ect. try to use the black outline.
    5. Then File -> DTM to text -> check the scar output box. The DTM is there.

    Then to use it by
    SCAR Code:
    function FindDTM(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Integer;

    So eg
    SCAR Code:
    DTM := DTMFromString('78DA636C626460F8C28002FEFFFF0FA619A17' +
           'CC6D740D66E026ADE00591E8CF8D5B403592D04D430025931A86A' +
           'BE7CF982AA8615C8BA87EA1EA369BF50D5780159ABF1BB1900840' +
           '31B38');
    FindDTM(DTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
    writeln('Found the DTM');

    Try that

    ~Spaz

  5. #5
    Join Date
    Mar 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for this mini-tutorial.
    Added reputation
    I'll see what i can do with it.

  6. #6
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its fine, just remember to ask if you get stuck.
    Also check out tutorial Island. There are some good Tuts there. Thats where i mostly learned

    ~Spaz

  7. #7
    Join Date
    Mar 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did anyone test it already?

  8. #8
    Join Date
    Dec 2011
    Location
    USA USA USA!!!
    Posts
    74
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This looks good. Im gonna test it out i have over 9000 vials to fill. Neitiznot is a great place to fill vials at as well. I've tried using MSI container fillers but they just run around everywhere or nothing at all :/

  9. #9
    Join Date
    Nov 2011
    Posts
    255
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by TwoClover View Post
    This looks good. Im gonna test it out i have over 9000 vials to fill. Neitiznot is a great place to fill vials at as well. I've tried using MSI container fillers but they just run around everywhere or nothing at all :/
    This is from 2008 and runs on ScarScape which hasn't existed since then...

  10. #10
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Closed.
    TwoClover DO NOT bump old threads, READ first!
    MSI has a vial filler and is up to date!

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
  •