Author |
Message
Pages: 1
|
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [873] NMDC Bot - posted: 2011-11-27 15:09:03 i've put together a quick DC bot in around 116 lines (include white spaced new lines but not including includes) Code:
The code was written very quickly, is not optimized, but is good as a starter code, or even for learning a little...Settings are at the top, including ip of the server and port, the bot will connect and has 2 valid commands. "zir say text here" - will send "text here" chat line. and "zir quit" - will quit from the server and prepare to close. let me know what you think, and if you make any improvements or make any bots using this code, please post and let us know Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Molotov Member (send private message) Posts: 49 Topics: 21 Location: Behind Keyboard | [874] - posted: 2011-11-27 15:57:59 nice bot,, got a quick q though wouldn´t Code:
be better as? Code:
since you have the same action in both brackets "Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b |
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [876] - posted: 2011-11-27 17:45:16 i think that will work if you are sure that ziron will treats eax as singed integer in this expression Code:
http://www.freewebs.com/ogremagic/index.htm |
Molotov Member (send private message) Posts: 49 Topics: 21 Location: Behind Keyboard | [878] - posted: 2011-11-27 18:19:45 hence posted it as a question.. wanted to know why he didn´t used it. since i just started coding zir/asm. "Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [879] - posted: 2011-11-27 18:45:03 yes and no.. it is possible to make ziron treat it as signed via a typecast Code:
however the idea was to have different error codes at some point... recv returning 0 = gracefully closed.. if -1 then there was an error get last error and print something... but that is for later Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [902] - posted: 2011-11-29 15:47:17 I decided to have a play around with this and try make it easier for others to understand, also i've made it process lines in order... since the previous version expected data sent in a specific order, this version is a little better and makes use of some functions to help keep things simple. It will also print the unknown commands in red, i did not re-add the commands in this version, that is your task You require the latest beta or newer of (Ziron 1.1.28.1) for this update with latest updated includes. (Which i have updated at usual beta download link) Code:
let me know your thoughts. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 8 user(s) online. 0 member(s) and 8 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |