Page 1 of 10 123 ... LastLast
Results 1 to 25 of 239

Thread: Randoms Development

  1. #1
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default Randoms Development

    To keep track of our status on the solvers. Edit this post with any changes needed and update for randoms I missed or added incorrectly (probably forgot quite a few, tried to grab most of wiki). We should also probably organize this post into type of random (chat one, combat one, telly one, etc). I'll leave that to someone who wants to edit


    Random Event Solver Detection Working on it
    Mime Not Started Complete - Justin Nobody
    Mordaut Complete - DannyRS Complete - Ashaman88 Complete - DannyRS
    Molly Not Started Complete - Unsure Nobody
    Maze Not Started Not Started Nobody
    Drunken Dwarf Complete - Ashaman88 Complete - Ashaman88 Nobody
    Drill Demon Complete - DannyRS Complete - DannyRS Complete - DannyRS
    Freaky Forrester Not Started Complete - slushpuppy Nobody
    Frog Not Started Complete - Ashaman88 Nobody
    Frog (Cave) Complete - Justin/Xrapsp Complete - Justin Complete - Justin/Xrapsp
    Prison Pete Not Started Complete - Justin/DannyRS Nobody
    Cap'n Arrav Chest Not Started Not Started Nobody
    Quiz Master Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Sandwich Lady Complete - DannyRS Complete - Ashaman88 Complete - DannyRS
    Evil Bob Complete - Justin Complete - Justin Complete - Justin
    Beekeeper Not Started Not Started Nobody
    Pinball Complete - slushpuppy Complete - Justin Complete - slushpuppy
    Grave Digger Not Started Not Started Nobody
    Pillory Cage Complete - DannyRS Complete - DannyRS Complete - DannyRS
    Exploding Rock Not Started Not Started Nobody
    Poison Gas Not Started Not Started Nobody
    Whirlpool Not Started Not Started Nobody
    Big Fish Not Started Not Started Nobody
    Ent Not Started Not Started Nobody
    Strange Box Not Started Complete - Ashaman88 Nobody
    Watchman Not Started Complete - Ashaman88 Nobody
    Zombie Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Evil Chicken Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Shade Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Rock Golem Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    River Troll Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Tree Spirit Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Swarm Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Strange Plant Not Started Not Started Nobody
    Rick Turpentine Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Security Guard Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Genie Complete - Ashaman88 Complete - Ashaman88 Complete - Ashaman88
    Lost Pirate Not Started Complete - Ashaman88 Nobody
    Hyde Complete - Ashaman88 (add dropping pots?) Complete - Ashaman88 Complete - Ashaman88
    Lost & Found (Abyss) Not Started Testing Needed
    Last edited by Justin; 03-31-2013 at 03:45 AM. Reason: Update@Molly

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

    Default

    I had Maze detection working, When using FindNormalRandoms() it would return false but when using Maze_Detect() (Or whatever the detection function is) it would return true

    Forum account issues? Please send me a PM

  3. #3
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    I would love to tackle these (although at the moment SRL6 is a priority), Also take a look at the old scar includes im sure alot them still work fine

    off topic, 6am here i will post the uptext ocr stuff tomorrow.

  4. #4
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    Also take a look at the old scar includes im sure alot them still work fine
    This would probably be the best approach. Dig out the old randoms and test them one by one. Get them all detecting then work on solving.
    How long do you think it will take to get at least 90% of detections working? (33/36)
    STOP PM'ING ME

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Does anyone have a link to that old revision of SRL with the random solvers?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    @Flight;
    I think Kave posted one, not sure if it's the one you're looking for or not though.
    http://villavu.com/forum/showthread.php?t=34856%22

  7. #7
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    @Flight;
    I think Kave posted one, not sure if it's the one you're looking for or not though.
    http://villavu.com/forum/showthread.php?t=34856%22
    Hey look, it's me!
    Also, note that the posting date of all the SRL Rev4.x archive threads is not the date it was released. Im not sure exactly on the dates apart from before Sept 2, 2008.


    Edited OP to put info into a table to make more readable and easier to update
    Last edited by Hobbit; 03-04-2013 at 07:11 AM.
    STOP PM'ING ME

  8. #8
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    Hey look, it's me!
    Also, note that the posting date of all the SRL Rev4.x archive threads is not the date it was released. Im not sure exactly on the dates apart from before Sept 2, 2008.


    Edited OP to put info into a table to make more readable and easier to update
    Ah, yes, sorry, Kave linked to you, Hobbit, indeed!
    Thanks for the table too, quicker reference with it!

  9. #9
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Do randoms still work in the way such that you can get into one, log out, and then log back in to solve it?
    So will developers need users' accounts which are stuck in random events to help solve them?

  10. #10
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Guess as we bot, we try to get randoms and solve them as we go

    Could take a while to reach 100% with the luck involved, I seem to never get any "kidnap" randoms these days
    Last edited by DannyRS; 03-04-2013 at 11:04 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  11. #11
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Pretty table

    Once we all take a look at the old solvers I think we will get a better idea of how long detection would take. And for a lot of them the solving should be pretty easy (Like for those attacking you just run away a little bit then run back)

  12. #12
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Pretty table

    Once we all take a look at the old solvers I think we will get a better idea of how long detection would take. And for a lot of them the solving should be pretty easy (Like for those attacking you just run away a little bit then run back)
    Only the swarm and strange plant attack you regardless of if you talk to them right? the rest you talk too and they go away, so the findname thing would do for alot of the randoms?

    the real problem is detecting when for example evil bob or the old man get their hands on you lol, is there a way you's can think without using SPS or something to check if your inside one of those places? as far as I can remember the chat message goes away if you click after being grabbed, so if you got grabbed mid-walking in a script, you can't get chat message to check for them, unless all scripters are more careful in clicking, DTM simular problem,

    maybe I'm over thinking it, we need to have a good look how it was done before
    Last edited by DannyRS; 03-04-2013 at 01:09 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  13. #13
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Only the swarm and strange plant attack you regardless of if you talk to them right? the rest you talk too and they go away, so the findname thing would do for alot of the randoms?

    the real problem is detecting when for example evil bob or the old man get their hands on you lol, is there a way you's can think without using SPS or something to check if your inside one of those places?
    I think we used to check for the lack of certain gametabs or we would check the music tab to see what song was playing in order to detect many randoms . We can also use like MM Black Percent to help see if something is wrong.

    The tabs/black percent don't tell exactly which random, but help know that something is up.

  14. #14
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    I think we used to check for the lack of certain gametabs or we would check the music tab to see what song was playing in order to detect many randoms . We can also use like MM Black Percent to help see if something is wrong.

    The tabs/black percent don't tell exactly which random, but help know that something is up.
    Ah I never thought about that! the music would be a really easy way!

    theres several kidnap randoms that don't remove your 1-7 gametabs if I remember tho :/

    and tabbing for music every call wouldn't be too great, so maybe some failsafe in a script if you can't find something for so long, another check checks your music tab with GetMusic,

    from which ones I can remember, prison pete doesn't remove your gametabs for example


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  15. #15
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Only the swarm and strange plant attack you regardless of if you talk to them right? the rest you talk too and they go away, so the findname thing would do for alot of the randoms?
    Swarm, Strange Plant, Ent, Evil Chicken, River Troll, Big Fish, Rock Golem
    I think all of those attack you regardless (If I remember correctly)
    STOP PM'ING ME

  16. #16
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    Swarm, Strange Plant, Ent, Evil Chicken, River Troll, Big Fish, Rock Golem
    I think all of those attack you regardless (If I remember correctly)
    Yeah so for those we just need to run away and run back - Have it be a random direction. Only thing that might be bad is if the direction it chooses is a direction you can't run to (like wall or ocean there). Maybe have a user option to determine which directions it can run?

  17. #17
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Yeah so for those we just need to run away and run back - Have it be a random direction. Only thing that might be bad is if the direction it chooses is a direction you can't run to (like wall or ocean there). Maybe have a user option to determine which directions it can run?
    Not to hard to filter out non walk able places (red is non walk able points).



    code(took like 1 min, should give a rough idea though )
    Simba Code:
    program new;

    var
      mmBox: tbox;

    function tpaFromMinimap: TPointArray;
    var
      BMP_MM: integer;
      KMTarget, ITarget, W, H, t: Integer;
    begin
      KMTarget := GetKeyMouseTarget;
      ITarget := GetImageTarget;

      BMP_MM := BitmapFromString(147, 153, 'meJztlUF2wjAQxbj/pemORUsD' +
               'dgiyEunpAOOvhW+3iBW4bxog22n2GEdwXK8KHsE3e1VwP2yvCo6CB' +
               '6rgEHiOCo6C71++UfDNyzcBPnXtRsEXLt8o+KrlGwVfsnwT4APWbg' +
               'J8Olwd+GJLaQEfakHXB59oWVcGH2dxFwTfROQ64FPoXAF8BKlV81o' +
               '1r1XzWjWvhZNaNa9V81o1r1XzWjipVfNaNa9V81o4qVXzWjipVfNa' +
               'OKlV81o1r4WTWjWvhZNaNa+Fk1o4qVXzWjiphZNaNa+Fk1o4qYWTW' +
               'jWvhZNaOKlVk1o4qYUz2gcntXBSCye1cFILJ7VwUgsntXBSCye1cF' +
               'ILJ7VwUgsn9VY7obfCOS2c1MJJLZzUwkktnNS/4CflS5+CX5UvLZz' +
               'UwkktnNTCSS2c1P/AD8sNN8Bvyw0LJ3Ub/Lx86kvwC/OphZP6DviR' +
               '+cs3we/MXxZO6vvgp+bDIfBr8+Eo+MF5H69WuEWcAz/74k6DX35x9' +
               '4Aff1n3gz/hgn4K/CGX8oPgb7mUnwV/zkU8AvxRp/c48Ked2C+Av/' +
               'FkfhP8safx++BPPoEg+NulrgA+gs7VwAdZ3MXB91lQC/hQS6kDXwz' +
               'XCz5d1faAb1iyafAxq7YHfNWS7QFfuGTT4FNXbQ/45iWbBh+/anvA' +
               'K5RsGjxH1abBo1RtGjxN1abBA1VtGjxT1abBY1VtGjxZ1aapmpeqe' +
               'amalMJJKZyXqkkpnJTCeamal6qpKZmXqkkpnJqSeanaaShWLM0P+b' +
               '5EFg==');

      setTargetBitmap(BMP_MM);
      getBitmapSize(BMP_MM, W, H);

      findcolors(result, 255, 1, 1, w-1, h-1);
      offsettpa(result, point(569, 8));

      t := GetImageTarget;
      SetKeyMouseTarget(KMTarget);
      SetImageTarget(ITarget);
      FreeTarget(t);

      try
        FreeBitmap(bmp_mm);
      except
        writeln('**** tpaFromMinimap: Unable to free bitmap!')
      end;
    end;


    procedure filterpointsMM(var tpa: tpointarray);
    var
      tpa2: tpointarray;
      mmtpa: tpointarray;
      mmbtpa: tpointarray;
    begin
      returnpointsnotintpawrap(tpaFromMinimap, mmbox, tpa2);
      cleartpafromtpawrap(tpa, tpa2, tpa);

    end;

    function getBlackBackground: Integer;
    var
      CTS, I, H, C, Count, MaxC: Integer;
      TPA: TPointArray;
      Cols: TIntegerArray;
    begin
      Result := -1;
      CTS := GetToleranceSpeed;

      setColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(100, 100);
      FindColorsTolerance(TPA, clBlack, mmbox.X1, mmbox.Y1, mmbox.X2, mmbox.Y2, 3);
      SetToleranceSpeed2Modifiers(0.2, 0.2);
      setColorToleranceSpeed(CTS);
      if (Length(TPA) < 1) then Exit;

      Cols := GetColors(TPA);
      ClearSameIntegers(Cols);

      H := High(Cols);
      for I := 0 to H do
      begin
        C := Cols[I];
        Count := CountColor(C, mmbox.X1, mmbox.Y1, mmbox.X2, mmbox.Y2);
        if (CountColor(C, mmbox.X1, mmbox.Y1, mmbox.X2, mmbox.Y2) > MaxC) then
        begin
          Result := C;
          MaxC := Count;
        end;
      end;

    end;

    function removeNonWalkablePoints: tpointarray;
    var
      data: t2dintegerarray;
      atpa: t2dpointarray;
      i: integer;
      tpa: tpointarray;
      bmp: integer;
    begin
      data := [TIntegerArray([getBlackBackground, 0]), TIntegerArray([12227199, 40])];
      setlength(atpa, length(data));

      for i := 0 to high(data) do
        findColorsTolerance(atpa[i], data[i][0], mmbox.X1, mmbox.Y1, mmbox.X2, mmbox.Y2, data[i][1]);

      mergeatpawrap(atpa, tpa);
      filterpointsmm(tpa);

      bmp := bitmapfromclient(1, 1, 763, 502);
      drawtpabitmap(bmp, tpa, clRed);
      drawbitmapdebugimg(bmp);
      displaydebugimgwindow(766, 503);
    end;

    begin
      mmBox := intToBox(568, 8, 715, 160);
      removeNonWalkablePoints
    end.

  18. #18
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    ^How does that work? What's the bitmap of? Are you sure that will work anywhere?

    Anyways, I think back in the day (slash new idea in my head?)similar to how we havea parameter for lampskill, we can have one for rundirection (I know for sure old scripts had that) which can be set by either the scritper or the user.

  19. #19
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    ^How does that work? What's the bitmap of? Are you sure that will work anywhere?

    Anyways, I think back in the day (slash new idea in my head?)similar to how we havea parameter for lampskill, we can have one for rundirection (I know for sure old scripts had that) which can be set by either the scritper or the user.
    the bitmap is the minimap, the minimap in 2007 is so weird you cant just use a circle.

  20. #20
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    What I meant to ask is, how are you detecting what is and int walk-able.

  21. #21
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    What I meant to ask is, how are you detecting what is and int walk-able.
    I'm looking for water colour + black space on the minimap

    Simba Code:
    // black background col, tolerance,              water color, tolerance.
    data := [TIntegerArray([getBlackBackground, 0]), TIntegerArray([12227199, 40])];

  22. #22
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Maybe detect the color or house floors also as non-walkable areas because if the door is open it go in there and be cornered. (If the door is shut RS will auto-shift the flag outside, so either way houses should be non walkable for safety)
    STOP PM'ING ME

  23. #23
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    Maybe detect the color or house floors also as non-walkable areas because if the door is open it go in there and be cornered. (If the door is shut RS will auto-shift the flag outside, so either way houses should be non walkable for safety)
    Ah, I was thinking the same thing.

    Is there any instance where an arrow will be stuck inside a house, or in a place you cannot walk to, making the flag in the MM useless?
    Ex. What I take from what Hobbit said, this will just make the flag shift outside, but could there be a case where the flag gets stuck in the house/other MiniMap Object, where it cannot walk to? (curious atm, explanation later if this is even a pertinent question )

  24. #24
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    if that was to happen fflag would timeout after like 15 seconds(or whatever the timeout is )

  25. #25
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    Ah, I was thinking the same thing.

    Is there any instance where an arrow will be stuck inside a house, or in a place you cannot walk to, making the flag in the MM useless?
    Ex. What I take from what Hobbit said, this will just make the flag shift outside, but could there be a case where the flag gets stuck in the house/other MiniMap Object, where it cannot walk to? (curious atm, explanation later if this is even a pertinent question )
    I've never encountered a case where the flag stays a play you cant walk to, RS has always moved it.
    That being said, we should still avoid clicking places that cant be walked so we can keep better track of where we are to make it easier to get back after the random.
    STOP PM'ING ME

Page 1 of 10 123 ... LastLast

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
  •