Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Travian Bot

  1. #11
    Remend
    Remend is offline
    New member
    Join Date
    2010 Nov
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Travian Bot

    Thank you it was really helpful!
    -- 2010-11-16, 13:24 --
    Once again I have a problem with parsing this time. The html data is the same as post#7. Using that piece of code Iam trying to take the number after '>' and before '/' :

    Code:
    var
    htm_data: array of String;
    temp_str: String;
    i: Integer; 
    begin
    temp_str := WebBrowser1.OleObject.Document.documentElement.innerHTML;
    Setlength(htm_data,length(temp_str));
    for i:=0 to length(temp_str) -1 do
    begin
      htm_data[i] := temp_str[i];
    end;
    for i:=0 to length(temp_str) -1 do
    begin
      if htm_data[i] = 'i' then
      begin
      if htm_data[i+1] = 'd' then
      if htm_data[i+4] = 'l' then
      if htm_data[i+5] = '4' then
      begin
      j := i+6;
      while htm_data[j] <> '>' do
      begin
      j := j+1;
      end;
      while htm_data[j+1] <> '/' do
      begin
      memo1.Text := memo1.Text + htm_data[j];
      j:= j+1;
      end;
      end;
      end;
      end;
    but It returns nothing... what can be possibly wrong?
    Note that temp_str length is about 11200

  2. #12
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,221
    Thanks
    211
    Thanked 2,224 Times in 289 Posts
    Rep Power
    10

    Re: Travian Bot

    Pal, your code scares me. Please find regex library and cutoff your problem with finding substrings in string
    Note that temp_str length is about 11200
    Moreover, your code isn't optimized you need to rewrite it for better performance
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

Page 2 of 2 FirstFirst 12
Visitors found this page by searching for:

delphi travian

travian 4 bot firefox

how to write travian bot

Travian professional

Delphi game bot

travian bot delphi

travian bot pro

travian bot firefox

travian 4 bot

травиан бот т4

travian bot programming

travian4 bot firefox

бот травиан т4

professional travian bot

travian bot firefox t4delphi webbrowser oleobject document linkstravian bot t4delphi travian bottravian 4bottravianbot firefoxfire fox bot for travian 4travian delphiWriting Bots for travian 4travian bot for firefox 4Travian Bot for Firefox for T4

Posting Permissions

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