Page 2 of 9 FirstFirst 1234 ... LastLast
Results 26 to 50 of 223

Thread: Script down your first rs tree!

  1. #26
    Join Date
    Dec 2007
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you explain Random(); for a bit?

  2. #27
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Random(x): Integer; returns a random integer (number), anywhere from 0 to x. So if x is 9001, it could be 0, 1, 2, 3, ... 9000, 9001. Hope that helps.

  3. #28
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Powerz View Post
    Could you explain Random(); for a bit?
    Well, the random is all about chances if something will happen. So, if we have Random(8), 8 becomes the denominator in a fraction. If we have 3 other options to execute in the script, there is a 1/8 chance that each one of those will happen. Since we only have three other options, there is a 5/8 chance that nothing at all will execute.

  4. #29
    Join Date
    Oct 2009
    Location
    usa the home of Damocracks
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thinks a lot at least i know some thing about making scripts now.... off to learn how to walk

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

    Default

    Very nice tutorial, I especially like how you show all the smaller pieces of code while you are explaining them instead of putting one mass of code up and trying to explain it all afterwards. Very good at explaining everything overall, maybe expand on it or post a tutorial on other things not described in this tutorial but still commonly used in tree cutting scripts.

  6. #31
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by nagrom1700 View Post
    Very nice tutorial, I especially like how you show all the smaller pieces of code while you are explaining them instead of putting one mass of code up and trying to explain it all afterwards. Very good at explaining everything overall, maybe expand on it or post a tutorial on other things not described in this tutorial but still commonly used in tree cutting scripts.
    Glad you liked it. I'm thinking about expanding on it, but the main purpose was to instruct new scripters the basics of scripting, not necessarily all about woodcutting. Thanks for the feedback

  7. #32
    Join Date
    Dec 2009
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks great tut.
    like the layout.
    ill def be checking out some more of ur tuts.
    thanks

  8. #33
    Join Date
    Dec 2009
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow it works very well after a few tweaks.
    again, thanks for the amazing guide.
    my first script... Done.
    now its time to develop it so i can use it for more than 1 trip and add some more AntiBan.
    had a problem with clicking oaks instead of normals due to the colour similarities.
    is there a way to get round this easily, thought of checking uptext or something.
    thanks again

    Edit: Sorry for the double post didn't realise i was the last.
    Last edited by mounty1; 01-06-2010 at 01:17 AM. Reason: double post

  9. #34
    Join Date
    Dec 2008
    Posts
    209
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tutorial Griff, it's nice and I've found that I could easily model this into another similar application like a power miner (well attempting too )

    By the way, I think I may have stumbled across a little typo:

    Code:
    ;
    
    Begin your procedure, and then write
    I am not sure if the semi-colon was intentionally there, but I'll check any ways

    ~ Craig`
    Last edited by Craig`; 01-06-2010 at 07:35 AM.

  10. #35
    Join Date
    Dec 2006
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have tried to run this, it compiles but gives the following error

    [Runtime Error] : Exception: Can't allocate the DIB handle in line 545 in script C:\Users\twobac\Desktop\scarprerelease\includes\SR L\SRL\Core\Text.scar

    which is
    FindColorsTolerance(TPA, 4016722, B.X1, B.Y1, B.X2, B.Y2, 0);

    Any ideas?

    ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457

  11. #36
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by twobac View Post
    I have tried to run this, it compiles but gives the following error

    [Runtime Error] : Exception: Can't allocate the DIB handle in line 545 in script C:\Users\twobac\Desktop\scarprerelease\includes\SR L\SRL\Core\Text.scar

    which is
    FindColorsTolerance(TPA, 4016722, B.X1, B.Y1, B.X2, B.Y2, 0);

    Any ideas?
    Your tolerance is 0, has to be at least 1. And for most things, yo usually want over 5, and a lot of the time 20-25.

  12. #37
    Join Date
    Dec 2006
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the quick reply, think ur tut is pretty good, learnt a couple of things already just from reading it.

    This is now a basic Ivy cutter and works pretty well. What function makes the inventory tab being displayed all the time, is it the InvFull procedure?

    Thanks again for the tut.
    Last edited by twobac; 03-23-2010 at 04:09 AM.

    ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457

  13. #38
    Join Date
    Feb 2010
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I did everything step by step it still says cant identify HowManyPlayers in line 5 what can I do?

  14. #39
    Join Date
    Jan 2007
    Posts
    181
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice tutorial I managed to edit the script so it works as a miner instead of logging. How can I set it so that it will click a different rock after it has clicked the current one? I don't want to make a script for use but for learning purposes so it doesn't have to be the safest method. ; )

  15. #40
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Hamish View Post
    Nice tutorial I managed to edit the script so it works as a miner instead of logging. How can I set it so that it will click a different rock after it has clicked the current one? I don't want to make a script for use but for learning purposes so it doesn't have to be the safest method. ; )
    There's a few different ways to do this, the simplest being to check the chatbox to see if the message has mined the rock is there, so then it knows to continue on to the next rock.

  16. #41
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It shows me these error
    [Error] (25:1): Type mismatch at line 24
    Compiling failed.
    And it says that the mistake is on here:
    program New;
    {.include srl/srl.scar}

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

    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or('InvFull')
    Until('InvFull')
    End;

    begin
    SetUpSRL;
    ActivateClient;
    end.

  17. #42
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    I think the tutorial is out of date seen as we use simba now not scar

    And last post was over a year ago but anyway

    It look like you have 2 until. But onlyt one repeat

  18. #43
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    I think the tutorial is out of date seen as we use simba now not scar

    And last post was over a year ago but anyway

    It look like you have 2 until. But onlyt one repeat

    Thanks!

  19. #44
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    program New;
    {.include srl/srl.scar}

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

    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or('InvFull')
    Repeat
    Wait(1200+random(250));
    Until('InvFull')
    End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn))then
    Exit;
    Case;Random(8)of
    0:
    Begin
    HoverSkill('Woodcutting'),false)
    Wait(2453+random(432));
    End
    1:PickUpMouse;
    2:
    Begin
    MakeCompass('N');
    Wait(100)+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
    End;
    End;
    End;

    begin
    SetUpSRL;
    ActivateClient;
    DeclarePlayers;
    ChopTree;
    end.

    Got this error

    [Error] (25:1): Type mismatch at line 24
    Compiling failed.

  20. #45
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

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

  21. #46
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Quote Originally Posted by Gaston7eze View Post
    program New;
    {.include srl/srl.scar}

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

    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active:=True;
    end;
    Procedure ChopTree;
    Var x,y: Integer;
    Begin
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, False);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('yew')or('InvFull')
    Repeat
    Wait(1200+random(250));
    Until('InvFull')
    End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn))then
    Exit;
    Case;Random(8)of
    0:
    Begin
    HoverSkill('Woodcutting'),false)
    Wait(2453+random(432));
    End
    1:PickUpMouse;
    2:
    Begin
    MakeCompass('N');
    Wait(100)+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
    End;
    End;
    End;

    begin
    SetUpSRL;
    ActivateClient;
    DeclarePlayers;
    ChopTree;
    end.

    Got this error

    [Error] (25:1): Type mismatch at line 24
    Compiling failed.
    Use Simba tags.

    Simba Code:
    Until not IsUpText('yew')or('InvFull')

    Why did you put InvFull in ' ' ? Everything between ' ' compiler recognise as string. So you placed String instead of Boolean in logical statement and got type mismatch error.

    Additionally everything related with not should be in bracket. Try:
    Simba Code:
    Until not(IsUpText('yew')or(InvFull))

  22. #47
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    Stickyfied!
    Thanks! And I don't know if you were behind it, but I like the tut cup too

    Maybe all this calls for an update of the tutorial!

    @Gaston: It won't compile right now, check back in a few days for an update (I'll probably get it done once my Christmas holidays start), but for now the main ideas still work
    Last edited by Griff; 12-22-2011 at 12:49 AM.

  23. #48
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Thanks

    I plan on reading through this and the other stickies a few more times so I'll hopefully have a grasp on what I'm doing when my computer comes in the mail and I can gtfo this iPad (iPads are nice btdubs GET ONE )

  24. #49
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    one of the better tutorials out there after generally finding my way around it with all the programs i should soon be able to construct a basic script also very clear and helpful instructions very easy to follow.

  25. #50
    Join Date
    Feb 2009
    Location
    inside Hello World! Application
    Posts
    232
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    when i do either of these functions it just hovers the inventory icon (the little bag) and does nothing... this is how i call it;

    Simba Code:
    repeat
    CutTreesOrWE;

    until(invcount = 20) or (InvFull));

    and doesnt work so i make my own FindcolorSpiral(); to find the log(cuz its wc script) in a certain Inventbox with custom xs,ys,xe,ye and works pretty good ^^

Page 2 of 9 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
  •