Results 1 to 3 of 3

Thread: teh radialwalk procedure

  1. #1
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default teh radialwalk procedure

    Credits For Nielsie for his autocoloring tut
    Will This Work ?

    SCAR Code:
    Procedure FindTheGrassColor;
    Var
    GrassColor, Grass, MaxTolerance: integer;
    Begin
      Grass := BitmapFromString2(False, 'a50EAA78DAAD934972C4200C' +
           '45AF2481187AE91873FF234512180BD3AE4A3AD9BC52C17F32930' +
           '100BE0A03926784CD31A3DFA5A6436ADA065D26190F3A5BA38C4B' +
           '1C6249D2E0A56E42A9373F88A5A84561CFD1B9CE9AC3C988D93BE' +
           'AF4D9CD7CB420D3BF5A7EE4CB959FACC6D5923C7556C9346ADE75' +
           '6AD2F247167E689183C1CF2DC904C3D582C9D2F1B756185F815B9' +
           'E9F109F79EB9C9A654E7BB620073C3A917BE2CDF2DD7DB4C29109' +
           'EB9FADF4D6BAD626DC75D7FC9B70F2F55B4B93364FD31DDDAD836' +
           'FD6734D3CEB95D8D9F25E67B91B16C3DA771AB46E24D969CF5B9E' +
           '79213E58AB7BAEF6B2A2A1B5AC8BCBBBB256D0F359DDD54AF2422' +
           '66B759D661AD5FA06EC0');
      MaxTolerance := 40;
      GrassColor:= AutoColorThis(Grass, MaxTolerance, MMX1, MMY1, MMX2, MMY2);
      WriteLn('GrassColor: '+IntToStr(GrassColor));
      FreeBitmap(Grass);
    End;

    SCAR Code:
    Procedure WalkToGuards;
    Begin
    MakeCompass('N');
    FindRoadColor;
    RadialRoadWalk(RoadColor, 42, 55, 57, 1, 1);
    FFlag(10);
    RadialRoadWalk(RoadColor, 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(GrassColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(GrassColor , 42, 55, 57, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 235, 254, 37, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 248, 260, 56, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 247, 238, 64, 1, 1);
    FFlag(10);
    RadialWalk(GrassColor , 273, 284, 72, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 291, 309, 64, 1, 1);
    FFlag(10);
    End;

  2. #2
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It should work. It all depends on the bitmap you took.

  3. #3
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No it wont the way you have it.
    SCAR Code:
    Procedure WalkToGuards;
    Begin
    MakeCompass('N');
    FindRoadColor;
    RadialRoadWalk(RoadColor, 42, 55, 57, 1, 1);
    FFlag(10);
    RadialRoadWalk(RoadColor, 305, 310, 52, 1, 1);
    FFlag(10);
    fingrasscolor;//or whatever the procedure was called
    RadialWalk(GrassColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(GrassColor , 42, 55, 57, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 305, 310, 52, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 235, 254, 37, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 248, 260, 56, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 247, 238, 64, 1, 1);
    FFlag(10);
    RadialWalk(GrassColor , 273, 284, 72, 1, 1);
    FFlag(10);
    RadialWalk(FindDirtRoadColor , 291, 309, 64, 1, 1);
    FFlag(10);
    End;

    also radialwalk has fflag(10) in it. so its not needed (i think)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. RadialWalk
    By quiescent_87 in forum OSR Help
    Replies: 1
    Last Post: 04-04-2008, 05:09 PM
  2. RadialWalk?
    By skilld u in forum OSR Help
    Replies: 6
    Last Post: 10-06-2007, 09:08 AM
  3. RadialWalk...
    By Lalaji in forum OSR Help
    Replies: 7
    Last Post: 04-30-2007, 11:03 AM
  4. RadialWalk
    By A G E N T in forum OSR Help
    Replies: 3
    Last Post: 03-09-2007, 02:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •