Results 1 to 3 of 3

Thread: Script help~!

  1. #1
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Script help~!

    Can somebody help me with errors I can't compile, also this is a test, what would I have to add to get this too Cast stun on a lesser demon?

    Simba Code:
    program New;
    {.include SRL/SRL.scar}

    var
      DemonColor: integer;

    var
      SpellColor: integer;


    const
      SpellType = '';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 2;
      CurrentPlayer := 1;
      NumberOfPlayers(HowManyPlayers);

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

    procedure AntiBan;
    begin
      if (not (LoggedIn)) then
        Exit;
      case Random(60) of
        0: RandomRClick;
        1: GameTab(1 + Random(12));
        2: PickUpMouse;
        3: RandomMovement;
        4: BoredHuman;
      end;
    end;

    procedure FindRandoms;
    begin
      FindNormalRandoms;
      RunAway('n', True, 1, 3000);
    end;

    procedure SetStun;
    begin
      case lowercase(SpellType) of
       'stun': SpellColor := 13091512;
      end;
    end;

    procedure CastStun;
    var
      X, Y: Integer;
    begin
      if FindColorSpiral(X, Y, SpellColor, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        if isuptext('ast') then
        begin
          GetMousePos(X, Y);
          Wait(50+random(50));
          Mouse(X, Y, 4, 4, True);
        end;
      end;
    end;

    procedure SetDemon;
    begin
      case lowercase(SpellType) of
       'demon': DemonColor := 2702687;
      end;
    end;

    procedure StunDemon;
    var
      X, Y: Integer;
    begin
      if FindColorSpiral(X, Y, DemonColor, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        if isuptext('emon') then
        begin
          GetMousePos(X, Y);
          Wait(50+random(50));
          Mouse(X, Y, 4, 4, True);
        end;
      end;
    end;

    procedure WhileCasting;
    var
      C: Integer;
    begin
      if not (LoggedIn) then
        Exit;
      MarkTime(C);
      begin
        While (TimeFromMark(c)) < 6000 do
        begin
          FindRandoms;
          Wait(100+random(50));
          AntiBan;
          Wait(500+random(500));
          if FindBlackChatMessage('anage') then
            Exit;
        end;
      end;
    end;



    procedure MainLoop;
    begin
      if not LoggedIn then
        LogInPlayer;
      SetDemon;
      repeat
        repeat
          StunDemon;
      Until False


    begin
      SetupSRL;
      MainLoop;
    end.

  2. #2
    Join Date
    Dec 2011
    Location
    P2P :)
    Posts
    561
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Simba Code:
    program New;
    {.include SRL/SRL.scar}

    var
      DemonColor: integer;

    var
      SpellColor: integer;


    const
      SpellType = '';

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 2;
      CurrentPlayer := 1;
      NumberOfPlayers(HowManyPlayers);

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

    procedure AntiBan;
    begin
      if (not (LoggedIn)) then
        Exit;
      case Random(60) of
        0: RandomRClick;
        1: GameTab(1 + Random(12));
        2: PickUpMouse;
        3: RandomMovement;
        4: BoredHuman;
      end;
    end;

    procedure FindRandoms;
    begin
      FindNormalRandoms;
      RunAway('n', True, 1, 3000);
    end;

    procedure SetStun;
    begin
      case lowercase(SpellType) of
       'stun': SpellColor := 13091512;
      end;
    end;

    procedure CastStun;
    var
      X, Y: Integer;
    begin
      if FindColorSpiral(X, Y, SpellColor, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        if isuptext('ast') then
        begin
          GetMousePos(X, Y);
          Wait(50+random(50));
          Mouse(X, Y, 4, 4, True);
        end;
      end;
    end;

    procedure SetDemon;
    begin
      case lowercase(SpellType) of
       'demon': DemonColor := 2702687;
      end;
    end;

    procedure StunDemon;
    var
      X, Y: Integer;
    begin
      if FindColorSpiral(X, Y, DemonColor, MSX1, MSY1, MSX2, MSY2) then
      begin
        mmouse( x, y, 4, 4 );
        wait(80+random(60));
        if isuptext('emon') then
        begin
          GetMousePos(X, Y);
          Wait(50+random(50));
          Mouse(X, Y, 4, 4, True);
        end;
      end;
    end;

    procedure WhileCasting;
    var
      C: Integer;
    begin
      if not (LoggedIn) then
        Exit;
      MarkTime(C);
      begin
        While (TimeFromMark(c)) < 6000 do
        begin
          FindRandoms;
          Wait(100+random(50));
          AntiBan;
          Wait(500+random(500));
          if FindBlackChatMessage('anage') then
            Exit;
        end;
      end;
    end;



    procedure MainLoop;
    begin
      if not LoggedIn then
        LogInPlayer;
      SetDemon;
      //repeat    Random repeat that isn't closed.
        repeat
          StunDemon;
      Until False
    end;//Until doesn't close the procedure end; does.


    begin
      SetupSRL;
      MainLoop;
    end.
    Progress Report:
    Compiled successfully in 717 ms.


    I have marked the issues that stopped you from compiling. As for anything else try it out and see. You have a lot to learn.

    As for your other issue about getting to the magic tab. Try
    Simba Code:
    GameTab(Tab_Magic);
    this will switch to the spell tab. Then for finding the spell you can use your current method or DTMs(judging by your skill level). Call GameTab befoer your spell casting procedure.
    I wear my scars like the rings on a pimp
    I live life like the captain of a sinking ship
    Always sell your product for ATLEAST mid to ensure that the market doesn't drop.

  3. #3
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    {.include SRL/SRL.scar} -> {$include SRL/SRL.simba}
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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
  •