Results 1 to 2 of 2

Thread: ehm its clicks the wrong door...

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

    Default ehm its clicks the wrong door...

    ehm its clicks the wrong door...
    this is special to boread because he amde it and clicks the wrong door.. and i need to get it working and credits to boreas for the door procedure|

    SCAR Code:
    program restlessghost;
    {.include SRL/SRL.scar}
    {.include srl/srl/core/doorprofiles.scar}
    {.include SRL/SRL/skill/magic.scar}
    var
    FindNorMalRandomsTime, SST1, SST2, FindFastRandomsTime, door, PleaseWait, H:integer;
    zy, zx, y, Hx, hy, x, k, talked :integer;




    Procedure DeclarePlayers;

    begin

         HowManyPlayers  :=1;               // Set Number of Players here.
         NumberOfPlayers(HowManyPlayers);   // Sets the Players Array Length;
         CurrentPlayer:=0;              // CurrentPlayer = Array Index

         Players[0].Name :='';          // runescape username
         Players[0].Pass :='';          // runescape password
         Players[0].Nick :='atts';          // nick, 3 - 4 letters of username
         Players[0].Loc  :='Areck';      // you can use 'somewhere' or 'Aereck'
         Players[0].Active:=True;       // active player


         writeln(inttostr(HowManyPlayers)+' Players');

    end;





    {=====================================================================================]
                DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
    [=====================================================================================}

    {===============================================]
        this function finds randoms by:wt-fawaki
    [===============================================}

    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 9 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
         9: begin
               if FindFight then
               begin
                 RunTo('N',False);
               end;
             end;
        end;

      end;
    end;


    //credits to WT-FAWAKI-----------------------------------------//
    // -- Performs Wait and FindTalk. + calls FindNormalRandoms every 10 secs and
    // -- FindFastRandoms every 3 secs.
    //----------------------------------------------------------------------------//

    Procedure WaitPlus(Time:Integer);
    var T: integer;
      begin
        For T := 1 to Time do
        begin
          if not LoggedIn then exit;
          Wait(200 + Random(50));
          FindTalk;
          RC;
        end;

        FindTalk;
        MarkTime(FindNorMalRandomsTime);
        if FindNorMalRandomsTime - SST1 >(10000 + Random(5000)) then
          begin
            FindNorMalRandoms;
            MarkTime(SST1);
          end;

        MarkTime(FindFastRandomsTime);
        if FindFastRandomsTime - SST2 >(1500 + Random(1500)) then
          begin
            FindFastRandoms;
            MarkTime(SST2);
          end;
    end;

    {===============================================]
        this procedure do,s antiban      //by: me =)
    [===============================================}

    procedure antiban;
    begin
      Case Random(10) Of
        1 : HoverSkill('defense', False);
        2 : HoverSkill('strenght', False);
        3 : begin
             GameTab(1+Random(12));
             waitplus(2000+Random(400));
             GameTab(4);
            end;
        4 : RandomRClick;
        5 : PickUpMouse;
        6 : HoverSkill('attack', False);
        7 : almostlogout;
        8 : begin
            gametab(9);
            gametab(5);
            gametab(1);
            gametab(2);
            end;
        9 :begin
           mmouse(zx,zy,333,273);
           end;



      end;
    end;

    {===============================================]
        loads bitmaps                   //by: me =)
    [===============================================}

    procedure loadbitmaps;
     begin
    PleaseWait := BitmapFromString(60, 2, 'z78DA33300001373030C060E30' +
           '294A8A7C41C52012EF3F1DB458C4A4C71FC2A872BA08F1F890F4F' +
           '00A555AC21');
     door := BitmapFromString2(False, 'aDD43D78DAC59241128330084' +
           '5AFF4090984A53572FF232966615DD8493B6365F12603FF6D0800' +
           '30D50D287340E32D940E72F453CD31ED1997E8C71032455F8B1FB' +
           '418506B1BF39E7FB02A74495E595F675EE54B6326EAD6620EE777' +
           '8E5B8A429C3BEFB0146262FFB47C4F8D583DFFACF5F92ABEDDC39' +
           '535788176FEDFFB2C9D55521BB9D8DF6A05CAB');
     end;

    {===================================================================]
        casts hometeleport and checks if you already did it //by: me =)
    [===================================================================}

    Procedure casthometeleport;
    begin
    gametab(7);
    cast('home teleport');
    wait(15000);



    end;


    {============================================================]
      made by nielsie and a very BIG UPDATE by: me =)
    [============================================================}

    Function InTalk: Boolean;
    begin
      if (FindColorTolerance(x,  y,  128,  220,  360,  365,  370,  5)) then
        Result  :=  True;
    end;

    {============================================================]
        i updated a function from srl with an extra//by : me XD
    [============================================================}

    function ClickTextX(b: Integer; txt: string; Left:Boolean): Boolean;
    var
    a : integer;
      begin
       repeat
        ClickNpcChatText(txt,left);
        a := a + 1;
        talked := talked + 1

       until(b = a);
     writeln('talked ' + intToStr(talked) +' time(s)');
     end;

    {===============================================]
            find and talk stuff        //by: me =)
    [===============================================}

    function FindAndTalkToAereck:boolean;
    var
    X:integer;
    begin
      repeat
      X := X + 1
      if (FindObj(Hx, Hy, 'ereck', 6984382, 10)) then
      begin
        Mouse(hx, hy, 1, 1, false);
        ChooseOption('to');
        markTime(H);
        waitplus(1);
      end;
        until(InTalk) or (X > 10);
        if (InTalk) then
        begin
          writeln('in talk with father Aereck');
          ClickTextX (1,'continue',true);
          ClickTextX (1,'looking',true);
          ClickTextX (2,'continue',true);
          ClickTextX (1,'help',true);
          ClickTextX (9,'continue',true);
        end;
      end;

    {===============================================]
             somthing with the door   //by: boreas
    [===============================================}

    procedure GotoSecondEasternMostDoor;
    var
      MyDoors: array of DoorProfile;
      f:integer;
      mytpa:array of tpoint;
    begin
    activateclient;
      MyDoors:=GetDoors;
      setarraylength(mytpa,getarraylength(mydoors));
      for f:= 0 to getarraylength(MyDoors)-1 do
      begin
      mytpa[f]:=MyDoors[f].midpoint;
      end;
      mytpa:= RearrangeTPA(mytpa,0,0,true,false);
      mouse(mytpa[0].x,mytpa[0].y,2,2,true);
      flag;
    end;


    {===============================================]
     handles the door at father Aereck   //by: me =)
    [===============================================}

    function HandleDoor:boolean;
    begin
      gotosecondeasternmostdoor;
      makecompass('E');
      lowestangle;
      if findcolorspiraltolerance( x, y,2309965,MSx1, MSy1, MSx2, MSy2,75) then
      begin
        writeln('color found');
        mmouse(x,y,0,0);
        mouse(x, y, 0, 0, false);
        waitplus(150);
        if  isuptextmulti('Open','pen','open') then
        begin
          mouse(x, y, 0, 0, true);
          result:=true
          writeln('opened door')
          end else
          if  isuptextmulti('ose','Close','lose') then
          begin
            result:=true
            writeln('door already opened' )
          end;
        end;
      end;

    {===============================================]
              walkings and stuff         //by: me =)
    [===============================================}

    function WalkToUrhney :boolean;
    begin
    writeln('walking to Urhney')
    RadialWalk( 1597519, 170, 180, 65, x, y);
    LinearWalk(0,185,65,x,y);

    end;


    {===============================================]
            find and talk stuff        //by: me =)
    [===============================================}

    procedure FindAndTalkToUrhney;
    begin
    if (FindObj(Hx, Hy, 'rhney', 7028284, 5)) then
      begin
          Mouse(hx, hy, 1, 1, false);
          ChooseOption('alk-to');
          markTime(H);
         repeat
          waitplus(500);
         until(InTalk) or (TimeFromMark(k) >=  10000);
        if (InTalk) then
        begin
          waitplus(900 + random(400));
          writeln('in talk with father Urhney');
          ClickTextX (1,'continue',true);
          ClickTextX (1,'sent',true);
          ClickTextX (2,'continue',true);
          ClickTextX (1,'haunting',true);
          ClickTextX (11,'continue',true);
       end;
      end;

    end;
    {======================================]
       walks to ghost   // by: me =)
    [======================================}

     procedure WalkToGhost;
     begin

     end;
    {======================================]
       find and talks ghost    // by: me =)
    [======================================}

    procedure FindAndTalkToGhost;
    begin
    if (FindObj(Hx, Hy, 'ghost', 10661538, 5)) then
      begin
          Mouse(hx, hy, 1, 1, false);
          ChooseOption('alk-to');
          markTime(H);
         repeat
          waitplus(500);
         until(InTalk) or (TimeFromMark(k) >=  5000);
        if (InTalk) then
        begin
          waitplus(900 + random(400));
          writeln('in talk with restless ghost');
          ClickTextX (4,'continue',true);
          ClickTextX (1,'problem',true);
          ClickTextX (12,'continue',true);

       end;
      end;

    end;
    {===================================================]
       walks to wizard towe for the skull   // by: me =)
    [===================================================}

    procedure WalkToSkull;
    begin

    end;

    {======================================]
       takes the skull from altar    // by: me =)
    [======================================}

    procedure GetSkull;
    begin

    end;
    {====================================================]
       goes back to ghost and ends the quest// by: me =)
    [====================================================}

    procedure EndQuest;
    begin

    end;

    {===============================]
               signature
    [===============================}

    procedure sign;
    begin
      writeln('  111111111    111111111                 111111     111    111        11111            1111111111111  111111111111 ')
      writeln('  11     111   111111111                1111111     111    111    111111111111        11111111111     111111111111 ')
      writeln('  11     111   111                    1111          111    111   11           11    11                    1111     ')
      writeln('  11     11    111                   111            111    111  111           111   11                    1111     ')
      writeln('  1111111      11111111   11111111   111  1111111   1111111111  111           111     1111111111          1111     ')
      writeln('  111111       11111111   11111111   111  1111111   1111111111  111           111     1111111111          1111     ')
      writeln('  11  111      111                   111      111   111    111  111           111               11        1111     ')
      writeln('  11    111    111111111             111111111111   111    111   111         111                11        1111     ')
      writeln('  11      111  111111111              1111111111    111    111     11111111111        11111111111         1111     ')

    end;
    {===============================]
               proggy
    [===============================}

    procedure proggy;
    begin
      writeln(' --------------------------------')
      writeln(' thank you that you used         ')
      writeln(' my auto-quester, remember to    ')
      writeln(' post bugs/proggy,s on my thread.')
      writeln(' --------------------------------')
      writeln('         progess-report          ')
      writeln('---------------------------------')
      writeln(' ran for' + TimeRunning+'        ')
      writeln('                                 ')
      writeln('---------------------------------')
    end;


    {==============================]
      setups the client  //by: me=)
    [==============================}

    procedure setupclient;
    begin
      setupsrl;

      sign;

      declareplayers;

      activateclient;

      loginplayer;
      highestangle;
      makecompass('N')
    end;
    {===============================================]
                  MAINLOOP               //by: me =)
    [===============================================}


    begin
      setupclient;
      if players[currentplayer].loc='somewhere' then
      begin
        casthometeleport;
      end;
        writeln('starting script');
        findandtalktoAereck;
        writeln('talked to Aereck');
        HandleDoor;
        writeln('handled door');
        WalkToUrhney;
        writeln('walked to urhney');
        FindAndTalkToUrhney;
        writeln('talked to urhney');
        walktoghost;
        writeln('walked to ghost');
        findandtalktoghost;
        writeln('talked ghost');
        walktoskull;
        writeln('walked to skull');
        getskull;
        writeln('took skull');
        endquest;
        writeln('quest completed heres the proggy :');
        proggy;
    end.
    ~Hermen

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Which door does it click?

    Is it covered?

    Does it it click the wrong one every time or only sometimes?

    Screenie and more info would be nice.

    (BTW, GotoSecondEasternMostDoor technically should be GotoEasternMostDoor)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. color coordinates and mouse clickS?
    By droppeD:) in forum OSR Help
    Replies: 5
    Last Post: 12-18-2008, 10:01 PM
  2. Random Number of Clicks?
    By Bourdou! in forum OSR Help
    Replies: 5
    Last Post: 08-12-2007, 05:32 AM

Posting Permissions

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