Page 8 of 9 FirstFirst ... 6789 LastLast
Results 176 to 200 of 209

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

  1. #176
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Hey. I loved your guide. I wonder if you could post the code of the script or send me via PM. Please it would be great

  2. #177
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    Hey. I loved your guide. I wonder if you could post the code of the script or send me via PM. Please it would be great
    If i'm not mistaken, he mentions something about writing it yourself because it's good practice. I know its a bit hard to see but try your best and write the functions yourself. I'm not trying to be mean but I bet that when you type them, you will feel like you learned something.

  3. #178
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Plus this was made ages ago, I do not think he still has it :P

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  4. #179
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Silentcore View Post
    If i'm not mistaken, he mentions something about writing it yourself because it's good practice. I know its a bit hard to see but try your best and write the functions yourself. I'm not trying to be mean but I bet that when you type them, you will feel like you learned something.
    right right right I think you're right. I'll write the code. Thanks

  5. #180
    Join Date
    Jan 2012
    Posts
    369
    Mentioned
    6 Post(s)
    Quoted
    91 Post(s)

    Default

    After a while coding, stuff keeps getting easier and easier. Although I saw some scripts with incredible advanced coding... I need to study some more to reach that level.

  6. #181
    Join Date
    Oct 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    [Error] (4:1): Semicolon (';') expected at line 3
    Compiling failed.



    As far as I know, I"m actually copying your first youtube video and it worked like 5 seconds ago but then when I tried to play it instead of compile it. It gives me this shit


    procedure Startgame;
    begin
    movemouse (251, 381);
    clickmouse (251, 381, 1);
    wait (500);
    movemouse(436, 357);
    clickmouse(436, 357, 1);
    wait(500)
    movemouse (374, 172);
    clickmouse (374, 172, 1);
    wait (500);
    end;

  7. #182
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You need to name the program first. Just put Program Programname; as your first line, feel free to change the name to whatever.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  8. #183
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Edit: I lied, that's not line 3.

  9. #184
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    Quote Originally Posted by Hapayboy View Post
    [Error] (4:1): Semicolon (';') expected at line 3
    Compiling failed.



    As far as I know, I"m actually copying your first youtube video and it worked like 5 seconds ago but then when I tried to play it instead of compile it. It gives me this shit


    procedure Startgame;
    begin
    movemouse (251, 381);
    clickmouse (251, 381, 1);
    wait (500);
    movemouse(436, 357);
    clickmouse(436, 357, 1);
    wait(500)
    movemouse (374, 172);
    clickmouse (374, 172, 1);
    wait (500);
    end;
    instead of doing movemouse, you can directly use clickmouse
    but its nicer to change clickmouse into clickmouse2 as it allows you to change the script in future for humanlike mouse movements

  10. #185
    Join Date
    Oct 2012
    Posts
    758
    Mentioned
    6 Post(s)
    Quoted
    282 Post(s)

    Default

    DTM is used in video#2 and video#3.
    How come the DTM is never released in your TuT?

    I mean no offence by questioning, but based on what I read about DTMs and bitmaps, you can cause memory leaks by not releasing them...?
    Last edited by Runehack123; 10-26-2012 at 04:34 PM.

  11. #186
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default


    Like Lol? Condoms = YohojoSRL?
    :d



    ^^

  12. #187
    Join Date
    Oct 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I have a script for a runescape private server that steals from stalls and on this rsps (soulsplit) it gives you straight Gp at pretty fast rates, This is my script I have so far it is **"NEXT"** to flawless after 6 hours or the eventually it will mess up somewhere (the server has a "macro dection system and teleports you after a few clicks). I'm looking for something that can have it reset it to a location, i have tried it and failed I'm saying if it can't find lets so COLOR then make it do fixit, I've had some ideas on looking off other scripts and none are a bighelp
    Fixit = trying to do what my problem is
    Stealsilk = finds the color and steals it
    program SilkStealer;
    {$i srl\srl.simba}
    var
    const
    COLOR = 1414674; //replace 000 with the numbers you get for each stall.
    AMOUNT = 22767; //replace 000 with the amount gained from when you steal from the stall
    var
    x, y, w, h, loot, money :Integer;
    procedure StealSilk;
    begin
    GetClientDimensions(w, h);
    if FindColor(x, y, COLOR, 0, 0, w-1, h-1)then
    begin
    loot := (loot + 1);
    Mouse(x, y, 0, 0, True);
    end else
    wait(100);
    end;
    procedure teleport;
    begin
    movemouse (1045,173)
    wait (25)
    clickmouse (1045,173,1)
    wait(500)
    movemouse (871,266)
    wait (25)
    clickmouse (871,266,1)
    wait (2000)
    movemouse (559, 353)
    wait (500)
    clickmouse (559,353,1)
    wait (10000)
    end;
    procedure fixit;
    begin
    If NoChange then
    teleport;
    end;
    procedure login;
    begin
    if FindColor(x, y, 1478316, 0, 0, w-1, h-1)then
    begin
    mouse(719, 348, 0, 0, true);
    wait(15000)
    end else
    wait(1)
    end;
    begin
    ClearDebug;
    SetUpSRL;
    MouseSpeed := 1000;
    AddOnTerminate('Proggy');
    repeat
    ClearDebug;
    Stealsilk;
    FixIt;
    login;
    until (IsKeyDown(114)); //pres F3 to stop and continue to Proggie!
    end.

  13. #188
    Join Date
    Jan 2012
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    All of you Tutu or simply awsome ! Thanks alot

  14. #189
    Join Date
    Oct 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I really like your tutorial! After watching your first video I attempted to write my own code for spank the monkey. I wrote it and then tried getting it to run and it wouldn't run...I then went back and compared your script to mine and they seemed identical. It seems the code for "holdmouse" is not functioning whenever I try it. Any opinions?

    Code:
    program SpankTheMonkey;
    
    var
      x, y:Integer;
    
    begin
      MoveMouse(545, 189);
      HoldMouse(545, 221, 1);
      MoveMouse(22, 190);
      ReleaseMouse(x, y, 1);
    end.

  15. #190
    Join Date
    Nov 2012
    Location
    N/A
    Posts
    185
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    This is the simba script used in part2#1 and part2#2 All updated to the latest simba release:
    Simba Code:
    program PowerChopper;

      {$DEFINE SMART}
      {$I SRL/SRL.simba}
      //{$i SRL/SRL/Misc/Stats.simba}


    Const
      SRLStats_Username = ''; //Your SRL Stats Username
      SRLStats_Password = ''; //Your SRL Stats Password
      BreakEvery        = 120; //How many minutes to break after
      BreakFor          = 5; //How long to break for
      Version           = '1.0';
      NumbOfPlayers     = 1; //How many players you are using
      StartPlayer       = 0; //Player to start autoing with! (0 means first char)

    Var
      TooLong: Integer;

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := '';     //Player nickname - 3-4 letters of Player username.
        Active      := True;
        Integers[1] := 4;       //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
        Integers[2] := 4;      //Seconds to try mining rock before clicking another.
      end;

     // with Players[1] do
     // begin
     //   Name        := '';     //Player username.
     //   Pass        := '';     //Player password.
     //   Nick        := '';     //Player nickname - 3-4 letters of Player username.
     //   Active      := True;
     //   Integers[1] := 4;       //1=BrightCopper,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;

    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_stats) Hoverskill('Woodcutting', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); 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(3000 + Random(500)); 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;
      Writeln(Reason);
      TerminateScript;
    End;

    Function ChopDown:Boolean;
    Var
      seX, SeY, PlusOne, TreeCounter: Integer;
    Begin
      MarkTime(TooLong);
      FindNormalRandoms;
      PlusOne:= InvCount + 1;
      //If FindObjCustom(seX, seY, ['Chop', 'down', 'p d'], [3426909, 2833741], 5) Then
      Sex:=MSCX;
      Sey:=MSCY;
      If FindObjTPA(SeX, SeY, 2899791, 10, 1, 15, 60, 600, ['Cho']) Then
      Begin
        StatsGuise('Found a tree');
        GetMousePos(seX, seY);

        Case Random(2) Of
           0: Mouse(seX, seY, 5, 5, True);
           1: Begin
                Mouse(seX, seY, 5, 5, False);
                WaitOption('Chop', 500);
              End;
        End;

        Flag;
        MarkTime(TreeCounter);
        If (TimeFromMark(TooLong) > 30000) Then
        FailSafe('Could not find Tree');
        Repeat
          If (TimeFromMark(TooLong) > 30000) Then
          FailSafe('Could not find Tree');
          FindNormalRandoms;
          StatsGuise('Antiban and Waiting');
          Antiban;
          Wait(1000);
          If InvCount=Plusone Then
            WriteLn('Chopped log successfully');
        Until (InvCount=Plusone) Or (TimeFromMark(TreeCounter) > 5000)

      End;
    End;

    Procedure DropLogs;
    Var
      SeX, SeY, LogDTM, I:Integer;
      SlotBox:TBox;
      LogPattern:TIntegerArray;


    Begin
      MarkTime(TooLong);
      LogDTM := DTMFromString('mggAAAHicY2NgYFBlZmBQAWJxIFYEYn0gNgLivYwMDJuBeBcQnwDiI0C8B4j9rJWAupgw8H8G7IARB4YAAHhRBy0=');
      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]
      StatsGuise('Dropping Logs');
      For I:=0 To 27 Do
      Begin
        FindNormalRandoms;
        StatsGuise('Dropping Log:' + IntToStr(I));
        SlotBox:=InvBox(LogPattern[I]);
        If FindDTm(LogDTM,Sex,Sey,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2)Then
        Begin
          MouseItem(LogPattern[I],mouse_Right);
          ChooseOption('Dro');
        End;
      End;
      MarkTime(TooLong);
    End;

    begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        ChopDown;
        If InvFull Then
          DropLogs;
      Until(false);

    End.

    I reallly REALLY REALLY do suggets you watch the videos first. But i am posting this because in all honesty i was lost as well with all of this, i had to download his video from youtube in 1080p to watch and pause and watch and pause until i got all of the script. And in the end i missed 2 very small things a ; and mouse_Right one of them was an update. After 5 hours of hard work watching these tutorials to then have a script not work is rather upsetting. So after spending another 3 hours on these forums i was given help and now the script is working fine.

    If the admins to not approve please remove my post. But i really do think that if you guys want to train newbies like myself you need something that is up-to-date. I have also posted the updates on the Paint script/tutorial.

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

    Default

    Hello World

  17. #192
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Hello World
    Hi there

    Loved your tutorials Very helpful

    Creds to DannyRS for this wonderful sig!

  18. #193
    Join Date
    Dec 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Can you tell me how to fix this problem?
    [Hint] C:\Users\2345324\Desktop\PowerChopper.simba(91:10) : Variable 'Result' never used at line 90
    [Error] C:\Users\234
    [Error] C:\Users\Sam5324\Desktop\PowerChopper.simba(170:4) : Identifier expected at line 169
    Compiling failed.
    program PowerChopper;

    {$DEFINE SMART}
    {$i SRL/SRL.simba}

    const
    SRLStats_Username = '';
    SRLStats_Password = '';
    NumbOfPlayers= 1;
    StartPlayer= 0;
    Var
    Toolong:Integer;

    procedure DeclarePlayers;
    var i:integer;
    begin
    NumberOfPlayers(NumbOfPlayers);
    CurrentPlayer := StartPlayer;
    for i := 0 to NumbOfPlayers-1 do
    Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

    with Players[0] do
    begin
    Name := '';
    Pass := '';
    Active := True;
    Integers[1] := 4;
    Integers[2] := 4;
    end;

    end;


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


    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean;
    Begin
    MMouse(x, y, 5, 5);
    If WaitUptext(UpText, 1500+Random(500)) Then
    Begin
    Result:=True;
    GetMousePos(x, y);

    Case RClick Of

    'R':
    Begin
    Mouse(x, y, 0, 0, False);
    WaitOption('hop', 4000);
    FFlag(0);
    End;

    'L':
    Begin
    Mouse(x, y, 0, 0,True);
    Wait(100+Random(50));
    FFlag(0);
    End;

    End;
    End;

    End;

    Procedure Antiban;
    Begin
    Case Random(5000) Of
    0: Begin StatsGuise ('Antiban') GameTab(Tab_Stats) HoverSkill('Woodcut', False) GameTab(28) End;
    1: Begin StatsGuise ('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
    2: Begin StatsGuise ('Antiban') GameTab(tab_Inv)ExamineInv; GameTab(28); End;
    3: Begin StatsGuise ('Antiban') GameTab(Tab_Stats); Wait (7000 + Random(500)); GameTab(22) End;
    End;
    End;


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

    Function ChopDown:Boolean;
    Var
    X, Y, PlusOne, TreeCounter, TooLong: Integer;
    Begin
    MarkTime(TooLong);
    FindNormalRandoms;
    PlusOne:= InvCount + 1;
    if FindObjCustom(X, Y, ['Chop', 'Down', 'p d'], [2239796, 2766654, 1252636], 5) Then
    x:=MSCX;
    y:=MSCY;
    If findObjTPA(X, Y, 3426909, 10, 1, 15, 60, 600, ['Cho']) Then
    Begin
    StatsGuise('we got one');
    GetMousePos(x, y);

    Case Random(2) Of
    0: Mouse(X, Y, 5, 5, True);
    1: Begin
    Mouse(X, Y, 5, 5, False);
    WaitOption('Chop', 4000);
    End;
    End;

    Flag;
    MarkTime(TreeCounter);
    If (TimeFromMark(TooLong) > 120000) Then
    FailSafe('Cant find tree');

    Repeat
    If (TimeFromMark(TooLong) >120000) Then
    FailSafe('Cant find tree');
    FindNormalRandoms;
    StatsGuise('Antiban')
    FailSafe('Cant find tree');
    Antiban;
    MarkTime(TreeCounter);
    Antiban;
    Wait(1000);
    If InvCount=PlusOne Then
    Writeln('we got one');
    Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 17000)

    End;
    End;

    Procedure DropLogs;
    var
    X, Y, LogDTM, I:Integer;
    SlotBox:TBox;
    LogPattern:TIntegerArray;

    Begin
    MarkTime(TooLong);
    LogDTM := DTMFromString('mwQAAAHic42RgYLBnYmCwAGJjIDYDYlcgdg FiDyaIHAjXMDIwtABxExBXAXEZlF0PxO1AXA7EsW6aDM2ZVgw1 yeZgOtxRDSwGwiEOqmA+MYCRCAwHABzIDsk=');
    LogPattern:=([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ,18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]);
    StatsGuise('dropping logs:' + IntToStr(I));
    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],0);
    ChooseOption('Dro');
    End;

    End;



    Begin

    SetupSRL;
    DeclarePlayers;
    Repeat
    ChopDown
    If InvFull Then;
    DropLogs
    Until(False);

    End.

  19. #194
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    ^use simba tags. Result var not being used is because you used a function instead of a procedure (functions should be used to return a result.)

  20. #195
    Join Date
    Dec 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I still cant get it working

  21. #196
    Join Date
    Jan 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Compiling Error

    Thanks for the tutorial, it's really well made, anyway;
    here is my problem.

    [Hint] C:\Simba\Scripts\PowerChopper.simba(70:10): Variable 'Result' never used at line 69
    [Error] C:\Simba\Scripts\PowerChopper.simba(126:40): Type mismatch at line 125
    Compiling failed.

    line 125 consists of the following;

    119: Begin
    FindNormalRandoms;
    StatsGuise('Dropping Log:' + IntToStr(I));
    SlotBox:=InvBox(LogPattern[I]);
    If FindDTm(LogDTM,SeX,SeY,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
    Begin
    125: MouseItem(LogPattern[I],False);
    ChooseOption('Dro');
    End;
    End;
    MarkTime(TooLong);
    130: End;

    Added the line numbers as a reference.

  22. #197
    Join Date
    Apr 2012
    Location
    Vancouver, BC
    Posts
    291
    Mentioned
    1 Post(s)
    Quoted
    84 Post(s)

    Default

    Hey YoHoJo,

    Loved your script ... used it to create my own Citadel Loomer and after a few errant/missed semi-colons finally got it to work. I then went back to another Citadel Loom script and was able to decipher the code based on everything you had taught in this tutorial! Wicked job ... really appreciate it!

    Cheers,

    DN

  23. #198
    Join Date
    Apr 2012
    Location
    Vancouver, BC
    Posts
    291
    Mentioned
    1 Post(s)
    Quoted
    84 Post(s)

    Default

    I have a follow up question ... I am having the same issue your tutorial was having where it would left click even if the text was not there. (ie it will click a color similar to the loom even though it doesnt say "weave"). Was there a better function to be using or a reason why this is happening?

  24. #199
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by digitalninja View Post
    I have a follow up question ... I am having the same issue your tutorial was having where it would left click even if the text was not there. (ie it will click a color similar to the loom even though it doesnt say "weave"). Was there a better function to be using or a reason why this is happening?
    Try using a secondary UpText check like WaitUpText('text', WaitTime)
    Current Project: Retired

  25. #200
    Join Date
    Apr 2012
    Location
    Vancouver, BC
    Posts
    291
    Mentioned
    1 Post(s)
    Quoted
    84 Post(s)

    Default

    Quote Originally Posted by Gucci View Post
    Try using a secondary UpText check like WaitUpText('text', WaitTime)
    Thanks Gucci ... after watching the 2nd script it also looks like the FindObjTPA worked a little better as well. Amazing how a few little 'tweaks' to tolerance made everything run smooth! I was also on the IRC channel this morning and didnt understand 1/2 of what was being said (it was about lape and 1/2 is optimistic ... I didnt understand a damn word). Just means I got me some more tutorials to watch!

Page 8 of 9 FirstFirst ... 6789 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
  •