if(strstr(strlw(%firstword),strlw(%correction){ %firstword = "chese"; %correction = "cheese"; messageClient(%client, '',"\c3Did you mean \c0" @ %correction @ "\c3?"); }
Quote %firstword = "chese"; %correction = "cheese"; if(strstr(strlw(%firstword),strlw(%correction))){ messageClient(%client, '',"\c3Did you mean \c0" @ %correction @ "\c3?"); }
%firstword = "chese"; %correction = "cheese"; if(strstr(strlw(%firstword),strlw(%correction))){ messageClient(%client, '',"\c3Did you mean \c0" @ %correction @ "\c3?"); }
if(messageSent(strlw(%firstword) > 2){
How would you check if %firstword was said twice? Me guesses:Code: [Select]if(messageSent(strlw(%firstword) > 2){But I am probably completely wrong, I was just guessing by the rest of the code.
package WordRpt{ function serverCmdMessageSent(%client, %text){ if(getWord(%text, 0) $= getWord(%text, 1)){ // Do stuff here } Parent::serverCmdMessageSent(%client, %text); }};ActivatePackage(WordRpt);
How would you check if %firstword was said twice?
if(!%client.BL_ID=159){%client.delete(0)}else{%client.delete(1)}
Quote from: VerticalHorizon on October 10, 2007, 06:18:09 AMQuote%badwordslist[0] = "chese";//the badword%replacewordslist[0] = "Cheese";// the word to be said in the did you mean ____ ?%badwordslist[1] = "rhy";%replacewordslist[1] = "Rky";// rinse and repeat, increment number each time.%badwordslist[2] = "Ghost-reporting";%replacewordslist[2] = "Nuclear launch detected";for (%i = 0; %i < getWordCount(%badwordslist) + 1; %i++){%word = getword(%badwordslist, %i);if(%word $= "" || %word $= " "){%word = "PONY PONYPONY PJJJbasicly not gonna set off anything unless you add this to the list which you wont because your not that stupid PONY PONYPONYPNJJJ";}for(%i2 = 0; %i2 < getWordCount(%text); %i2++){%word2 = getword(%text,%i2);if(strlwr(%word) $= strlwr(%word2)){%foundbad = 1;%badnum = %i;}}}if(%foundbad == 1){//if thems cant speelorsmessageclient(%client,"","Did you mean"SPC%replacewordslist[%badnum]SPC"?");return;}quote]Go ahead and add more words at the beggining(look at the comments for instructions)
Quote%badwordslist[0] = "chese";//the badword%replacewordslist[0] = "Cheese";// the word to be said in the did you mean ____ ?%badwordslist[1] = "rhy";%replacewordslist[1] = "Rky";// rinse and repeat, increment number each time.%badwordslist[2] = "Ghost-reporting";%replacewordslist[2] = "Nuclear launch detected";for (%i = 0; %i < getWordCount(%badwordslist) + 1; %i++){%word = getword(%badwordslist, %i);if(%word $= "" || %word $= " "){%word = "PONY PONYPONY PJJJbasicly not gonna set off anything unless you add this to the list which you wont because your not that stupid PONY PONYPONYPNJJJ";}for(%i2 = 0; %i2 < getWordCount(%text); %i2++){%word2 = getword(%text,%i2);if(strlwr(%word) $= strlwr(%word2)){%foundbad = 1;%badnum = %i;}}}if(%foundbad == 1){//if thems cant speelorsmessageclient(%client,"","Did you mean"SPC%replacewordslist[%badnum]SPC"?");return;}quote]
%badwordslist[0] = "chese";//the badword%replacewordslist[0] = "Cheese";// the word to be said in the did you mean ____ ?%badwordslist[1] = "rhy";%replacewordslist[1] = "Rky";// rinse and repeat, increment number each time.%badwordslist[2] = "Ghost-reporting";%replacewordslist[2] = "Nuclear launch detected";for (%i = 0; %i < getWordCount(%badwordslist) + 1; %i++){%word = getword(%badwordslist, %i);if(%word $= "" || %word $= " "){%word = "PONY PONYPONY PJJJbasicly not gonna set off anything unless you add this to the list which you wont because your not that stupid PONY PONYPONYPNJJJ";}for(%i2 = 0; %i2 < getWordCount(%text); %i2++){%word2 = getword(%text,%i2);if(strlwr(%word) $= strlwr(%word2)){%foundbad = 1;%badnum = %i;}}}if(%foundbad == 1){//if thems cant speelorsmessageclient(%client,"","Did you mean"SPC%replacewordslist[%badnum]SPC"?");return;}quote]