Results 1 to 6 of 6

Thread: WTF is wrong with this script!

  1. #1
    Join Date
    Jan 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default WTF is wrong with this script!

    okay, i have been out of the whole scar scripting thing ever since reflection came around, i decided to come back and use simba as it seems to be the very same as scar but much more supported these days. anyways to my point... WTF is wrong with this. it logs you in juts fine, does the antiban and anti randoms, but it will not cast, or select the correct spells. it click on the zombies but wont stun. anyone with scripting knowledge please help me )


    Simba Code:
    program MageGuildStunAlcher;
    {$define srl5}
    {$loadlib sps}
    {$define smart}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    {$i srl/srl/skill/fighting.simba}
    {$i srl/srl/skill/magic.simba}


    const
      zomcol1 = 5601688;  //may need to change these using the eye dropper..
      zomcol2 = 3553336;  //zomcol means zombie color.....
      zomcol3 = 8423045;

    var
    X, Y :integer;
    //////////////////////////////\PLAYER SETUP\////////////////////////////////////
    procedure declareplayers; //Declareplayers
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';    //Username
      Players[0].Pass := '';    //Password
      Players[0].Nick := '';    //3-4 lower case letters of your username
      Players[0].Active:= True; //is this player active?
    end;
    ////////////////////////////////////////////////////////////////////////////////
    //// NO MORE TOUCHING ///////////////////////////////////// NO MORE TOUCHING////
    ////////////////////////////////////////////////////////////////////////////////
    Procedure Randoms; //randoms
    begin
    writeln('any randoms?');
    FindNormalRandoms;
    If Not(LoggedIn) Then
      begin
        WriteLn('Unsolvable random??');
        LoginPlayer;
        FindNormalRandoms;
        If Not(LoggedIn) Then
          begin
            WriteLn('Client has Logged Out, Failed a Random? Stopping Scrip...');
            TerminateScript;
            writeln('Script may need human assistance at this point');
          end
      end;
    end;
    Procedure Antiban;
    begin
    writeln('Bored Human');
      if not LoggedIn then Exit;
      case Random(99) of
        0: begin
              wait(1526);
              PickUpMouse;
              SetAngle(SRL_ANGLE_HIGH);
           end;
        1: begin
             RandomMovement;
             SetAngle(SRL_ANGLE_HIGH);
           end;
        3: PickUpMouse;
        4:begin
          wait(2413)
          pickupmouse;
          wait(518)
          randommovement;
          end;
      end;
    end;
     //Borrowed, cut, screwed from a few scripts.....
     Function FindObjectFX(colors: TIntegerArray; Uptext: TStringArray; X1, Y1, X2, Y2, Width, Height, tol: integer; Click: Boolean): Boolean;
      var
          X, Y, I: integer;
          TPA: TPointArray;
          ATPA: T2DPointArray;

      begin
        SetLength(TPA, Length(Colors));

        For I:= 0 To High(Colors) do
          FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], X1, Y1, X2, Y2, tol);

        ATPA:= TPAToATPAEx(TPA, Width, Height);
        SortATPAFrom(ATPA, Point(MSCX, MSCY));
        if(Length(ATPA) = 0) then
          Exit;

        MiddleTPAEx(ATPA[0], X, Y);
        if Click then
          MMouse(x, y, 5, 5);

        Wait(randomrange(200, 500));
          If(IsUpTextMultiCustom(UpText)) then
          begin
            if Click then
            begin
              ClickMouse2(False);
              wait(500);
              if ChooseOptionMulti(UpText) then
              begin
                Result := True;
                Exit;
              end;
            end else
              Result := True
          end else
            Result:= (((X <> 0) and (Y <> 0)) and (Click = False)) ;
      end;
    function ClickZom(Colors: TIntegerArray; Tol, TimeOut: Integer): Boolean;
    var
     x, y:integer;
    begin
      if (not LoggedIn) then exit;
      if FindObjectFX(Colors, ['ttack', 'mbie', 'zomb'], MSX1, MSY1, MSX2, MSY2, 10, 10, Tol, True) then
      cast('stun',false);
      mouse(x,y,3,3,true);
    end;
    procedure ClickClickBoom;
    begin
    wait(RandomRange(236, 561));
    if clickzom([zomcol1,zomcol2,zomcol3],5,1000) then
    cast('high level alchemy', false);
    Antiban;
    end;




    begin   //main
    cleardebug;
    Smart_Server := 11;
    Smart_Members := True;
    Smart_Signed := True;
    Smart_SuperDetail := False;
    SetupSRL;
    cleardebug;
    writeln(' ')                                     ;
    writeln(' ')                                     ;
    writeln('JDMzaks Mage_Guild_Stun_Alcher')        ;
    writeln('            Version 1')                 ;
    writeln('****FEEDBACK MAKES BETTER SCRIPTS****') ;
    writeln(' ')                                     ;
    writeln(' ')                                     ;
    declareplayers;
    LoginPlayer;
    wait(1500);
    SetAngle(SRL_ANGLE_HIGH);


    repeat //main loop
    Randoms;
    ClickClickBoom;
    until(false)
    end.
    just because my account says im new doesnt mean i dont know what im doing....

  2. #2
    Join Date
    Jan 2012
    Posts
    126
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    hey i need zombie color codes they wont work for me ;s
    ill try your codes

  3. #3
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    I would suggest making DTMs for the spells so it know what to look for.
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

  4. #4
    Join Date
    Dec 2011
    Location
    USA
    Posts
    362
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    stun is difficult to dtm sometimes, i had some problems with it, i advise a bitmap for stun.

  5. #5
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by johnnimms13 View Post
    stun is difficult to dtm sometimes, i had some problems with it, i advise a bitmap for stun.
    bitmaps are only "easier" because you can raise the tolerance as high as needed.

    DTM's are not only faster they're faster.

    A simple GetColor(x, y); would be plenty if each person has the same spell book setup.
    Otherwise i'd suggest a DTM.

  6. #6
    Join Date
    Dec 2011
    Location
    USA
    Posts
    362
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good to know

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
  •