Ajantis said:What is the BodyValue number for Elves?
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (3 errors, 0 warnings)
- Error: Scripts\Misc\CharacterCreation.cs: CS0117: (line 629, column 8) 'Serve
r.CharacterCreatedEventArgs' does not contain a definition for 'Elf'
- Error: Scripts\Misc\CharacterCreation.cs: CS0117: (line 638, column 63) 'Serv
er.CharacterCreatedEventArgs' does not contain a definition for 'Elf'
- Error: Scripts\Misc\CharacterCreation.cs: CS0117: (line 668, column 90) 'Serv
er.CharacterCreatedEventArgs' does not contain a definition for 'Elf'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Regrettably I don't have a ML account on OSI so I cannot do the final step of the heritage.jaynigs said:Saved me some time, Thanks..
ive been trying to find the Character Race Changer from the client, i did all the quests on osi and that gump popped up, its very similiar to the one on character creation, you can select body color and hair style, now i had spy uo running when i did this on osi, but it didnt recognise any gumps, so i assume it is built in the client, anywhere know where it is? and how to call it?
On an additional note, ive tried to recreate this "gump" with gump studio, but i cannot seem to figure out how to do pulldown selection menus just like in character creation, and also the hue selection.
Any help appreciated, thanks..
Jay
FreeshardNoob said:I did the mods but I'm getting this:
I check my input, and it looks right. What can it be?
arul said:Regrettably I don't have a ML account on OSI so I cannot do the final step of the heritage.
I'd suggest you one thing, change the packet filter to show every incoming packet and there should be something new.
Most likely it will be sub-command of the extended command packet ( 0xBF ).
arul said:This doesn't seem to be the correct one, try it multiple times and there should be some repetition of the one packet. Trial&error
BYTE 0xBF
WORD Length ( 7 )
WORD Subcommand - 0x2A
BYTE Gender ( 0 = male, 1 = female )
BYTE Race ( 1 = human, 2 = elf )
BYTE 0xBF - subcommand
WORD Length ( 15 )
WORD Subcommand - 0x2A
WORD BodyHue
WORD HairId
WORD HairHue
WORD BeardId
WORD BeardHue
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 );
}
}
}
arul said:You didn't do everything I said. Look at the step 6 again please.
public class CharacterCreatedEventArgs : EventArgs
{
private NetState m_State;
private IAccount m_Account;
private CityInfo m_City;
private SkillNameValue[] m_Skills;
private int m_ShirtHue, m_PantsHue;
private int m_HairID, m_HairHue;
private int m_BeardID, m_BeardHue;
private string m_Name;
private bool m_Female, m_Elf;
private int m_Hue;
private int m_Str, m_Dex, m_Int;
private int m_Profession;
private Mobile m_Mobile;
public NetState State{ get{ return m_State; } }
public IAccount Account{ get{ return m_Account; } }
public Mobile Mobile{ get{ return m_Mobile; } set{ m_Mobile = value; } }
public string Name{ get{ return m_Name; } }
public bool Female{ get{ return m_Female; } }
public bool Elf { get { return m_Elf; } }
public int Hue{ get{ return m_Hue; } }
public int Str{ get{ return m_Str; } }
public int Dex{ get{ return m_Dex; } }
public int Int{ get{ return m_Int; } }
public CityInfo City{ get{ return m_City; } }
public SkillNameValue[] Skills{ get{ return m_Skills; } }
public int ShirtHue{ get{ return m_ShirtHue; } }
public int PantsHue{ get{ return m_PantsHue; } }
public int HairID{ get{ return m_HairID; } }
public int HairHue{ get{ return m_HairHue; } }
public int BeardID{ get{ return m_BeardID; } }
public int BeardHue{ get{ return m_BeardHue; } }
public int Profession{ get{ return m_Profession; } set{ m_Profession = value; }}
public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, bool elf, int hue, int str, int dex, int intel, CityInfo city, SkillNameValue[] skills, int shirtHue, int pantsHue, int hairID, int hairHue, int beardID, int beardHue, int profession )
{
m_State = state;
m_Account = a;
m_Name = name;
m_Female = female;
m_Elf = elf;
m_Hue = hue;
m_Str = str;
m_Dex = dex;
m_Int = intel;
m_City = city;
m_Skills = skills;
m_ShirtHue = shirtHue;
m_PantsHue = pantsHue;
m_HairID = hairID;
m_HairHue = hairHue;
m_BeardID = beardID;
m_BeardHue = beardHue;
m_Profession = profession;
}
}