Results 1 to 14 of 14

Thread: adding consts in send keys?

  1. #1
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default adding consts in send keys?

    i want to make a auto merchanter, but i also want it to say this:

    sendkeys(Message1)

    and message1 is:

    const
    Message1='buying up to' + howmany + whatyouwannabuy + 'for' + eaprice

    but that doesnt work.

    PS: howmany,whatyouwannabuy, and eaprice are also consts.

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    make it a variable

  3. #3
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    um make what a variable? my other consts?

    im also not to sure how to do this, i got Scar yesterday, and started scripting today X_X

    i did read some tutorials though!

  4. #4
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    var
    message1: string;

  5. #5
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, now it says duplicate identifier in script in line 9.

    heres my script. plz help!

    SCAR Code:
    program MerchantMaster;
    {.Include SRL/SRL.scar}

    var
    message1: string;


    const
    Message1='buying up to' + howmany+whatyouwannabuy + '! for' + eaprice + '!'
    Whatyouwannabuy=?
    howmany=?
    eaprice=?

    procedure saystuff;
    begin
    sendkeys(Message1)
    SendKeysVb('{ENTER}',false)





    end.

  6. #6
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well you made message1 a string and a const. set it up like this.

    Code:
    program MerchantMaster;
    {.Include SRL/SRL.scar}
    
    const
    howmany=10;
    whatyouwannabuy='gold';
    eaprice=200;
    Var
    Message1:String;
    
    begin
    Message1:=('buying up to' + IntToStr(howmany) + whatyouwannabuy + 'for' + IntToStr(eaprice));
    typesend(Message1);
    end.

  7. #7
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and popped up this:

    Line 6: unkown identifer ' '

  8. #8
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Do you get an error with this?
    Code:
    program MerchantMaster;
    {.Include SRL/SRL.scar}
    
    const
    howmany=10;
    whatyouwannabuy='gold';
    eaprice=200;
    Var
    Message1:String;
    
    begin
    Message1:=('buying up to ' + IntToStr(howmany) +' '+ whatyouwannabuy + ' for ' + IntToStr(eaprice));
    typesend(Message1);
    end.

  9. #9
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks! now it works!

    Im gonna take it to the next step now....is there a way so that when you get traded, itll search for that purple text, and the name of the person who traded u, then search for that name on ure map, then click trade with them?

    PS: to search for the person, it wont search the entire map, but only the spots around u.

  10. #10
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sry for double post, but for the post behing me, i started trying to write a script for it, and this is wat i got so far:

    procedure lookfortrade;
    begin
    wait(15000)
    if(findcolor(x,y,8388736,142,386,443,174)=True)and
    if(FindChatText('wishes to trade with you')) then
    procedure starttrade;
    begin
    mouse(

    And then im stuck....i want it to look for the person in the text and trade with him, i have no clue how to do this.....

  11. #11
    Join Date
    Dec 2006
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    cmon anyone....anyone at all.... >

  12. #12
    Join Date
    Jun 2006
    Location
    Tennessee, USA
    Posts
    2,603
    Mentioned
    1 Post(s)
    Quoted
    46 Post(s)

    Default

    there's a procedure in SRL that does that. just look for it in your SRL folder. i think its in the misc folder.

  13. #13
    Join Date
    Sep 2006
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea, and why would you put this:
    SCAR Code:
    and
    if(FindChatText('wishes to trade with you'))
    Only trade requests are purple, so that is just useless.


    SCAR Code:
    procedure lookfortrade;
    begin
    wait(15000);
    if(findcolor(x,y,8388736,142,386,443,174)) then starttrade;
    end;

    procedure starttrade;
    begin
    Mouse(x, y, 2, 2, True);
    end;
    That's it.

  14. #14
    Join Date
    Dec 2006
    Posts
    374
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    u could do this
    SCAR Code:
    const
    msg1 = 'buying coal';

    procedure talk;
     begin
    TypeSend(msg1 + chr(13)) ;
    end;

    begin
    repeat
    talk;
    end;
    end.
    Another awsome scripting forum! Check it out: www.Uberbroproductions.net/forums
    TRY MY VARROCK ZAMMY MAGE CURSER/CONFUSER/WEAKENER! THE LINK IS BELOW
    http://www.srl-forums.com/forum/varr...56.html?t=6356
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. A Tut on Consts and Vars
    By Naum in forum OSR Outdated Tutorials
    Replies: 11
    Last Post: 03-25-2009, 03:18 AM
  2. type send not send keys in vb
    By Noob King in forum C#/Visual Basic Help and Tutorials
    Replies: 5
    Last Post: 10-23-2008, 09:14 PM
  3. Silent Send Keys?
    By yanix in forum OSR Help
    Replies: 5
    Last Post: 01-06-2008, 04:11 PM
  4. help with how to send arrow keys
    By rogue poser in forum OSR Help
    Replies: 4
    Last Post: 04-19-2007, 11:16 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
  •