Page 2 of 2 FirstFirst 12
Results 26 to 39 of 39

Thread: * Fighting.scar

  1. #26
    Join Date
    Jan 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh ok sorry i should of listen to what u said the first time
    ive downloaded srl...and will your script work smothly with 3.20 or should i try and find the 3.15 version?
    also i tryed running your script with srl and this messaged poped up
    Line 29: [Error] (16941:1): Identifier expected in script

  2. #27
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by wisard 93596 View Post
    oh ok sorry i should of listen to what u said the first time
    ive downloaded srl...and will your script work smothly with 3.20 or should i try and find the 3.15 version?
    also i tryed running your script with srl and this messaged poped up
    Line 29: [Error] (16941:1): Identifier expected in script
    Are you just copying and pasting the code into SCAR and pressing play? If so, that won't work, as theres no main loop.

  3. #28
    Join Date
    Jan 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok last question...i have my scar program full working and my script seems like it will work smoothly...but for it to find monsters it needs 3 colors...i know its some sort of code or number...where would i find these codes?

  4. #29
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Rasta Magician View Post
    lol.
    Function SetAutoRetaliate(On : Boolean): Boolean;

    notice the bolded bit, hermen, nauman?

    anyway, good work richard, although i thought these had already been done by narcle.
    I'll have a better look later.

    ~RM
    I noticed it man, just thought it would clash with the bold 'On' command in SCAR,

    http://www.delphibasics.co.uk/RTL.asp?Name=On



    Although it's pretty cool to use your own local variable as a result, didn't know you could do that

    More Over, Shut your shortened version would still not work:

    Quote Originally Posted by Shuttleu View Post
    i shall have a look at them

    ~shut

    EDIT: not really shorter but it is neater
    SCAR Code:
    {*******************************************************************************
    Procedure SpecialAttack(MinPercent: Integer);
    By: Richard edited by Shuttleu
    Description: Use the special attack button if it is present, and presses it if
    the percent of the bar filled is >= MinPercent
    *******************************************************************************}

    procedure SpecialAttack(MinPercent: Integer);
    begin
      GameTab(1);
      case GetColor(623,424) of
        65535: Begin
                 WriteLN('Special attack is already active');
                 Exit;
               end;
        1048576: begin
                   WriteLN('Current weapon doesn'#39't have a special attack');
                   Exit;
                 end;
      end;
      If (MinPercent <= Round((((CountColorTolerance(3700023, 572, 417, 713, 428, 120))/1634)*100))) then
        MouseBox(570, 413, 714, 431, 1);
    end;
    Should work with this:

    SCAR Code:
    If (GetColor(623,424) = 65535) then
      Begin
        WriteLN('Special attack is already active');
        Exit;
      end;
      If (GetColor(623,424) {}<>{} 1048576) then

    there is an <> in there so if it is not Equal to, what your doing in your other procedure is making it equal to
    Last edited by Naum; 05-19-2009 at 03:06 PM.

  5. #30
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Rasta Magician View Post
    lol.
    Function SetAutoRetaliate(On : Boolean): Boolean;

    notice the bolded bit, hermen, nauman?

    anyway, good work richard, although i thought these had already been done by narcle.
    I'll have a better look later.

    ~RM
    I'm sorry that was so funny 2 very good scripters didin't notice Boolean?

    Well anyways, this was kinda off topic (:

    ~HOme

  6. #31
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    But I did notice it.

    Thanks for the good scripter compliment

  7. #32
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Hermen View Post
    SCAR Code:
    Function SetAutoRetaliate(On : Boolean): Boolean;
    Var
    c: Integer;
    Begin//I MEAN WHERE IS THE ON in this function?! You don't even var the ON.
      If (IsAutoRetaliateOn = True) then //<-- should be here?!?
      Begin
        Result := True;
        Exit;
      end;
    Btw, it's pretty lame if you just changed it and say like it wasn't never wrong.(Just saying if you didn't you're fine ).
    Quote Originally Posted by Hermen View Post
    Now I am getting pissed the function in the first post is different than in the post of naum, I probably know params better than you(Richard) and if you would have read my post correctly you would have seen it!
    Chill, mate. Richard's original function is the one in the first post atm. He hasn't changed anything with it so don't get angry...

    Anyway Richard, nice functions. I'm pretty sure, however, that SetAutoRetaliate and SetAttackStyle are already in SRL:

    SCAR Code:
    procedure Retaliate(RetTrue: Boolean);  //GameTab.scar

    function SetFightMode(oFightMode: Integer): Boolean;  //GameTab.scar

    I'm not sure about the magic staffs though.

  8. #33
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Chill, mate. Richard's original function is the one in the first post atm. He hasn't changed anything with it so don't get angry...

    Anyway Richard, nice functions. I'm pretty sure, however, that SetAutoRetaliate and SetAttackStyle are already in SRL:

    SCAR Code:
    procedure Retaliate(RetTrue: Boolean);  //GameTab.scar

    function SetFightMode(oFightMode: Integer): Boolean;  //GameTab.scar

    I'm not sure about the magic staffs though.
    Didn't think of looking in GameTab.scar, I guess its more relevant as there could also be magic/range weapons.

    Thanks.

  9. #34
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wtf, lol I did notice it just some person had a edited qoute of the real function and I was like Fuck The What, and I tried to help Richard .

    That you didn't know that, that you can pass var's thru a parameter like:

    SCAR Code:
    function FindEdgeBank(var TempX, TempY:integer; MaxTime :integer):boolean;

    if FindEdgeBank(A, B, 5000) then

    It's very handy especially for this^
    ~Hermen

  10. #35
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    No hermpie he used his own local variable to use as a result

  11. #36
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    You should change the On variable, On is a part of pascal script afaik.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  12. #37
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Is this planning to be added?

    Also, changing the "on" to "setOn" to prevent problems with SCARs inbuilt variable.

    May I ask what the asterisk next to this thread means?

  13. #38
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I'll have a look in a bit. I think a couple could be useful (like SpecialAttack).

  14. #39
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright, nevermind then. I deleted the post. Edit it out from your quote .

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Posting Permissions

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