Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[C#]TibiaAPI Project: TP Bot. - Page 2
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36

Thread: [C#]TibiaAPI Project: TP Bot.

  1. #11

    RE: [C#]TibiaAPI Project: TP Bot.

    Quote Originally Posted by Blaster_89
    Even better is to not fuck around with string splitting and use a listbox like it was intended. Write a waypoint class and add an instance to the listbox, then you can use it like so:
    [code=c#]
    Waypoint wp = (Waypoint)listBox1.SelectedItem;
    [/code]
    Noob thing to ask but someone got to. How do you add an instance to a listbox? That sounds confusing....

  2. #12
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: [C#]TibiaAPI Project: TP Bot.

    Quote Originally Posted by Aggressive Prefector
    Quote Originally Posted by Blaster_89
    Even better is to not fuck around with string splitting and use a listbox like it was intended. Write a waypoint class and add an instance to the listbox, then you can use it like so:
    [code=c#]
    Waypoint wp = (Waypoint)listBox1.SelectedItem;
    [/code]
    Noob thing to ask but someone got to. How do you add an instance to a listbox? That sounds confusing....
    [code=c#]
    Waypoint wp = new Waypoint(parameters);
    listBox1.Items.Add(wp); /* listBox1.Items is a list of objects of type object. Object as a type can be anything */
    [/code]

    edit: a listbox is pretty much the same as a list (List<T>), except it also shows its contents to the user by using each object's ToString()

  3. #13
    Senior Member
    Join Date
    Oct 2007
    Posts
    216

    RE: [C#]TibiaAPI Project: TP Bot.

    Nice to see you working again Veritias.
    you can find tons of code in vb.net in my LaptrotBot source around here.

    a suggest: Use a Lookat function or say something in npc channel for an anti-iddle instead to dance. a dance is safe if you are pretty sure that nobody is around there.

  4. #14
    Administrator
    Join Date
    Mar 2007
    Posts
    436

    RE: [C#]TibiaAPI Project: TP Bot.

    Haha, thanks! We will see how this goes though! Still got a lot of work to do.

    @ suggestion:
    Well, it only moves after 10 minutes, so it's hardly noticeable

  5. #15
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    RE: [C#]TibiaAPI Project: TP Bot.

    Quote Originally Posted by Blaster_89
    Quote Originally Posted by Aggressive Prefector
    Quote Originally Posted by Blaster_89
    Even better is to not fuck around with string splitting and use a listbox like it was intended. Write a waypoint class and add an instance to the listbox, then you can use it like so:
    [code=c#]
    Waypoint wp = (Waypoint)listBox1.SelectedItem;
    [/code]
    Noob thing to ask but someone got to. How do you add an instance to a listbox? That sounds confusing....
    [code=c#]
    Waypoint wp = new Waypoint(parameters);
    listBox1.Items.Add(wp); /* listBox1.Items is a list of objects of type object. Object as a type can be anything */
    [/code]

    edit: a listbox is pretty much the same as a list (List<T>), except it also shows its contents to the user by using each object's ToString()
    But when you need to save it into a file how do you write the objects to a for examble textfile? Just read them as text save them as text? And then parse them to locations when you load them again?

    So I prefere to handle every location, I add it as string read it as string and save it as string.

  6. #16
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: [C#]TibiaAPI Project: TP Bot.

    Quote Originally Posted by klusbert
    Quote Originally Posted by Blaster_89
    Quote Originally Posted by Aggressive Prefector
    Quote Originally Posted by Blaster_89
    Even better is to not fuck around with string splitting and use a listbox like it was intended. Write a waypoint class and add an instance to the listbox, then you can use it like so:
    [code=c#]
    Waypoint wp = (Waypoint)listBox1.SelectedItem;
    [/code]
    Noob thing to ask but someone got to. How do you add an instance to a listbox? That sounds confusing....
    [code=c#]
    Waypoint wp = new Waypoint(parameters);
    listBox1.Items.Add(wp); /* listBox1.Items is a list of objects of type object. Object as a type can be anything */
    [/code]

    edit: a listbox is pretty much the same as a list (List<T>), except it also shows its contents to the user by using each object's ToString()
    But when you need to save it into a file how do you write the objects to a for examble textfile? Just read them as text save them as text? And then parse them to locations when you load them again?

    So I prefere to handle every location, I add it as string read it as string and save it as string.
    Why convert numericals to a string? Instead, use BinaryReader or FileStream.
    Makes the files smaller and you don't have to mess about with converting strings
    For example, the structure for a waypoint could be 1 byte waypoint type (walk, node, shovel, rope etc), 2 bytes X, 2 bytes Y and 1 byte Z.
    Doesn't really get any easier than that

    edit: You could even write a small wrapper for handling byte arrays, then it'd be so easy a beginner could do it with ease

  7. #17
    Super Moderator klusbert's Avatar
    Join Date
    Dec 2007
    Posts
    1,201

    RE: [C#]TibiaAPI Project: TP Bot.

    Nop it thats easy enough But if in the future have stuff like script lines etc. Wich my bot have. Maybe I'm beeing stupid again. Beeeeeeer!!!

  8. #18

    RE: [C#]TibiaAPI Project: TP Bot.

    Humans cant read binary in notepad. Lines of text anyone can read seems simple. No one is going to cry over a few kb in a settings file or waypoint file.

  9. #19
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: [C#]TibiaAPI Project: TP Bot.

    Quote Originally Posted by Aggressive Prefector
    Humans cant read binary in notepad. Lines of text anyone can read seems simple. No one is going to cry over a few kb in a settings file or waypoint file.
    Writing a program to read the data and output it in editable text is a matter of a couple of minutes.
    The advantage of this is cleaner code, and cleaner code means easier maintainability, which is quite important when a bot has all the features a good bot should have.

  10. #20
    Senior Member
    Join Date
    Jan 2010
    Location
    Venezuela
    Posts
    366

    RE: [C#]TibiaAPI Project: TP Bot.

    Don't you guys believe that the work for this project could be better without TibiaAPI itself, I mean to work on the client externally, SendMessage & PostMessage a bot like NeoBot.

Posting Permissions

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