Results 1 to 10 of 10

Thread: if something happens how do you start a procedure?

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

    Default if something happens how do you start a procedure?

    I have a script where I type if(blah blah) then i want to begin a different procedure, how do I do this?

    EDIT:- btw, this is the exact piece of code i have:
    SCAR Code:
    if FindColor(Fx, Fy, 8388736, 21, 416, 29, 425) then ;   //if the trade color is found...
        begin
        StartTrade;
    end;

  2. #2
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    if (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425)) then {;}  // DELETE IN THE BRACKETS
        begin
        StartTrade;
    end;
    SUMMER BREAK be back when I want to

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

    Default

    it just says unknown identifier StartTrade....
    But the next procedure is:
    procedure StartTrade //This moves the mouse to start the trade
    var cx, cy : integer;
    begin
    If(FindChat('rade')then //if it finds rade in the chat box...
    begin
    Wait(500);
    Mouse(cx+10,cy+3,0,0,True); //it will move the mouse towards it.
    Wait(500);
    BuyTrade
    end;
    end;

  4. #4
    Join Date
    Dec 2006
    Location
    Ky
    Posts
    390
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put the StartTrade procedure before this:

    SCAR Code:
    if (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425)) then {;}  // DELETE IN THE BRACKETS
        begin
        StartTrade;
    end;

    This is because SCAR reads from top to bottom and so it hasn't yet got to the StartTrade procedure and so it doesn't know what it is. Hoped that helped
    SUMMER BREAK be back when I want to

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

    Default

    o ty that works! ^^
    but as u can see, the procedure StartTrade is connected to another procedure, BuyTrade, which has the code below:
    procedure BuyTrade //This starts the procedure of a Buying Trade
    var;
    Message2:string;
    begin
    Wait(3000);
    Message2:=('Lobster')
    Option2(: String): Boolean;
    end;

    Note- BuyTrade is not complete yet; so I know there are alot of errors in it. But, If I have to put BuyTrade before StartTrade; how do I make it so it wont run until StartTrade has? ps- thx for helping so much

  6. #6
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It Reads the MainLoop, and it uses those first, but it reads for procedures Top-Procedure your calling from .

  7. #7
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    though you could put

    procedure StartTrade: forward;

    before that code then have the procedures actual code after it....I probably just confused you.

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

    Default

    so do i need to change anything, or can i leave it at the top?
    ps- could someone explain to me the
    Option2(Text:String):Boolean?
    I don't really understand what goes where for that....

  9. #9
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Option2(Text:String):Boolean

    ok, you use it like this:

    Option2('Attack')

    now u can replace between the ' ' any word, example if ur mining, u would have something like: mine or rock etc..

    you can also use it like this:

    If option2('attack')then
    bla..bla..

    because it returns as a boolean.

    got it? if not add me on msn if u want to

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

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

    Default

    ah i see, ty
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Where should i start?
    By ZomgCollin in forum OSR Help
    Replies: 7
    Last Post: 07-06-2008, 04:21 AM
  2. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  3. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  4. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 PM
  5. Replies: 6
    Last Post: 06-03-2006, 09:32 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
  •