Blockland Forums > Modification Help

My chatbot is not working

Pages: << < (13/23) > >>

Deoxys And One Noob:


--- Quote from: Lugnut1206 on March 30, 2012, 09:12:30 PM ---take a wild guess
you got it right on all the other ones

--- End quote ---
:o

Deoxys And One Noob:

New code, that I fixed, yet its not working

Code:


--- Code: ---// Made by ThinkInvisible, BLID 14511, helped and edited by Deoxys & One Noob, BLID 30436

package GunGame {
     $rouletteBarrel = getrandomnum(1,7);
     $rouletteScoreCombo = 0;
     $rouletteLastShoot = NaN;
     function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg) {
          parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
          if (striPos(%msg,"Roulette") > 0) {
               if (striPos(%msg,"Dare the odds") > 0) {
               if ($rouletteLastShoot != %name) {
                    commandToServer('messageSent',%name@" spins the barrel and pulls the trigger...");
                    %tempval = getrandomnum(1,7);
                    if (%tempval = $rouletteBarrel) {
                         $rouletteScore[%name] ++;
                         export("$rouletteScore*","add-ons/client_roulette/scores.cs");
                         $rouletteLastShoot = NaN;
                         $rouletteBarrel = getRandomNum(1,7);
                         commandToServer('messageSent',"NoobBot: *BLAM*... "@%name@" got hit! "@%name@" has been hit "@$rouletteScore[%name]@" times.");
} else {
commandToServer('messageSent',"NoobBot: *Chk*... "@%name@" missed the bullet! Nice one there, winner...");
$rouletteLastShoot = %name;
}
} else {
commandToServer('messageSent',"NoobBot: What? "@%name@", you can't dare your odds twice in a row! Let somebody else have a turn, please, for the sake of fun.");
}
}
}
}
};
activatePackage(GunGame);

--- End code ---

There, please tell me whats wrong

otto-san:

the function is getRandom, not getRandomNum

Deoxys And One Noob:


--- Quote from: otto-san on April 03, 2012, 08:50:09 PM ---the function is getRandom, not getRandomNum

--- End quote ---
k

Treynolds416:

And the tutorial you are using is pretty bad

Pages: << < (13/23) > >>

Go to full version