Results 1 to 9 of 9

Thread: Help with 'Simple' procedure.

  1. #1
    Join Date
    Apr 2008
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with 'Simple' procedure.

    Hello I am in need of some help. So I am trying to make a new chicken killing script. Very basic at the moment no feather picking etc. just killing chickens.

    While trying to setup my retaliate procedure the script stops working.

    This is a sample of what it looks like:

    program New;
    {.include srl/srl.scar}
    procedure SetRetaliateMode;


    begin
    if not (LoggedIn) then exit;
    gametab(1);
    if GetColor(610,390) = 1908610 then exit else mouse(610+random(20),390+random(10),0,0,true);
    end;


    begin
    SetupSRL;
    SetRetaliateMode;
    end.

    After compiling and running that the debug box shows this:

    Successfully compiled (1672 ms)
    File access error
    SRL Compiled in 16 msec
    Successfully executed

    Then nothing happens. Does anyone have any tips for me?

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl/srl.scar}

    procedure SetRetaliateMode;
    begin
    if not (LoggedIn) then exit;
    gametab(1);
    if GetColor(610,390) = 1908610 then exit else mouse(610+random(20),390+random(10),0,0,true);
    end;
    end;

    begin
    SetupSRL;
    SetRetaliateMode;
    end.
    Scar tags next time please, but it looks like you forgot an "end;" at the end of the retaliate procedure. I added it in there ^ Or you could use SRL's retaliate. Good luck

    EDIT:
    SCAR Code:
    procedure Retaliate(RetTrue: Boolean);
    used like: Retaliate(True); or Retaliate(False);

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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

    Default

    First, you need a DeclarePlayers; procedure, and you need to call it.

    Secondly, SRL has a function named Retaliate. It's parameters are in form of a boolean. It is used like this:

    SCAR Code:
    Retaliate(True); // This would turn Retaliate on

    Retaliate(False); // This would turn Retaliate off

    Perhaps nothing happened because you didn't activate the client?

    Hope I helped

  4. #4
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    SCAR Code:
    procedure SetRetaliateMode;
    begin
    if not (LoggedIn) then exit;
    gametab(1);
    if GetColor(610,390) = 1908610 then exit else mouse(610+random(20),390+random(10),0,0,true);
    end;
    end;

    SCAR Code:
    procedure SetRetaliateMode;
    begin
      if not (LoggedIn) then exit;
      gametab(1);
      if GetColor(610,390) = 1908610 then
        exit
      else
        mouse(610+random(20),390+random(10),0,0,true);
    //end; you had this end too much.
    end;

    you had an end too much Camo.

    ps: This s why standarts are important, it makes you see where something has gone wrong easier.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  5. #5
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Oops, I just copied what he had. Let us know if these work

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  6. #6
    Join Date
    Apr 2008
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you for the advice. I am going to try them right now.

  7. #7
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    I tried it for him, it did work.

  8. #8
    Join Date
    Sep 2006
    Posts
    457
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah you might want to add some tolerance to your color finding thing. Because the colors change and you will probably not get that color 100% of the time. So just my 2 cents.
    Finished my curser ---> it's in mage section.

  9. #9
    Join Date
    Apr 2008
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry I haven't posted anything back yet. I have not had a chance to incorporate the changes. I got called into work . Anyways I'll post again as soon as I try em.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  2. Replies: 5
    Last Post: 03-26-2007, 07:57 PM
  3. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 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
  •