Results 1 to 4 of 4

Thread: Citadel Suite

  1. #1
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default Citadel Suite

    A while back, I write an ore script for the citadel. Made it so i could just change colors for the different ores. will start working on it so its a professional script that works the entire citadel =].,.. hopefully.

    It will prob be a bit before I really begin working on this to better it, as I am working on an air orb runner right now.

    To Use:

    Stand exactly in front of one of the precious ores at the citadel,
    current code, which works:

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i srl/srl/misc/paintsmart.scar}

    var boxLeft,boxRight,boxMe:TBox;

    procedure setVars;
    begin
      SetColorspeed2Modifiers(0.01,0.40);

      with boxMe do
      begin
        X1 := 232;
        X2 := 286;
        Y1 := 118;
        Y2 := 163;
      end;
      with boxLeft do
      begin
        X1 := 138;
        X2 := 165;
        Y1 := 114;
        Y2 := 149;
      end;
      with boxRight do
      begin
        X1 := 353;
        X2 := 374;
        Y1 := 123;
        Y2 := 158;
      end;
    end;

    procedure drawBoxes;
    begin
      SMART_DrawBoxex(true,boxLeft,clBlue);
      SMART_DrawBoxex(false,boxMe,clOlive);
      SMART_DrawBoxex(false,boxRight,clBlue);
    end;

    procedure mouseLeftBox;
    begin
      MMouse(boxLeft.X1+(boxLeft.X2-boxLeft.X1)/2,boxLeft.Y1+(boxLeft.Y2-boxLeft.Y1)/2,10,10);
    end;

    procedure mouseRightBox;
    begin
      MMouse(boxRight.X1+(boxRight.X2-boxRight.X1)/2,boxRight.Y1+(boxRight.Y2-boxRight.Y1)/2,10,10);
    end;

    function clickBoxMe:boolean;
    var mid:tpoint;tpa:TPointArray;x,y,I:integer;
    begin
      result := FindColorsSpiralTolerance(x,y,tpa,1607850,boxme.x1,boxme.y1,boxme.x2,boxme.y2,13);
      mid:= MiddleTPA(tpa);
       if (result) then
       begin
         for I := 0 to 10 do
         begin
           mmouse(mid.x,mid.y,10,10);
           if WaitUptext('ine',725+random(225)) then
           begin
             clickmouse2(true);
             break;
           end;
         end;
       end;
    end;


    function checkLeft:boolean;
    begin
      result := CountColorTolerance(1414075,BoxLeft.X1,BoxLeft.Y1,BoxLeft.X2,BoxLeft.Y2,8) > 0;
      writeln('Ore on left side: ' + BoolToStr(result));
    end;

    function checkRight:boolean;
    begin
      result := CountColorTolerance(1414075,boxRight.X1,boxRight.Y1,boxRight.X2,boxRight.Y2,8) > 0;
      writeln('Ore on right side: ' + BoolToStr(result));
    end;

    procedure waitTillMined;
    var time:longint;
    begin
      wait(4000);
      markTime(time);

      while (CountColorTolerance(1414075 ,BoxMe.X1,BoxMe.Y1,BoxMe.x2,BoxMe.y2,13)) >0 do
      begin
      writeln('in waittill mined');
        wait(1000+random(10));
        if timefrommark(time) > 25000 then
        begin
          clickBoxMe;
          markTime(time);
          if checkLeft then mouseLeftBox else if checkRight then mouseRightBox;
        end;
      end;
      writeln('done waiting to finish mining');
    end;

    var x,y:integer;
    begin
      Smart_Members := true;
      Smart_Server := 100;
      Smart_Signed := true;
      Smart_SuperDetail := false;

      SetupSRL;
      ActivateClient;
      setVars;
      drawBoxes;
      clickboxme;
      if(checkLeft) then mouseLeftBox else if checkRight then mouseRightBox;
      waitTillMined;
      repeat
      if checkLeft then
      begin
        GetMousePos(x,y);
        if (pointinbox(Point(x,y),boxLeft)) then
        begin
          ClickMouse2(true);
          mouseRightBox;
        end else
        begin
          mouseLeftBox;
          ClickMouse2(true);
          mouseRightBox;
        end;
      end;
      if checkRight then
      begin
        GetMousePos(x,y);
        if (pointinbox(Point(x,y),boxRight)) then
        begin
          ClickMouse2(true);
          mouseLeftBox;
        end else
        begin
          mouseRightBox;
          ClickMouse2(true);
          mouseLeftBox;
        end;
      end;
        waitTillMined;
      until IsKeyDown(VK_CONTROL) AND IsKeyDown(VK_S);    {}
    end.

    NOTE: This is not a fully fail safed script, it has little uptext, and I wrote it quickly to mine while I was sitting at the computer.

  2. #2
    Join Date
    Nov 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    cool release but i got this
    Compiling failed.
    Exception in Script: Unable to find file 'srl/srl/misc/paintsmart.scar' used from ''

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Tocholoko View Post
    cool release but i got this
    change the .scar to .simba

  4. #4
    Join Date
    Dec 2011
    Posts
    733
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    lol works for me. weird

    Might have something to do with SRL5? Think they were moving all over to .simbas

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
  •