Results 1 to 18 of 18

Thread: How to change the camera?

  1. #1
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to change the camera?

    hey guys,
    What command to I use if I want the camera to change and look directly above where I am? I know of MakeCompass('N'), but doesn't help for changing the camera to look from above instead of sideways.

    Thank you =]..
    Ongoing Project:
    Treehugger 1.0

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

    Default

    SCAR Code:
    SetAngle(True);

  3. #3
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! =D
    Ongoing Project:
    Treehugger 1.0

  4. #4
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    also.... here's my code below, for some reason it's not actually running past login and moving the camera..any hints? I'm sure it's something stupid :P

    PHP Code:
    program TreeHugger;

    //Including all the needed thingies.
    {.include SRL/SRL/Misc/Smart.scar}
    {.Include 
    SRL\SRL.SCAR}
    {.include 
    srl/srl/misc/Reports.scar}

    //declaring players
    procedure DeclarePlayers;
    begin
      NumberOfPlayers
    (1);
      
    Players[0].Name := 'username';     //Username
      
    Players[0].Pass := 'pass';     //Password
      
    Players[0].Nick := 'nick';     //2-3 Letters Of Your Username
      
    Players[0].Active :=True;  //Using This Account?
      
    if(not(loggedin)) then loginplayer;
    end;

    //Checking if you're at the west Varrock bank.
    function CheckingAtBankBoolean;
    var 
    abwzxkljinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab2075128600200700300) and
         
    FindColor(wz6975602500300600400) and
         
    FindColor(xk5388097500400600500) and
         
    FindColor(lj1403051600400700500then
      result
    := true;
    end;

    //Checking for Axe
    function CheckingForAxeBoolean;
    var 
    abwzinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab12076979004001000500) and
         
    FindColor(wz7919079004001000500then
      result
    := true;
    end;

    //Equipping Axe
    procedure EquippingAxe;
    begin
     
    if CheckingAtBank true and
        
    CheckingForAxetrue then
        Mousebox
    (9084159164301)
     
    end;
     
    begin
      SetUpSRL
    ;
      
    ActivateClient;
      
    DeclarePlayers;
      
    CheckingAtBank;
      
    CheckingForAxe;
      
    EquippingAxe;
    end
    Ongoing Project:
    Treehugger 1.0

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

    Default

    Have you set CurrentPlayer and HowManyPlayers?

  6. #6
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I assumed since there is only one player it is the one it uses? It logs it in..
    Ongoing Project:
    Treehugger 1.0

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

    Default

    Ehh LoginPlayer?

    ~Home

  8. #8
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah..yeah..that was dumb D
    Ongoing Project:
    Treehugger 1.0

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

    Default

    Code:
    program TreeHugger;
    
    //Including all the needed thingies.
    {.include SRL/SRL/Misc/SMART.scar}
    {.include SRL\SRL.scar}
    {.include srl/srl/misc/Reports.scar}
    
    //declaring players
    procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      Players[0].Name := 'username';     //Username
      Players[0].Pass := 'pass';     //Password
      Players[0].Nick := 'nick';     //2-3 Letters Of Your Username
      Players[0].Active :=True;  //Using This Account?
      if(not(loggedin)) then loginplayer;
    end;
    
    //Checking if you're at the west Varrock bank.
    function CheckingAtBank: Boolean;
    var a, b, w, z, x, k, l, j: integer;
    begin
      MakeCompass('N');
      SetAngle(True);
      if FindColor(a, b, 2075128, 600, 200, 700, 300) and
         FindColor(w, z, 6975602, 500, 300, 600, 400) and
         FindColor(x, k, 5388097, 500, 400, 600, 500) and
         FindColor(l, j, 1403051, 600, 400, 700, 500) then
      result:= true;
    end;
    
    //Checking for Axe
    function CheckingForAxe: Boolean;
    var a, b, w, z: integer;
    begin
      MakeCompass('N');
      SetAngle(True);
      if FindColor(a, b, 1207697, 900, 400, 1000, 500) and
         FindColor(w, z, 791907, 900, 400, 1000, 500) then
      result:= true;
    end;
    
    //Equipping Axe
    procedure EquippingAxe;
    begin
     if CheckingAtBank = true and
        CheckingForAxe= true then
        Mousebox(908, 415, 916, 430, 1)
     end;
    
    begin
      SetUpSRL;
      DeclarePlayers;
      LoginPlayer;
      CheckingAtBank;
      CheckingForAxe;
      EquippingAxe;
    end.
    Fixed Includes and removed activateclient ( Because of use of SMART) And added LoginPlayer in Mainloop.

    ~Home

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

    Default

    He's had it.

    SCAR Code:
    if(not(loggedin)) then loginplayer;
    is located in DeclarePlayers;.

  11. #11
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, the new script is below..but it still logs in, moves the camera..and says script successfully executed.


    PHP Code:
    program TreeHugger;

    //Including all the needed thingies.
    {.include SRL/SRL/Misc/Smart.scar}
    {.Include 
    SRL\SRL.SCAR}
    {.include 
    srl/srl/misc/Reports.scar}

    //declaring players
    procedure DeclarePlayers;
    begin
      HowManyPlayers 
    := 1;             //Change this accordingly
      
    NumberOfPlayers(HowManyPlayers); // Total Number Of Players
      
    CurrentPlayer := 0;              // The Current Player To Start With
      
    Players[0].Name := 'user';     //Username
      
    Players[0].Pass := 'pass';     //Password
      
    Players[0].Nick := 'nick';     //2-3 Letters Of Your Username
      
    Players[0].Active := True;  //Using This Account?
      
    if(not(loggedin)) then loginplayer;
    end;

    //Checking if you're at the west Varrock bank.
    function CheckingAtBankBoolean;
    var 
    abwzxkljinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab2075128600200700300) and
         
    FindColor(wz6975602500300600400) and
         
    FindColor(xk5388097500400600500) and
         
    FindColor(lj1403051600400700500then
      result
    := true;
    end;

    //Checking for Axe
    function CheckingForAxeBoolean;
    var 
    abwzinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab12076979004001000500) and
         
    FindColor(wz7919079004001000500then
      result
    := true;
    end;

    //Equipping Axe
    procedure EquippingAxe;
    begin
     
    if CheckingAtBank true and
        
    CheckingForAxetrue then
        Mousebox
    (9084159164301)
     
    end;
     
    begin
      SetUpSRL
    ;
      
    ActivateClient;
      
    DeclarePlayers;
      
    CheckingAtBank;
      
    CheckingForAxe;
      
    EquippingAxe;
    end
    Ongoing Project:
    Treehugger 1.0

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

    Default

    What is it supposed to do now..?

  13. #13
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    What is it supposed to do now..?
    It's supposed to check if it's in the bank by finding the colors, and check if there is an axe by finding those colors, and if there is an axe, it's supposed to left click it.
    Ongoing Project:
    Treehugger 1.0

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

    Default

    Quote Originally Posted by Da 0wner View Post
    He's had it.

    SCAR Code:
    if(not(loggedin)) then loginplayer;
    is located in DeclarePlayers;.
    Heh, my bad

    Quote Originally Posted by Crazydictator View Post
    Ok, the new script is below..but it still logs in, moves the camera..and says script successfully executed.



    PHP Code:
    program TreeHugger;

    //Including all the needed thingies.
    {.include SRL/SRL/Misc/Smart.scar}
    {.Include 
    SRL\SRL.SCAR}
    {.include 
    srl/srl/misc/Reports.scar}

    //declaring players
    procedure DeclarePlayers;
    begin
      HowManyPlayers 
    := 1;             //Change this accordingly
      
    NumberOfPlayers(HowManyPlayers); // Total Number Of Players
      
    CurrentPlayer := 0;              // The Current Player To Start With
      
    Players[0].Name := 'user';     //Username
      
    Players[0].Pass := 'pass';     //Password
      
    Players[0].Nick := 'nick';     //2-3 Letters Of Your Username
      
    Players[0].Active := True;  //Using This Account?
      
    if(not(loggedin)) then loginplayer;
    end;

    //Checking if you're at the west Varrock bank.
    function CheckingAtBankBoolean;
    var 
    abwzxkljinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab2075128600200700300) and
         
    FindColor(wz6975602500300600400) and
         
    FindColor(xk5388097500400600500) and
         
    FindColor(lj1403051600400700500then
      result
    := true;
    end;

    //Checking for Axe
    function CheckingForAxeBoolean;
    var 
    abwzinteger;
    begin
      MakeCompass
    ('N');
      
    SetAngle(True);
      if 
    FindColor(ab12076979004001000500) and
         
    FindColor(wz7919079004001000500then
      result
    := true;
    end;

    //Equipping Axe
    procedure EquippingAxe;
    begin
     
    if CheckingAtBank true and
        
    CheckingForAxetrue then
        Mousebox
    (9084159164301)
     
    end;
     
    begin
      SetUpSRL
    ;
      
    ActivateClient;
      
    DeclarePlayers;
      
    CheckingAtBank;
      
    CheckingForAxe;
      
    EquippingAxe;
    end
    Hmm how i can explain this to you..
    First it logs in then moves camera.
    Then it checks are in you bank ( What i think will result false? ) Because of simple findcolor ( Colors do change ) after that it checks for an Axe what MIGHT result false but it does not matter because of this.

    Code:
     if CheckingAtBank = true and
        CheckingForAxe= true then
        Mousebox(908, 415, 916, 430, 1)
    If one or 2 will result false then it will SKip whoe MouseBox Procedure and it will be tarminated ( Because Mainloop is over )
    I hope that i explained enough clearly.

    ~Home

  15. #15
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah..so you're saying it's not finding the color so it doesn't move on...that might be it.. I guess I'll use a different method.
    Ongoing Project:
    Treehugger 1.0

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

    Default

    Quote Originally Posted by Crazydictator View Post
    Ah..so you're saying it's not finding the color so it doesn't move on...that might be it.. I guess I'll use a different method.
    Yes that's what i'm saying you could use mabey a Symbols ? Banksymbols? Make DTM of Bankers? If you don't know how, then go look some tutorials in Tutorial Island

    ~Home

  17. #17
    Join Date
    Jul 2007
    Posts
    94
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think I'll wait to try and make something that works until new scar and SRL is out..lots of the SRL functions don't work..like the find symbol :P
    Ongoing Project:
    Treehugger 1.0

  18. #18
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah now would be an annoying time to learn how to script, since rs seems to be doing alot of updateing latley. Functions could break every time rs updates, but dont let that hold you back, they will always be fixed up again and so your script should still work.
    your doing quite good sofar, good luck :]
    Lance. Da. Pants.

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
  •