Results 1 to 4 of 4

Thread: Hi First Script, How to Add...

  1. #1
    Join Date
    Jul 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Hi First Script, How to Add...

    how do i add this randoms to my main loop?

    Code:
    procedure Run;
    Begin
      if(not(LoggedIn))then Exit;
      WriteLn('>>Running Away');
      RunAwayDirection('N');
      Wait(12000 + random(2000));
      RunBack;
    end;
    
    Procedure Randoms;
     Begin
      If(not(LoggedIn))then Exit;
      FindTalk;
      Wait(10)
      FindNormalRandoms;
      if (FindFight) then Run;
     end;

  2. #2
    Join Date
    Jul 2007
    Location
    UK
    Posts
    307
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Just put it in your main loop like you would a normal procedure..
    SCAR Code:
    program Randoms;
    procedure Run;
    Begin
      if(not(LoggedIn))then Exit;
      WriteLn('>>Running Away');
      RunAwayDirection('N');
      Wait(12000 + random(2000));
      RunBack;
    end;

    Procedure Randoms;
     Begin
      If(not(LoggedIn))then Exit;
      FindTalk;
      Wait(10)
      FindNormalRandoms;
      if (FindFight) then Run;
     end;

    begin
    Randoms;
    end.

  3. #3
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

    Default

    yup cathering summed it up nicely. that would work well, provided you called Randoms often enough, I try to have it called roughly 4 times a second in my scripts.

  4. #4
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, the mainloop is the bunch of procedures that the script has to do.
    You may have 1000 procedures made, but if you don't "load" them in your mainloop, the script will do nothing except compile
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

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
  •