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 Created a heal bot in C# take a look
I figured I'll just share the code for a simple heal bot. I just started to write it last night so the code is not perfect, nor commented Someone out there might find use for it or maybe just look at the code to learn something.
The reason why I developed this is mainly because I start a course in C# this fall, and I figured I'll get ahead and learn something before then. My next project will probably be something more advanced, I sure want to learn stuff about injection into the client and method calls through Tibia API. We will see what comes out
Since you are going to start a c# course, let me just point out one thing - actual programming (I mean writing the code itself) is really the least part of the whole thing. The hardest part is to create a good architecture of your program. You want to train - that's why I'm writing this post. I know you wrote this during one night but I think you should rethink what your classes do. Look at tibiaapi's structure and learn from it, it's really good. And btw: class KeyboardSimulator, lines 37 and 40. If you tibia is null, I think you will get some kind of nullpointer exception cause you are using a property from object tibia.
Thanks a lot for your reply @Danioss, I really appriciate that you took the time. I watched the three first videos, and it's a great series of videos for learning C#, thanks a lot for sharing those. I understand completly what you mean about getting the architecture right - It's damn hard. I have been reading into some design patterns and when to use them etc. but I can say that I'm not really comfortable with the concept yet.
Do you think that there is a certain design pattern that would be a good approch for this type of application?
Well, thanks again for the reply and for the tips!