|
||
|
|||||||
| Subsystems This forum is for modifications to the various subystem code of RunUO |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
No longer supported, update to RunUO 2.0!
ADDITION: Race Change client 'gump' Packet structure: Code:
Server -> Client BYTE 0xBF WORD Length ( 7 ) WORD Subcommand - 0x2A BYTE Gender ( 0 = male, 1 = female ) BYTE Race ( 1 = human, 2 = elf ) Client -> Server BYTE 0xBF WORD Length ( 15 ) WORD Subcommand - 0x2A WORD BodyHue WORD HairId WORD HairHue WORD BeardId WORD BeardHue Code:
using System;
using Server.Items;
namespace Server.Network
{
public sealed class ChangeRace : Packet
{
public static void Initialize()
{
Commands.Register("Race", AccessLevel.Player, new CommandEventHandler(OnCommand));
PacketHandlers.RegisterExtended(0x2A, true, new OnPacketReceive(Change));
}
private static void Change( NetState state, PacketReader pvSrc )
{
short bodyHue = pvSrc.ReadInt16();
short hairId = pvSrc.ReadInt16();
short hairHue = pvSrc.ReadInt16();
short beardId = pvSrc.ReadInt16();
short beardHue = pvSrc.ReadInt16();
if ( ( bodyHue
| hairId
| hairHue
| beardId
| beardHue )
== 0 ) return;
Mobile sender = state.Mobile;
Item currentHair = sender.FindItemOnLayer( Layer.Hair );
Item currentBeard = sender.FindItemOnLayer( Layer.FacialHair );
if ( currentBeard != null ) currentBeard.Delete();
if ( currentHair != null ) currentHair.Delete();
sender.Body = sender.Female ? ( sender.Elf ? 0x191 : 0x25E ) : ( sender.Elf ? 0x190 : 0x25D );
sender.Hue = bodyHue;
sender.Elf ^= true;
sender.AddItem( Hair.CreateByID( hairId, hairHue ) );
if ( !sender.Female && !sender.Elf ) sender.AddItem( Beard.CreateByID( beardId, beardHue ) );
}
public static void OnCommand(CommandEventArgs e)
{
Mobile m = e.Mobile;
if (m != null)
{
m.Send(new ChangeRace( (byte)(m.Female ? 1 : 0), (byte)(m.Elf ? 1 : 2)));
}
}
public ChangeRace(byte gender, byte race)
: base(0xBF)
{
EnsureCapacity(7);
m_Stream.Write( (short) 0x2A );
m_Stream.Write( (byte) gender );
m_Stream.Write( (byte) race );
}
}
}
__________________
Angels are falling the very last time, down they're burning in hate and decline, unfaithful and violent we're breaking the spell, we're god, we're scissor, in heaven and hell! Last edited by arul; 06-17-2006 at 12:23 PM. |
|
|
|
|
|
#2 (permalink) |
|
Forum Newbie
Join Date: May 2005
Age: 97
Posts: 75
|
None of the files I've looked at have 2000 lines... like network.cs or packets.cs (and which one there are like 6). Am I just a tard or what? Please let me know a bit more. THANKS
![]() |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
|
Quote:
PacketHandlers.cs has 2222 lines. |
|
|
|
|
|
|
#5 (permalink) |
|
Join Date: Oct 2005
Age: 21
Posts: 73
|
The core is a separate download, and didn't come with the already-compiled RunUO 1.0.0.
But, I have good news (no, I didn't save money by switching to Geico, I actually lost about $5 a month from that): this thread popped up recently: RunUO source download gone? - there is a valid link to the source there. Just a friendly little tidbit though, be careful when you're messing with the core. The RunUO forums do not, to my knowledge, support modified cores, so if something gets totally buggered, there isn't much we can do to help. But, on that note, if it works great and you never have a problem with it, you'll never have to worry about that will you? ![]() Off Topic: Out of curiosity, is it bad luck to post at 4:04am/pm? Just curious.... |
|
|
|
|
|
#9 (permalink) | |
|
Join Date: Oct 2005
Age: 21
Posts: 73
|
Quote:
|
|
|
|
|
|
|
#10 (permalink) | |
|
Forum Expert
|
Quote:
__________________
|
|
|
|
|
|
|
#15 (permalink) |
|
ok did this and get the screen to pick elf etc.. all working now except when you actually get in game it changes body id to human and hair from elf is gone ok nm i figured that i had t add it to char creation just having prob now with body
__________________
History is the meave of things outside of life, Not for those still within its loom... Admin V Forum Moderator The RunUO.com Forum Moderator Team http://runuo.com http://krylon.us Last edited by Admin_V; 01-03-2006 at 01:26 PM. |
|
|
|
|
|
|
#17 (permalink) |
|
Join Date: Jun 2005
Age: 23
Posts: 27
|
So once I've modified this core, how do I start up the server using the new code?
I started with just the Runuo server download, and Just, as i was reading this post got the Source. So, How do i start using this modified source? I stopped to think for a moment, if i can modify the core......why can;t i figue out how to use it? Simple.....comying and pasting code...is not the same as knowing what im doing.....so i aprreciate the help |
|
|
|
|
|
#18 (permalink) |
|
Forum Novice
|
You've to recompile it.
How to compile a source code in an excutable ? With the .Net framework http://msdn.microsoft.com is your best friend to do this. I advice you download Visual C# Express |
|
|
|
|
|
#20 (permalink) |
|
Forum Expert
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,825
|
You don't really need it. Here's my bat file for compiling the server:
SET DOTNET=C:\WINDOWS\Microsoft.NET\Framework\v2.0.507 27 SET PATH=%DOTNET% csc.exe /debug /nowarn:0618 /nologo /out:.\Server.exe /unsafe /recurse:*.cs Note I am using the 2.0 framework. For you to do this, there's a bit more to be done. Namely, I had to fix I think one actual error, plus suppress a whole slew of (legitimate) warnings that were new to the 2.0 compiler. |
|
|
|
|
|
#22 (permalink) | |
|
Forum Newbie
Join Date: Mar 2005
Location: Brazil
Age: 27
Posts: 4
|
Quote:
|
|
|
|
|
|
|
#23 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Age: 31
Posts: 410
|
Only thing i want to know before i even touch this file is: when runuo comes out with the next release that covers this stuff in it already wil i have to change anything back to its original code or will that all be in the new download for run uo release?>maybe this was a lil bit of a bad question< but im just speculating things here right now as im still fairly new to scripts and to even running a server.......good thing about thta is when i mess something up real bad i juts start over rebuilding everything again and all that.......i say its a good thing because i learn from my errors and fix things better that way.....and ideas get better as well...............sorry for the long post i just a;lways feel i dont get my point across and explained how i mean it most the time anyway.....lol.....well thanks for any answers on this it should help in my discovery of new and fun things to learn!
|
|
|
|
|
|
#24 (permalink) |
|
Forum Newbie
Join Date: Mar 2005
Location: Brazil
Age: 27
Posts: 4
|
Answering the wulf monat questions:
1. Nobody knows when the next version will be released (at least, nobody told me) 2. Nobody can give assure the compatibility between this code and the official release. 3. To monitore the RunUO development, and stay informed about the changes and additions, play at Demise, the RunUO test shard. Now, in demise, the Samurai Empire stuff is working (100%, I think), and they are dealing with the ML stuff. You can create a elf character, but he/she don't has the racial traits yet. 4. Somebody (from the dev team) said: "each time anybody asks 'when next version will be released' we add another day to the releasing date". In another post, somebody said "each time somebody asks it, God kills a kitty", or something like this. So you just delayed the release in one more day, and killed a kitty... You're mean!!! Sorry for the joke, but the truth is: if you want a 100% official ML support, wait until the dev team finish it. Nobody can script a code and assure it will be 100% compatible with the official stuff. The only chance it happen is: the person do a such good job that the dev team consider to use it in the official release... So, I ask it again: where do I add that 2 lines with the hues ??? I don't like my elven characters looking like bald humans!About the corageous instructions: I've tryied it, but it didn't work with the .NET 2. The server.exe gives an error and stop. So i followed your instruction swaping it to 1.1 and it worked fine. Goodbye. PS: sorry for my crap english. I've learned english by reading, so I'm not good at writing, let alone talking/hearing... |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|