Results 1 to 16 of 16

Thread: Scripting Help Needed!

  1. #1
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default Scripting Help Needed!

    Ok, so i read some tut's of how to script and stuff and i want to make my first script. It's gonna be a bucket of water buyer from the gnomecopter place...so if you can help me, post here or pm!!?!?!plx...

  2. #2
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well if you want to make a script then you should make it, not us, and if you read tutorials, then you should know the basics, so make a script post here in scar tags, and we can fix it up for yah

  3. #3
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by d1s3l View Post
    well if you want to make a script then you should make it, not us, and if you read tutorials, then you should know the basics, so make a script post here in scar tags, and we can fix it up for yah
    ok um... i will work on it somemore... cuz it is really rudimentary right now(like really) but prolly try to post tomoro

  4. #4
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mormons arnt allowed to cheat
    ~ Metagen

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    Mormons arnt allowed to cheat
    lol says who?
    i'm at school right now... i need help with finding an NPC without reflection...is it possible?

  6. #6
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    also... sorry for double-post... i need help with depositing items in a deposit box(is it the same as a normal bank?)

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No its different, it would be really simple to create a dtm, or TPA for it. If you would like help, just PM me.

    -Blumblebee
    “Ignorance, the root and the stem of every evil.”

  8. #8
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    would i just have it look on mainscreen for DTM of the bucket of water and right click then ChooseOption('All')?

  9. #9
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's how I would do it. If you have IRC shoot me a pm, I'll help you . I can help over pm to, but it'd take longer :P.

  10. #10
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    i got to go to work... will do when i get home!

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    wait i need help with another thing too... how do i trade with a NPC without using reflection

  12. #12
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Umm


    SCAR Code:
    Function FindNPC(Uptex:string; Colors: Integer: Boolean;
    Var
      TPAs: TPointArray;
      TPA:  Tpoint;
      D2TPA: T2DPointArray;
      X,Y,I,N: Integer;

    Begin
       FindColorsSpiralTolerance(x,y,TPAs,Colors,MMX1, MMY1,   MMX2,MMY2,20);
      If length(TPAs) = 0 Then
        Exit;
      D2TPA:= TPAtoATPAEx(TPAs,8,8);
      For i:= 0 to length(D2TPA) - 1 Do
      begin
        TPA:= MiddleTPA(D2TPA[i]);
        DebugATPA(D2TPA,'TPA');
        MMouse(TPA.X, TPA.Y, 0, 0);
        Wait(150 + Random(50));
        If IsUpText(UpTex) Then
        begin
          X:= TPA.X
          Y:= TPA.Y
          Result:= True;
        end;
      end;
    end;

  13. #13
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    ok its not working but here it is! comment plz
    SCAR Code:
    program BucketBuyer;
    {.include SRL/SRL.scar}
    var
      x, y : Integer;
      WaterBucketDTM : Integer;
    procedure BuyWaterBucket;
    begin
      WaterBucketDTM := DTMFromString('78DA63F466606070654001C5D1FA0CBF80342' +
           '310FF0702C66020C38A010D30229140DA0548F811501302243C09' +
           'A8710212F604D480DC1C805F0D00FCCA096D');
      if (FindDTM(WaterBucketDTM, x, y, MSx1, MSy1, MSx2, MSy2)) then
      begin
        Wait(500+random(150));
        Mouse(x, y, 3, 3, False);
        Wait(500+random(150));
        if ChooseOption('X') then
        begin
         Wait(500+random(150));
         TypeSend('123');
         Wait(500+random(150))
         Exit;
        end;
      end;
      FreeDTM(WaterBucketDTM);
    end;

    var

      BankSymbolDTM : Integer;

    procedure WalkToDepositBox;
      begin
        BankSymbolDTM := DTMFromString('78DA6314676060106540012F778B333C04D28' +
           'C40FC1F0818A5810C7E881C23540D2323235808CE970312E204D4' +
           '80E46508A81104121244A81124A006E4273EFC6A00A2FD0845');
        if (FindDTM(BankSymbolDTM, x, y, MMx1, MMy1, MMx2, MMy2)) then
        begin
          Wait(400+random(150));
          Mouse(x,y,4,4, True);
        end;
        FreeDTM(BankSymbolDTM);
      end;
     



    procedure OpenDepositBox;
       begin
         if (FindColorSpiralTolerance(x, y, 5329483, 0, 0, 520, 340, 8)) then
         begin
           Wait(400+random(150));
           Mouse(x, y, 3, 3, False);
           Wait(300+random(150));
           ChooseOption('Open');
         end;
       end;


    procedure DepositBucket;
      begin
        WaterBucketDTM := DTMFromString('78DA63F466606070654001C5D1FA0CBF80342' +
           '310FF0702C66020C38A010D30229140DA0548F811501302243C09' +
           'A8710212F604D480DC1C805F0D00FCCA096D');
        if (FindDTM(WaterBucketDTM, x, y, MSx1, MSy1, MSx2, MSy2)) then
        begin
          Wait(300+random(150));
          Mouse(x,y,3,3, False);
          Wait(500+random(150));
          ChooseOption('All');
        end;
        FreeDTM(WaterBucketDTM);
      end;

           
           
           
    begin
    SetupSRL;
    ActivateClient;
    BuyWaterBucket;
    WalkToDepositBox;
    OpenDepositBox;
    DepositBucket;
    end.
    it doesn't find the DTM for the bank symbol because there aren't bankers dots to use for making the DTM.. i don't wanna use reflection...
    don't just say it sucks... i know that(its not done) i haven't added login antiban failsafes or multiplayer... going to learn how tomoro and this weekend! i just need to add the tpa findnpc thingy that nicbaz posted!

  14. #14
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by NiCbaZ View Post
    Umm


    SCAR Code:
    Function FindNPC(Uptex:string; Colors: Integer: Boolean;
    Var
      TPAs: TPointArray;
      TPA:  Tpoint;
      D2TPA: T2DPointArray;
      X,Y,I,N: Integer;

    Begin
       FindColorsSpiralTolerance(x,y,TPAs,Colors,MMX1, MMY1,   MMX2,MMY2,20);
      If length(TPAs) = 0 Then
        Exit;
      D2TPA:= TPAtoATPAEx(TPAs,8,8);
      For i:= 0 to length(D2TPA) - 1 Do
      begin
        TPA:= MiddleTPA(D2TPA[i]);
        DebugATPA(D2TPA,'TPA');
        MMouse(TPA.X, TPA.Y, 0, 0);
        Wait(150 + Random(50));
        If IsUpText(UpTex) Then
        begin
          X:= TPA.X
          Y:= TPA.Y
          Result:= True;
        end;
      end;
    end;
    i haven't read a tpa tutorial yet... so i don't really get this, im gunna read one tomorrow.

  15. #15
    Join Date
    Oct 2008
    Location
    England
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    i haven't read a tpa tutorial yet... so i don't really get this, im gunna read one tomorrow.
    First, make it functional.
    Then, make it more efficient

    That's what I'm doing for my script anyway, working well so far.

  16. #16
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    ok i got it functional... kinda i don't have anything special... just loops will post tomoro after i get back from school and work

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TPA Scripting Help Needed!
    By FreakyMonkey in forum OSR Help
    Replies: 7
    Last Post: 04-19-2008, 06:53 PM
  2. eek. A little help needed:
    By malotthouse in forum OSR Help
    Replies: 4
    Last Post: 02-18-2008, 06:01 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
  •