Results 1 to 22 of 22

Thread: How can I...?

  1. #1
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Exclamation How can I...?

    Edited thread! Got help for something else but now im asking...

    IMPORTANT* Is it possible to add a code so the bot can stay logged in? Like for example, each 30 seconds, it moves the camera? I would like a simple code with anything that can let the bot stay logged in.

    less IMPORTANT* Is it possible to change the link in of 2007 for eoc? Basically I want to get both so if you are able to put them both in one script(like when you say !07 its pc 2007 and if !eoc its pc eoc), would be great. If not, can you guys help make this into RS3? I think its only the link but i dont know what link for eoc and if its really that.

    Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    
    Type T07Item = record
      Name                 : String;
      ID,Average,RecentLow,
      RecentHigh,AlchPrice : Integer;
    end;
    
    var
    LastT : string;
    
    // By Flight
    function getItem(Item: String): T07ITem;
    var
      fullS,s1,s2: String;
    begin
      Result.ID := 0;
      fullS := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (Pos('"error"', fullS) > 0) then
          Exit;
    
      Result.Name       := capitalize(Item);
      Result.ID         := Round(StrToInt(between('"id":"', '"', fullS)));
      Result.Average    := Round(StrToFloat(between('average":"', '"', fullS)));
      Result.RecentHigh := Round(StrToFloat(between('t_high":"', '"', fullS)));
      Result.RecentLow  := Round(StrToFloat(between('t_low":"', '"', fullS)));
      Result.AlchPrice  := Round(StrToFloat(between('lch":"', '"', fullS)));
    end;
    
    procedure start();
    var
      T,S : String;
      I   : Integer;
      item: T07Item;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)
    
        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');
    
            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
                TypeSend('/'+item.Name+' is '+intToStr(item.Average))
              else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end else if (Expl[I] = '!full') then
          begin
            T := replace(T, '!full ', '');
            T := replace(T, ' ', '_');
    
            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
              begin
                S := toStr(item);
                TypeSend('/'+S);
              end else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end;
        end;
      until false;
    end;
    
    begin
      setupSRL();
      activateClient();
    
      start();
    end.
    Last edited by SimbaGod; 10-09-2013 at 11:46 AM.

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Give me a second and I'll edit this post.

    Edit:
    Untested but this should work:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    var
    LastT : string;

    function getPrice(Item: String) : Integer; // Made by Shatterhand, you're awesome! :)
    var
      s1,s2: String;
    begin
      s1 := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (s1 = '{"error":"No results found."}') then
        Exit;

      s2 := Between('"average":"', '"', s1);
      Result := Round(StrToFloat(s2));
    end;

    procedure start();
    var
      T   : String;
      I,P : Integer;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '+');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              P := getPrice(T);
              if (P > 0) then
                TypeSend(capitalize(T)+' pricechecked at ' + IntTostr(P) + ' GP')
              else
              begin
                writeln('Incorrect item');
                Exit;
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Let me know how that works for ya.
    Last edited by Flight; 10-07-2013 at 01:26 AM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Give me a second and I'll edit this post.
    OK! thanksss

  4. #4
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Give me a second and I'll edit this post.

    Edit:
    Untested but this should work:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    var
    LastT : string;

    function getPrice(Item: String) : Integer; // Made by Shatterhand, you're awesome! :)
    var
      s1,s2: String;
    begin
      s1 := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (s1 = '{"error":"No results found."}') then
        Exit;

      s2 := Between('"average":"', '"', s1);
      Result := Round(StrToFloat(s2));
    end;

    procedure start();
    var
      T   : String;
      I,P : Integer;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '+');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              P := getPrice(T);
              if (P > 0) then
                TypeSend(capitalize(T)+' pricechecked at ' + IntTostr(P) + ' GP')
              else
              begin
                writeln('Incorrect item');
                Exit;
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Let me know how that works for ya.
    Theres a + meaning the space for the item before the pricechecked. Can it be a space beside of a + (see screenshot)? Also,the "incorrect item" doesnt work. It says the pc of the item before.

    Screenshot:
    Last edited by SimbaGod; 10-07-2013 at 01:46 AM.

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Try this:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    var
    LastT : string;

    function getPrice(Item: String): Integer; // Made by Shatterhand, you're awesome! :)
    var
      s1,s2: String;
    begin
      Result := 0;
      s1 := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (s1 = '{"error":"No results found."}') then
        Exit;

      s2 := Between('"average":"', '"', s1);
      Result := Round(StrToFloat(s2));
    end;

    procedure start();
    var
      T   : String;
      I,P : Integer;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              P := getPrice(T);
              if (P > 0) then
                TypeSend(capitalize(T)+' pricechecked at ' + IntTostr(P) + ' GP')
              else
              begin
                writeln('Incorrect item');
                Exit;
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Try this:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    var
    LastT : string;

    function getPrice(Item: String): Integer; // Made by Shatterhand, you're awesome! :)
    var
      s1,s2: String;
    begin
      Result := 0;
      s1 := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (s1 = '{"error":"No results found."}') then
        Exit;

      s2 := Between('"average":"', '"', s1);
      Result := Round(StrToFloat(s2));
    end;

    procedure start();
    var
      T   : String;
      I,P : Integer;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              P := getPrice(T);
              if (P > 0) then
                TypeSend(capitalize(T)+' pricechecked at ' + IntTostr(P) + ' GP')
              else
              begin
                writeln('Incorrect item');
                Exit;
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.
    Hey! thanks for doing this I have a problem with the script tho. The item name is great but the mistake thing isnt workin. It stops the bot like before.


  7. #7
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Try this one

    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    var
    LastT : string;

    function getPrice(Item: String): Integer; // Made by Shatterhand, you're awesome! :)
    var
      s1,s2: String;
    begin
      Result := 0;
      s1 := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (s1 = '{"error":"No results found."}') then
        Exit;

      s2 := Between('"average":"', '"', s1);
      try
        Result := Round(StrToFloat(s2));
      except
        Writeln(Format('Invalid item ''%s''.', [Item]));
      end;
    end;

    procedure start();
    var
      T   : String;
      I,P : Integer;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              P := getPrice(T);
              if (P > 0) then
                TypeSend(capitalize(T)+' pricechecked at ' + IntTostr(P) + ' GP')
              else
              begin
                writeln('Incorrect item');
                Exit;
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Or what Flight suggested below. That would be the better solution as it is more in line with the original code.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  8. #8
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Ok try this: replace these two lines:
    Simba Code:
    if (s1 = '{"error":"No results found."}') then
        Exit;
    with these two lines:
    Simba Code:
    if (Pos('"error"', s1) > 0) then
        Exit;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  9. #9
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Ok try this: replace these two lines:
    Simba Code:
    if (s1 = '{"error":"No results found."}') then
        Exit;
    with these two lines:
    Simba Code:
    if (Pos('"error"', s1) > 0) then
        Exit;
    didnt quite work but with all your help, i got my pc working! Thank you

  10. #10
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Edited thread! Need help for that!

  11. #11
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Need something else! Was thinking it was simple to do (im starting) but i cant see it! Help me :S

  12. #12
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Yeah that's possible if you create a new type in the script which will store the item data. Give me a few minutes and I'll see what I can come up with.

    Try this on for size:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}

    Type T07Item = record
      Name                 : String;
      ID,Average,RecentLow,
      RecentHigh,AlchPrice : Integer;
    end;

    var
    LastT : string;

    // By Flight
    function getItem(Item: String): T07ITem;
    var
      fullS,s1,s2: String;
    begin
      Result.ID := 0;
      fullS := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (Pos('"error"', fullS) > 0) then
          Exit;

      Result.Name       := capitalize(Item);
      Result.ID         := Round(StrToInt(between('"id":"', '"', fullS)));
      Result.Average    := Round(StrToFloat(between('age":"', '"', fullS)));
      Result.RecentHigh := Round(StrToFloat(between('t_high":"', '"', fullS)));
      Result.RecentLow  := Round(StrToFloat(between('t_low":"', '"', fullS)));
      Result.AlchPrice  := Round(StrToFloat(between('lch":"', '"', fullS)));
    end;

    procedure start();
    var
      T,S : String;
      I   : Integer;
      item: T07Item;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
                TypeSend('/'+item.Name+': '+intToStr(item.Average))
              else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end else if (Expl[I] = '!full') then
          begin
            T := replace(T, '!full ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
              begin
                S := toStr(item);
                TypeSend('/'+S);
              end else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Type "!pc (item name)" for getting the average price only. Type "!full (item name)" for getting all the data of an item (Name, ID, average price, recent high, recent low, high alch value). For example, if you did "!full raw monkfish" this is what you would get:
    Code:
    "{'Raw_monkfish', 3889, 415, 415, 414, 138}"
    ...assuming my code above is correct.
    Last edited by Flight; 10-09-2013 at 04:03 AM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  13. #13
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Yeah that's possible if you create a new type in the script which will store the item data. Give me a few minutes and I'll see what I can come up with.

    Try this on for size:
    Simba Code:
    program Pricechecker;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}

    Type T07Item = record
      Name                 : String;
      ID,Average,RecentLow,
      RecentHigh,AlchPrice : Integer;
    end;

    var
    LastT : string;

    // By Flight
    function getItem(Item: String): T07ITem;
    var
      fullS,s1,s2: String;
    begin
      Result.ID := 0;
      fullS := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (Pos('"error"', fullS) > 0) then
          Exit;

      Result.Name       := capitalize(Item);
      Result.ID         := Round(StrToInt(between('"id":"', '"', fullS)));
      Result.Average    := Round(StrToFloat(between('age":"', '"', fullS)));
      Result.RecentHigh := Round(StrToFloat(between('t_high":"', '"', fullS)));
      Result.RecentLow  := Round(StrToFloat(between('t_low":"', '"', fullS)));
      Result.AlchPrice  := Round(StrToFloat(between('lch":"', '"', fullS)));
    end;

    procedure start();
    var
      T,S : String;
      I   : Integer;
      item: T07Item;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
                TypeSend('/'+item.Name+': '+intToStr(item.Average))
              else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end else if (Expl[I] = '!full') then
          begin
            T := replace(T, '!full ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
              begin
                S := toStr(item);
                TypeSend('/'+S);
              end else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end;
        end;
      until false;
    end;

    begin
      setupSRL();
      activateClient();

      start();
    end.

    Type "!pc (item name)" for getting the average price only. Type "!full (item name)" for getting all the data of an item (Name, ID, average price, recent high, recent low, high alch value). For example, if you did "!full raw monkfish" this is what you would get:
    Code:
    "{'Raw_monkfish', 3889, 415, 415, 414, 138}"
    ...assuming my code above is correct.
    Thanks flight! I got an error doing !pc rune and !full rune. Both came up with this :



    Edit: All is ok! I replaced "age" with "average" and it works. THANKS FLIGHT! I know im annoying but is it possible that the bot stays loged in? like is it possible to code for the bot : each 30 seconds, the camera moves.

    Because it logs out when inactive.
    Last edited by SimbaGod; 10-09-2013 at 11:42 AM.

  14. #14
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    "
    IMPORTANT* Is it possible to add a code so the bot can stay logged in? Like for example, each 30 seconds, it moves the camera? I would like a simple code with anything that can let the bot stay logged in. "

    Or type a letter each 1 min to be active and stay logged in XD

  15. #15
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Need this!

  16. #16
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by SimbaGod View Post
    Need this!
    you can make another procedure like this

    Simba Code:
    procedure NoLog;
    begin
    case random(6969) of //you can change this. of you want this more frequent you lower the number.
    0..10: randomtab(false);
    11..20: makecompass(randomrange(0, 360));
    end;
    end;

    this will click random tabs and move the camera randomly.

  17. #17
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    you can make another procedure like this

    Simba Code:
    procedure NoLog;
    begin
    case random(6969) of //you can change this. of you want this more frequent you lower the number.
    0..10: randomtab(false);
    11..20: makecompass(randomrange(0, 360));
    end;
    end;

    this will click random tabs and move the camera randomly.
    Does not work can u do copy the full link and insert it so m sure i did the right thing? Maybe its the code tho?

  18. #18
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by SimbaGod View Post
    Does not work can u do copy the full link and insert it so m sure i did the right thing? Maybe its the code tho?
    idk if this was the correct one, but this should work. if its never doing anything try to lower the amount (6966)
    Simba Code:
    program pricechecker;

    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}

    Type T07Item = record
      Name                 : String;
      ID,Average,RecentLow,
      RecentHigh,AlchPrice : Integer;
    end;

    var
    LastT : string;

    // By Flight
    function getItem(Item: String): T07ITem;
    var
      fullS,s1,s2: String;
    begin
      Result.ID := 0;
      fullS := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (Pos('"error"', fullS) > 0) then
          Exit;

      Result.Name       := capitalize(Item);
      Result.ID         := Round(StrToInt(between('"id":"', '"', fullS)));
      Result.Average    := Round(StrToFloat(between('age":"', '"', fullS)));
      Result.RecentHigh := Round(StrToFloat(between('t_high":"', '"', fullS)));
      Result.RecentLow  := Round(StrToFloat(between('t_low":"', '"', fullS)));
      Result.AlchPrice  := Round(StrToFloat(between('lch":"', '"', fullS)));
    end;

    procedure start();
    var
      T,S : String;
      I   : Integer;
      item: T07Item;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
                TypeSend('/'+item.Name+': '+intToStr(item.Average))
              else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end else if (Expl[I] = '!full') then
          begin
            T := replace(T, '!full ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
              begin
                S := toStr(item);
                TypeSend('/'+S);
              end else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end;
        end;
      until false;
    end;

    procedure NoLog;
    begin
    case random(6969) of //you can change this. of you want this more frequent you lower the number.
    0..10: randomtab(false);
    11..20: makecompass(randomrange(0, 360));
    end;
    end;

    begin
      setupSRL();
      activateClient();
      repeat
      start();
      NoLog;
      until(false)
    end.

  19. #19
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by hoodz View Post
    idk if this was the correct one, but this should work. if its never doing anything try to lower the amount (6966)
    Simba Code:
    program pricechecker;

    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}

    Type T07Item = record
      Name                 : String;
      ID,Average,RecentLow,
      RecentHigh,AlchPrice : Integer;
    end;

    var
    LastT : string;

    // By Flight
    function getItem(Item: String): T07ITem;
    var
      fullS,s1,s2: String;
    begin
      Result.ID := 0;
      fullS := GetPage('http://forums.zybez.net/runescape-2007-prices/api/' + Item);
      if (Pos('"error"', fullS) > 0) then
          Exit;

      Result.Name       := capitalize(Item);
      Result.ID         := Round(StrToInt(between('"id":"', '"', fullS)));
      Result.Average    := Round(StrToFloat(between('age":"', '"', fullS)));
      Result.RecentHigh := Round(StrToFloat(between('t_high":"', '"', fullS)));
      Result.RecentLow  := Round(StrToFloat(between('t_low":"', '"', fullS)));
      Result.AlchPrice  := Round(StrToFloat(between('lch":"', '"', fullS)));
    end;

    procedure start();
    var
      T,S : String;
      I   : Integer;
      item: T07Item;
      Expl: TStringArray;
    begin
      repeat
        T := lowercase(getChatBoxText(8, 128));
        Expl := explode(' ', T)

        for I:=0 to high(Expl) do
        begin
          if (Expl[I] = '!pc') then
          begin
            T := replace(T, '!pc ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
                TypeSend('/'+item.Name+': '+intToStr(item.Average))
              else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end else if (Expl[I] = '!full') then
          begin
            T := replace(T, '!full ', '');
            T := replace(T, ' ', '_');

            if not (T = LastT) then
            begin
              LastT := T;
              writeLn(T);
              item := getItem(T);
              if (item.ID > 0) then
              begin
                S := toStr(item);
                TypeSend('/'+S);
              end else
              begin
                writeln('Incorrect item');
                TypeSend('/Incorrect Item');
              end;
            end;
          end;
        end;
      until false;
    end;

    procedure NoLog;
    begin
    case random(6969) of //you can change this. of you want this more frequent you lower the number.
    0..10: randomtab(false);
    11..20: makecompass(randomrange(0, 360));
    end;
    end;

    begin
      setupSRL();
      activateClient();
      repeat
      start();
      NoLog;
      until(false)
    end.
    sry but still not working :S even with that you said (the change)

  20. #20
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by SimbaGod View Post
    sry but still not working :S even with that you said (the change)
    Come on man, I already did the hard part for you. Surely you can make a loop that calls this (and random-finders) constantly and also does random anti-bans. Just read up on some tutorials about loops and adding anti-bans to your script. I'm positive you can come up with something nice on your own if you just give a little effort.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  21. #21
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Come on man, I already did the hard part for you. Surely you can make a loop that calls this (and random-finders) constantly and also does random anti-bans. Just read up on some tutorials about loops and adding anti-bans to your script. I'm positive you can come up with something nice on your own if you just give a little effort.
    I tried many things... I cant get it! I tried doing an auto typer with the pc bot so it wont log out. I tried doing the camera thing but didnt work. I got an answer on that so i tried it and didnt work so i had to edit the script and do some things... (That didnt work!) it doesnt seem im trying but i spend alot of time trying to know what you guys do.

    I only need the code for it so it doesnt logged out after being inactive! Flight, thank you alot for your time on my script. I appeciate it

  22. #22
    Join Date
    Oct 2013
    Posts
    42
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Need this!

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
  •