| Blockland Forums > Modification Help |
| Message Sent |
| (1/2) > >> |
| Danny Boy:
Sorry for the bad title couldn't really think of one that was good So as you know if you type this into the console commandtoserver('messagesent',"Hello there"); It would appear in chat as you saying "Hello there" What I am looking to do is being able quotation marks twice so using that command I can make it say this findclientbyname(danny).clanSuffix="Stuff"; Any help? |
| mp7964:
How to findClientByName(danny).clanSuffix="Stuff"; related? First of all, using findClientByName needs quotation marks around the name. |
| Danny Boy:
I use eval chat on my server. So if I were to change my clan Suffix with it I would say into chat $findclientbyname("danny").clanSuffix="Stuff"; What I am trying to do is make a chatbot that when I say a certain thing like "Set my clan tag to fav 1" it would then make me say the command So basically if I said "Set my clan tags to fav 1" It would make me say "$findclientbyname("danny").clanSuffix="stuff"; Sorry it's hard to explain. |
| jes00:
--- Quote from: Danny Boy on December 23, 2011, 11:45:42 AM ---I use eval chat on my server. So if I were to change my clan Suffix with it I would say into chat $findclientbyname("danny").clanSuffix="Stuff"; What I am trying to do is make a chatbot that when I say a certain thing like "Set my clan tag to fav 1" it would then make me say the command So basically if I said "Set my clan tags to fav 1" It would make me say "$findclientbyname("danny").clanSuffix="stuff"; Sorry it's hard to explain. --- End quote --- Try this: --- Code: ---package myPackage { function clientCmdChatMessage(%a, %b, %c, %fmsg, %cp, %name, %cs, %msg) { parent::clientCmdChatMessage(%a, %b, %c, %fmsg, %cp, %name, %cs, %msg); %clanSuffix = getWord(%msg, 1); if(getWord(stripMLControlChars(%msg), 0) $= "Set my clan tags to") { if(%name $= "Danny Boy") { commandToServer('messageSent', "$findclientbyname("Danny Boy").clanSuffix=" @ %clanSuffix); } } } }; activatePackage(myPackage); --- End code --- |
| Danny Boy:
Cool thanks, I'll try it out when I get back on my laptop. |
| Navigation |
| Message Index |
| Next page |