Results 1 to 13 of 13

Thread: AutoColour is 100% failing.

  1. #1
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default AutoColour is 100% failing.

    Okay, here is my problem. I am using the scar assist tool by sombody i cannoth remember the name of .
    The auto color i am using from it is not working?
    I have tried 5 different colours.
    It is the magic dummys in lumbridge.

    SCAR Code:
    program New;

      {.include srl/srl.scar}
      {.include srl/srl/skill/magic.scar}


    Const
    CastsToDo=5000;
    UsingSmart=True; //This is only for minimised autoing

    var
    x,y,i,mx,my,MageLVL,casted,DummyColour:Integer;
    Spell:String;



    procedure MyWait(Time: Integer);
    var
      Marker: Integer;
    begin
      MarkTime(Marker);
      while (TimeFromMark(Marker) < Time) do
      begin
        Wait(50);
        FindNonInventoryRandoms;
        if (i=10) then
         begin
         FindNormalRandoms;
         i:=0;
         end;
      end;
    end;



    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;


      Players[0].Name := 'cakedon ko';
      Players[0].Pass := 'magicgate';
      Players[0].Nick := 'aked';
      Players[0].Active := True;
    End;

    (*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\
    ||   TR - Displays the about of time the script has been running   ||
    ||    (Only added here so I can have hours->hrs,etc. shortened)    ||
    ||              By: Phalanx + RsN, small edit by Hy71194           ||
    \\_________________________________________________________________*)

    function TR: String;
    var
      RHours, Minutes, Seconds, RMinutes, RSeconds: LongInt;
      Time: string;
    begin
      Seconds := GetTimeRunning div 1000;
      Minutes := Seconds div 60;
      RHours := Minutes div 60;
      Time := IntToStr(Seconds) + ' Secs';
      if Minutes <> 0 then
      begin
        RSeconds := Seconds mod (Minutes * 60);
        Time := IntToStr(Minutes) + ' Mins and ' + IntToStr(RSeconds) +
          ' Secs';
      end;
      if RHours <> 0 then
      begin
        RMinutes := Minutes mod (RHours * 60);
        RSeconds := Seconds mod (Minutes * 60);
        Time := IntToStr(RHours) + ' Hrs, ' + IntToStr(RMinutes) +
          ' Mins, and ' + IntToStr(RSeconds) + ' Secs';
      end;
      Result := Time;
    end;

    Procedure Proggy;
    var
    ExpForSpell, ExpGained:Integer;

    Begin
    If Spell = 'Confuse' then ExpForSpell:= 13;    //   Pretty sure that
    If Spell = 'Weaken' then ExpForSpell:= 21;    //    this could be a
    If Spell = 'Curse' then ExpForSpell:= 29;    //     case, dont know how though.
    ExpGained:= Casted*ExpForSpell;
    WriteLn('The script has run for: '+TR);
    WriteLn('Casted '+IntToStr(casted)+'/'+IntToStr(CastsToDo));
    WriteLn('Gained '+(IntToStr(ExpGained))+' exp.');

    End;

    Procedure SetupMage1;
     begin
      Players[CurrentPlayer].level[6] := GetSkillInfo('magic',False);
      MageLVL:= Players[CurrentPlayer].level[6];
      MyWait(500);
        if MageLVL > 2 then Spell:= 'Confuse';
        if MageLVL > 10 then Spell:= 'Weaken';
        if MageLVL > 18 then Spell:= 'Curse';
      ClearDebug;
      Writeln('Using the spell: '+Spell);
     end;



    procedure ChangeMusic; // Leeched off HY :D
     begin   // Changes RS Music track :)
            GameTab(13);
            Wait(Random(2000));
            MouseBox(715,284,728,435,1);
            Wait(40+Random(3000));
            if FindColorTolerance(mx,my, 65280, 562, 270, 661, 450, 5) then
            begin
              Mouse(mx + Random(125), my + Random(8), 0, 0, True);
              Wait(Random(3000));
            end else
            begin
              MouseBox(562,268,711,449,1);
              Wait(Random(5000));
            end;
            FindNormalRandoms;
          end;


    function AutoColor: Integer;
    var
      I, R, G, B, Len, TestColor: Integer;
      H, S, L, X, Y, Z: Extended;
      P: TPointArray;

    begin
      Result := -1;
      FFlag(0);
      FindColorsTolerance(P, 9664355, MMX1, MMY1, MMX2, MMY2, 120);
      Len := High(P);
      for I := 0 to Len do
        if RS_OnMinimap(P[I].X, P[I].Y) then
        begin
          TestColor := GetColor(P[I].X, P[I].Y);
          ColorToRGB(TestColor, R, G, B);
          if InRange(R - B, -68, -28) then
            if InRange(R - G, -40, 0) then
              if InRange(G - B, -48, -8) then
              begin
                ColorToHSL(TestColor, H, S, L);
                if InRange(Round(H - L), -4, 26) then
                  if InRange(Round(S - H), -55, -25) then
                    if InRange(Round(S - L), -44, -14) then
                    begin
                      ColorToXYZ(TestColor, X, Y, Z);
                      if InRange(Round(X - Y), -8, 6) then
                        if InRange(Round(Y - Z), -19, -5) then
                        begin
                          Result := TestColor;
                          Exit;
                        end;
                    end;
              end;
        end;
      WriteLn('Autocolor did not find the color.');
    end;



    Procedure CastTehSpells;

      begin
       CastOn(Spell,'Magic dummy',DummyColour,20);
       casted:= casted+1;
       i:=i+1;
       ClearDebug;
       Proggy;
       MyWait(1000+Random(200));
      end;
     


    begin
    SetupSRL;
    DeclarePlayers;
    If Not LoggedIn then loginplayer;
    SetupMage1;
    MakeCompass('e');
    AutoColor;
    DummyColour:=AutoColor;
     repeat
      CastTehSpells;
      until(casted=CastsToDo)
    end.


    ***EDIT

    And dont say anything about the lack of anitban please.
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

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

    Default

    That looks on the MM for the color. You need to make it look for the MS not MM. Also cred the person who made it If you need any more help feel free to shoot me a PM or add my IM's

    ~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.


  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Camo¤Kyle View Post
    That looks on the MM for the color. You need to make it look for the MS not MM. Also cred the person who made it If you need any more help feel free to shoot me a PM or add my IM's

    ~Camo
    you can use ACA for MS and Inventory as well as MM

    ~shut

  5. #5
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Camo¤Kyle View Post
    That looks on the MM for the color. You need to make it look for the MS not MM. Also cred the person who made it If you need any more help feel free to shoot me a PM or add my IM's

    ~Camo
    I did credit them but i re-did the assist again and forgot

    Thanks for the help.


    ***EDIT

    I dont have it, only the DFM parser
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  6. #6
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    left pass sending it to u
    I do visit every 2-6 months

  7. #7
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OMG, I thought i took it out... AGAIN....


    Thanks. My second CTRL + C didnt work ><
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

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

    Default

    Quote Originally Posted by Shuttleu View Post
    you can use ACA for MS and Inventory as well as MM

    ~shut
    He means he's searching the wrong place. The autocolor works for the mm. The dummy finder needs one for the ms

  10. #10
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

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

    Default

    You're still getting it wrong. You need to make it look in the MS not MM.
    SCAR Code:
    FindColorsTolerance(P, 9664355, MMX1, MMY1, MMX2, MMY2, 120);
    That's your problem. Also, you need an autocolor function that works for the MS. I'm sure that if you just change MM to MS it won't work. Hope this helps

    ~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.


  12. #12
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    You're using SCAR Assistant
    (Link in sig.)

    If you need to find objects, use the object finding function generator instead. Autocoloing is mostly used for finding road colors et cetera on the minimap.

  13. #13
    Join Date
    Feb 2007
    Posts
    849
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah okay thanks, I will try it out!
    ________________________________________
    14:19 < cycrosism> I wonder what she would have done without it
    14:19 < cycrosism> without me*
    Cycrosism is now an it.
    Quote Originally Posted by Dervish View Post
    /Facedesk.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with autocolour
    By Tom_Gower in forum OSR Help
    Replies: 1
    Last Post: 11-11-2008, 04:24 AM
  2. Fuctions just failing on me
    By SirPa in forum OSR Help
    Replies: 10
    Last Post: 11-05-2008, 10:45 AM
  3. Best way to autocolour roads?
    By Ruski in forum OSR Help
    Replies: 2
    Last Post: 07-31-2008, 06:03 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
  •