Blizzhackers

Return of the Jedi

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Thu Jun 20, 2013 4:15 am


All times are UTC [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Done something new and amazing? Post it here!
PostPosted: Thu May 27, 2010 7:26 pm 
 
User
User
User avatar

Joined: Fri Jun 04, 2004 3:36 am
Location: GA
Basically, we see a *ton* of the same stuff recycled over and over again, new scripts posted that depend on old libs that aren't making full use of the core because they're recycled and converted from other bots from D2NT or D2JSP. While these work, happily so, they bring along a lot of bugs because D2BS has a lot of functions that are generally not used, or not efficiently used.

Anyway, asking people who are doing individual scripts, or want to show off some snippets of code that isn't the same old NTM_GoHere(); NTA_KillThis(); stuff.

I think it'll help people learn a bit more, I've updated the API a little bit *pokes lord2800*, which is helpful, but I do think that it'll help people to see code that works without depending on a gazillion includes to make it work, I think people who are learning are better off seeing example individually then looking at how NTTM calls NTM which calls NTA which calls a core function to do NT_DoThis();. I could be wrong.

Anyway, here's an example of my XferBot, this is the D2BS side of the code, there's also a mIRC side of the code. Probably the most important part of this is js_strict(true);, I like to always have that in place, and heed/fix any warnings it throws.

The example below shows you how to login, make a game, send messages to IRC, and a bit of anti-idling.

sendDDE is a great feature that is UNIQUE to d2bs, you can send DDE (Dynamic Data Exchange) messages to any application that has a DDE server, I use it to send messages to #MultiBot, and PM. You can also use it to execute other mIRC commands, and it'd make a cool notification system, especially if you use different computers to bot on like I do.

I'll be posting lots more like this in time.

starter.dbj:

js_strict(true);

include('gamemanager.dbl');

function main()
{
login('timex-xfer');
createGame("Xfer" + rand(1,5000), "xfer" + rand(1,5000));
};



default.dbj:


js_strict(true);
function main() {
    sendDDE(1, "logger", "command", "", "/set %WestGame " + me.gamename);
    sendDDE(1, "logger", "command", "", "/set %WestPass " + me.gamepassword);
    sendDDE(1, "logger", "command", "", "//msg %WestXferNick 14Xferbot is waiting for you in %WestGame // %WestPass ");
    sendDDE(1, "logger", "command", "", "//msg %WestXferNick 4Do not forget to tell me !Done when you are done, or you may be banned!");
    while (me.ingame) {
        delay(30000);
        say("Anti-Idle Message!");
      if (me.gametype == 1) {
              weaponSwitch(0);
      }
    }
};

_________________
Image

Top
 Profile  
 Post subject:
PostPosted: Thu May 27, 2010 9:20 pm 
 
User
User

Joined: Mon Jan 01, 2007 2:48 am
Fabulous work once again Timex,

I like the idea of an xfer bot. sendDDE sounds to and looks to be a better method/way of team botting...

Top
 Profile  
 Post subject:
PostPosted: Thu May 27, 2010 9:35 pm 
 
User
User
User avatar

Joined: Fri Jun 04, 2004 3:36 am
Location: GA
YourGreatestMember wrote:
Fabulous work once again Timex,

I like the idea of an xfer bot. sendDDE sounds to and looks to be a better method/way of team botting...


Just note that the DDE server within D2BS is broken, not sure why yet, the code looks fine, so you can send from D2BS, but can't recieve. lord2800 is aware and will fix this AFAIK.

The Xferbot is active on irc.synirc.net #Multibot, it's not just an example, it's a copy of the working bot. :P

_________________
Image

Top
 Profile  
 Post subject:
PostPosted: Sat May 29, 2010 12:05 am 
 
User
User
User avatar

Joined: Fri Jun 04, 2004 3:36 am
Location: GA
Reading game/pass from text and joining:

js_strict(true);

include('gamemanager.dbl');

function main() {
    var getChantGameName = File.open("gamename.txt", 2)
    var chantGameName = getChantGameName.readLine();
    getChantGameName.close();
    var getChantGamePass = File.open("gamepass.txt", 2)
    var chantGamePass = getChantGamePass.readLine();
    getChantGamePass.close();
    login('timex-xfer');
    joinGame(chantGameName, chantGamePass);
};


I use mIRC scripting to write the game/pass based on user input, script fires up the bot and the info is already there for it's use.

_________________
Image

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron