Results 1 to 20 of 20

Thread: Banking function at Port phasmatys

  1. #1
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Banking function at Port phasmatys

    I am trying to write a banking function for Port Phasmatys, but depending on my orientation ingame I get different colors because the bankers are translucid and such.

    Could anyone with experience in banking procedures help me out? I'm starting to think case (RS_GetCompassAngeDegrees) of different findcolorsspiraltolerance procedures with different params.

    Code:
    //Head south, cam up high, ghost banker colour is 8635287 (0.08, 1.09) tol 26
    //Head south, cam down, ghost banker colour is 9677466 (0.18, 0.53) tol 12
    //Head east, cam high, ghost banker colour is 10277806 (0.06, 1.58) tol 19
    //Head east, cam down, ghost banker colour is 10801330 (0.08, 1.39) tol 16
    
    //Head south, cam up high, bank booth glass colour is 5532774 (0.14, 0.44) tol 6
    //Head south, any cam, bank booth bottom colour is 1319970 (0, 0) tol 0
    //Head south, cam down, bank booth colour is 2836291 (0.19, 1.40) tol 3
    //Head east, cam mid, bank booth top colour is 1911837 (0.56, 0.34) tol 2
    //Head east, cam mid, bank booth colour is 2837831 (0.32, 0.12) tol 2
    //Head north, cam down, ghost banker / booth glass colour is 8890517 (0.08, 0.53) tol 16
    //Head north, cam down, bank booth colour is 4021079 (0.11, 0.10) tol 6
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

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

    Default

    Mustn't there be a way to find only the ghost-coloured translucid colour?
    For example: (colour you find) - (colour of the bank walls/the floor) = ghost colour
    Ce ne sont que des gueux


  3. #3
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Take a look at my OpenBankQuiet. This works with a sliced long bitmap (eg. 30*1) of the Bank Counter. If you make your own bitmapslice, it will probably work at Phasmatys.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  4. #4
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WT-Fakawi : I'd love to, but OpenBankQuiet never worked for me? would any slice of the bank booth work?

    Floor66 : Ugh. Maths.
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  5. #5
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I think you'll be good if you use one of those 2 methods.
    Don't think I know what your talking about Area Wise (Never been a Member :P) but can't you try TPA's with it? Example : FindColorsSpiralTolerance(In a Box ) - CheckLength - Sort ,Split , W/e - MiddleTPAEx() - Bankers?

    Might work no? but thats if you have a good color for the ghosts as well = /
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  6. #6
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Heavenguard View Post
    I think you'll be good if you use one of those 2 methods.
    Don't think I know what your talking about Area Wise (Never been a Member :P) but can't you try TPA's with it? Example : FindColorsSpiralTolerance(In a Box ) - CheckLength - Sort ,Split , W/e - MiddleTPAEx() - Bankers?

    Might work no? but thats if you have a good color for the ghosts as well = /
    Might work, but I'd need to use a very high tolerance. Ghost bankers are translucid, meaning you can see what's behind them - and that's not too good for color picking

    Going to try that. And Fakawi : can you walk me through creating a valid BMP slice?
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Sure. What is needed to get to phasmatys? Do I need a quest or something? I am sure that when I arrive there I will have a banking function dor you ready in no time at all.....but I have never been to phasmatys. Guess it is a wonderful spot to auto.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

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

    Default

    Port Phasmatys is like... Deserted. Except for the closeness to the Ectofunctus... You need to pay these tokens you get with the Ectofunctus to get in Port Phasmatys AFAIk.
    Ce ne sont que des gueux


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

    Default

    Does it still look like this


    [picture credits - http://runescape.salmoneus.net/citie...hasmatys.html]

    If so, you could probably make an autocolor with ACA as those colors don't look like they would change too much.

  10. #10
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Would clicking the spot in front of the same bank booth on the minimap every time help much?

  11. #11
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    Sure. What is needed to get to phasmatys? Do I need a quest or something? I am sure that when I arrive there I will have a banking function dor you ready in no time at all.....but I have never been to phasmatys. Guess it is a wonderful spot to auto.
    You need Priest in Peril to get in, and Ghosts Ahoy! to get in free of charge.
    Port Phasmatys has the best furnace location of the whole game and used to be a popular spot for FM training before grand exchange.

    the script I'll apply to members with will be an auto-ectofunctus : lots of walking and interaction with a high number of objects (barrier, trapdoor, stairs, bone grinder, bank, ghost disciple, ectofunctus).

    Quote Originally Posted by Boreas View Post
    Would clicking the spot in front of the same bank booth on the minimap every time help much?
    I wish I could manage that, really. I have tried to make working DDTMs for hours yesterday, with no success, following Coh3n's crystal clear tutorial...

    I attached my first try, it seems to work most of the time. if you are not wearing a ghostspeak amulet, it will retrieve one, equip it and re-open bank. I'd love if someone checked it out and pointed me any mistakes I made

    I also included .BMPs and lower resolution copies of the minimap excerpts I want to make DDTMs of. Any ideas on the best way to walk it through?
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  12. #12
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    the best furnace in game is edgy. [/correction]

    and just making an auto color for the bankers would probobly work, since they do stand out from the rest of the place
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  13. #13
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Hmmm. Unlucky me. I don't play runescape and I absolutely hate quests! So I dont go to port phasmatys.

    Maybe we should set up a quests service, lol.
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  14. #14
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    GhostPoint:=MiddleTPA(GhostPointsBox[i]);
          MMouse(GhostPoint.x, GhostPoint.y, 4, 4);
          Wait(175+Random(50));
         
          if IsUpText('ank') then
          begin
            Mouse(GhostPoint.x, GhostPoint.y, 5, 5, False);
            Wait(1000 + Random(100));
            ChooseOptionEx('Bank', 'action');
            Wait(1500+Random(200));

    In your Mouse function you shouldn't have randomness like that. You already moved the mouse with randomness from the point found. You don't want to have it move to the object, find the uptext, move the mouse again then click. You simple want it to move the mouse, find the uptext, then click.

    SCAR Code:
    GhostPoint:=MiddleTPA(GhostPointsBox[i]);
          MMouse(GhostPoint.x, GhostPoint.y, 4, 4);
          Wait(175+Random(50));
         
          if IsUpText('ank') then
          begin
            Mouse(GhostPoint.x, GhostPoint.y, 0, 0, False);
            Wait(1000 + Random(100));
            ChooseOptionEx('Bank', 'action');
            Wait(1500+Random(200));

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  15. #15
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    I'm guessing this is for the minimap.

    We could just upload a picture of it?

    http://www.tip.it/runescape/html/world_map.htm

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  16. #16
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    This was from a few years ago, before DDTMs, but the general idea of FindYellows(hx,hy,16,5,590,30,700,120); should still work, will need tweaking if the banker dots moved though.


    Code:
    type ybox = record
    x1,y1,x2,y2,cx,cy:integer;
    active:boolean;
    end;
    
    
    type tehpoint = record
    x,y :integer;
    active : boolean;
    end;
    
    type combo = record
    point1,point2,x1,y1,x2,y2,dist:integer;
    active:boolean;
    end;
    
    
    
    var hx,hy,gx,gy,bankfindtries:integer;
    findyellowdone,foundbooth:boolean;
    
    procedure findyellows (var fx, fy:integer; PointsToFind,width,basex,basey,endx,endy:integer);
    var
    box :array of ybox;
    ypoint : array of tehpoint;
    com:array [1..300] of combo;
    x,d,e,f,i,g,nob,fyx,fyy,currentpoint,row,prow,col,nor,noc:integer;
    
    begin
      noc:=(( (endx-basex) - (width mod (endx-basex)))/width)+1;
      nor:=(( (endy-basey) - (width mod (endy-basey)))/width)+1;
    
      nob:=nor*noc;
      setarraylength(box, ((nob)+2));
      repeat
        x:=x+1;
        if  ((x+noc) mod noc)>0 then
          col:=((x+noc) mod noc);
        if ((x+noc) mod noc) =0then
          col:=noc;
        prow:=0;
        repeat
          prow:=prow+1;
        until (  x<=(noc*prow));
        row:=prow;
        box[x].x1:=(basex+ ((col-1)*width) );
        box[x].x2:=(basex+(col*width));
        box[x].y1:=(basey+ ((row-1)*width) );
        box[x].y2:=(basey+(row*width));
        box[x].cx:=round((box[x].x2+box[x].x1)/2);
        box[x].cy:=round((box[x].y2+box[x].y1)/2);
        box[x].active:=true;
    
        {
        //draws the boxes on paint
        movemouse(box[x].x1,box[x].y1);
        holdmouse(box[x].x1,box[x].y1,true);
        movemouse(box[x].x2,box[x].y2);
        releasemouse(box[x].x2,box[x].y2,true);
         }
      until x>=nob;
    
      currentpoint:=1;
      d:=0;
      setarraylength(ypoint, pointstofind+1);
      repeat
        d:=d+1;
        if (box[d].active) then
        begin
          if findcolor(fyx,fyy,195836,box[d].x1,box[d].y1,box[d].x2,box[d].y2) then
          begin
            ypoint[currentpoint].x :=fyx;
            ypoint[currentpoint].y :=fyy;
            currentpoint:=currentpoint+1;
            box[d].active:=false;
          end;
        end;
      until ((  currentpoint= pointstofind)or (d=nob));
    {
      e:=0;
      repeat
        e:=e+1;
        writeln(inttostr(ypoint[e].x)+'  '+inttostr(ypoint[e].y));
        if not((ypoint[e].x = 0) and (ypoint[e].y = 0)) then ypoint[e].active:=true;
      until e=16;
    
      writeln('                      all points');}
    
      e:=0;
      repeat
        f:=f+1;
        g:=0;
        repeat
          g:=g+1;
          e:=e+1;
          //writeln(inttostr(f)+'  '+inttostr(g)+'  '+inttostr(e));
          com[e].point1:=f;
          com[e].point2:=g;
          com[e].x1:=ypoint[f].x;
          com[e].y1:=ypoint[f].y;
          com[e].x2:=ypoint[g].x;
          com[e].y2:=ypoint[g].y;
          if not((com[e].x1=0) or (com[e].y1=0) or (com[e].x2=0) or (com[e].y2=0)) then com[e].active:=true;
        until( (g=16) or (e=256));
      until ((f=16) or (e=256));
    
    /////////--------------------analysis------------------------------
      { port phasmatys/draynor banker configuration
    
      port phasmatys:
      x-random people outside bank
    
      x...x......x...x  - bankers
      pair 1     pair 2
    
      first eliminates dots more than 20 away (random people outside)
      then finds 2 dots close (6) together, (pair 1 or 2)
      then finds a dot more than 7 away (a banker in the other pair)
    
      the last step is so that 2 people outside walking close together
      won't be mistaken for a pair of bankers
    
      draynor is the same except that the one pair is a single and
      its vertical, but that doesn't matter
      }
    
      e:=0;
      repeat
        e:=e+1;
        com[e].dist:=Round(Sqrt(Sqr(com[e].x1 - com[e].x2) + Sqr(com[e].y1 - com[e].y2)))
        if ((com[e].dist=0) or (com[e].dist>20)) then com[e].active:=false;
        i:=0;
        repeat
          i:=i+1;
          if ((com[e].active) and (com[i].active))then
          begin
            if ((com[e].point1=com[i].point2)and (com[e].point2=com[i].point1)) then com[i].active:=false;
          end;
        until i=256;
        if com[e].dist=1 then com[e].active:=false;
        //if com[e].active then writeln(inttostr(com[e].point1)+'  '+inttostr(com[e].point2)+'  '+inttostr(com[e].dist));
      until e=256;
      e:=0;
      repeat
        e:=e+1;
        if com[e].active then
        begin
          if (com[e].dist <5 ) then
          begin
            i:=0;
            repeat
            i:=i+1;
            if ((com[i].point1=com[e].point1) or (com[i].point1=com[e].point2)  or (com[i].point2=com[e].point1) or (com[i].point2=com[e].point2))then
            begin
              if com[i].dist>6 then
              begin
                if (((com[e].x1=com[i].x1) and (com[e].y1=com[i].y1)) or ((com[e].x1=com[i].x2) and (com[e].y1=com[i].y2))) then
                begin
                  fx:=com[e].x1;
                  fy:=com[e].y1;
                  findyellowdone:=true;
                end;
                if (((com[e].x2=com[i].x1) and (com[e].y2=com[i].y1)) or ((com[e].x2=com[i].x2) and (com[e].y2=com[i].y2))) then
                begin
                  fx:=com[e].x2;
                  fy:=com[e].y2;
                  findyellowdone:=true;
                end;
              end;
            end;
            until i=256;
          end;
        end;
      until e=256;
    /////////--------------------analysis end--------------------------
    end;

    Edit: whipped this up based on your picture using more modern functions. If the bank symbol covers up the banker dots you'll have to add something.
    Code:
    program New;
    {.include SRL\SRL.scar}
    
    //Should give you the 3rd banker dot
    function PPBankDots: tpoint;
    var YellowPoints, NPCPoints: TPointArray;
    NPCTPAs, NPCGroups: T2DPointArray;
    GroupBox: Tbox;
    i: integer;
    begin
      FindColors(YellowPoints, 195836, MMX1, MMY1, MMX2, MMY2);
      NPCTPAs := TPAtoATPA(YellowPoints, 2);
      //writeln(length(NPCTPAs));
      SetArrayLength(NPCPoints, length(NPCTPAs));
      for i:= 0 to High(NPCTPAs) do
      begin
        NPCPoints[i]:= NPCTPAs[i][0];
      end;
      NPCGroups := TPAtoATPA(NPCPoints, 4);
    //  WritelN(length(NPCGroups));
      SortATPASize(NPCGroups, true);
      i := 0;
      repeat
        inc(i);
      until length(NPCGroups[i])=1;
      SetLength(NPCGroups, i);
      NPCPoints := MergeATPA(NPCGroups);
      NPCGroups := TPAtoATPA(NPCPoints, 15);
    
      for i:=0 to High(NPCGroups) do
      begin
        //writeln(length(NPCGroups[i]));
        if length(NPCGroups[i])>3 then
        begin
          GroupBox:= GetTPABounds(NPCGroups[i]);
          //writeln(inttostr(GroupBox.x2 - GroupBox.x1)+' '+inttostr(GroupBox.y2 - GroupBox.y1));
          if (GroupBox.x2 - GroupBox.x1) > (4 * (GroupBox.y2 - GroupBox.y1)) then
          begin
            SortTPAFrom(NPCGroups[i], Point(MMX2, MMCY));
            result:= NPCGroups[i][1];
          end;
        end;
      end;
      
    end;
    var MyPoint: tpoint;
    begin
      setupsrl;
      MyPoint := PPBankDots;
      writeln(inttostr(MyPoint.x)+' '+inttostr(MyPoint.y));
    end.
    Edit: here's another one using doors if the symbol messes with the NPC dots, though DoorProfiles.scar needs to be updated and it needs north. It takes 6 times longer than the NPC dot one, but that's still only 18ms.
    Code:
    function PPBankDotsDoors: Tpoint;
    var MyDoors: array of DoorProfile;
    i:integer;
    DoorPoints: TPointarray;
    begin
     ClickNorth(true);
      MyDoors:= GetDoors;
      SetLength(DoorPoints,length(GetDoors));
      for i:=0 to high(Mydoors) do
        DoorPoints[i]:= MyDoors[i].Midpoint;
      SortTPAFrom(DoorPoints, Point(MMCX,MMY1));
      SetArrayLength(DoorPoints, 2);
      SortTPAFrom(DoorPoints, Point(MMX1,MMCY));
      result := Point(DoorPoints[1].x+22, DoorPoints[1].y+47)
    end;
    Last edited by Boreas; 01-13-2010 at 06:13 PM.

  17. #17
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Boreas View Post
    This was from a few years ago, before DDTMs, but the general idea of FindYellows(hx,hy,16,5,590,30,700,120); should still work, will need tweaking if the banker dots moved though.
    Brillant piece of work there x_x I'm going to study it to see what I can learn from it thank you !

    Edit : tested your second function and I get out of range error on line 26:
    until length(NPCGroups[i])=1;
    probably meaning that if doesn't finds anything going to try and tweak it out with tolerances and such.
    Re-Edit : added tolerance to findcolor, now it finds it one time out of two, based on cam angle.


    Now onto DDTMs... Has anybody got a little spare time and MSN to help me through it?
    Last edited by Cigue; 01-13-2010 at 10:56 PM.
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  18. #18
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    OMG I just remembered that xD
    Dude make a DTM of the Banker dots!

    there are 2 static colors in the Yellow Dots in the Minimap.
    Ill give you mine and give you instructions. I used this in my VE Mine + Banker.

    SCAR Code:
    BankDTM := DTMFromString('78DA63AC646260286140019525250C3A8C0C0' +
                 'C40C4F01F0818416A2A20724C50357FFE40588C503E632D116A4A' +
                 '89505348580D005A351238');

    This is the DTM for the Bank, its basically 4 dots together. Just like the Bankers.
    Now use it with this.

    SCAR Code:
    if (DTMRotated(BankDTM, X, Y, MMX1, MMCY, MMX2, MMY2)) then
      begin
        Tip := ('Used Bank DTM to Walk into the Bank');
        SmallError := True;
        Mouse(X, Y, 4, 4, True);
        Wait(400);
        Flag;
        FreeDTM(BankDTM);
        Result := True;
        Exit;
      end;

    This is just taken from a piece from my script, but pretty much this searches for the DTM in Bottom Half of the Minimap.
    Just change MMX1, MMY1, MMX2, MMY2 to the area you want to search for.
    SCAR Code:
    MMX1, MMY1, MMX2, MMY2 // Searches Whole MiniMap
    MMX1, MMCY, MMCX, MMY2 // Searches Bottom Left of the MiniMap
    MMX1, MMY1, MMX2, MMCY // Searches Top Half of the Minimap.

    Just picture the Coordinate Plane and you'll get how that works. Make sure you take out Tip and all those variables, I use those for Proggies and Feedback. Remember MMC = Minimap Center.

    This is to Position the Character Exactly infront of a BankBooth, maybe this will help with trying to help it Bank.
    Last edited by Heavenguard; 01-13-2010 at 11:16 PM.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  19. #19
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Made a working procedure using DTMs, thank you HG you rock !

    Edit : I also have a few bugs listed in the last post of the thread in my sig - if you could help me figure it out I'd be obliged
    Last edited by Cigue; 01-14-2010 at 12:23 AM.
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

  20. #20
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    , Thank Zephyr lol, he gave me the method a while ago. Gotta love everyone on this site.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

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
  •