Warconn Posted December 4, 2008 Author Share Posted December 4, 2008 Alright guys, i got real angry with eclipse the other day because i had to keep typing /help to see the different options such as 'is broadcast, and - is emote. I realized that first time players might be angry aswell, so i decided to change it to something easier to remember such as /b, /e, and /w. I will show you how to do that, and to change them to which ever you would like.Ok we start of Client SIde in ModGameLogicfind```Sub HandleKeypresses(ByVal KeyAscii As Integer)```and scroll down till you see' Broadcast messageselect all of the following text``` If Mid$(MyText, 1, 1) = "'" Then ChatText = Mid$(MyText, 2, Len(MyText) - 1) If Len(Trim$(ChatText)) > 0 Then Call BroadcastMsg(ChatText) End If MyText = vbNullString Exit Sub End If```replace it with this```If LCase$(Mid$(MyText, 1, 3)) = "/b " Then ChatText = LCase$(Mid$(MyText, 4, Len(MyText) - 3)) If Len(Trim$(ChatText)) > 0 Then Call BroadcastMsg(ChatText) End If MyText = vbNullString Exit Sub End If```next you want to find``` ' Emote message If Mid$(MyText, 1, 1) = "-" Then ChatText = Mid$(MyText, 2, Len(MyText) - 1) If Len(Trim$(ChatText)) > 0 Then Call EmoteMsg(ChatText) End If MyText = vbNullString Exit Sub End If```and replace it with``` ' Emote message If LCase$(Mid$(MyText, 1, 3)) = "/e " Then ChatText = LCase$(Mid$(MyText, 4, Len(MyText) - 3)) If Len(Trim$(ChatText)) > 0 Then Call EmoteMsg(ChatText) End If MyText = vbNullString Exit Sub End If```and lastly the whisper command``` ' Player message If Mid$(MyText, 1, 1) = "!" Then ChatText = Mid$(MyText, 2, Len(MyText) - 1) Name = vbNullString ' Get the desired player from the user text For i = 1 To Len(ChatText) If Mid$(ChatText, i, 1) <> " " Then Name = Name & Mid$(ChatText, i, 1) Else Exit For End If Next i ' Make sure they are actually sending something If Len(ChatText) - i > 0 Then ChatText = Mid$(ChatText, i + 1, Len(ChatText) - i) ' Send the message to the player Call PlayerMsg(ChatText, Name) Else Call AddText("Usage: !playername msghere", AlertColor) End If MyText = vbNullString Exit Sub End If```change that with``` ' Player message If LCase$(Mid$(MyText, 1, 3)) = "/w " Then ChatText = LCase$(Mid$(MyText, 4, Len(MyText) - 3)) Name = vbNullString ' Get the desired player from the user text For i = 1 To Len(ChatText) If LCase$(Mid$(ChatText, i, 1)) <> " " Then Name = Name & Mid$(ChatText, i, 1) Else Exit For End If Next i 'Warconn message change ' Make sure they are actually sending something If Len(ChatText) - i > 0 Then ChatText = LCase$(Mid$(ChatText, i + 1, Len(ChatText) - i)) ' Send the message to the player Call PlayerMsg(ChatText, Name) Else Call AddText("Usage: /w playername msghere", AlertColor) End If MyText = vbNullString Exit Sub End If```that is how to change all of the commandswhat everything meansIf LCase$(Mid$(MyText, 1, 3)) = "/b " Then ChatText = LCase$(Mid$(MyText, 4, Len(MyText) - 3)) If Len(Trim$(ChatText)) > 0 Then Call BroadcastMsg(ChatText) End If MyText = vbNullString Exit Sub End Ifthis is how many characters are in between the quotes including spaces, exmp: if it was "/broadcast " the number would be 11This is always one more then the red numberand that is all you need to change to change the broadcast/emote/whisper commandsthis is one of the many snippets added to New Colony Online, check it out from the link in my sig.ThanksWarconn Link to comment Share on other sites More sharing options...
munro Posted December 4, 2008 Share Posted December 4, 2008 Are you freking kidding me! Everytime I add a feature within a week someone post's a "How to add this" on Eclipse.Anyways, nice, its a good feature for the newer editors. Link to comment Share on other sites More sharing options...
Warconn Posted December 4, 2008 Author Share Posted December 4, 2008 lol thanks i have this added for a couple weeks now, i just found the time to post a tutorial on it :) Link to comment Share on other sites More sharing options...
Tyr Posted December 5, 2008 Share Posted December 5, 2008 simple… but usefull :) Link to comment Share on other sites More sharing options...
Warconn Posted December 5, 2008 Author Share Posted December 5, 2008 thanks its my first tutorial hope i explained everything Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now