mob proc emoticon() var/list/emoticon=(":)",";)",":D",":(",":x",":P"," B-)",":|",":-$","X_X","ROFL","BYE","HMMMM","TIMEOUT","LOSER",":-O") var/T as text if(T=="[emoticon]") if(":)") ReplaceText("[T]",":)",'smile.gif') if(";)") ReplaceText("[T]",";)",'winking.gif') if(":D") ReplaceText("[T]",":D",'cheesing.gif') if(":(") ReplaceText("[T]",":(",'sad.gif') if(":x") ReplaceText("[T]",":x",'heart.gif') if(":P") ReplaceText("[T]",":P",'tounge.gif') if("B-)") ReplaceText("[T]","B-)",'cool.gif') if(":|") ReplaceText("[T]",":|",'straight face.gif') if(":-$") ReplaceText("[T]",":-$",'dont tell.gif') if("X_X") ReplaceText("[T]","X_X",'dont want too see.gif') if("ROFL") ReplaceText("[T]","ROFL",'ROFL.gif') if("BYE") ReplaceText("[T]","BYE",'wave.gif') if("HMMMM") ReplaceText("[T]","HMMMM",'thinking.gif') if("TIMEOUT") ReplaceText("[T]","TIMEOUT",'timeout.gif') if("LOSER") ReplaceText("[T]","LOSER",'loser.gif') if(":-O") ReplaceText("[T]",":-O",'suprised.gif') else return
|
Do you know what this does? Your list serves no purpose although it looks like it should. You could probably get rid of it completely without a problem. Also, ReplaceText() was never a feature of DM.
However, you can fix that by including the library it was once contained in or making your own little ReplaceText() function. If it goes like this:
ReplaceText(string, find, replace), then you'd want to use findtextEx() to find the needle and copytext() to replace it. Think along these lines: