Results 1 to 10 of 10

Thread: All Together confused.

  1. #1
    Join Date
    Mar 2008
    Posts
    200
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default All Together confused.

    Hello, i've read several tutorials and they all seem to amke sense write up untill i try and write my own script. i'm getting confused on all the booleans and const, vars ect ect. and im only trying to make an autotalker atm . can anyone help me figure this stuff out?


    Benson

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

    Default

    Well First of all it takes time to become a scripter.
    Be patient and work with it untill you get it.
    but heres alittle help


    Consts are like for public use, ill try to use an example to try and show you what i mean.

    SCAR Code:
    Program Consthelp;
    {.include SRL/SRL.scar}


    const
    TreeColor = 34234234;

    Begin
      Findcolor(TreeColor,x,y,0,0,500,500)
      // Instead of putting the color in it, i used "Treecolor"
      // So anytime you put TreeColor in your script
      // It will use that color you picked (The Numbers) in the const
    end.


    This is What it would look like without Const's

    SCAR Code:
    Program Consthelp;
    {.include SRL/SRL.scar}

    Begin
      Findcolor(34234234,x,y,0,0,500,500)
    end.

    Ill help more later, but i gtg for now
    Hope i help =\


    Someone: 'Who the hell is TooManySitUps?'

    Boreas: 'Switch the first and last letter of my name, what do you get?'

    Someone: 'Um, SoreAb?'

    Boreas: 'And how do you get that?'

    Someone: 'From Too Many Sit Ups!! Haha, Boreas you are so clever!'

    Boreas: 'Ya he's like my evil twin that takes over when I'm being really sarcastic, or playing devil's advocate.'

  3. #3
    Join Date
    Mar 2008
    Posts
    200
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    you deffinantly helpped, here i jsut finished a little autotalk script thingy. but im fine tuning all the errors otu..cant run a script with errors right? but ig et this error and im nto sure what its asking.

    Line 26: [Error] (12605:11): Duplicate identifier 'WAIT' in script C:\Program Files\SCAR 3.14\Scripts\MyFirstScript.scar

    heres my script

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

     {Hello, and welcome to the only autotalker that will impress the RuneScape ladies}
     {This autotalker will show off your amazing skills to speak other languages!!}
     {To begin, start off logged in, find a gullible person, and hit start.}
     {DO NOT FORGET TO SELECT THE RUNESCAPE SCREEN >>AND BE LOGGED IN :P<<}
     {Hope you enjoy it, it didnt take long, but i ahd to read a lot and figure stuff out}
     {Please let me know waht you think, and things to improve on.}

    {------------------------------------------------------------------------------}
    {+++++++++++++++++++++++++++DO NOT EDIT PASSED HERE++++++++++++++++++++++++++++}
    {------------------------------------------------------------------------------}

    var
    i: integer;
    s: string;

    const
     Talk1='Hello everyone!';
     Talk2='Howdy, yall!';
     Talk3='Bonjour mon amie!';
     Talk4='Alloha';
     Talk5='How are you doing, eh?';
     
    Procedure Wait;
     begin
      Wait(3000+random(1000));
     end;
     
    Procedure  AutoTalk;
    i:= 1337;
     begin
      WriteLN(s:'I can speak in many languages!!');
      Wait(500+random(100));
      TypeSend(Talk1);
      Wait(500+random(100));
      TypeSend(Talk2);
      Wait(500+random(100));
      TypeSend(Talk3);
      Wait(500+random(100));
      TypeSend(Talk4);
      Wait(500+random(100));
      TypeSend(Talk5);
      Wait(500+random(100));
      TypeSend('isnt that'(i));
      end;
     
    begin
    SetupSRL;
    repeat
     Wait;
     AutoTalk;
    until(IsFKeyDown(12));
    end.

    hope you can help me or anyone for that matter.

  4. #4
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Since there already is a procedure called "Wait" in SCAR when you made your "Wait" Procedure it confused SCAR. So just remove your

    SCAR Code:
    Procedure Wait;
     begin
      Wait(3000+random(1000));
     end;

    and that will get rid of your error.

    Also normally instead of using constants using variables for different responses would probably be better.

    Basically you'd want your script to look like this...

    SCAR Code:
    program New;
    var
      Response1, Response2, Response3: string;

    begin
      Response1:= 'Text';
      Response2:= 'Text';
      Response3:= 'Text';
     
      TypeSend(Response);
    end.

    Also where you have

    SCAR Code:
    TypeSend('isnt that'(i));

    you can just have
    SCAR Code:
    TypeSend('Isnt that 1337');

    But if you want it to Type a variable integer like you had told it to you would have to have
    SCAR Code:
    TypeSend('Isnt that' + Inttostr(i));
    The Inttostr changes the 1337 -> '1337' and you need to have a + when adding in strings or variables to a string.

    I'd browse around the Tutorial Island here a bit more and learn some more of that basic stuff but remember it takes time to become a scripter.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

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

    Default

    Thanks and if you need any other help
    Just give me a PM or contact me on Msn Rizaalb1tch@live.com


    Someone: 'Who the hell is TooManySitUps?'

    Boreas: 'Switch the first and last letter of my name, what do you get?'

    Someone: 'Um, SoreAb?'

    Boreas: 'And how do you get that?'

    Someone: 'From Too Many Sit Ups!! Haha, Boreas you are so clever!'

    Boreas: 'Ya he's like my evil twin that takes over when I'm being really sarcastic, or playing devil's advocate.'

  6. #6
    Join Date
    Mar 2008
    Posts
    200
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    sounds good to me, i was kinda frustrated so i went and played BF2, which made me mroe frustrated then i jsut sat down and wrote all that out the best i could. ill take in your opinions and fix my problems . i used the integer thing cause i wanted to try and make a script that used at least one of most of the things i knew. :P thanks again. names going on it :P

    EDIT: ok so i've fiddled around some more and sadly it works but it skips over the strings.

    SCAR Code:
    //script was here but problem sorted out, saving space.

    all it types is "i can speak in many languages!!", "isnt that 1337!!"

    EDIT2: fixed my problem, but i ahev a question, some other scripts have the scar window minimize... how can i do that because currently, it doesnt work properly and you gotta make sure you select the rs window.

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

    Default

    You never call type send after all the messge1:=''; so it would be
    SCAR Code:
    Program new;
    {.include srl/srl.scar}
    var
    Talk1, Talk2, Talk3, Talk4, Talk5: string;

    Procedure  AutoTalk;
     begin
      TypeSend('I can speak in many languages!!');
      Wait(500+random(100));
      Talk1:='Hello everyone!';
      Typesend(Talk1)
      Wait(500+random(100));
      Talk2:='Howdy, yall!';
      Typesend(Talk2)
      Wait(500+random(100));
      Talk3:='Bonjour mon amie!';
      Typesend(Talk3)
      Wait(500+random(100));
      Talk4:='Alloha!';
      Typesend(Talk4)
      Wait(500+random(100));
      Talk5:='How are you doing, eh?';
      Typesend(Talk5)
      Wait(500+random(100));
      TypeSend('isnt that 1337');
      end;

    begin
    SetupSRL;
    repeat
     AutoTalk;
     Wait(2000+random(1000));
    until(IsFKeyDown(12));
    end.
    Also for the ease of people makeing their own messages you might want to put it back to cont for the phrase. Special is just weird

  8. #8
    Join Date
    Mar 2008
    Posts
    200
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    wahts the diffrence of putting all the mesages at the begining of the procedure, then having teh put just before when they are used?


    Main Question now: How do i get SCAR to minimize just before it starts?

  9. #9
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Mine was just an example... not really meant to work. To answer your question Benson, there really is no difference besides the cosmetic portion of the script, it just looks nicer to have all the "responses" at the beginning rather than before each type send.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

  10. #10
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Benson View Post
    Main Question now: How do i get SCAR to minimize just before it starts?
    Add Activateclient; to the begin or your main loop

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Confused
    By massive630 in forum OSR Help
    Replies: 11
    Last Post: 01-19-2009, 11:29 PM
  2. I'm a little confused
    By 499185 in forum SRL Site Discussion
    Replies: 5
    Last Post: 09-21-2007, 04:23 AM
  3. UID.dat .. really confused to what it does :S:S
    By koolkishan in forum News and General
    Replies: 13
    Last Post: 09-07-2007, 08:25 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
  •