Results 1 to 4 of 4

Thread: Chicken Killer

  1. #1
    Join Date
    Mar 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post Chicken Killer

    Well here is my first script after 5 days of scripting it seems presentable so I decided to post it. I am still going to be improving it but I am posting for feedback on what I can do better to improve the weak points in my script.

    Mainly looking for feedback and ways to improve.

    Instructions:
    Just fill in the player info and press run.

  2. #2
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    very nice first script inly thing i saw at a glance was

    Code:
    function InCombat: boolean;
    var
      centerX, centerY : Integer;
      AllHPBars : TBoxArray;
    begin
      if not LoggedIn then Exit;
      centerX := MSCX;
      centerY := MSCY;
      AllHpBars := FindAllHPBars(centerX, centerY, MSCX-40, MSCY-40, MSCX+40, MSCY+40);
      if not High(AllHpBars) < 0 then
      begin
        Result := True;
        InCombatVar := True;
      end else
      begin
        InCombatVar := False;
      end;
    end;
    could be

    Code:
    function InCombat: boolean;
    var
      centerX, centerY : Integer;
      AllHPBars : TBoxArray;
    begin
      if not LoggedIn then Exit;
    
      AllHpBars := FindAllHPBars(mscX, mscY, MSCX-40, MSCY-40, MSCX+40, MSCY+40);
      if not High(AllHpBars) < 0 then
      begin
        Result := True;
        InCombatVar := True;
      end else
      begin
        InCombatVar := False;
      end;
    end;
    to save lines of code but very nice im expecting alot from you

  3. #3
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i found a possible error

    SCAR Code:
    case Lowercase(Players[currentplayer].Strings[0]) of
         'Attack': SetFightMode(1);
         'Strength':SetFightMode(2);
         'Defence':SetFightMode(4);
         'even':SetFightMode(3);
        end;

    I'm not quite sure, but shouldnt it be
    SCAR Code:
    'attack': SetFightMode(1);
    and so on

    because

    lowercase("Attack") <> "Attack"
    Project: Welcome To Rainbow

  4. #4
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeah... Lowercase('Floor66'); is 'floor66', it will never be 'Floor66'.
    Ce ne sont que des gueux


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
  •