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

Thread: YoHoJo Video Tutorial #2: Making your VERY FIRST script for RUNESCAPE

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

    Default

    Quote Originally Posted by iitwinz View Post
    These tutorials are GREAT!

    btw, do you mind me using those procedures/functions you wrote on there?

    or would you rather we try to do it ourselves?
    Go for it I don't mind they're pretty basic.
    Just give credit I guess, and know a scriptthis simple will not get you SRL membership .
    Glad you enjoyed and learned!

  2. #27
    Join Date
    Nov 2011
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Great tutortial, and disreguard everything else you may have seen in my post.
    Last edited by i_liek2feesh; 12-21-2011 at 09:33 AM.

  3. #28
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tuts. They helped a ton. Using it and some help from others I've got a cray fish power fish lol You've done a great job of making everything understandable even to those of us who've never scripted. I can't thank you enough because without these I'd still feel like making a script would be beyond my capabilities.

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

    Default

    Thank you everyone for the positive feedback, enthusiasm, and for watching along and creating your first scripts!
    Hope to see many of you advance even further by looking at other scripts and tutorials, and I will be slowly making more video tutorials in the future!

  5. #30
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    I am having an issue with the script I have done. When I go to compile it, it will say:

    [Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(11:1): Semicolon (';') expected at line 10
    Compiling failed.

    And it ipens up a new tab with a script name "Simba" which it states is the Scar Standard Resource Library, simba.simba

    I am not sure what I have done wrong as I have copied word for word off you.

    Simba Code:
    program powerchopper

    {$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i SRL\SRL\Misc\Stats.simba}


    Const
      SRLStats_Username = 'a'; // SRL Stats Username
      SRLStats_Password = 'a'; // Your SRL Password
      BreakEvery        = '5'; // How many minutes to break after
      BreakFor          = '2'; // How long to break for
      Version           = '1.0B';
      NumberOfPlayers = 1;  // How many players
      StartPlayer = 0;  // Player to start with

    procedure DeclarePlayers;
    var 1:integer;
    begin
      NumberOfPlayers(NumberOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 NumberOfpPlayers-1 do
        players[i].BoxRewards := ['note', 'ostume', 'XP', 'amp'];

      with Players[0] do
      begin
        Name        := '';  // Player username
        Pass        := '';  // Player password
        Active      := True;
        Integers[1] := 4; // 1=bright copper, 2=Darkcopper, 3=tin, 4=iron.
        Integers[2] := 4; // Seconds to try mining rock before clicking another
      end;
    end;


    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End



    Function CheckAndClick(UpText, Option:String; X, T:Integer; RClick:Boolean):Boolean;
    begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x,y);
        If RClick Then
        begin
          Mouse(x, y, 0, 0 False);
          Results:= WaitOption(Option, 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0, True);
          Wait(100+Random(50));
          FFlag(0);
        End
      End
    End


    Procedure AntiBan;
    begin
      Case Random(250) of
        0: begin StatusGuise ('AntiBan') GameTab(tab_stats) HoverSkill ('Woodcut', False) GameTab(28) End;
        1: begin StatusGuise ('AntiBan') SleepAndMoveMouse(7000 + Random(500)) End;
        2: begin StatusGuise ('AntiBan') GameTab(tab_inv) ExamineInv; Gametab(28); end
        3: begin StatusGuise ('AntiBan') RandomAngle(1); End;
        4: begin StatusGuise ('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: begin StatusGuise ('AntiBan') Gametan(tan_stats) hoverskill ('random', False); GameTab(28); End;
      end;
    end;

    Procedure FailSafe (Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_Commit;
      ProgressReport;
      TerminateScript;
    end;




    Function ChopDown:Boolean;
    begin
      If FindObjectCustom(seX, seY, ['Chop', 'Down', 'own', 'hop', 'ree', 'tree'], [1318686, 1450785, 923159], 924954 , 10) Then
    End




    Begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        ChopDown;
      Until(False);
    End.

  6. #31
    Join Date
    Nov 2011
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    These text guides make no sense to me! you need to make them into more video tutorials FASTER so im not a

    Quote Originally Posted by YoHoJo View Post
    leecher noob failface
    !







    just kidding, take your time. the vid tuts are very helpful though



    EDIT: your next vid tut (if more) should be all about walking .
    Last edited by KFC; 01-01-2012 at 10:01 PM.

  7. #32
    Join Date
    Dec 2011
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TheJokester117 View Post
    I'm about to check these out today and tomorrow. Your first video was very helpful and I hope I can learn to make like a basic PowerChopper or something after these videos. I gotta start somewhere haha.

    E: So I finished both of the tutorial videos, and got the script working. It works great until the dropping procedure, and I get these errors:

    Simba Code:
    New window: 3997982
    [Hint] (91:10): Variable 'Result' never used at line 90
    Compiled successfully in 484 ms.
    SRL Compiled in 15 msec
    Error: Exception: FindDTMs: DTM[] is not valid. at line 150
    The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

    I've tried restarting Simba and my computer, thinking it might have been a memory leak of sorts to no avail. Any suggestions?
    Can't help you completly but, after using your DTMs variables, you must release it - or it'll downgrade your script -; and in the case of the error, I think that's because you didn't load your DTM correctly.


    dtmFish := DTMFromString('mwQAAAHic42RgYOBhgABOIOYHYikoZgdiYS BmBmIOqBpuIBYAYhGoWkYgZoPK5yXEA0kmApgwYCQCwwEAE0sC Gg==');


    Quote Originally Posted by Dan the man View Post
    I am having an issue with the script I have done. When I go to compile it, it will say:
    [Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(11:1): Semicolon (';') expected at line 10Compiling failed.
    Dan, you forgot adding an ";" in the end of the name of the program, it should be:

    program powerchopper;
    Last edited by Mokwa; 01-02-2012 at 01:04 AM.

  8. #33
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    Quote Originally Posted by KFC View Post
    EDIT: your next vid tut (if more) should be all about walking .
    Yes! A walking tut would be amazing. That is one thing I just can't seem to get right.




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  9. #34
    Join Date
    Jan 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Function CheckAndClick(UpText, Option:String;  RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption(Option, 2000);
          If Result Then FFlag(0);
        End else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait (100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    I get an error on mmouse "[Error] (49:10): Unknown identifier 'X' at line 48" I don't get it. I even re watched over that part a couple of times. Still didn't get it. Help?

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

    Default

    Need to declare it as variable
    (See 2nd and 3rd line of code I added)

    Function CheckAndClick(UpText, Option:String; RClick:Boolean):Boolean;
    var
    X, Y:Integer;
    Begin
    MMouse(x, y, 5, 5);
    If WaitUptext(UpText, 1500+Random(500)) Then
    Begin
    Result:=True;
    GetMousePos(x, y);
    If RClick Then
    Begin
    Mouse(x, y, 0, 0, False);
    Result:= WaitOption(Option, 2000);
    If Result Then FFlag(0);
    End else
    Begin
    Mouse(x, y, 0, 0,True);
    Wait (100+Random(50));
    FFlag(0);
    End;
    End;
    End;

  11. #36
    Join Date
    Nov 2011
    Posts
    132
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks for this great vid also you have good taste in music

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

    Default

    Quote Originally Posted by loser69 View Post
    Thanks for this great vid also you have good taste in music
    Hey thanks a lot, glad you all are enjoying them and learning so much.
    I'm starting to see a lot of people with their 'first scripts' based off of these tutorials, it's great to see!

    Yeah I try to keep some nice interesting lyric-less music in the back for you guys, glad you like that too!

  13. #38
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    I really liked it. But could you post your finished code?

  14. #39
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Love how you explain things! it really is easy to learn with the videos and if you think about it 40 minutes isn't that long to learn code scripting is easier then I thought I might be putting in some effort into it in the future thank you!
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

  15. #40
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    really helpful tutorials, im doing the first video of your second tutorial at the moment and when i try to do findobj i cant, i noticed on the youtube video you said to make sure you have SRl enabled but im getting this error

    "Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''

    any ideas as to the problem? I definitely have SRl and i ran all the auto updaters.

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

    Default

    I think I replied to your comment on youtube already.
    SRL update, change anything that says .scar at end to .simba instead and you'll be good.

  17. #42
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah sorry I haven't refreshed the youtube page because didn't want to lose my place, thanks for the tip I'll do that now

    EDIT: ok i can do findobj now, thanks again

  18. #43
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok i have done all the way up to the bit with the hooray we found a tree, when compiling im getting this error

    "Exception in Script: Unknown compiler directives at 5:3"

    you know why? sorry about all these questions im just a nooby leech ^^

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

    Default

    Can't help at all unless I see code.
    Copy/paste it here and put Simba tags around it.
    5:20am and I haven't slept though, I'll get to it later .

  20. #45
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program PowerChopper;
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    {$1 SRL\SRL\Misc\Stats.simba}

    const
      SRLStats_User     = '';   // Your SRL Stats Username
      SRLStats_Password = '';   // Your SRL Stats Password
      BreakEvery        = 120;  // How long to bot before break
      BreakFor          = 7;    // Break Length
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
      Version           = '1.0';
    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards := ['XP']

      with PLayers[0] do
      begin
        Name          := ''; //Username.
        Pass          := ''; //Password.
        Active        := '';
        Integers[1]   := ''; //1=BrightCopper, 2=DarkCopper, 3=Tin, 4=Iron.
        Integers[2]   := ''; //Seconds to try mining a rock before clicking another.
      end;

    end;


    Procedure StatsGuise(wat:String);
    begin
      Status(wat);
      Disguise)wat);
    end;

    Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUpText(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption(Option, 2000);
          If Result Then FFlag90);
        End Else
        Begin
          Mouse(x, y, 0, 0, True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    Procedure ANtiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcut', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse (2000 + Random(4000)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(tab_Stats); Wait(2000 + Random 1500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill ('random', False); GameTab(28); End;
      End;
    End;


    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    End;


    Function ChopDown:Boolean;
    Begin
      If FindObjCustom(X. Y, ['Chop', 'down', 'p d'], [2109748, 3164508, 2571332, 3098458, 3625833, 1252894, 1384736, 1252637], 30) Then
      WriteLn(':D:D:D:D:D:D');


    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        ChopDown;
      Until(false);


    end.

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

    Default

    Man odd error, normally it tells you what line is wrong, you got a lot of small errors I caught by eye though.

    Disguise)wat); Should be Disguise(wat);

    If FindObjCustom(X. Y, should be If FindObjCustom(X, Y,

    Need an end for your ChopDown function.

    Just keep comparing your code to the video's and try to find it
    Can't seem to help much more because Simba isn't say which line is the problem.

  22. #47
    Join Date
    Feb 2008
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks for the help ill have a look

    EDIT: Spent almost an hour comparing the scripts and after the couple typos have been changed it's exactly the same, still getting the same error.

    Exception in Script: Unknown compiler directives at 5:3
    Last edited by Giant Panda; 01-11-2012 at 02:28 PM.

  23. #48
    Join Date
    Jan 2012
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh gawd, I think im a leecher :3, il try and follow your guide, thanks ))))

  24. #49
    Join Date
    Jan 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    Well time to actualy make my own script =D
    instead of just offering help.
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly.

  25. #50
    Join Date
    Dec 2008
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Procedure DropLogs;
    var
      x, y, LogDTM, I: Integer;
      SlotBox:TBox;
      LogPattern:TIntegerArray;
    begin
      LogDTM:= DTMFromString('m1gAAAHic42JgYOBngABmIOYBYgkglgNiSSCWAmJRqBpuIBYGYg4gFoey+YCYC6oXBJiAOMReBcrCj/8zEAcYicQIAACI7gL1');
      LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
      For I:=0 To 27 Do
      begin
        SlotBox:=InvBox(LogPattern[I]);
        if FindDTM(LogDTM, x, y, SlotBox.X1,SlotBox.Y1,SlotBox.X2,SlotBox.Y2) then
         begin
           MouseItem(LogPattern[I],False);
           ChooseOption('Dro');
         end;
       end;

    end;

    I keep getting
    Code:
    [Error] (131:35): Type mismatch at line 130
    Thats the MouseItem(LogPattern[I],False);
    And I can not figure it out I'm sorry it's probably somthing really dumb

    BTW once I get this figured out I'll be working on my first script thanks a bunch
    Last edited by poopy2177; 01-14-2012 at 08:51 PM.
    My Soul Wars Scipt Proggress:[100%....]
    Probably won't release though I like it for myself

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
  •