Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Subsystems

Subsystems This forum is for modifications to the various subystem code of RunUO

Reply
 
Thread Tools Display Modes
Old 12-20-2005, 06:56 PM   #1 (permalink)
Forum Expert
 
arul's Avatar
 
Join Date: Jan 2005
Location: Hic sunt leones ...
Age: 21
Posts: 1,289
Send a message via MSN to arul
Default [Obsolete] Basic ML & Elf functionality

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 example:
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.
arul is offline   Reply With Quote
Old 12-21-2005, 06:44 PM   #2 (permalink)
Forum Newbie
 
Join Date: May 2005
Age: 97
Posts: 75
Talking What magic file are you talking about dude?

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
REDiR2 is offline   Reply With Quote
Old 12-21-2005, 06:52 PM   #3 (permalink)
Forum Expert
 
Join Date: Oct 2003
Location: Behind you with a knife
Age: 31
Posts: 1,118
Send a message via AIM to Formater
Default

Quote:
Originally Posted by REDiR2
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
These modifications are for the core. Sounds to me like your looking at the files in /scripts/

PacketHandlers.cs has 2222 lines.
Formater is offline   Reply With Quote
Old 12-22-2005, 06:04 AM   #4 (permalink)
 
Join Date: Dec 2005
Posts: 75
Default

How can i explore core? I searched for this .cs fils but i found nothung... can you give me exzact patch of thoose files? thanks
Falafel is offline   Reply With Quote
Old 12-22-2005, 10:31 AM   #5 (permalink)
 
Join Date: Oct 2005
Age: 21
Posts: 73
Default

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....
Livewire is offline   Reply With Quote
Old 12-22-2005, 08:59 PM   #6 (permalink)
Forum Expert
 
IHaveRegistered's Avatar
 
Join Date: Jun 2003
Location: Ontario
Age: 20
Posts: 4,522
Send a message via MSN to IHaveRegistered
Default

