Results 1 to 4 of 4

Thread: meed help with trap-door

  1. #1
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default meed help with trap-door

    i dont know how to do for open a trap door and then go in(at edgville),
    im currently doing my first script so im very noob, ill accept all help.

    its an auto air orb charger

    and it can use reflection.

    thanx

  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
    Sep 2006
    Location
    Canada
    Posts
    1,124
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    To expand away from Shuttleu's way it would be better to use if(getobjectat(Tile) = closed trapdoor ID)) that way you will only move your mouse towards the trapdoor if its closed.

  4. #4
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    for now my script look like this;

    PHP Code:
    program AutoAirOrbCharger;
    {.Include 
    SRL\SRL\Misc\Smart.Scar}
    {.Include 
    SRL\SRL.Scar}
    {.Include 
    SRL\SRL\Reflection\Reflection.Scar}
    Procedure DeclarePlayers;
    Begin

      HowManyPlayers 
    := 1;
      
    NumberOfPlayers(HowManyPlayers);
      
    CurrentPlayer := 0;

      
    Players[0].Name :='';
      
    Players[0].Pass :='';
      
    Players[0].Nick :='';
      
    Players[0].Active:=True;

    end;


    function 
    LoadPathTPointArray;
    begin
      SetLength
    (Result4);

      
    Result[0] := Point(30933489);
      
    Result[1] := Point(30933483);
      
    Result[2] := Point(30943475);
      
    Result[3] := Point(30953470);

    end;

    Procedure WalkThePath;
    Var
      
    IInteger;
      
    PathTPointArray;

    Begin
      Path 
    := LoadPath;
      for 
    := 0 to High(Path) do
        
    Begin
           WalkToTile
    (Path[i], 00);
        
    end;
          
    Wait(500+Random(300));
    end;


    function 
    openTrapDoor (id :integerleftboolean): boolean;
    var
      
    xx   TPoint;
    begin
      
    if FindObject(xX,idthen
      begin
        Result
    := True;
        
    XX:= TileToMS(XX0);
        
    Mouse(xx.xxx.y22Left);
        
    Wait(30 Random(10));
       
    end;
    end;

    function 
    EnterTrapDoor (id :integerleftboolean): boolean;
    var
      
    xx   TPoint;
    begin
      
    if FindObject(xX,idthen
      begin
        Result
    := True;
        
    XX:= TileToMS(XX0);
        
    Mouse(xx.xxx.y22Left);
        
    Wait(30 Random(10));
       
    end;
    end;



    Procedure SetupSmart;
    Begin
      SMARTSetupEx
    (145TrueTrueFalse);
      
    Wait(5000);
      
    SetTargetDC(SmartGetDC);
      
    repeat
        wait
    (100);
      
    until(SmartGetColor(253233)<>1118604);
    end;

    procedure mainLoop;
    Begin
      SetupSRL
    ;
      
    SetupSmart;
      
    DeclarePlayers;
      
    LoginPlayer;
      
    SetAngle(True);
      
    SetRun(True);
      
    WalkThePath;
      if 
    opentrapDoor(26933truethen
      Wait
    (100 Random(10));  EnterTrapDoor(26934,true);
      
    EnterTrapDoor(26934,true);

    end;

    Begin
    mainLoop
    ;

    end.

     
    //trapdoor//
     //Location X = 3097Location Y = 3468
     //Object I.D is 26934
     //The object's UID is 269341076206137
     //The Object's type is 26934(whene open) --26933 (whene close) 

    -----------------------------
    edit
    -----------------------------

    i found sumthing
    and it work thanx
    Formerly known as FrancisHelie

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Door checker?
    By Rubix in forum OSR Help
    Replies: 3
    Last Post: 07-17-2008, 09:43 PM
  2. Door Question
    By TViYH in forum OSR Help
    Replies: 1
    Last Post: 03-08-2008, 01:46 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
  •