ID:155573
 
How would i go about doing a World of Warcraft style chat system... where if a user typed /s and then space bar it would switch to "Say:" or if /p it would switch to "Party:" I just need a little feedback on how I can do this...all is appreciated
Just go look up the findtext proc from the reference. This ain't too hard to do!
In response to Syntty
I understand how to find if they typed /s to switch it but is there a way to check the text box as it is updated right now i have it doing -
 FindChat(txt as text)
if(findtext(txt,"/p"))
usr<<"Talking to Party."
if(findtext(txt,"/s"))
var/txt2=(copytext(txt,4))
view(7) <<"\icon[usr.FaceIcon]<FONT COLOR=WHITE>[usr.name] says: [txt2]"


but to produce the result i want...i have to type
"/s message" then press enter.

I want it to switch to the appropriate chat channel without having to press enter till i am ready to send the message.

I hope that makes sense...
In response to Bhill1
I highly doubt that that can be done. Only way to do that would be a never ending loop which would always winget() the input and check if there is /s or some other text macro...
In response to Bhill1
Is there any reason you can't make a simpler chat system, such as pressing 's' to open up a prompt for 'say', and 'p' for a prompt for 'party-say'?

World of Warcraft probably did that because it was easier with their chat system, but it's not very easy or efficient to do it in BYOND.
In response to Warlord Fred
My own opinion is to use one button to change the chat channel. Like I tend to use TAB to change from say to party to guild to world chat etc. etc.