You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well now i am trying the bot army and everything goes fine except it doesnt release the trooper bot. It returns the message in the log so I dont know. can you help?
var ROOMID = 'xxxxxxxxxxxxxxx';
var USERID = 'xxxxxxxxxxxxxxx';
// BOT ARMY INFO
var num_army_bots = 1; // Update this when adding more bots
var botArmyIDs = 'xxxxxxxxxx';
var botArmyAuths = 'xxxxxxxx';
var control_army= true;
var currently_sending_trooper = false;
var trooper_sent = 0;
// Log in woofus' army
var botArmy = new Array();
for (botIndex=0;botIndex<num_army_bots;botIndex=botIndex+1) {
botArmy[botIndex] = new Bot(botArmyAuths[botIndex], botArmyIDs[botIndex], ROOMID);
}
bot.on('speak', function(data) {
if( data.userid == USERID ) {
return;
} else {
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
if( data.userid == botArmyIDs[botIndex] ) {
return;
}
}
}
// Get the data
var name = data.name;
var text = data.text;
// Hide troops
if (data.text.match('hide troops')) {
console.log('\nGetting rid of the troops\n\n', data);
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
botArmy[botIndex].roomDeregister();
}
control_army = false;
handled_command = true;
}
// Bring back troops
if (data.text.match('bring troops')) {
console.log('\nBringing the troops back\n\n', data);
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
botArmy[botIndex].roomRegister(current_room);
}
control_army = true;
handled_command = true;
}
The text was updated successfully, but these errors were encountered:
as in it does not initiate the trooper bot, so it doesnt enter room. I dont get an error or anything but the trooper bot will not initiate? the log just says the response thats set and thats all.
Are you familiar with node-inspector? I would suggest using that or some other server side debugger to see exactly what's happening. It's hard to troubleshoot what's happening without that.
What exactly are you doing? Are you using woofus's script exactly as it is? Did you create turntable.fm accounts for all the bots you want to start, and put their auth info in?
Well now i am trying the bot army and everything goes fine except it doesnt release the trooper bot. It returns the message in the log so I dont know. can you help?
var ROOMID = 'xxxxxxxxxxxxxxx';
var USERID = 'xxxxxxxxxxxxxxx';
// BOT ARMY INFO
var num_army_bots = 1; // Update this when adding more bots
var botArmyIDs = 'xxxxxxxxxx';
var botArmyAuths = 'xxxxxxxx';
var control_army= true;
var currently_sending_trooper = false;
var trooper_sent = 0;
// Log in woofus' army
var botArmy = new Array();
for (botIndex=0;botIndex<num_army_bots;botIndex=botIndex+1) {
botArmy[botIndex] = new Bot(botArmyAuths[botIndex], botArmyIDs[botIndex], ROOMID);
}
bot.on('speak', function(data) {
if( data.userid == USERID ) {
return;
} else {
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
if( data.userid == botArmyIDs[botIndex] ) {
return;
}
}
}
// Hide troops
if (data.text.match('hide troops')) {
console.log('\nGetting rid of the troops\n\n', data);
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
botArmy[botIndex].roomDeregister();
}
control_army = false;
handled_command = true;
}
// Bring back troops
if (data.text.match('bring troops')) {
console.log('\nBringing the troops back\n\n', data);
for( botIndex=0; botIndex<num_army_bots; botIndex=botIndex+1 ) {
botArmy[botIndex].roomRegister(current_room);
}
control_army = true;
handled_command = true;
The text was updated successfully, but these errors were encountered: