Results 1 to 5 of 5

Thread: Another Alcher

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

    Default Another Alcher

    This is another alcher, please help me as this is my first script and it doesn't work very well, I would love it if you could help:

    version 1.0

    Simba Code:
    program SimpleAlch;
    {.include srl/srl.scar}
    {$DEFINE SMART}
    {$i SRL/SRL.scar}

    var xval, yval, xinval, yinval: integer;

    const
     Message1='Lets Cast';
     Message2='Casted...';

     Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';   // Copy and paste to add more players
      Players[0].Pass :='';
      Players[0].Nick :='';  //Used for random events
      Players[0].Active:=True;
    end;

    procedure Cast;
    begin
      while GetCurrentTab = tab_Inv do
      begin
        Gametab(tab_Magic);
         Wait(100+ Random(100));
      end;

      while GetCurrentTab = tab_Magic do
      begin
        Wait(200 + Random(50));
        xval := Random(10)+687; //Can somebody tell me how to get these values as at the moment I just guess.
        yval := Random(10)+341;
        Mouse(xval, yval, 1, 1, True);

        xinval := Random(20)+569;
        yinval := Random(20)+219;
        Mouse(xinval, yinval, 1, 1, True);

      end;


      FindNormalRandoms
      wait(1000)
    //  Writeln(Message2);
    end;


    begin
      Writeln(Message1);
      Smart_Server := 28;               //Set to world you'd like to use
      Smart_Members := False;           //Can be set t true
      Smart_Signed := True;
      Smart_SuperDetail := False;

      SetUpSRL;
      ActivateClient;
      LoginPlayer;
      Writeln(Message1);
      Cast;

    end.

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

    Default

    HOLY COCKBALLS!
    I think you left your username and password in the script, pelase be more careful next time!
    Lucky I saw it first and edited it out!

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

    Default

    Take a look over this, if you have any question let me know.

    Simba Code:
    program SimpleAlch;
    (*{.include srl/srl.scar} Delete this, it's not needed*)
    {$DEFINE SMART}
    {$i SRL/SRL.scar}

    var
      xval, yval, xinval, yinval: integer;
      // These are how your stardards are suppose to be, no worries, you'll get
      // better with time :)

    const
      Message1='Lets Cast';
      Message2='Casted...';
      // Again, use TAB for indents

    procedure DeclarePlayers; // I really don't care about capital bold words, but some people will complain
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';   // Copy and paste to add more players
      Players[0].Pass :='';
      Players[0].Nick :='';  //Used for random events
      Players[0].Active:=True;
    end;

    procedure Cast;
    begin
      while GetCurrentTab = tab_Inv do
      begin
        Gametab(tab_Magic);
        Wait(250 + Random(100));
        // Also, space these mathmatics out, like so
      end;

      while GetCurrentTab = tab_Magic do
      begin
        Wait(200 + Random(50));
        //xval := Random(10) + 687; Don't need this

        // To find the coords of the spell, make sure RS is selected as the client
        // Then click on the color picker (The blue eye dropper)
        // Click on the spell, it will pull up a popup box with your x,y coords

        //yval := Random(10) + 341; Don't need this either

        Mouse(xval, yval, 3, 3, True); // Where is this clicking?
        // Use a higher random, like 3

        //xinval := Random(20) + 569; Get rid of these
        //yinval := Random(20) + 219;

        Mouse(xinval, yinval, 3, 3, True); // Where is this clicking?

      end;


      FindNormalRandoms();
      wait(RandomRange(750, 1250));
    //  Writeln(Message2);
    end;


    begin
      Writeln(Message1);
      Smart_Server := 28;               //Set to world you'd like to use
      Smart_Members := False;           //Can be set t true
      Smart_Signed := True;
      Smart_SuperDetail := False;

      SetUpSRL;
      ActivateClient;
      LoginPlayer;
      Writeln(Message1);
      Cast;

    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
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    A very good start for a first script... Here's some feedback.

    First of all, You Included SRL twice:

    Simba Code:
    {.include srl/srl.scar}
    {$DEFINE SMART}
    {$i SRL/SRL.scar}

    This Should work:

    Simba Code:
    {$DEFINE SMART}
    {$i SRL/SRL.scar}

    ...

    Simba Code:
    Players[0].Nick :='';  //Used for random events

    This isn't used for randoms anymore.

    also, i see you still have problems with Random Function, and don't really know how to place the waits correctly, For example:

    Simba Code:
    procedure Cast;
    begin
      while GetCurrentTab = tab_Inv do
      begin
        Gametab(tab_Magic);
         Wait(100+ Random(100));
      end;

    Let's take this out:

    Simba Code:
    Wait(100+ Random(100));

    This, waits 100 ms, and an extra random number from 0 to 99, so 0 might not be the right think that you're looking for, what i'd recommend sometimes, is RandomRange function. For example:

    Simba Code:
    Wait(RandomRange(120, 200));

    in this case, it does a Random wait with a range of 120 and 200, so it waits somewhere randomly between 120 and 200, or here's another example.

    Simba Code:
    Wait(100+ RandomRange(20, 100));

    This is the same, just in an other way.

    lets move further...

    This:
    Simba Code:
    procedure Cast;
    begin
      while GetCurrentTab = tab_Inv do
      begin
        Gametab(tab_Magic);
         Wait(100+ Random(100));
      end;

      while GetCurrentTab = tab_Magic do
      begin
        Wait(200 + Random(50));
        xval := Random(10)+687; //Can somebody tell me how to get these values as at the moment I just guess.
        yval := Random(10)+341;
        Mouse(xval, yval, 1, 1, True);

        xinval := Random(20)+569;
        yinval := Random(20)+219;
        Mouse(xinval, yinval, 1, 1, True);

      end;

    "Can somebody tell me how to get these values as at the moment I just guess."

    I didn't really understand the question, so sorry, if you expected someone to answer that.

    This:
    Simba Code:
    xval := Random(10)+687;
        yval := Random(10)+341;
        Mouse(xval, yval, 1, 1, True);

    this part is completely unnecessary.

    Simba Code:
    Mouse(687, 341, 10, 10, True);

    what it does is just the same thing, it clicks on the coords 687 and 341 plus a random of 10 in each coordinate.

    That's it.

    And if you have a problem, then please show it, give more information, so we can understand what you're trying to say/do.
    Hi

  5. #5
    Join Date
    Mar 2010
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To me it looks the same as this: http://villavu.com/forum/showthread.php?t=64231

    Just without the paint/antiban and a couple things reworded, but i guess thats expected from new scripters and something so basic.

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
  •