Results 1 to 6 of 6

Thread: My script so far..

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

    Default My script so far..

    Well this is my curser script so far. I know my standards stink :P but i just want some feedback from you guys on what i could do to improve the script. Keep in mind it's not done tho.

    SCAR Code:
    program jesus45lumbypwner;
    {.Include SRL\SRL\Misc\SMART.SCAR}
    {.Include SRL\SRL.SCAR}

    var
      x, y, BodyRune, Curse: integer;

    const
    ///////////////////////////////////////////////////////
                                                        //
      SmartWorld = 61;         //what world?           //
      MembersAccount = False;  // True for members     //
                                                     //
    //////////////////////////////////////////////////
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many Players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer :=0; //Starting Player

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
    end;
    {////////////////////////////////////////////////////////////////////////
                                                                          //
        DO NOT TOUCH BELOW HERE, UNLESS YOU KNOW WHAT YOUR DOING ;)      //
                                                                        //
    }
    ////////////////////////////////////////////////////////////////////
    procedure Hello;
    begin
     writeln('-------------------------------------------------------*');
     writeln('               WElCOME TO JESUS45 CURSE OWNER          *');
     writeln('                                                       *');
     writeln('                         ENJOY!                        *');
     writeln('                                                       *');
     writeln('         and dont be a noob or ill flamzor you :)      *');
     writeln('-------------------------------------------------------*');
    end;
    ///////////////////////////////////////////////////////////////////////
    Procedure Dtms;
    begin
    BodyRune := DTMFromString('78DA63B466666098C2C8800CFA5A5A18F8803' +
           '448F43F1030BA02D574A1AA81C8C24820ED06543397801A33A09A' +
           '4504D4E802D54C23A0460FA8A60FBF1A00840A0AA2');
    end;



    ///////////////////////////////////////////////////////////////
    Procedure FindRune;
    begin
      GameTab(7);
      Wait(200+random(200));
      if findDTM(BodyRune,x,y,MIX1,MIY1,MIX2,MIY2) then
      begin
        Wait(200+random(300));
        Writeln('Found the body rune!');
        end else
      Writeln('Could not find body rune DTM');
      end;
    end;
    //////////////////////////////////////////////////////////////////
    Function CastCurse: boolean;
    var
     MyTPA :TPointArray;
     MyPoint : TPoint;
     x, y, i : integer;
     Which : integer;
    begin
      FindColorsTolerance(MyTPA, 2456554, MSX1, MSY1, MSX2, MSY2,10);
      if Length(MyTPA) = 0 then
        FindColorsTolerance(MyTPA, 2234344, MSX1, MSY1, MSX2, MSY2, 10);
      for i := 0 to High(MyTPA)do
      begin
        MyPoint := MyTPA[i]
        MMouse(MyPoint.x, MyPoint.y, 3, 3);
        Wait(50+random(50));
        if(IsUpTextMultiCustom(['dum', 'mmy'])) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Wait(250+random(100));
          Wait(100+random(50));
          Exit;
        end;
      Wait(300+random(400));
      Wait(100+random(50));
      end;
    end;
    //////////////////////////////////////////////////////////////
    procedure SetupMagic;

    var
    x, y: integer;

    begin
      GameTab(7);
      Wait(200+random(300));
      Cast('curse');
      begin
        Wait(300+random(500));
        Wait(100+random(50));

      end;
    end;
    /////////////////////////////////////////////////////////
    procedure ScriptSetup;
    begin
      SetupSRL;
      SmartSetupEx(SmartWorld, MembersAccount, True, False);
        while(not SmartActive)do Wait(100);
      SetTargetDC(SmartGetDC);
    end;
    ////////////////////////////////////////////////////////
    Procedure AntiBanage;
    begin
     case random(5) of
     
       1:PickUpMouse;
         Wait(150+random(100));
         end;
         
       2:RandomMovement;
         Wait(200+random(100));
         end;
         
       3:RandomClick;
         Wait(200+random(85));

       4: begin
            MakeCompass('N');
            Wait(50+random(25));
            MakeCompass('S');
            Wait(75+random(15));
            MakeCompass('N');
            Wait(100+random(10));
            end;

    end;




    ////////////////////////////////////////////////////////
    begin
      ScriptSetup
      DeclarePlayers;
      Hello;
    end.

    Finished my curser ---> it's in mage section.

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what's the point of the CastCurse and SetupMagic procs? :\

    you don't need setupmagic.. it's the same thing as cast curse..

    (btw, thanks for saying I helped you! )

    EDIT:

    SCAR Code:
    program jesus45lumbypwner;
    {.Include SRL\SRL\Misc\SMART.SCAR}
    {.Include SRL\SRL.SCAR}
    {. include srl/srl/skills/magic.SCAR}
    //Thanks to 99_ for helping :D (lol)

    var
      x, y, BodyRune, Curse: integer;

    const
    ///////////////////////////////////////////////////////
                                                        //
      SmartWorld = 61;         //what world?           //
      MembersAccount = False;  // True for members    //
                                                     //
    //////////////////////////////////////////////////
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many Players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer :=0; //Starting Player

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
    end;
    {////////////////////////////////////////////////////////////////////////
                                                                          //
        DO NOT TOUCH BELOW HERE, UNLESS YOU KNOW WHAT YOUR DOING ;)      //
                                                                        //
    }
    ////////////////////////////////////////////////////////////////////
    procedure Hello;
    begin
      writeln('-------------------------------------------------------*');
      writeln('               WElCOME TO JESUS45 CURSE OWNER          *');
      writeln('                                                       *');
      writeln('                         ENJOY!                        *');
      writeln('                                                       *');
      writeln('         and dont be a noob or ill flamzor you :)      *');
      writeln('-------------------------------------------------------*');
    end;
    ///////////////////////////////////////////////////////////////////////
    Procedure Dtms;
    begin
      BodyRune := DTMFromString('78DA63B466666098C2C8800CFA5A5A18F8803' +
           '448F43F1030BA02D574A1AA81C8C24820ED06543397801A33A09A' +
           '4504D4E802D54C23A0460FA8A60FBF1A00840A0AA2');
    end;
    ///////////////////////////////////////////////////////////////
    Procedure FindRune;
    begin
      GameTab(7);
      Wait(200+random(200));
      if findDTM(BodyRune,x,y,MIX1,MIY1,MIX2,MIY2) then
      begin
        Wait(200+random(300));
        Writeln('Found the body rune!');
      end else
      Writeln('Could not find body rune DTM');
    end;
    //////////////////////////////////////////////////////////////////
    Function CastCurse: boolean;
    var
      MyTPA :TPointArray;
      MyPoint : TPoint;
      x, y, i : integer;
      Which : integer;
    begin
      FindColorsTolerance(MyTPA, 2456554, MSX1, MSY1, MSX2, MSY2,10);
      if Length(MyTPA) = 0 then
        FindColorsTolerance(MyTPA, 2234344, MSX1, MSY1, MSX2, MSY2, 10);
      for i := 0 to High(MyTPA)do
      begin
        MyPoint := MyTPA[i]
        MMouse(MyPoint.x, MyPoint.y, 3, 3);
        Wait(50+random(50));
        if(IsUpTextMultiCustom(['dum', 'mmy'])) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 0, 0, True);
          Wait(250+random(100));
          Wait(100+random(50));
          Exit;
        end;
      Wait(300+random(400));
      Wait(100+random(50));
      end;
    end;
    /////////////////////////////////////////////////////////
    procedure ScriptSetup;
    begin
      SetupSRL;
      SmartSetupEx(SmartWorld, MembersAccount, True, False);
        while(not SmartActive)do Wait(100);
      SetTargetDC(SmartGetDC);
    end;
    ////////////////////////////////////////////////////////
    Procedure AntiBanage;
    begin
      case random(5) of

        1: begin
             PickUpMouse;
             Wait(150+random(100));
           end;

        2: begin
             RandomMovement;
             Wait(200+random(100));
           end;

        3: begin
             RandomRClick;
             Wait(200+random(85));
           end;

        4: begin
             MakeCompass('N');
             Wait(50+random(25));
             MakeCompass('S');
             Wait(75+random(15));
             MakeCompass('N');
             Wait(100+random(10));
           end;
      end;
    end;
    ////////////////////////////////////////////////////////
    begin
      ScriptSetup
      DeclarePlayers;
      Hello;
    end.

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

    Default

    Well cause the tpa function only clicks to cast the spell on the dummy. So i need some other procedure to click on the curse spell then click on the dummy
    Finished my curser ---> it's in mage section.

  4. #4
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    You still don't have the anti-random in it...

    SCAR Code:
    Procedure RandomCheck;
    begin
      FindNormalRandoms;
      if FindFight then
      begin
        // Do something.
      end;
    end;
    Hi

  5. #5
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    You should add a better FailSafe to this:
    SCAR Code:
    Procedure FindRune;
    begin
      GameTab(7);
      Wait(200+random(200));
      if findDTM(BodyRune,x,y,MIX1,MIY1,MIX2,MIY2) then
      begin
        Wait(200+random(300));
        Writeln('Found the body rune!');
        end else
      Writeln('Could not find body rune DTM');
      end;
    end;
    as of right now it doesnt do anything if it doesnt find the runes except tell you it cant find them. Maybe make it look again, or check the bank or something?

    Why do you keep putting back to back Wait();?
    SCAR Code:
    Wait(250+random(100));
          Wait(100+random(50));
          Exit;
        end;
      Wait(300+random(400));
      Wait(100+random(50));

    Last thing im going to say for now:
    SCAR Code:
    Procedure AntiBanage;
    begin
     case random(5) of
     
       1:PickUpMouse;
         Wait(150+random(100));
         end;
         
       2:RandomMovement;
         Wait(200+random(100));
         end;
         
       3:RandomClick;
         Wait(200+random(85));
     
       4: begin
            MakeCompass('N');
            Wait(50+random(25));
            MakeCompass('S');
            Wait(75+random(15));
            MakeCompass('N');
            Wait(100+random(10));
            end;
     
    end;
    That looks goofy, but if it works for you then cool lol.

    Good Luck!

  6. #6
    Join Date
    Mar 2008
    Location
    New Jersey
    Posts
    1,673
    Mentioned
    1 Post(s)
    Quoted
    9 Post(s)

    Default

    wow a first script with a TPA never saw that before. Did you use a tut to make that TPA or did you rip it out of someone else's script? well definitely good job on your first script. I'm going to look through it more to see if I can make any suggestions that other people have not.

    you never called cast curse of any procedure/function, all you have in your main loop is script setup, declare players, and hello procedure. This script has good procedure and funtions, but the main loop isn't done, you need to call everything.

    EDITops sorry just noticed, keep in mind it's not done, my bad.

    EDIT2: Thought I was in the first script section, just noticed now this is scripting help.

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
  •