Results 1 to 6 of 6

Thread: For a first script

  1. #1
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default For a first script

    I was thinking about applying my first script attempt as a newbie with no scripting background towards a Chaos Tunnels monster killing script.

    Would this be a wise place for me to start out?

    Any opinion welcomed, as well as a better place to start if my idea of a starting point isn't tangible.

    Cheers

  2. #2
    Join Date
    Jan 2012
    Location
    Texas
    Posts
    241
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I'm sure you Could do it, but if you have no scripting experience with any language, I think that a woodcutter is always a good place to start. I always recommend a draynor village willow cutter, but you can do whatever you set your mind to. Just have patience/perseverance and give it a lot of your time.

    Good Luck!
    Coming together is a beginning.
    Keeping together is progress.
    Working together is success.

  3. #3
    Join Date
    Nov 2011
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I too am about to set off on my first script journey. Chaos tunnel killer... Sounds pretty good man. Kinda complicated for a first script though. I plan and doing some type of woodcutter (like Spiker recommended). Maybe yews + banking so I can get regular script experience and also walking and banking experience too.

    Basically for a first script, at least in my opinion, should help you learn and figure out as much stuff as possible. Just my two cents. Whatever you do though, good luck with it!
    It's not brainfreeze. It's Flavo-Masochism.

  4. #4
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Followed the first YoHoJo's video tutorial; was legit.
    One thing I had to redo was the DeclarePlayers procedure, which was outdated I believe.

    Here's what I came up with :

    Simba Code:
    program PowerChooper;

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


    Const
      SRLStats_Username = '';               //Enter your SRL Stats Username
      SRLStats_Password = '';               //Enter your SRL Stats Password
      BreakEvery        = 185;                //How many minutes to break after
      BreakFor          = 20;                  //How long the break will be for after you choose to break, found in the line above
      Version           = '1.0';                //The version of which this script is
      NumbOfPlayers     = 1;                //How many players are used in this script?
      StartPlayer       = 0;                  //The player you want to start


      Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name        := '';
          Pass        := '';
          Nick        := '';
          Pin         := '';
          BoxRewards  := ['XP', 'xp', 'lamp', 'Gem', 'ithril', 'oal', 'une'];
          LampSkill   := Skill_Magic;
          Active      := True;
        end;
      end;


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

    Function CheckAndClick(UpText:String; X,Y:Integer; Stronger:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 5000) Then
      Begin
        GetMousePos(x, y);
        If Stronger Then
        Begin
          Mouse(X, Y, 0, 0, False);
          Result:=WaitOption('tta', 3000)
        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('Woodcutting', False) GameTab(28) End;
      1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(9000 + Random(890)); 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(4000 + 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;
      //ProgressReport;
      TerminateScript;
    End;


    Function ChopDown:Boolean;
    Var
      seX, seY, PlusOne, TreeCounter: Integer;
    Begin
      PlusOne:= InvCount + 1;
      //FindObjCustom(x, y, ['att', 'ack'], [123456, 123456], 5);
      If FindObjCustom(seX, seY, ['Chop', 'down'], [2176055, 2306611, 2635579, 2108462, 2043438, 1714219, 1252122], 5) Then
      Begin
        StatsGuise('Hooray, we found a tree');
        GetMousePos(Sex, Sey);

        Case Random(2) Of
          0: Mouse(SeX, SeY, 5, 5, True); //True is for left clicking, and fasle is for right clicks
          1: Begin
              Mouse(SeX, SeY, 5, 5, False);
              WaitOption('Chop', 500); //Will wait until the option chop appears on the uptext or after 500 milliseconds has elasped
             End;
        End; //Cases always need to end
        Repeat
          MarkTime(TreeCounter);
          Antiban;
          Wait(100);
          If InvCount=PlusOne Then
            Writeln('We got one');
        Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

      End;
    End;










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



    end.

    Had to pause the video to see what he typed frequently.
    This was good practice, and hopefully I can advance from WC scripts to more advanced soon :>

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

    Default

    Great job , you can do it!
    Try to make it bank now, SPS is a great way to start (Simple walking method)




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

  6. #6
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by R4nd0m View Post
    Great job , you can do it!
    Try to make it bank now, SPS is a great way to start (Simple walking method)
    Ya, but take a look at DTM Walking too.

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
  •