Results 1 to 12 of 12

Thread: FindDead Help?

  1. #1
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default FindDead Help?

    Hey guys, I'm trying to use FindDead to go back to the spot where I am fighting. Right now I have this:
    Simba Code:
    Procedure DeathCheck;

    begin
      If(FindDead) Then
      begin
        WriteLn('You died. Returning to rats..');
        WalkToRats;
      end else
       exit;
    end;

    But it does not work. Am I doing something wrong?

    Thanks

  2. #2
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Is there an error in the debug?
    Also, I have never seen this function before. Where did you find it?

    Edit: Found it. Check this: http://docs.villavu.com/srl-5/antiban.html

    It says it 'Logs out and sets the current player to false if they are found dead. Will not logout if Reincarnate (global boolean) is set to true.'

    Is that what you want to happen? Did you set Reincarnate to true?

    Simba Code:
    Procedure DeathCheck;
    Var Reincarnate:Boolean;
    begin
    Reincarnate:=true;

      If(FindDead()) Then
      begin
        WriteLn('You died. Returning to rats..');
        WalkToRats;
      end else
       exit;
    end;

    That should do it, try it out for me? Damn its hard to be helpful on a bad smartphone!
    Last edited by Rezozo; 11-03-2012 at 01:00 AM.

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Rezozo is right except that Reincarnate is already declared globally in the include so you shouldn't declare it again in your local routine. Simply declare it anywhere after SetupSRL, preferably just once.

  4. #4
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    function IsDead:Boolean;
    var
      i:Integer;
    begin
      for i := 1 to 4 do
      begin
        Result := FindChatBoxText('dead',i,clBlack);
      end;
    end;

    procedure XX;
    begin
      if IsDead then
      begin
        WalkBackToRats;
        shithere;
      end else
        shithere;
    end;

  5. #5
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Thanks guys, I'll try changing reincarnate to true. If that doesn't work then I'll use find black chat message

  6. #6
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    I would do Shays only as a last resort. Many Many 'Black texts'

    @Riwu, My bad :P Forgot, so yea. BMWxi, don't declare it again, just change the value to true.
    Good Sailing
    ~Joey

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  7. #7
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Quote Originally Posted by Rezozo View Post
    I would do Shays only as a last resort. Many Many 'Black texts'

    @Riwu, My bad :P Forgot, so yea. BMWxi, don't declare it again, just change the value to true.
    Good Sailing
    ~Joey
    Wut?
    It'll only result true if Dead is found.

  8. #8
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    What shay posted would actually work just fine if it broke out of the loop if the result is true.

    Simba Code:
    function IsDead:Boolean;
    var
      i:Integer;
    begin
      for i := 1 to 4 do
      begin
        Result := FindChatBoxText('dead',i,clBlack);
        if result then
          break;
      end;
    end;

    Although Reincarnate := true; would be shorter/do the same thing basically.

  9. #9
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    What Shay and Nebula suggested would work if they expand the i to 8, or simply use IsChatBoxTextAnyLine, rather than searching only the first 4 lines (and the message is likely to appear at line 7-8 instead). Haha just joking they are great guys

    Like Neb said, stick to the include function would be a better idea.

  10. #10
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    @Neb How does his not get out of the loop? I see that it works well. In fact yours is longer...Cheers.

    My bad Shay, wasn't thinking straight :P

    I just think that adding the Reincarnate:=true; is slightly easier. Meant that if that doesn't work, he could always use yours. Its just longer

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  11. #11
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Quote Originally Posted by Rezozo View Post
    @Neb How does his not get out of the loop? I see that it works well. In fact yours is longer...Cheers.

    My bad Shay, wasn't thinking straight :P

    I just think that adding the Reincarnate:=true; is slightly easier. Meant that if that doesn't work, he could always use yours. Its just longer
    Nebs' is right on this account, forgot to add the break.

  12. #12
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    It actually took me 15 whole minutes to find out what you meant...Jesus FML...
    I see now...By bad Neb :P
    Im just being stupid today...

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

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
  •