aster Posted October 29, 2009 Author Share Posted October 29, 2009 credits to Soul Greendude120 ツ and Damian i got code from ES, just explained how to add to EE cuz im not a fan of ESok well alot of you have been asking for the drop down chat bar to choose between global, guild, private etc. This will aslo add a new feature to your game guild chat!!GUILD CHAT DOESNT SHOW UP ON THE SERVER LOG! not to big of a prob thofirst off let make a ComboBox in frmMirage that is heigth 21 width 97 style 2-dropdownvisible = true text, mapchat name, mapchat (put this next to the bar where u enter your message) almost forgot on the list in item properties make 4 0's looking like this0000Next go into ModClientTCP go down to the guild section and below the last on paste this```Sub GuildChat(ByVal Text As String) Call SendData("guildmsg" & SEP_CHAR & Text & END_CHAR)End Sub```Next go into modGameLogic go down to handle key press and at the very first 'map message highlight everything all way to the last code before //commands// and delete it then paste this``` ' Map message If frmMirage.MapChat.Text = "Map" Then 'Check if the user uses other chat then mapchat ' Broadcast message If Not Mid$(MyText, 1, 1) = "/" Then 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 End If ' Emote message If Not Mid$(MyText, 1, 1) = "/" Then 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 End If ' Guild message If Not Mid$(MyText, 1, 1) = "/" Then If Mid$(MyText, 1, 1) = "@" Then ChatText = MyText If Len(Trim$(ChatText)) > 0 Then Call GuildChat(ChatText) End If MyText = vbNullString Exit Sub End If End If ' Player message If Not Mid$(MyText, 1, 1) = "/" Then 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 ' 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 If Len(Trim$(MyText)) > 0 Then Call SayMsg(MyText) End If MyText = vbNullString Exit Sub End If End If ' Broadcast message If frmMirage.MapChat.Text = "Global" Then ChatText = MyText If Len(Trim$(ChatText)) > 0 Then Call BroadcastMsg(ChatText) End If MyText = vbNullString Exit Sub End If ' 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 ' Guild message If frmMirage.MapChat.Text = "Guild" Then ChatText = MyText If Len(Trim$(ChatText)) > 0 Then Call GuildChat(ChatText) End If MyText = vbNullString Exit Sub End If ' Player message If frmMirage.MapChat.Text = "Private" Then ChatText = MyText 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```You're done with the client side now you want to go to your server and addnow go into modHandleData in your server and look for the Cases and put this``` Case "guildmsg" Call Packet_GuildMsg(index, Parse(1)) Exit Sub```now go to the Very bottom of modHandleData and paste this```Public Sub Packet_GuildMsg(ByVal index As Long, ByVal Msg As String) Dim I ' Prevent hacking For I = 1 To Len(Msg) If Asc(Mid$(Msg, I, 1)) < 32 Or Asc(Mid$(Msg, I, 1)) > 255 Then Call HackingAttempt(index, "Broadcast Text Modification") Exit Sub End If Next I If GetPlayerGuild(index) = "" Then Call PlayerMsg(index, "your not in a guild...", BRIGHTRED) Exit Sub End If For I = 1 To MAX_PLAYERS If IsPlaying(I) Then If GetPlayerGuild(index) = GetPlayerGuild(I) And GetPlayerGuild(I) <> "" Then Call PlayerMsg(I, "[Guild : " & GetPlayerName(index) & "]: " & Msg, BRIGHTCYAN) End If End If Next IEnd Sub```This is my first ever tutorial at anything so give me props for trying =PCredits The Soul Numb and Damian666 for guild code Link to comment Share on other sites More sharing options...
evilbunnie Posted October 29, 2009 Share Posted October 29, 2009 Nice i might use it. Link to comment Share on other sites More sharing options...
aster Posted October 29, 2009 Author Share Posted October 29, 2009 thanks oh and almost forgot give a lil credit to TSN for pointing me out on where to find the handlekeypresses. Link to comment Share on other sites More sharing options...
damian666 Posted October 29, 2009 Share Posted October 29, 2009 not to be a ass…but i see my guild code...yours...```Public Sub Packet_GuildMsg(ByVal index As Long, ByVal Msg As String) Dim I ' Prevent hacking For I = 1 To Len(Msg) If Asc(Mid$(Msg, I, 1)) < 32 Or Asc(Mid$(Msg, I, 1)) > 255 Then Call HackingAttempt(index, "Broadcast Text Modification") Exit Sub End If Next I If GetPlayerGuild(index) = "" Then Call PlayerMsg(index, "your not in a guild...", BRIGHTRED) Exit Sub End If For I = 1 To MAX_PLAYERS If IsPlaying(I) Then If GetPlayerGuild(index) = GetPlayerGuild(I) And GetPlayerGuild(I) <> "" Then Call PlayerMsg(I, "[Guild : " & GetPlayerName(index) & "]: " & Msg, BRIGHTCYAN) End If End If Next IEnd Sub```and this is mine…```Public Sub Packet_GuildMsg(ByVal Index As Long, ByVal Msg As String) Dim I ' Prevent hacking For I = 1 To Len(Msg) If Asc(Mid$(Msg, I, 1)) < 32 Or Asc(Mid$(Msg, I, 1)) > 255 Then Call HackingAttempt(Index, "Broadcast Text Modification") Exit Sub End If Next I If GetPlayerGuild(Index) = "" Then Call PlayerMsg(Index, "your not in a crew...", BRIGHTRED) Exit Sub End If For I = 1 To MAX_PLAYERS If IsPlaying(I) Then If GetPlayerGuild(Index) = GetPlayerGuild(I) And GetPlayerGuild(I) <> "" Then Call PlayerMsg(I, "[Crew : " & GetPlayerName(Index) & "]: " & Msg, GREEN) End If End If Next IEnd Sub```what about credit? im not a credit whore, but this is not nice of ya…you could atleast state the source where ya get it...Damian666 Link to comment Share on other sites More sharing options...
aster Posted October 29, 2009 Author Share Posted October 29, 2009 added u in credits along with TSN Link to comment Share on other sites More sharing options...
damian666 Posted October 29, 2009 Share Posted October 29, 2009 ok, cool ^^Damian666 Link to comment Share on other sites More sharing options...
Nahchito Posted December 5, 2009 Share Posted December 5, 2009 Sorry for the Necro, by someone may stumble upon this and it will not work if he doens't know a little VB6.When you finish, click on the ComboBox you created, on the right click on List and add: MapGlobalGuildthere. Link to comment Share on other sites More sharing options...
Flaw Posted December 5, 2009 Share Posted December 5, 2009 Not to mention it's already in Eclipse Stable, which most new users use >.> Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 5, 2009 Share Posted December 5, 2009 I think this is pretty old, this was back when my name was TSN. Link to comment Share on other sites More sharing options...
Nahchito Posted December 5, 2009 Share Posted December 5, 2009 Also, you need to add this:in FrmMirage go to Sub Form_Load() and pastes this:MapChat.ListIndex = 0it Preselect the first thing on the list, in this case, Map. Link to comment Share on other sites More sharing options...
Patrick Posted December 5, 2009 Share Posted December 5, 2009 @[SB:> Soul link=topic=53410.msg582016#msg582016 date=1259983778]> I think this is pretty old, this was back when my name was TSN.so 1564 posts ago? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 5, 2009 Share Posted December 5, 2009 @üÑÂøчġġÑâ€Ã‘‚:> @[SB:> > > Soul link=topic=53410.msg582016#msg582016 date=1259983778]> > I think this is pretty old, this was back when my name was TSN.> > so 1564 posts ago?Like 100, I changed it because everyone calls me Soul anyways.Yeah this is old though, I remember helping him out with this. Link to comment Share on other sites More sharing options...
aster Posted December 17, 2009 Author Share Posted December 17, 2009 ya without soul and damian i prob couldnt have done this and i still use 2.8 cuz dont like Main.ess XD Link to comment Share on other sites More sharing options...
Lam3r Posted December 17, 2009 Share Posted December 17, 2009 @Flaw:> Not to mention it's already in Eclipse Stable, which most new users use >.>Wait it's in Eclipse Stable? I'm using 1.1 and i'm not sure i'm seeing it? Link to comment Share on other sites More sharing options...
xelander Posted December 21, 2009 Share Posted December 21, 2009 I get this error..When I'm in game, if I try to write anything, I get an error and it crashes…I can't press the combobox at all...Nothing happens then...Help?Edit: I forgot! When I try to compile, it say's ChatText isn't declared, how to fix? Link to comment Share on other sites More sharing options...
Braiton Posted December 21, 2009 Share Posted December 21, 2009 @IceCake:> Edit: I forgot! When I try to compile, it say's ChatText isn't declared, how to fix?I think thats pretty much self-explainatory. ChatText isn't declared. Check to see if it's being declared, if it's not then save it as a string. Link to comment Share on other sites More sharing options...
xelander Posted December 21, 2009 Share Posted December 21, 2009 Kay, I'll test…Well...I got another error, the "Name" Isn't declared, I made it a string, then "I", As integer...Then it said that there can't be a "End if" Whit out "Block If", deleted the "end if"...Now it dosn't show any error, but...It dosn't work to send anything, and the combo box is still full of 0. Link to comment Share on other sites More sharing options...
Greendude120 Posted December 21, 2009 Share Posted December 21, 2009 Dude, like wow. this is a really dick move. This goes to everyone:Do not steal someones code or take it from the engine if it already comes with it and then post it as if it was your own. Not exactly sure how you got that code cause it was suppose to be me and damian only, but what u did there was steal someones work.In school you would of got kicked out and perhaps arrested cause universities and shit dont accept stealing work. its actually illegal.hope this serves example for everyoneEDIT: you only have 52 posts (one of which u stole codes) and ur name is EclipseStalker… give u a good first impression Link to comment Share on other sites More sharing options...
xelander Posted December 21, 2009 Share Posted December 21, 2009 So…I won't get any help? Link to comment Share on other sites More sharing options...
Flaw Posted December 21, 2009 Share Posted December 21, 2009 @Lam3r:> @Flaw:> > > Not to mention it's already in Eclipse Stable, which most new users use >.>> > Wait it's in Eclipse Stable? I'm using 1.1 and i'm not sure i'm seeing it?It's right to the left of your chat bar.. o.O Link to comment Share on other sites More sharing options...
xelander Posted December 21, 2009 Share Posted December 21, 2009 I won't get ANY help at all? :cI'd like to have some help so I can get it to work, and compile it, so All my othre edits works! Link to comment Share on other sites More sharing options...
Braiton Posted December 22, 2009 Share Posted December 22, 2009 Instead of bitchin' you could save time and try reinstalling it. If it's not returning any errors after you deleted the end if and its still not working then it's because you installed the code wrongly. Link to comment Share on other sites More sharing options...
xelander Posted December 22, 2009 Share Posted December 22, 2009 I tryed 5 times…But it jsut isn't working, now "Index" Isn't a defined varible...And Some more, So I'll uninstall it. Link to comment Share on other sites More sharing options...
damian666 Posted December 22, 2009 Share Posted December 22, 2009 well, it was never ment to be a piece of code to add in ya know.he just ripped it from Stable, and made a sort of tutorial of it.Damian666 Link to comment Share on other sites More sharing options...
xelander Posted December 22, 2009 Share Posted December 22, 2009 Ah, meh, I get way to manny errors whit it anyway. :PAlot of these dosn't work at all whit SVN 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