Results 1 to 18 of 18

Thread: Help starting frist script

  1. #1
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help starting frist script

    I've been here at srl-forums for quite a while. But I still have no idea where to begin my script. Do I build from the bottom up, start with some things then build on it? I have no idea so post here if you can help me.

    Thanks, Insane Death
    You're the best at all you do - and all you do is make people hate you.
    http://img517.imageshack.us/img517/2522/death2ap9.png

  2. #2
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What type of script were you thinking of making?

    A simple autotyper is always a good start. I'm pleased to see you want to start scripting

    ~Pancakes.
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  3. #3
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You should always start simple, get to know the functions, start with basic mouse movement and talking maybe.

    Then add to that script, make it do more, etc. Always advance

    Good lucky

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  4. #4
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks for the advice, I was thinking of making an auto-woodcutter for my first script. I think making this is easiest because there are good trees near banks such as draynor and willows, seers and maples/yews, varrock and yews and other places, So I don't have to make it walk very far.

    I might try and make a simple auto talker first. It could have duration for how long to send the message for instead of it just constantly sending the same message all the time, it moves onto a different one.

    Do those goals sound reasonable for a first script? I have virtually no experience, and I'm reading some guides in the "Tutorial Island" section
    You're the best at all you do - and all you do is make people hate you.
    http://img517.imageshack.us/img517/2522/death2ap9.png

  5. #5
    Join Date
    Jun 2007
    Location
    NSW, Australia.
    Posts
    541
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    These do sound like reasonable goals. Just read up on some tutorials (as you said you were doing) in the begginners section. These should help you alot, as I can see you are keen to script, which is always good!

    If you need any help with any specific thing, feel free to PM me
    Quote Originally Posted by RAM View Post
    I sam sofa king wee todd did ! ~RAM
    My SRL Army Blog.


  6. #6
    Join Date
    Jan 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i recently just started too and i am getting a pretty good grasp of this i have made a couple scripts that work decently but so far they very small scripts that arnt worth posting. one thing you have to do is KEEP ON READING TUTORIALS! if you are bored and have nothing to do just sit down and read one on something you have some knowledge on but not much and just keep going.

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

    Default

    Start simple, a loginner that uses bitmaps and such. Then go powerchopper, just build it top down, don't think backwards.

  8. #8
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the support guys, still reading...

    EDIT:

    So far I have come up with this for an auto talker:

    program script;
    const
    Message1='Hello world!'; // message number 1 here
    Message2='Hello';
    Message3='world!';
    procedure HelloWorld;
    begin
    wait(1000) //time between message here. 1000= 1 second
    Writeln(Message1);
    end;
    procedure Hello;
    begin
    wait(2000)
    writeln(message2)
    end;
    procedure world;
    begin
    wait(3000)
    Writeln(message3)
    end;
    begin
    repeat
    helloworld;
    hello;
    world;
    until(false)
    end.


    Re-edit: Im not sure writeln is the write command to make scar type into Runescape. Can anyone tell me what it is?

  9. #9
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I also have this: It has some kind of standards...

    I still don't know what command to use to make scar write into Runescape.

    program InsaneAutotalker;

    const
    Message1='Hello world!'; // message number 1 here
    Message2='Hello';
    Message3='World!';

    procedure HelloWorld;
    begin
    wait(1000) //time between message here. 1000= 1 second
    Witeln(Message1);
    end;
    procedure Hello;
    begin
    wait(2000)
    Writeln(Message2)
    end;
    procedure world;
    begin
    wait(3000)
    Writeln(Message3)
    end;

    begin
    repeat
    helloworld;
    hello;
    world;
    until(false)
    end.

  10. #10
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Insane Death,, scar tags: [scar] you're code [/scar>
    (the last > = ]

    WriteLn = the comment to write in the debug box from scar. not to type in runescape.
    to type in runescape use : TypeSend

  11. #11
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think I tried TypeSend and it wouldn't compile. Let me try again...

    Also thanks for tip on tags for my code.

    I've fixed up my code a bit with some standards I think...

    SCAR Code:
    program InsaneAutotalker;

    const
    Message1='Hello world!'; // message number 1 here
    Message2='Hello';
    Message3='World!';

    procedure HelloWorld;
      begin
        wait(1000) //time between message here. 1000= 1 second
        TypeSend(Message1);
      end;
    procedure Hello;
      begin
        wait(2000)
        TypeSend(Message2)
      end;
    procedure world;
      begin
        wait(3000)
        TypeSend(Message3)
      end;

    begin
      repeat
        helloworld;
        hello;
        world;
      until(false)
    end.

    When I use TypeSend I get this error:

    Failed when compiling
    Line 12: [Error] (12:1): Unknown identifier 'TypeSend' in script C:\Program Files\SCAR 3.12\Scripts\my auto talker.scar

  12. #12
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    TypeSend is a srl fucntion

    you can use SendKeys if you don't want to use srl.

    but ill recommend to put
    {.include srl/srl.scar} on the begin of you're script (under program InsaneAutotalker

    and
    SetUpSrl; on the begin of you're main loop. (not in the repeat loop )

  13. #13
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It worked, thanks for that! Now to set up things like timers for the duration on the message (posted somewhere near the top)

  14. #14
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    something like timers is in a tut made by The Claw. it goes about fail saves.

    if you don't understand the tut fully just ask

  15. #15
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks I'm looking it up about now, heres the updated version of script.
    SCAR Code:
    {Setup lines are: 7, 8, 9, 10, 11, 12 }

    program InsaneAutotalker;
    {.include srl/srl.scar}

    const
    Message1='Hello world!'; // Message Number 1
    Message2='Hello'; // Message Number 2
    Message3='World!'; // Message Number 3
    Message4='Something'; // Message Number 4
    Message5='Ramdom'; // Message Number 5
    Message6='Here'; // Message Number 6 Here

    procedure Message1Procedure;
      begin
        wait(1000) //time between message 1 here. 1000 = 1 second
        TypeSend(Message1);
      end;
    procedure Message2Procedure;
      begin
        wait(2000)
        TypeSend(Message2)
      end;
    procedure Message3Procedure;
      begin
        wait(3000)
        TypeSend(Message3)
      end;
    procedure Message4Procedure;
      begin
        wait(4000)
        TypeSend(Message4)
      end;
    procedure Message5Procedure;
      begin
        wait(5000)
        Typesend(Message5)
      end;
    procedure Message6Procedure;
      begin
        wait(6000)
        TypeSend(Message6)
      end;

    begin
      SetUpSRL
      repeat
        Message1Procedure;
        Message2Procedure;
        Message3Procedure;
        Message4Procedure;
        Message5Procedure;
        Message6Procedure;
      until(false)
    end.

  16. #16
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What about this?

    SCAR Code:
    {
    Setup Lines:
    15 to 21
    }


    program InsaneAutotalker;
    {.include srl/srl.scar}

    var
    i,WaitTime:Integer;
    Messages:Array[0..5] of string;

    procedure MessageSetup;
    begin
      Messages[0]:='Hello'; //Message 0 to 5..
      Messages[1]:='Hello1';
      Messages[2]:='Hello2';
      Messages[3]:='Hello3';
      Messages[4]:='Hello4';
      Messages[5]:='Hello5';
      WaitTime:=300//Miliseconds 1000 = 1 second
    end;

    procedure SendMessages;
    begin
      for i:=0 to 5 do
      begin
        TypeSend(Messages[i]);
        wait(WaitTime+random(200));
      end;
    end;

    begin
      SetUpSRL;
      MessageSetup;
      repeat
        SendMessages;
      until(false)
    end.

    Dunno if its too advanced for you at your current stage.

    You can use MarkTime to mark the time and then TimeFromMark to see how long its been since the MarkTime (eg.. how long it took to send all messages etc)

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  17. #17
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The bits I don't get are:

    SCAR Code:
    var
    i,WaitTime:Integer;
    Messages:Array[0..5] of string; <-- Is that saying that there are 6 messages, 0-5?

    procedure SendMessages;
    begin
      for i:=0 to 5 do
      begin
        TypeSend(Messages[i]); <-- Does that make it send messages 0-5?
        wait(WaitTime+random(200)); <-- Does that make it wait anywhere from 300-500?

  18. #18
    Join Date
    Apr 2007
    Location
    NSW, Australia
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just about 10 minutes ago I tried putting in an option to make my autotalker automatic and make it send messages when you press an FKey.

    Here is my script since I started that:

    SCAR Code:
    {Setup lines are: 7, 8, 9, 10, 11, 12 }

    program InsaneAutotalker;
    {.include srl/srl.scar}

    const
    FKey = 1; //0 is automatic, 1 means press an Fkey down to send
    Message1='Hello world!'; // Message Number 1
    Message2='Hello'; // Message Number 2
    Message3='World!'; // Message Number 3
    Message4='Something'; // Message Number 4
    Message5='Ramdom'; // Message Number 5
    Message6='Here'; // Message Number 6 Here

    procedure Message1Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(1)) then TypeSend(Message1) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        TypeSend(Message1);
      end;
    procedure Message2Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(2)) then TypeSend(Message2) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        TypeSend(Message2)
      end;
    procedure Message3Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(3)) then TypeSend(Message3) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        TypeSend(Message3)
      end;
    procedure Message4Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(4)) then TypeSend(Message4) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        TypeSend(Message4)
      end;
    procedure Message5Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(5)) then TypeSend(Message5) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        Typesend(Message5)
      end;
    procedure Message6Procedure;
      begin
        if FKey:1 then
          if (IsFKeyDown(6)) then TypeSend(Message6) else
        wait(1000 + random(200)) //time between message 1 here. 1000 = 1 second
        TypeSend(Message6)
      end;

    begin
      SetUpSRL
      repeat
        Message1Procedure;
        Message2Procedure;
        Message3Procedure;
        Message4Procedure;
        Message5Procedure;
        Message6Procedure;
      until(false)
    end.

    When I compile I get this error, I think it's about FKey:

    Failed when compiling
    Line 17: [Error] (14698:8): 'THEN' expected in script C:\Program Files\SCAR 3.12\Scripts\my auto talker.scar
    You're the best at all you do - and all you do is make people hate you.
    http://img517.imageshack.us/img517/2522/death2ap9.png

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. script not starting?
    By sundeep125 in forum OSR Help
    Replies: 5
    Last Post: 11-17-2008, 06:15 PM
  2. very frist scrpit help, noob inside!
    By danman1212 in forum OSR Help
    Replies: 10
    Last Post: 01-05-2008, 09:57 AM
  3. Starting to Script
    By Suyeda in forum News and General
    Replies: 5
    Last Post: 10-31-2006, 04:02 AM

Posting Permissions

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