|
||
|
|||||||
| Network Modifications This forum is for modifications to the networking code of RunUO |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Connection Reset by Peer
Join Date: Jan 2003
Posts: 676
|
I've programmed guild chat using \ for my personal shard, and thought it might be a good idea to share.
The code really does need cleaning up, and I'm planning to do that in a day or two. I have not implemented Alliance chat. At the moment, this is just changed to Guild chat, as the functions necessary for checking alliances are not in the core (as far as I can see, if anyone knows otherwise, please tell me). There are two files to modify. File 1: Network\PacketHandlers.cs Find: Code:
public enum MessageType
{
Regular = 0x00,
System = 0x01,
Emote = 0x02,
Label = 0x06,
Focus = 0x07,
Whisper = 0x08,
Yell = 0x09,
Spell = 0x0A,
Encoded = 0xC0
}
Code:
public enum MessageType
{
Regular = 0x00,
System = 0x01,
Emote = 0x02,
Label = 0x06,
Focus = 0x07,
Whisper = 0x08,
Yell = 0x09,
Spell = 0x0A,
Guild = 0x0D,
Alliance = 0x0E,
Encoded = 0xC0
}
Find: Code:
switch ( type )
{
case MessageType.Regular: m_SpeechHue = hue; break;
case MessageType.Emote: m_EmoteHue = hue; break;
case MessageType.Whisper: m_WhisperHue = hue; range = 1; break;
case MessageType.Yell: m_YellHue = hue; range = 18; break;
default: type = MessageType.Regular; break;
}
Code:
switch ( type )
{
case MessageType.Regular: m_SpeechHue = hue; break;
case MessageType.Emote: m_EmoteHue = hue; break;
case MessageType.Whisper: m_WhisperHue = hue; range = 1; break;
case MessageType.Yell: m_YellHue = hue; range = 18; break;
case MessageType.Guild: break;
case MessageType.Alliance: type = MessageType.Guild; break;
default: type = MessageType.Regular; break;
}
Code:
SpeechEventArgs regArgs = new SpeechEventArgs( this, text, type, hue, keywords ); EventSink.InvokeSpeech( regArgs ); m_Region.OnSpeech( regArgs ); OnSaid( regArgs ); Code:
SpeechEventArgs regArgs = new SpeechEventArgs( this, text, type, hue, keywords );
if ( type == MessageType.Guild )
{
if ( this.Guild != null )
{
BaseGuild guild = this.Guild;
foreach ( Mobile m in World.Mobiles.Values )
{
if ( m.Player )
{
if ( m.Guild == guild )
{
m.OnSpeech( regArgs );
NetState ns = m.NetState;
Packet regp = null;
if ( ns != null )
{
if ( regp == null )
regp = new UnicodeMessage( m_Serial, Body, type, hue, 3, m_Language, Name, text );
ns.Send( regp );
}
}
}
}
}
return;
}
EventSink.InvokeSpeech( regArgs );
m_Region.OnSpeech( regArgs );
OnSaid( regArgs );
).If you find any bugs or have any ideas for improvements, please inform me. Remember that using a modified core means that you may not recieve script support! Last edited by tejster24; 02-11-2006 at 08:09 PM. |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
|
although since this IS a core mod it would cause loss of all future script support.
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
|
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
Join Date: May 2005
Age: 29
Posts: 949
|
This is the core mod forum, hopefully you don't post that to any core modification here :-)
Personally I didn't even know that guild and alliance chat was there... Good to know *g* Last edited by Irian; 02-11-2006 at 04:44 AM. |
|
|
|
|
|
#5 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
|
Quote:
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
|
#6 (permalink) |
|
Forum Expert
Join Date: May 2005
Age: 29
Posts: 949
|
I think the God of OffTopics will punish me for that, but...
How do we know, who uses a modified core? Does someone make a list, everytime somebody posts here? How does this person know if the person actually uses the core mod? How do I get this list, to know who I may answer to? :-) |
|
|
|
|
|
#7 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
|
Quote:
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
|
#10 (permalink) |
|
Forum Expert
Join Date: Jan 2003
Posts: 564
|
i think people say that you are going to loose support if you use a modified core thinking in the worst possibility (for example, you came here with a completelly "new" core for runuo totally diferent from the current one and want support for something that isn't working well)...
i consider this type of modification as a "patched core" not a "modified core". small well coded "patches" have no chance to make things don't work.
__________________
|
|
|
|
|
|
#11 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 34
Posts: 3,848
|
Quote:
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
|
#12 (permalink) |
|
Forum Expert
Join Date: Mar 2003
Location: England
Age: 35
Posts: 986
|
Hmm there is a sticky at the very top of the core modifications subforum, is there any need to reiterate it inside threads? i mean this is the core modifications forum and the sticky posted by quantos should be enough of a reminder.
My personal opinion is that the non support of slightly modified cores is an unhelpful gesture to what is meant to be an open source project, and its quite obvious to anyone who knows what they are looking for that a problem has occured from a core modification usually from the server crashlog. with or without the build number. We all should be helping each really, some bugfixes need to be fixed by a shard owners and sometimes waiting for an official fix isn't an option when you are trying to proffesionally run a shard. But, thus, i dont make the rules..... |
|
|
|
|
|
#13 (permalink) | |
|
Forum Expert
Join Date: Sep 2002
Age: 23
Posts: 1,472
|
Quote:
|
|
|
|
|
|
|
#14 (permalink) | |
|
Connection Reset by Peer
Join Date: Jan 2003
Posts: 676
|
Quote:
|
|
|
|
|
|
|
#15 (permalink) | |
|
RunUO Forum Moderator
|
Quote:
It's very clear that modified core does not get supported in the script support forum. If a user will post a thread with modified core it'll either get locked or deleted, that's the end of this discussion. Now let the thread owner take control over his own thread and stop arguing about something you can't change.
__________________
I always try to help
![]() Sometimes, I don't know how.... ![]() My Web Page Forum Rules ------------------------------------------------------------- Extensive OWLTR System | Token System | World Teleporters ------------------------------------------------------------- |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|