Results 1 to 7 of 7

Thread: FFlag picking up on symbols

  1. #1
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FFlag picking up on symbols

    I'm working on a script and it walks by the dungeon symbol and it keeps thinking that the flag is still there because it sees the dungeon symbol or the arrow that is right next to it. Any solutions you guys can come up with for this?

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

    Default

    I thought about this the other day actually, that it could happen with how the current function is written.

    Perhaps a length check would fix it?

    I may have some time to look at it later.

  3. #3
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for a rare occurrence like that why not use isMoving or something?
    “Ignorance, the root and the stem of every evil.”

  4. #4
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I was thinking about doing that Blumblebee, but then the script would wait for the character to stop moving entirely before continuing along the path. I always thought that was rather bottish, I suppose it will do for now though.

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bbri06 View Post
    I was thinking about doing that Blumblebee, but then the script would wait for the character to stop moving entirely before continuing along the path. I always thought that was rather bottish, I suppose it will do for now though.
    I suppose your right. You could do a while not isMoving do wait(x); and then a basic flag with a timeout of X seconds (if the walking is consistent with a time)
    “Ignorance, the root and the stem of every evil.”

  6. #6
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So I worked off of that idea and I came up with this. Seems to work pretty well. It also checks to see if the flag went off the map and acts accordingly—that was another problem I was having.

    SCAR Code:
    {Credits to the creaters/updaters of FlagEx
    (Wizzup? / WT-Fakawi / ZephyrsFury modified by N1ke!)

    Used some of FlagEx}

    Procedure BBFlag(Dist: integer);
    var
      TimeFS1, TimeFS2, Distance1, a, b: integer;
    begin
      Wait(500 + random(250));
      MarkTime(TimeFS1);
      While IsMoving do
      begin
        if(FindColor(a, b, 3026478, mmx1, mmy1, mmx2, mmy2))then
        begin
          Wait(50);
          Distance1 := Distance(a, b + 14, MMCX, MMCY);
          if(Distance1 <= Dist)then
            Exit;
        end else
          if(not(IsMoving))then
            Exit
          else
            if(not(OffMapFlag))then
              Exit;
      Wait(200);
      MarkTime(TimeFS2);
      if((TimeFS2 - TimeFS1) > 6000)then
        if(Distance1 = Distance(a, b + 14, MMCX, MMCY))then
          Exit;
      if (Random(20) = 0)then
        IdleTime(500, 1000, 0.01);
      end;
    end;
    Last edited by bbri06; 05-11-2010 at 11:56 PM.

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    looks good nice work
    “Ignorance, the root and the stem of every evil.”

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
  •