Quote:
Originally Posted by Livewire
But, I have good news (no, I didn't save money by switching to Geico, I actually lost about $5 a month from that)
Well... That was random :P
__________________
IHaveRegistered is offline   Reply With Quote
Old 12-22-2005, 10:45 PM   #7 (permalink)
 
Join Date: Oct 2005
Age: 21
Posts: 73
Default

I try to keep things light and shake people up if possible
Livewire is offline   Reply With Quote
Old 12-22-2005, 10:53 PM   #8 (permalink)
Forum Expert
 
IHaveRegistered's Avatar
 
Join Date: Jun 2003
Location: Ontario
Age: 20
Posts: 4,522
Send a message via MSN to IHaveRegistered
Default

Quote:
Originally Posted by Livewire
I try to keep things light and shake people up if possible
lmao, we need more people like you :P
__________________
IHaveRegistered is offline   Reply With Quote
Old 12-23-2005, 03:36 AM   #9 (permalink)
 
Join Date: Oct 2005
Age: 21
Posts: 73
Default

Quote:
Originally Posted by IHaveRegistered
lmao, we need more people like you :P
Eh...Might not be the best of ideas. I'm not the sharpest knife in the drawer, brightest bulb in the lamp, I'm a taco short of a combination plate, the list goes on and on...
Livewire is offline   Reply With Quote
Old 12-23-2005, 11:56 AM   #10 (permalink)
Forum Expert
 
IHaveRegistered's Avatar
 
Join Date: Jun 2003
Location: Ontario
Age: 20
Posts: 4,522
Send a message via MSN to IHaveRegistered
Default

Quote:
Originally Posted by Livewire
Eh...Might not be the best of ideas. I'm not the sharpest knife in the drawer, brightest bulb in the lamp, I'm a taco short of a combination plate, the list goes on and on...
Well, lets get out those knife-sharpeners, those bulb-lighteners, and those combination plates! lol
__________________
IHaveRegistered is offline   Reply With Quote
Old 12-24-2005, 02:35 AM   #11 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 10
Default

i don't have a Network\packets.cs i mean i don't have a network folder in my RunUO so what do i do?
Iakona is offline   Reply With Quote
Old 12-24-2005, 02:40 AM   #12 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
Default

This modification is for the Core, not normal RunUO.
Joeku is offline   Reply With Quote
Old 12-24-2005, 03:21 AM   #13 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 10
Default

ehhe ok nps sorry to waist everyones time then just thought it would be nice to have the new walls and tiles for the houses
Iakona is offline   Reply With Quote
Old 12-30-2005, 08:55 PM   #14 (permalink)
Forum Novice
 
Join Date: Dec 2003
Location: South-Africa
Age: 19
Posts: 165
Default

Sweet, thanks a lot.
Btw, is it normal not to be able to open your paperdoll if your an elf?
DaLaw66 is offline   Reply With Quote
Old 01-03-2006, 12:15 PM   #15 (permalink)
 
Join Date: Sep 2002
Location: St. Louis MO
Age: 34
Posts: 183
Send a message via ICQ to Admin_V Send a message via MSN to Admin_V
Default

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.
Admin_V is offline   Reply With Quote
Old 01-03-2006, 02:33 PM   #16 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 206
Default

Please click one of the Quick Reply icons in the posts above to activate Quick Reply.
the nico is offline   Reply With Quote
Old 01-09-2006, 01:37 AM   #17 (permalink)
 
Join Date: Jun 2005
Age: 23
Posts: 27
Default So, now what?

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
Shadowdark is offline   Reply With Quote
Old 01-09-2006, 01:51 AM   #18 (permalink)
Forum Novice
 
Dereckson's Avatar
 
Join Date: Dec 2005
Location: Belgium
Age: 25
Posts: 260
Send a message via Skype™ to Dereckson
Default

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
Dereckson is offline   Reply With Quote
Old 01-09-2006, 09:21 PM   #19 (permalink)
 
Join Date: Jun 2005
Age: 23
Posts: 27
Default Wooo

Hehe, allright thanks.

I just happen to have a full Visual Studio laying around.


It's been so long since i've done anything with VS though
Shadowdark is offline   Reply With Quote
Old 01-09-2006, 11:48 PM   #20 (permalink)
Forum Expert
 
Courageous's Avatar
 
Join Date: Nov 2005
Location: San Diego, CA
Posts: 1,825
Default

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.
Courageous is offline   Reply With Quote
Old 01-10-2006, 08:21 PM   #21 (permalink)
Forum Novice
 
Halciet's Avatar
 
Join Date: Jan 2004
Location: Chapel Hill, NC
Age: 26
Posts: 165
Send a message via ICQ to Halciet Send a message via AIM to Halciet
Default

Er...maybe I'm missing something, but where exactly does the hue code go? I haven't worked on my server for a few months now because of work, so I'm a little out of the loop.

-Hal
Halciet is offline   Reply With Quote
Old 01-25-2006, 02:54 PM   #22 (permalink)
Forum Newbie
 
Join Date: Mar 2005
Location: Brazil
Age: 27
Posts: 4
Default

Quote:
Originally Posted by Halciet
Er...maybe I'm missing something, but where exactly does the hue code go? I haven't worked on my server for a few months now because of work, so I'm a little out of the loop.

-Hal
I want to know it, too... I managed to add the whole code without this single lines, because I don't know where I have to add them. So, my new-compiled server accepts the creation of elves, the client acknowledge the server as supporting ML, but the elven characters I create are created as bald humans... Can anybody give some help?
gilberto is offline   Reply With Quote
Old 01-25-2006, 06:17 PM   #23 (permalink)
Forum Expert
 
Join Date: Jul 2005
Age: 31
Posts: 410
Default Sorry if this was asked already i didnt see it if was!

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!
wulf monat is offline   Reply With Quote
Old 01-25-2006, 06:52 PM   #24 (permalink)
Forum Newbie
 
Join Date: Mar 2005
Location: Brazil
Age: 27
Posts: 4
Default

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...
gilberto is offline   Reply With Quote
Old 01-25-2006, 08:32 PM   #25 (permalink)
Forum Expert
 
Join Date: Jul 2005
Age: 31
Posts: 410
Default thank you

thats exactly what i needed to know ill wait and let the dev team do what they need to.
wulf monat is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5