Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33

Thread: GetSkill Functions

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

    Default

    Shhhhh!

  2. #27
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol I knew that reaction was coming...

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

    Default

    Wow. How could I have missed this thread. I have been thinking about this too, and Stupid3ooo's ChooseOption comes close to the ideal solution. It narrows down the search box. And allthough they look like popup's, they are actually fixed bitmaps at fixed position. Much unlike the uptext that randomly floats +-2 pixels.

    Have you tried contacting masquerader? He's the FontMaster



    THIS IS OLD STUPID's CHOOSEOPTION:

    PHP Code:
    {*******************************************************************************
    function 
    ChooseOption(xyIntegertxtString): Boolean;
    ByStupid3ooo
    Description
    Finds Popup menuthen clicks on it.
    *******************************************************************************}

    function 
    ChooseOption(xyIntegertxtstring): Boolean;
    var
      
    x1y1x2y2LeftCornerRightCornerInteger;
    begin
      LeftCorner 
    := BitmapFromString(44'z78DA33753135313137C5' +
        
    '411A600064715CEA914500CACE13F0');
      
    RightCorner := BitmapFromString(44'z78DA33753135313137' +
        
    'C5200D30002E35F8C501C9C013F0');
      if (
    FindBitmap(LeftCornerx1y1)) and (FindBitmap(RightCornerx2y2)) then
      begin
        
    if (FindText(xytxtupcharsx1y1x2502)) then
        begin
          Result 
    := True;
          
    Mouse(Length(txt) * 3322True);
        
    end
        
    else if (FindText(xy'Cancel'upcharsx1y1x2502)) then
          Mouse
    (9322True);
      
    end;
      
    FreeBitmap(LeftCorner);
      
    FreeBitmap(RightCorner);
    end

    Where do you retrieve your baseline from?


    Maybe you should grab this semicolon bitmap:



    I think it is unique, but it is a hypothesis. Well, that is what I had in mind of doing but-what-I-havent-been-able-to-do-since-I-am-sooo pre-occupied, pfew.

    Good work.


    TOB? Why are you not a member around here? Please apply...or did you already?
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

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

    Default

    I'll PM masquerader now, hopefully he can take this off my hands (I'm working on a lot of scripts atm lol).

    I think the width's of '<Skill> XP' and 'Next Level at' and the widths of the numbers is messing up the way it finds the width between the dtms and divides. And I don't know how to go about solving that so that it works for every account.

    I'll look into the chooseoption thing if a dev (or anyone with more time than me) doesn't fix it.

    Baseline is above the P. I was using a dtm of the P and the semi colon, because dtm of semicolon obviously doesn't work (and a dtm of the right edge of the box). I didn't want to use bitmaps, but if masq doesn't have time to do it, I guess I'll try it.

  5. #30
    Join Date
    Nov 2006
    Location
    California, USA
    Posts
    336
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    TOB? Why are you not a member around here? Please apply...or did you already?
    Well, when SRL first came out I wasn't interested in SCAR and I just recently got back into forums. I haven't applied because I haven't made any scripts really with SRL, or in general. I didn't think I would be accepted so I chose not to apply until [if] I make a script using SRL.

  6. #31
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha, ok, i'll take a look at it

    ps:
    fawki, can you add FontMaster to my title?
    lol

    [edit]
    here:
    Code:
    function skillxp(skill:string; current:boolean):integer;
    //masquerader w/ others
    var
      textx,texty,x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
      text,xp:string;
      t:tpoint;
    begin
      LeftCorner:= DTMFromString('78DA63346164603006622C0026CA684A841A9' +
           '03926449883A6E6FFFF0598E60411614E100173406A8289703301' +
           '3500C6560919');
      RightCorner:= DTMFromString('78DA635CC2C8C0100CC458004C947131916A8' +
           '250D5FCFFBF0055CD124C3558CD3121600E488D3101739610A9C6' +
           '04BF1A00F7DF0C91');
      result:=-1;
      GameTab(2);
      case lowercase(skill) of
        'attack': t := SkillCoords(1, 1);
        'hitpoints': t := SkillCoords(1, 2);
        'mining': t := SkillCoords(1, 3);
        'strength': t := SkillCoords(2, 1);
        'agility': t := SkillCoords(2, 2);
        'smithing': t := SkillCoords(2, 3);
        'defence': t := SkillCoords(3, 1);
        'herblore': t := SkillCoords(3, 2);
        'fishing': t := SkillCoords(3, 3);
        'ranged': t := SkillCoords(4, 1);
        'thieving': t := SkillCoords(4, 2);
        'cooking': t := SkillCoords(4, 3);
        'prayer': t := SkillCoords(5, 1);
        'crafting': t := SkillCoords(5, 2);
        'firemaking': t := SkillCoords(5, 3);
        'magic': t := SkillCoords(6, 1);
        'fletching': t := SkillCoords(6, 2);
        'woodcutting': t := SkillCoords(6, 3);
        'runecrafting': t := SkillCoords(7, 1);
        'slayer': t := SkillCoords(7, 2);
        'farming': t := SkillCoords(7, 3);
        else writeln('invalid skill');
      end;
      MMouse(t.x, t.y + 12, 5, 5);
      repeat
        wait(10);
      until findcolor(x,y,10551295,554, 205, 743, 465);
      if((FindDtm(LeftCorner,x1,y1,554, 205, 743, 465))and(FindDtm(RightCorner,x2,y2,554, 205, 743, 465))) then
      begin
        if(current)then
        begin
          text:=skill;
          text[1]:=UpperCase(text[1])[1];
        end else
          text:='at'
        if(istextinareaex(x1,y1,x2,y2,textx,texty,text, 0, smallchars,false,true, 0,2,0))then
        begin
          if(istextinareaex(textx,texty,textx+100,texty,textx,texty,':',0,smallchars,false,true,0,2,0))then
          begin
            xp:=trim(gettextatex(textx+6,texty,0,smallchars,false,true,0,2,0,9,false,tr_digits))
            result:=strtoint(xp);
          end;
        end;
      end;
      freedtm(leftcorner);
      freedtm(rightcorner);
    end;

  7. #32
    Join Date
    Jun 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Works really well, but it seems to always trim off the last number, so 2595 appears as 259. Any idea why?

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

    Default

    Yea same here. No title until you fix that lol.

    I think its because the left side of the number changes with the length of the name of the skill, the right side changes with the number of digits in the number,and the distance to edge of the box changes with the length of Next level at and the number compared to the top line. All these together make it hard.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Functions
    By lordsaturn in forum OSR Help
    Replies: 1
    Last Post: 08-13-2007, 10:12 PM
  2. All of my functions (7 so far)
    By nght spud in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 08-04-2007, 01:59 AM
  3. Help with some functions
    By Pinqvin in forum OSR Help
    Replies: 6
    Last Post: 03-06-2007, 01:34 PM

Posting Permissions

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