Results 1 to 8 of 8

Thread: How do I do this method the mathamaticians way?

  1. #1
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default How do I do this method the mathamaticians way?

    Although I know their is a better way to do this? I just havnt been confident enough to bother attempting it yet
    Ignore that part im just sort of talking to myself their I kind of did attempt it now lol and I cant get my stupid head around it the way im really wanting
    Simba Code:
    procedure whichclayy;                  //This is just the coords of the middle of each item in each space in each slot of the inventory
    var                                     //The procedure picks 1 of 28 Numbers Randomly each number coresponds to each slot, so when the number is picked it moves the mouse to that slot
    whichclay: integer;                      //This I believe is a Good feature for Anti-Ban in combination with the 4/4 preset coord randomization provided with the mmouse function
    begin                                     //Although I know their is a better way to do this? I just havnt been confident enough to bother attempting it yet
    whichclay:=0;                              //I should make a case of this now that I think of it
    whichclay:=random(28);                      // x:=536 +(42*whichclay);??? so if x=0 which is 1 then 536 will equal 578 it gets more complicated then that tho dividing the math between 6 parts
    if(whichclay=0 or 1 or 5 or 9)then mmouse(578,229,4,4);     // WTF? if(whichclay=1 or 5 or 9 or 13 or 18 or 21 or 25)then x:=578; etc etc? thats the easy way right? how would i go the smarter way?
    if(whichclay=1)then mmouse(578,229,4,4);
    if(whichclay=2)then mmouse(620,229,4,4);
    if(whichclay=3)then mmouse(661, 230,4,4);
    if(whichclay=4)then mmouse(704, 231,4,4);

    if(whichclay=5)then mmouse(578, 267,4,4);
    if(whichclay=6)then mmouse(620, 267,4,4);
    if(whichclay=7)then mmouse(662, 268,4,4);
    if(whichclay=8)then mmouse(704, 267,4,4);

    if(whichclay=9)then mmouse(577, 303,4,4);
    if(whichclay=10)then mmouse(622, 304,4,4);
    if(whichclay=11)then mmouse(664, 303,4,4);
    if(whichclay=12)then mmouse(706, 302,4,4);

    if(whichclay=13)then mmouse(579, 338,4,4);
    if(whichclay=14)then mmouse(621, 338,4,4);
    if(whichclay=15)then mmouse(663, 338,4,4);
    if(whichclay=16)then mmouse(705, 339,4,4);

    if(whichclay=17)then mmouse(577, 375,4,4);
    if(whichclay=18)then mmouse(621, 373,4,4);
    if(whichclay=19)then mmouse(662, 374,4,4);
    if(whichclay=20)then mmouse(705, 375,4,4);

    if(whichclay=21)then mmouse(579, 411,4,4);
    if(whichclay=22)then mmouse(620, 412,4,4);
    if(whichclay=23)then mmouse(662, 412,4,4);
    if(whichclay=24)then mmouse(705, 411,4,4);

    if(whichclay=25)then mmouse(578, 447,4,4);
    if(whichclay=26)then mmouse(621, 446,4,4);
    if(whichclay=27)then mmouse(664, 448,4,4);
    if(whichclay=28)then mmouse(705, 446,4,4);
    end;
    Last edited by Sir Ducksworthy; 03-08-2012 at 03:49 PM.

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    procedure whichclayy;.
    var
    WhichClay:Integer;
    begin
    WhichClay := RandomRange(1,28); //do this, otherwise if Whichclay lands on 0, you're screwed
    MouseItem(WhichClay,3); //moves mouse
    end;

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

    Default

    Look in inventory.simba, there are a ton of useful features.

    Simba Code:
    program new;
    {$i srl/srl.simba}

    procedure WhichClay();
    var
      invB : TBox;
    begin
      invB := InvBox(RandomRange(1, 28));
      MMouse((invB.X1 + invB.X2) / 2, (invB.Y1 + invB.Y2) / 2, 5, 5);
    end;

    begin
      SetupSRL();
      WhichClay();
    end.
    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.


  4. #4
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Kyle, I ninja'd you.
    Plan worked perfectly, while you were distracted by my PM, I answered!

  5. #5
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    GNomg Im such a retard
    Thankyou honarable masters

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

    Default

    Yeah, but yours can be shortened up even more and won't compile

    Simba Code:
    procedure whichclayy;
    begin
      MouseItem(RandomRange(1, 28), 3); //moves mouse
    end;
    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.


  7. #7
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Yeah, but yours can be shortened up even more and won't compile

    Simba Code:
    procedure whichclayy;
    begin
      MouseItem(RandomRange(1, 28), 3); //moves mouse
    end;
    Hehe true, I was in a rush when I saw you viewing the thread :3

  8. #8
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    rep+'d Both of u's cheers heaps
    +
    Learned like 3 Diff things just then
    Last edited by Sir Ducksworthy; 03-08-2012 at 04:02 PM.

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
  •