Results 1 to 12 of 12

Thread: My first SRL Script need Pointers

  1. #1
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My first SRL Script need Pointers

    As title says first SRL Script and i need some pointers . So if any1 as any then go ahead and post em . Help me make this an ownage script. Yay i got it working. Guess what the problem was. It's kinda sad but i forgot to put Until(false) at the end of the script :P only reason it didnt work.



    Code:
    pprogram Hey321sNoobFighter;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fighting.scar}
    {.include SRL/SRL/extended/xAntiRandoms.scar}
    
    var
    MColor1, MColor2, MColor3: Integer;
    
    var
    MonsterName: string;
    
    var
    MonstersFought: Integer;
    
    Const
    Tolerance=5;
    fightmode=0;
    NumLoops=5;
    waittime=1000;
    procedure Colours;
    begin
    MonsterName:='Cow';//name of monster to fight.
    MColor1:=000000;//first colour on the monster.
    MColor2:=000000;//second colour.
    MColor3:=000000;//self explanotory.
    end;
    
    Procedure DeclarePlayers;
    begin
    
    HowManyPlayers:=4;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;
    
    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active :=True;
    
    Players[1].Name :='';
    Players[1].Pass :='';
    Players[1].Nick :='';
    Players[1].Active :=True;
    
    Players[2].Name :='';
    Players[2].Pass :='';
    Players[2].Nick :='';
    Players[2].Active :=True;
    
    Players[3].Name :='';
    Players[3].Pass :='';
    Players[3].Nick :='';
    Players[3].Active :=True;
    end;
    
    
    procedure Login;
    begin
    if(not loggedin)then
    loginplayer
    end;
    
    procedure NoBan;
    begin
    AntiBan;
    BoredHuman;
    RandomMovement;
    FindMod;
    RotateEvery(10);
    FindNormalRandoms;
    if (not (loggedin)) then;
    begin
    NextPlayer(true);
    end;
    end;
    
    procedure Setup;
    begin
    SetupSRL;
    SetUpDemon;
    SetupSandWich;
    declareplayers;
    Login;
    SetFightMode(FightMode);
    end;
    
    
    procedure ProgressReport;
    begin
    Writeln('[]---////////////////////\\\\\\\\\\\\\\\---[]');
    Writeln(' Thanks for using Hey321s');
    Writeln(' Auto-Fighter ');
    Writeln(' Worked for:' +ScriptTime2(2));
    Writeln(' Monsters Fought: '+IntToStr(MonstersFought)+'');
    Writeln('[]---////////////////////\\\\\\\\\\\\\\\---[]');
    end;
    
    Procedure Fighting;
    begin if not (InFight) then begin;
    FindMonster(MColor1, MColor2, MColor3,tolerance, MonsterName);
    KAttackMonster(MColor1,MColor2,MColor3,tolerance, MonsterName);
    while InFight do
    wait(waittime);
    end;
    end;
    
    
    begin
    Setup;
    Colours;
    repeat
    NoBan;
    Fighting;
    NoBan;
    ProgressReport;
    if (MonstersFought=NumLoops) then
    NextPlayer(true);
    until(false)
    end.

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Check out some other scripts for the player switching ( WT-Fakawi).

    Put your setup stuff in a separate procedure and have highest angle, compass north, set chat if needed.

    Check out other scripts for random use also.

    Umm never written a fighter before, someone who has can help you more.

  3. #3
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No highest angle stuff is needed, gonna look for player switching now. Also what do you mean by "random use"?

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I meant how to use antirandoms.

  5. #5
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, this is wierd. I've checked out a few different scripts that have multi-char support, yet i can't figure out how to use it. Do i just do this:

    Code:
    The stuff that lets you do that here.
    
    
    Then in my main loop put:
    
    If CowsKilled=NumLoops then
    NextPlayer;
    Did i do that right?

  6. #6
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, make a part called "playersetup"

    for randoms, just do findnormalrandoms;
    that will do all of the randoms that you have in your code.

    copy the player setup from srl template (/includes/srl/scripts/SRLtemplate.scar)

    add a failsafe to run away if your hp is below a %

    also wait(waittime+random(1000));
    and i believe it is SLEEP, not wait, but a better procedure is SLEEPANDMOVEMOUSE() it does the same thing as sleep.
    jagex can detect when the waits are exact amounts to the millisecond, every time.

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  7. #7
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Yea pretty much. You need this in the beginning

    Procedure DeclarePlayers;
    begin

    HowManyPlayers:=7;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    Players[0].Name :='';
    Players[0].Pass :='';
    Players[0].Nick :='';
    Players[0].Active :=True;



    end;
    You need the nick for randoms.

    In main loop:

    General Setup etc
    Login the first time if neeeded
    Repeat
    Setup for individual player
    walk to mining/fighting/etc place if needed
    repeat
    mine a rock/fight a monster/etc
    until mined a load/inventory filled with monster drops
    walk to bank and do banking stuff/drop load etc

    if done enough loads then next player

    until false

    This format is just a general guide

    Also make use of if not(loggedin)

  8. #8
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You also need to add a Nickname for each player if you want the SRL randoms to work for you.

    A Nickname is 3-5 non-capitalized letters from your character name. It's better if they are not common. Like if your character name was 'Powerlvls', you would not want to use 'Powe' because it's capitalized, and you wouldn't want to use 'lvls' because people are always saying that. So, you could pick 'erlv' or 'werl'.

  9. #9
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wait, why not Powe? people rarely capitolize peoples names when they are talking, and randoms always do!

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  10. #10
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Because Powe is more likely to be used by a person than a random. Also did i set that up right? Like at the bottom
    Code:
    If (MonstersFought=NumLoops) Then
    NextPlayer;
    Would that do it?

  11. #11
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Powe? i never say

    "hey, im PowerMining" lol

    And check out my pascal interpreter!
    <R0b0t1> No, really, I went to a bar and picked up a transvestite.

  12. #12
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no someone else would say some like this "powerlvls mining lvl?" which would set off randoms as the P in power would be capitalized. I do it all the time to fuck up what macros i see.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. c++(pointers) help
    By hackncrack1 in forum C/C++ Help and Tutorials
    Replies: 10
    Last Post: 05-25-2009, 01:38 PM
  2. Pointers?
    By mat_de_b in forum C/C++ Help and Tutorials
    Replies: 8
    Last Post: 11-05-2007, 09:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •