Results 1 to 9 of 9

Thread: CheckMusic: Check you location in RS using music!

  1. #1
    Join Date
    Mar 2007
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    CheckMusic: Check you location in RS using music!

    In making a complex script involving heavy walking, (think mind runes ) I stumbled on a great set of new functions in SRL 4; MusicLocation.scar.

    The included functions are good, but a little heavy for what i had planed, so I made this. To use this function, simply insert the name of the music that plays in the area you character is in. If that music is not found, the script exits.

    Fast, and light! Hope you like it.

    SCAR Code:
    function CheckMusic(Music: string): Boolean;      //By Cbris
    var
      PlayingMusic: string;
    begin
      PlayingMusic := GetMusic;
      if (PlayingMusic = Music) then
      begin
        WriteLn(music + ' is playing, you are in the right place.');
      end else
      begin
        WriteLn(music + 'is NOT playing, you are lost!');
        WriteLn('exiting...');
        TerminateScript;
      end;
      Result := True;
    end;

    To use simply copy and paste into you script and add the MusicLocation include.

    SCAR Code:
    {.include SRL/SRL/misc/MusicLocation.scar}
    These are my principles. If you don't like them, well... I have others.

    Since brevity is the soul of wit, I will be brief. Auto Correctly.

  2. #2
    Join Date
    Oct 2006
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, this could really help with scripts! Nice find!

  3. #3
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Put this in Public Test Corner?
    The truth finally came out...


  4. #4
    Join Date
    Nov 2006
    Location
    Wisconsin
    Posts
    1,629
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Hmm, this seems like a great idea to check position, although music does play the same song in a quite a large area which means you could be lost while playing the right song.


    Quote Originally Posted by Rubix View Post
    Quote Originally Posted by Dan Cardin View Post
    you ought to listen to Mr. Klean...he's magical!
    this.

  5. #5
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Its already in SRL. GetLocation; by nielsie95...But good shot
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

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

    Default

    wt fawaki you always have to bring the bad news
    ~Hermen

  7. #7
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hermpie, nice. Btw, app for members.
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  8. #8
    Join Date
    Mar 2007
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fakawi. i know it's in SRL, but the SRL GetLocation requires the .loc, something that my script does not need. CheckMusic is just a lighter variation of GetLocation. In fact, CheckMusic uses some of the same things that GetLocation does.
    These are my principles. If you don't like them, well... I have others.

    Since brevity is the soul of wit, I will be brief. Auto Correctly.

  9. #9
    Join Date
    Jun 2007
    Location
    brooklyn ny
    Posts
    683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well this is not so special in my idea

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. new randoms.dat location
    By GhostNote in forum Bot Information and Spottings
    Replies: 7
    Last Post: 12-04-2007, 11:57 PM
  2. new UID.dat location!
    By Ruroken in forum News and General
    Replies: 25
    Last Post: 03-05-2007, 04:08 PM
  3. NEW UPDATE: Location Changes...
    By WT-Fakawi in forum RS has been updated.
    Replies: 0
    Last Post: 09-27-2006, 03:28 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
  •