Page 2 of 10 FirstFirst 1234 ... LastLast
Results 26 to 50 of 239

Thread: Randoms Development

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

    Default

    Quote Originally Posted by Hobbit View Post
    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.
    That's not as easy as it sounds, there are so many variables that could happen.

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

    Default

    Yes, thats why we should filter out places like the house, one less variable to go wrong. I never said it would be easy, but eliminating houses and other non-walk areas would help keep track better.
    STOP PM'ING ME

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

    Default

    Quote Originally Posted by Ollybest View Post
    That's not as easy as it sounds, there are so many variables that could happen.
    I believe in you Olly!!

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

    Default

    For tracking the return route here is best I can think of. Im not sure how much SPS has changed since its original release so this may not even work.

    During the find normal randoms check, update current tile from SPS
    If in fight run away (random direction) to walkable area
    Check if still under attack (Repeat above step)
    When no longer attack, walk back to previous location via SPS
    STOP PM'ING ME

  5. #30
    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
    For tracking the return route here is best I can think of. Im not sure how much SPS has changed since its original release so this may not even work.

    During the find normal randoms check, update current tile from SPS
    If in fight run away (random direction) to walkable area
    Check if still under attack (Repeat above step)
    When no longer attack, walk back to previous location via SPS
    That would require everyone to load their sps areas for every script, and thus we would have to build a world map for osr which would take a ton of time. We could do something with DDTM's maybe? Or just a move away randomrange x and y pixels, then move the same amount of pixels +/- a few pixels in the opposite direction? So you would end up in roughly the same spot

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

    Default

    @Hobbit

    SPS is a big no no, i don't really want to go though every reason lol

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

    Default

    Quote Originally Posted by Ollybest View Post
    @Hobbit

    SPS is a big no no, i don't really want to go though every reason lol
    ^^^


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

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

    Default

    Danny got me thinking, maybe we should make a topic requesting screenshots and/or accounts with randoms to speed up development? Or maybe hold off until we get a better grasp on how we want to tackle them?

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

    Default

    Quote Originally Posted by Ashaman88 View Post
    Danny got me thinking, maybe we should make a topic requesting screenshots and/or accounts with randoms to speed up development? Or maybe hold off until we get a better grasp on how we want to tackle them?
    I remember a couple people still having Dev's need Random Accounts, etc. in their signatures (assuming for the sole purpose of what you just said).

    Screenshots only go so far, and I indeed like the idea of lending random dev's accounts, however I'm not blind to the issue of account 'lending'/etc. To be fair for the issue, I think it would be heavily enforced/stated to have account lenders for dev's remove all items worth value from the account, etc. I would like to utilize the idea, but again, there's some liability if the lending isn't taken carefully.

    (sorry for stating what might have been the blatantly obvious, but the last thing I'd want for anyone here or myself is any trouble of any type)

    -Lj

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

    Default

    Quote Originally Posted by Le Jingle View Post
    I remember a couple people still having Dev's need Random Accounts, etc. in their signatures (assuming for the sole purpose of what you just said).

    Screenshots only go so far, and I indeed like the idea of lending random dev's accounts, however I'm not blind to the issue of account 'lending'/etc. To be fair for the issue, I think it would be heavily enforced/stated to have account lenders for dev's remove all items worth value from the account, etc. I would like to utilize the idea, but again, there's some liability if the lending isn't taken carefully.

    (sorry for stating what might have been the blatantly obvious, but the last thing I'd want for anyone here or myself is any trouble of any type)

    -Lj
    Yea, but we could state the risk I suppose, theres also the number 1. Reason I avoid acc lending, even if people want you to make scripts with their acc, you could be a different country (I have VPN access but you can never be sure what Jagex look at, they could notice public IPs or something) and the account lock / email reset could trigger a mod review, or even get the account watched for botting, which is not going to be good for just as obvious reasons lol,

    So it would be viable and great on low wealth (eveyone on OSR is anyway) characters that have no maingame main attached, and are not *precious* to the owner,

    It would help speed up development of solvers 10 fold for sure, but is it worth the risks :/ whats your opinion @Hobbit?

    Screenshot thread would be a great Idea though, every little helps
    Last edited by DannyRS; 03-05-2013 at 12:00 AM.


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

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

    Default

    Quote Originally Posted by Ashaman88 View Post
    Danny got me thinking, maybe we should make a topic requesting screenshots and/or accounts with randoms to speed up development? Or maybe hold off until we get a better grasp on how we want to tackle them?
    Well starting tonight, I'll be running 5 accounts power-mining Tin ore trying to get random events, I'll make the script take screenshots every-time yellow text has been detected and also when srl_infight (has it been updated?)

    Hope this will speed it up.

    Justin

    Forum account issues? Please send me a PM

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

    Default

    Quote Originally Posted by Justin View Post
    Well starting tonight, I'll be running 5 accounts power-mining Tin ore trying to get random events, I'll make the script take screenshots every-time yellow text has been detected and also when srl_infight (has it been updated?)

    Hope this will speed it up.

    Justin
    If it hasn't been updated, it should be - would be key

    Example of run away:

    Simba Code:
    Procedure Test;
    Begin
      Writeln('Found fight running away!');
      SetRun(True);
      MMouse(MMCX-50 + RandomRange(-3,3),MMCY + RandomRange(-3,3),0,0);
      ClickMouse2(True);
      Wait(1000);
      While IsMoving Do
        Wait(200);
      MMouse(MMCX + RandomRange(-3,3),MMCY-50 + RandomRange(-3,3),0,0);
      ClickMouse2(True);
      Wait(1000);
      While IsMoving Do
        Wait(200);

      Wait(RandomRange(4000,5000));

      MMouse(MMCX + RandomRange(-3,3),MMCY+50 + RandomRange(-3,3),0,0);
      ClickMouse2(True);
      Wait(1000);
      While IsMoving Do
        Wait(200);

      MMouse(MMCX+50 + RandomRange(-3,3),MMCY + RandomRange(-3,3),0,0);
      ClickMouse2(True);
      Wait(1000);
      While IsMoving Do
        Wait(200);
    End;

    basic I know but something like this?


    Edit2:

    Took a bunch of pics of mystery box, shouldn't be too hard to solve!
    Last edited by Ashaman88; 03-05-2013 at 01:36 AM.

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

    Default

    Actually guys that test function worked like a charm! Made a tiny edit to srl_infight and just added this to my loops

    Simba Code:
    If SRL_InFight Then
                Test;

    Ran away and back like a charm

    Edit: But what if you are training combat, how would that work?
    Last edited by Ashaman88; 03-05-2013 at 03:53 AM.

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

    Default

    You guys don't notice this has already been done and has for combat etc its hard, you cant account for everything.

    Simba Code:
    (*
    RunAway
    ~~~~~~~

    .. code-block:: pascal

        procedure RunAway(dir: string; RunFar: Boolean; Action, WaitTime: Integer);

    - Runs away in minimap related direction, based on north.
    - Dir can be 'N', 'E', 'S', 'W' or an angle in degrees (145, 93, 180, etc).
    - RunFar will run further than normal.
    - Action can be either 1, 2 or 3:

        1. RunAway + Wait(WaitTime) + RunBack
        2. RunAway + Wait(WaitTime)
        3. RunBack

    .. note::
        WaitTime is in milliseconds!

    .. note::

        by nielsie95 modified by ZephyrsFury

    Example:

    .. code-block:: pascal

        if (FindFight()) then
        begin
          WriteLn('We are in a fight!');
          RunAway('n', True, 1, 2000);
        end;

    *)


    // TODO: Implement constants!
    procedure RunAway(dir: variant; RunFar: Boolean; Action, WaitTime: Integer);
    var
      Rad, T: Integer;
      Deg: extended;
    begin
      if (not LoggedIn) then exit;

      if RunFar then
        Rad := 63
      else
        Rad := 30;
      Deg := variantToDirection(dir);

      if (Action < 3) then
      begin
        SetRun(True);
        MFNF(Trunc(Rad * Sin(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCX + Random(5)),
          Trunc(-Rad * Cos(Radians(FixD(Rs_GetCompassAngleDegrees + Deg))) + MMCY + Random(5)), 1, 1);
        FFlag(0);
        Wait(500 + Random(1500));
        t := GetSystemTime;
        while ((GetSystemTime - t) < WaitTime) and (LoggedIn) do
          if (Random(5) = 0) then
            IdleTime(2000, 500, 1.0)
          else
            Wait((WaitTime - (GetSystemTime - t)) div 5);
      end;

      if (Action = 1) or (Action = 3) then
      begin
        MFNF(Trunc(Rad * Sin(Radians(FixD(Rs_GetCompassAngleDegrees + (Deg + 180)))) + MMCX - Random(5)),
          Trunc(-Rad * Cos(Radians(FixD(Rs_GetCompassAngleDegrees + (Deg + 180)))) + MMCY - Random(5)), 1, 1);
        FFlag(0);
        Wait(500 + Random(1500));
      end;

      SetRun(False);
    end;

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

    Default


    If you need a grid for the Lamp skills
    I'd do it myself but I am horrible at maths

    Forum account issues? Please send me a PM

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

    Default

    Good call Olly haha very nice.


    If nobody starts on the lamp solver, I'll do it tonight - thanks Justin

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

    Default

    Seems like Jagex have stopped trial accounts, I'm unable to farm randoms

    Forum account issues? Please send me a PM

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

    Default

    As for the randoms where we need to runaway apart from having a general function like (runaway) and we need to make use of the SRL_Proc system we have for if the scripter wants to do a custom action, something like this:

    Simba Code:
    procedure weneedtorunaway;
    begin
      writeln('ah balls, something is attacking us... run!');

      if SRL_HasProc(SRL_runAway) then
          SRL_Procs[SRL_runAway]()
      else
        runAway(blah blah blah);

    end;

    procedure customRunAway;
    begin
      sps_blindwalk(p);
      wait(forhowlong);

      writeln('we can now walk back.');
      sps_blindwalk(p);
    end;

    SRL_Procs[SRL_runAway] := @customRunAway;

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

    Default

    Quote Originally Posted by Ollybest View Post
    As for the randoms where we need to runaway apart from having a general function like (runaway) and we need to make use of the SRL_Proc system we have for if the scripter wants to do a custom action, something like this:

    Simba Code:
    procedure weneedtorunaway;
    begin
      writeln('ah balls, something is attacking us... run!');

      if SRL_HasProc(SRL_runAway) then
          SRL_Procs[SRL_runAway]()
      else
        runAway(blah blah blah);

    end;

    procedure customRunAway;
    begin
      sps_blindwalk(p);
      wait(forhowlong);

      writeln('we can now walk back.');
      sps_blindwalk(p);
    end;

    SRL_Procs[SRL_runAway] := @customRunAway;
    Yes that would be ideal. Also not sure if runaway already has this, but we putting an option for the script writer to determine which directions runaway should run in. Like only 'N' etc etc

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

    Default

    Got a few screenshot collections of some while woodcutting,

    Mordaut does not mess around :/ - let me know if you want those screens now, I'll upload all I got later

    Working on Sandwich lady because I want to start with a relatively easy one myself


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

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

    Default

    Quote Originally Posted by DannyRS View Post
    Got a few screenshot collections of some while woodcutting,

    Mordaut does not mess around :/ - let me know if you want those screens now, I'll upload all I got later

    Working on Sandwich lady because I want to start with a relatively easy one myself
    I can send you some sandwich pics if you would like?

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

    Default

    Quote Originally Posted by Ashaman88 View Post
    I can send you some sandwich pics if you would like?
    that would be great


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

  23. #48
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by Justin View Post

    If you need a grid for the Lamp skills
    I'd do it myself but I am horrible at maths
    Simba Code:
    (**
     * Author: Coh3n, J J
     * Description: Uses the lamp on the skill of choice
     *)

    function UseLamp: boolean;
    var
      Skill: Integer;
      Slot: TPoint;
      Box: TBox;

    begin
      //Skill := Players[currentPlayer].lampSkill;
      Skill := SKILL_MAGIC;

      case Skill of
        SKILL_ATTACK              : slot := Point(0, 0);
        SKILL_STRENGTH            : slot := Point(1, 0);
        SKILL_RANGE               : slot := Point(2, 0);
        SKILL_MAGIC               : slot := Point(3, 0);
        SKILL_DEFENCE             : slot := Point(4, 0);
        SKILL_HITPOINTS, SKILL_HP : slot := Point(0, 1);
        SKILL_PRAYER              : slot := Point(1, 1);
        SKILL_AGILITY             : slot := Point(2, 1);
        SKILL_HERBLORE            : slot := Point(3, 1);
        SKILL_THIEVING            : slot := Point(4, 1);
        SKILL_CRAFTING            : slot := Point(5, 1);
        SKILL_RUNECRAFTING        : slot := Point(0, 2);
        SKILL_SLAYER              : slot := Point(1, 2);
        SKILL_FARMING             : slot := Point(2, 2);
        SKILL_MINING              : slot := Point(3, 2);
        SKILL_SMITHING            : slot := Point(4, 2);
        SKILL_FISHING             : slot := Point(5, 2);
        SKILL_COOKING             : slot := Point(0, 3);
        SKILL_FIREMAKING          : slot := Point(1, 3);
        SKILL_WOODCUTTING         : slot := Point(2, 3);
        SKILL_FLETCHING           : slot := Point(3, 3);
        SKILL_CONSTRUCTION        : slot := Point(4, 3);
        SKILL_HUNTER              : slot := Point(5, 3);
      end;

      { INFO
        8 pixels between each box horizontal
        4 pixels between each box vertical

        Row 0
        189, 144 -> 213, 149
        203, 134 -> 204, 158
        Box: 24, 24

        Row 1, 2, 3
        -------------------
        174, 182 ->  198, 179
        187, 164 -> 189, 188
        Box: 24, 24
      }


      if Slot.y > 0 then
        Box := IntToBox(173 + Slot.x * 24 + Slot.x * 8,
                        164 + (Slot.y-1) * 24 + (Slot.y-1) * 4,
                        173 + Slot.x * 24 + Slot.x * 8 + 24,
                        164 + (Slot.y-1) * 24 + (Slot.y-1) * 4 + 24)
      else
        Box := IntToBox(189 + Slot.x * 24 + Slot.x * 8,
                        134 + Slot.y * 24 + Slot.y * 4,
                        189 + Slot.x * 24 + Slot.x * 8 + 24,
                        134 + Slot.y * 24 + Slot.y * 4 + 24);

      writeln('Lamp box: ' + ToStr(Box));
    end;

    Script source code available here: Github

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

    Default

    @J J; nice work! I tried using grid box the other day and failed miserably. :'[

    On that note, has anyone fixed up core/antirandoms/rewards.simba?
    If not, I'd love to update it (granted J J's code helps carry the bulk of the rewards.simba file) :]

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

    Default

    Quote Originally Posted by Le Jingle View Post
    @J J; nice work! I tried using grid box the other day and failed miserably. :'[

    On that note, has anyone fixed up core/antirandoms/rewards.simba?
    If not, I'd love to update it (granted J J's code helps carry the bulk of the rewards.simba file) :]
    I haven't touched it. Check out the history on it @ git and if no changes - go for it

Page 2 of 10 FirstFirst 1234 ... 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
  •