DarthCarter Report post Posted June 19, 2006 Hi, before I write one myself, I thought I'd ask if there is a bot skeleton written in perl floating around ? If not I'll start writing one and make it available once it's semi-functional cheers Share this post Link to post Share on other sites
majestyk Report post Posted June 19, 2006 Hi, before I write one myself, I thought I'd ask if there is a bot skeleton written in perl floating around ? If not I'll start writing one and make it available once it's semi-functional cheers I was looking around for different bot implementations a while ago because I was thinking about a perl bot too. I didn't find a perl implementation and finally decided to go for a different language because perl SDL lacks SDL_net support, and I thought that at least that part should be provided by the language. Maybe that has changed in the meanwhile, please keep us informed :-) Cheers, maj Share this post Link to post Share on other sites
DarthCarter Report post Posted June 19, 2006 Hi, before I write one myself, I thought I'd ask if there is a bot skeleton written in perl floating around ? If not I'll start writing one and make it available once it's semi-functional cheers I was looking around for different bot implementations a while ago because I was thinking about a perl bot too. I didn't find a perl implementation and finally decided to go for a different language because perl SDL lacks SDL_net support, and I thought that at least that part should be provided by the language. Maybe that has changed in the meanwhile, please keep us informed :-) Cheers, maj I'm not sure what the SDL_net stuff provides - I'm hoping it's just a socket functions etc, which aren't that difficult in perl, anyway I'll post when I have something non-trivial working cheers Share this post Link to post Share on other sites
Jaxbot Report post Posted June 19, 2006 (edited) A bot skeliton? I'm not even sure that's allowed, but feel free to correct me if I'm wrong. EDIT: wait, by skeliton, do you mean Partly-writen-bot, or a bot program thats a skeliton in game? Edited June 19, 2006 by Jaxbot Share this post Link to post Share on other sites
ttlanhil Report post Posted June 19, 2006 A bot skeliton? I'm not even sure that's allowed, but feel free to correct me if I'm wrong. EDIT: wait, by skeliton, do you mean Partly-writen-bot, or a bot program thats a skeliton in game? the code has nothing to do with the account. skeleton, of course, refers to the 'bare bones' of a bot. it doesn't do much except log in, but it's ready for you to add handlers for commands and such as for the networking... you can implement your own easily enough. perl sockets are easy to deal with, you'll just need some special work to deal with binary data (if the server wants a Uint8 stream and you send a perl string, you may have issues) Share this post Link to post Share on other sites
DarthCarter Report post Posted June 19, 2006 A bot skeliton? I'm not even sure that's allowed, but feel free to correct me if I'm wrong. EDIT: wait, by skeliton, do you mean Partly-writen-bot, or a bot program thats a skeliton in game? the code has nothing to do with the account. skeleton, of course, refers to the 'bare bones' of a bot. it doesn't do much except log in, but it's ready for you to add handlers for commands and such as for the networking... you can implement your own easily enough. perl sockets are easy to deal with, you'll just need some special work to deal with binary data (if the server wants a Uint8 stream and you send a perl string, you may have issues) Yep - I meant the bare bones of a bot minus this bits that do anything usefull. Binary data is easy - pack and unpack are your friends ;-) Share this post Link to post Share on other sites
Jaxbot Report post Posted June 20, 2006 Oh, ok. Sorry, I tought you were trying to make a Real Skeliton ingame, and I don't think animals are allowed Ok, that makes a little more sense. Share this post Link to post Share on other sites
ttlanhil Report post Posted June 20, 2006 (edited) Binary data is easy - pack and unpack are your friends ;-) aye, just a matter of remembering to always use it. some people around would probably forget and try to send perl-type integers and strings Oh, ok. Sorry, I tought you were trying to make a Real Skeliton ingame, and I don't think animals are allowed Ok, that makes a little more sense. a bot is an automated player, with extra restrictions and a flag to change the name colour. how would bot code set it to a monster type?it's not like skeleton/framework is a little-used term in coding either... Edited June 20, 2006 by ttlanhil Share this post Link to post Share on other sites
dns_server Report post Posted June 20, 2006 Ethereal is your friend for debugging and reverse engeneering the packets. First capture you useing the real client then program your bot and get it to send messages exactly like the captured data. Share this post Link to post Share on other sites
DarthCarter Report post Posted June 21, 2006 Ethereal is your friend for debugging and reverse engeneering the packets. First capture you useing the real client then program your bot and get it to send messages exactly like the captured data. Yep - hopefully less traumatic than debugging firewalls with 3 simulatenous tcpdump logs ;-) Share this post Link to post Share on other sites
majestyk Report post Posted June 22, 2006 Ethereal is your friend for debugging and reverse engeneering the packets. First capture you useing the real client then program your bot and get it to send messages exactly like the captured data. Just look at the client implementation or other bot implementations to see what's going on. Where is the sense in reverse engineering a program you have to sources for? ;-) Share this post Link to post Share on other sites
ttlanhil Report post Posted June 22, 2006 Just look at the client implementation or other bot implementations to see what's going on. Where is the sense in reverse engineering a program you have to sources for? ;-) it's not as silly as it sounds. sure, if you can read ELC's source to get most of it done, it's probably easier, but what about when something just isn't coming out right? maybe you have an offset or length or something wrong. checking with ethereal to make sure you're getting exactly the same in elc and your bot rules out everything up to message parsing Share this post Link to post Share on other sites
DarthCarter Report post Posted June 22, 2006 Just look at the client implementation or other bot implementations to see what's going on. Where is the sense in reverse engineering a program you have to sources for? ;-) it's not as silly as it sounds. sure, if you can read ELC's source to get most of it done, it's probably easier, but what about when something just isn't coming out right? maybe you have an offset or length or something wrong. checking with ethereal to make sure you're getting exactly the same in elc and your bot rules out everything up to message parsing Yep, both are just ways of getting more information and correlating what you *think* is happening in the code. I have looked at a php bot, the official client code and packet dumps - and after a flurry of endian errors, off-by-one problems, pack/unpack stuff-ups and caffeine saturation have got the test server to have a simple conversation with me ;-) Share this post Link to post Share on other sites
Torg Report post Posted June 22, 2006 I have looked at a php bot, the official client code and packet dumps - and after a flurry of endian errors, off-by-one problems, pack/unpack stuff-ups and caffeine saturation have got the test server to have a simple conversation with me ;-) Hehehe. \o/ That sounds *sooooo* familiar that I love it. Share this post Link to post Share on other sites
Drakos7 Report post Posted June 26, 2006 Well done Darth. Share this post Link to post Share on other sites
dns_server Report post Posted June 26, 2006 Well done, if you need some help from someone who doesn't know any perl (But is trying to learn) just ask. I'm involved in the java side so i've probly found some of the same problems. Share this post Link to post Share on other sites
Drakos7 Report post Posted June 26, 2006 I am deep in perl for my work, so I might be able to field questions as well. Share this post Link to post Share on other sites
DarthCarter Report post Posted June 26, 2006 I am deep in perl for my work, so I might be able to field questions as well. Thanks for the offers (dns_server as well), I'm pretty comfortable in perl, but have one perl and one EL related question. 1. Do you know how to export variables from a module with their values set, In ELConstants.pm I have something like packge ELConstants; require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%ServerCommands); my %ServerCommands = ( 'RAW_TEXT' => chr(0), ); then in ELCLient.pm I have use ELConstants qw(%ServerCommands); The variable is defined but empty, i. e {} Any ideas ? 2. I have assumed that the EL server preserves the order of actions for each individual actor, i.e if I say 'Look at X' followed by 'Look at Y' the server will tell me about X and then about Y, and that if another actor performs two actions I will see those actions in the same order in which the actor performed them correct ? Oh, and I suppose a license question - is there any restrictions on what license we can release bots/clients for EL under ? thanks Share this post Link to post Share on other sites
ttlanhil Report post Posted June 26, 2006 (edited) 2. I have assumed that the EL server preserves the order of actions for each individual actor, i.e if I say 'Look at X' followed by 'Look at Y' the server will tell me about X and then about Y, and that if another actor performs two actions I will see those actions in the same order in which the actor performed them correct ?it's not the server preserving them, it just responds in order. each command is a seperate network message, and TCP ensures that messages stay in order Edited June 26, 2006 by ttlanhil Share this post Link to post Share on other sites
DarthCarter Report post Posted June 26, 2006 2. I have assumed that the EL server preserves the order of actions for each individual actor, i.e if I say 'Look at X' followed by 'Look at Y' the server will tell me about X and then about Y, and that if another actor performs two actions I will see those actions in the same order in which the actor performed them correct ?it's not the server preserving them, it just responds in order. each command is a seperate network message, and TCP ensures that messages stay in order Ok, just wanted to make sure that the server didn't deliberatly re-order it's reponses ;-) thanks Share this post Link to post Share on other sites
DarthCarter Report post Posted June 26, 2006 Figured it out, i should have been using 'use vars' to declare package global variables, not my() I am deep in perl for my work, so I might be able to field questions as well. Thanks for the offers (dns_server as well), I'm pretty comfortable in perl, but have one perl and one EL related question. 1. Do you know how to export variables from a module with their values set, In ELConstants.pm I have something like packge ELConstants; require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%ServerCommands); my %ServerCommands = ( 'RAW_TEXT' => chr(0), ); then in ELCLient.pm I have use ELConstants qw(%ServerCommands); The variable is defined but empty, i. e {} Any ideas ? 2. I have assumed that the EL server preserves the order of actions for each individual actor, i.e if I say 'Look at X' followed by 'Look at Y' the server will tell me about X and then about Y, and that if another actor performs two actions I will see those actions in the same order in which the actor performed them correct ? Oh, and I suppose a license question - is there any restrictions on what license we can release bots/clients for EL under ? thanks Share this post Link to post Share on other sites
DarthCarter Report post Posted July 1, 2006 Hi, before I write one myself, I thought I'd ask if there is a bot skeleton written in perl floating around ? If not I'll start writing one and make it available once it's semi-functional cheers Hi, Could I get someone who is in a guild to do some simple trades with DarthBot who is near the fire on IP. I have trading working but I am unguilded and want to see what the differences are. To trade with the bot, start a trade with it and then PM with 'buy', 'sell', 'inv', 'wanted' or 'help' for some really basic help It may be a bit slow as I have full packet logging on . Thanks Share this post Link to post Share on other sites