+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 26 to 46 of 46

Thread: SRL Randoms Help & Suggestions

  1. #26
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Did you modify your SRL at all? That doesn't happen to me (and yes, I ran your example script).
    Nope.. Might re-install it in the morning.. tired atm but I'm 100% sure I didn't modify it.. Seems to be happening to a couple of testers as well :S

    Happens in Ancient cavern.. when it does happen, it runs to the darkest area it can find on the Minimap AFTER it spams the console :S

    Either that or it will stand there for the 15 seconds and then execute the procedure after.



    EDIT.. also happens at frost dragons since that's where I died..
    I am Ggzz..
    Hackintosher

  2. #27
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    I can't see why it would walk anywhere on the minimap. The only random that walks is Evil Bob, and obviously it isn't being detected. Do you set any kind of SRL_Procs in the other scripts it happens with?

    E: The only other thing I can think of is maybe you're running a finding function on a TTimer?

  3. #28
    Join Date
    May 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hi just a quick question. Have the randoms already been updated onto the client or do I have to add them myself? Thanks in advance!

  4. #29
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by starrychelx View Post
    hi just a quick question. Have the randoms already been updated onto the client or do I have to add them myself? Thanks in advance!
    If the script you are using puts in a function called FindNormalRandoms, then you don't have to do anything

  5. #30
    Join Date
    Mar 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is there a way you can select your rewards? Every time I have a lamp in my inventory it automatically uses it on Attack, which I do not want....

  6. #31
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by rs2info View Post
    Is there a way you can select your rewards? Every time I have a lamp in my inventory it automatically uses it on Attack, which I do not want....
    In your DeclarePlayers procedure look at where it says
    user: '';
    pass: '';

    Then add
    Simba Code:
    BoxRewards  := ['']; // put what you want in quotation marks

  7. #32
    Join Date
    Mar 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Can you give an example for a lamp on agility for example?

    EDIT: Thanks for the quick reply btw.

  8. #33
    Join Date
    May 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Essence Miner

    hi im really new to scripting and i keep getting Unknown identifier 'InAbyss' at line 1088
    Compiling failed. when i try to run SRL essence miner any tips on what to do??

  9. #34
    Join Date
    Nov 2011
    Location
    Canada
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    In order to disable randoms from Simba (make it so that it logs out when a random has been detected), how would I incorportate this line into the script? "SRL_DisableRandoms := true;"

  10. #35
    Join Date
    Jan 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not sure this is the right place, but can you pick which reward you get after completing the random? The script I am running keeps picking the random box reward, and I would prefer a lamp.

    Thanks.

  11. #36
    Join Date
    Feb 2012
    Location
    Denver, CO
    Posts
    863
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Scruff View Post
    Not sure this is the right place, but can you pick which reward you get after completing the random? The script I am running keeps picking the random box reward, and I would prefer a lamp.

    Thanks.
    I have a similar comment. I think that the mystery box is a poor option for the reward because it places an item in your inventory. This can cause issues in scripts.

    For example, I was using Flight's granite miner, and received a boot from the mystery box. The script is meant to drop items in the first two inventory spaces but was selecting examine on the boot instead of drop. Also, I was using the heavy rodding fishing script and received a mithril scimitar from a mystery box. For whatever reason, the script equipped the scimitar. It wasn't an issue for me, but it could be if someone has something equipped (e.g. a dragon pickaxe).

    I think coins is the best option because it will just go into the money pouch.

    Just an idea!

  12. #37
    Join Date
    Jan 2012
    Posts
    273
    Mentioned
    7 Post(s)
    Quoted
    6 Post(s)

    Default

    My suggestion is as follows:

    when calling FindAllRandoms, which calls _FindAllRandoms, the result value is not initially set, so it defaults to false. But when you look at code path - it is only set to true if a random is solved so basically the results are:

    true - found and solved random
    false - either didn't find or didn't solve random

    which isn't entirely helpful if you want to use the return value unless all you are concerned about is to tell user "yay, resolved random for you"

    my suggestion is to set the default value to true, and set it to false if resolving random fails

    that would make result as follows:

    true - either didn't find random or solved it
    false - found random but failed to solve it

    and then i could use the value to take action based upon it such as

    Simba Code:
    if not FindAllRandoms then
    begin
      // handle failed random
    end;

    or alternatively add another out boolean parameter so that i can check and determine if there was failure with random.

    i suppose i could check if LoggedIn is true, as failed randoms log person out, but because the function exits if user is not logged in, if i call findallrandoms before screen is fully up, i will not be able to tell if user was logged out due to failed random
    Perfect script? There is no such thing as "perfect", only "better than you expect".

  13. #38
    Join Date
    May 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think there must be an issue with SMART, or something similar. SRL RandomTool has failed like almost every random I've come across, even ones that claim to be working.

    I've failed:
    Mime
    Pillory
    Maze
    Classroom
    And more, I'm sure.

    The only randoms I can recall working correctly are the Sandwhich Lady and the Abyss Teleporter (Clicked on the same pipe over and over, but it worked so I suppose that's fine).

    People are reporting that all of these are working fine for them, and that problems may be caused by SMART lag. I have a quadcore with 4GB RAM so I don't think it's on my computers end, is there another issue and a possible fix?

  14. #39
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by Creath View Post
    I think there must be an issue with SMART, or something similar. SRL RandomTool has failed like almost every random I've come across, even ones that claim to be working.

    I've failed:
    Mime
    Pillory
    Maze
    Classroom
    And more, I'm sure.

    The only randoms I can recall working correctly are the Sandwhich Lady and the Abyss Teleporter (Clicked on the same pipe over and over, but it worked so I suppose that's fine).

    People are reporting that all of these are working fine for them, and that problems may be caused by SMART lag. I have a quadcore with 4GB RAM so I don't think it's on my computers end, is there another issue and a possible fix?

    Yes some randoms are broken but as you can see, people don't post logs/pm account details any more so the Random team are unable to fix them.

    Forum account issues? Please send me a PM

  15. #40
    Join Date
    May 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by [J]ustin View Post
    Yes some randoms are broken but as you can see, people don't post logs/pm account details any more so the Random team are unable to fix them.
    I've been doing my best. Not sure about giving the account details, but I've tried to provide logs whenever possible.

  16. #41
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Quote Originally Posted by Creath View Post
    I've been doing my best. Not sure about giving the account details, but I've tried to provide logs whenever possible.
    Although posting logs help, being able to edit what caused it to fail is what's needed.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  17. #42
    Join Date
    May 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Although posting logs help, being able to edit what caused it to fail is what's needed.
    As in editing the code? If I was an adept coder I'd be glad to, but at this point I'm just learning.

  18. #43
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    I'm saying by letting a dev borrow your account that's in the random, we can fix the issues.
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  19. #44
    Join Date
    May 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    I'm saying by letting a dev borrow your account that's in the random, we can fix the issues.
    Who are the official devs? I'll gladly loan my account for a bit if it helps.

  20. #45
    Join Date
    Oct 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    In your DeclarePlayers procedure look at where it says
    user: '';
    pass: '';

    Then add
    Simba Code:
    BoxRewards  := ['']; // put what you want in quotation marks
    So
    BoxRewards := ['Constitution'];
    will get a lamp and use it on constitution, right? Or is it HP? Or Different captitalizations? Is this documented anywhere so I can make sure I'm doing it right?

    Thanks.

    Edit: no, that didn't work, I just watched it pick a mystery box
    Last edited by Devlor; 06-08-2012 at 11:22 AM.

  21. #46
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    How about something where on a random failing the debug log is send to somewhere for us all to access? I could write something?

    Edit:

    This could be called on a random failing:
    Simba Code:
    Procedure RandomSendLog;
    Var
      S, R, Name, Temp : String;
      num : integer;
      Succeeded : Boolean;
      Names : array of String;
    begin

      if (SRL_DisableLogging) then
        exit;

      if (not directoryExists(SRL_SavePath)) then
        forceDirectories(SRL_SavePath);

      Name := 'SRL log ('+SRL_StartTime+').txt';
      Name := replace(Name, '/', '-');
      Name := replace(Name, ':', ' ');
      Name := SRL_SavePath + Name;

      if (FileExists(Name)) then
        num := OpenFile(Name, False)
      else
        exit;

      ReadFileString(num, S, FileSize(num));
      CloseFile(num);

      Names := ['Drill Demon', 'Maze', 'Evil Bob', 'Mordaut', 'Certers', 'Mime', 'Abyss', 'Frog', 'Pinball', 'Sandwich Lady', 'Pillory (Cage)', 'Cap''n Arnav', 'Quiz Master', 'Leo', 'Prison Pete', 'Freaky Forester', 'Beekeeper', 'Molly', 'Rewards'];
      for num := 0 to high(Names) do
        if(Pos(Names[num], S) > 0)then
          begin
            R := Names[num];
            break;
          end;

      Succeeded := Pos('Solved Random', S) > 0;

      While(Pos('Current player:', S) > 0)do    //Removing usename:
        begin
          Temp := Copy(S, Pos('Current player:', S) + 13, Length(S));
          S := Copy(S, 1, Pos('Current player:', S) + 13) + '**********' + Copy(Temp, Pos(#13#10, Temp), Length(Temp));
        end;

      S := Replace(S, #13#10, ',,'); //The double commas are replaced by <BR> tags when it is printed
      S := Replace(S, #39, '');
      S := Replace(S, '"', '');

      if(S <> '')then
        begin
          num := InitializeHTTPClientWrap(False);
          AddPostVariable(num, 'log', S);
          AddPostVariable(num, 'random', R);
          AddPostVariable(num, 'succeeded', BoolToStr(Succeeded));
          PostHTTPPageEx(num, '...');//I have removed the website as I would assume you wouldn't want me hosting it, but it works on my site
          FreeHTTPClient(num);
        end;

    end;

    And the php:
    PHP Code:
    <?PHP

        $user_name 
    "";
        
    $pass_word "";
        
    $database "";
        
    $server "";

        
    $log $_POST['log'];    
        
    $random $_POST['random'];    
        
    $succeeded $_POST['succeeded'];
        
        
    $ip $_SERVER['REMOTE_ADDR'];        //This is saved incase of abuse, it can start rejecting posts based on IP

        
    $db_handle mysql_connect($server$user_name$pass_word);
        
    $db_found mysql_select_db($database$db_handle);

        if (
    $db_found) {    

            
    $SQL "INSERT INTO `Random Event Logs` (`Random` ,`Succeeded` ,`Log` ,`IP`) VALUES ('".$random."', '".$succeeded."', '".$log."', '".$ip."')";
            
    $result mysql_query($SQL);
            if(
    $result)
                print 
    "True";
            else
                print 
    "False";    
            
        }
        else 
            print 
    "DB not Found, please report this";
            

    ?>
    And then so we can look at the logs:
    PHP Code:
    <?PHP

        $user_name 
    "";
        
    $pass_word "";
        
    $database "";
        
    $server "";

        
    $random $_GET['random'];    
        
    $username $_GET['username'];
        
    $password $_GET['password'];

        
    $db_handle mysql_connect($server$user_name$pass_word);
        
    $db_found mysql_select_db($database$db_handle);

        if ((
    $db_found) && ($username == "") && ($password == "")){//Just to keep it private

            
    $SQL "SELECT * FROM `Random Event Logs`";
            
    $result mysql_query($SQL);    

            while (
    $db_field mysql_fetch_assoc($result)) {
                if(
    $db_field['Random'] == $random){
                    print 
    "<b>ID:</b>";
                    print 
    $db_field['ID'] . "<BR>";
                    print 
    "<b>Random:</b>";
                    print 
    $db_field['Random'] . "<BR>";
                    print 
    "<b>Succeeded:</b>";
                    print 
    $db_field['Succeeded'] . "<BR>";
                    print 
    "<b>Log:</b>";
                    print 
    str_replace(",,""<BR>"$db_field['Log']) . "<BR><BR>";
                }
            }        
            
        }
        else 
            print 
    "Username of Password incorrect";
            

    ?>
    The viewing could obviously be improved, with record deleting, and choosing to view only failed logs etc.
    Last edited by putonajonny; 06-11-2012 at 09:52 PM.

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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