| Blockland Forums > Modification Help |
| My chatbot is not working |
| << < (6/23) > >> |
| Deoxys And One Noob:
--- Quote from: Port on March 09, 2012, 11:58:01 PM ---description.txt --- End quote --- It was all lowercased --- Quote from: Port on March 10, 2012, 12:50:17 AM --- --- Code: ---package chatbot { function clientCmdChatMessage( %cl, %voice, %pitch, %line, %pre, %name, %suf, %msg ) { parent::clientCmdChatMessage( %cl, %voice, %pitch, %line, %pre, %name, %suf, %msg ); %self = ( %name $= $Pref::Player::NetName ); switch$ ( %msg ) { case "NoobBot": if ( %self ) { commandToServer( 'messageSent', "What a cool chatbot!" ); } } } }; activatePackage( "chatbot" ); --- End code --- --- End quote --- Thank you. |
| FFSO:
--- Quote from: Port on March 10, 2012, 12:50:17 AM --- --- Code: ---package chatbot { function clientCmdChatMessage( %cl, %voice, %pitch, %line, %pre, %name, %suf, %msg ) { parent::clientCmdChatMessage( %cl, %voice, %pitch, %line, %pre, %name, %suf, %msg ); %self = ( %name $= $Pref::Player::NetName ); switch$ ( %msg ) { case "NoobBot": if ( %self ) { commandToServer( 'messageSent', "What a cool chatbot!" ); } } } }; activatePackage( "chatbot" ); --- End code --- --- End quote --- olol forgot the main variables for switch. |
| Wordy:
Does it have to use switch$ ? Why not just use 'if' statements? |
| FFSO:
--- Quote from: Wordy on March 12, 2012, 06:48:53 AM ---Does it have to use switch$ ? Why not just use 'if' statements? --- End quote --- Because Switch$ works |
| Deoxys And One Noob:
OK, downloaded Notepad++, using FFSO's code |
| Navigation |
| Message Index |
| Next page |
| Previous page |