|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
|
Sorry if I posted this is the wrong place, but I'm wondering if the dynamic race/class sys created by...Echoecho (?) has been updated?
Heres a link to the one im talking about...http://runuo.com/forums/showthread.p...ight=raceclass Anyway I ATTEMPTED to update it for 2.0 RC1...but finally got stuck on an error. (when i pop it back in I can give you the exact error, but atm its out and people are playing so ill wait) Its been several weeks since I worked on it, but the error had to do with this sys conflcting with the race sys already in (the ML elves and humans) There are so many systems out there, but we really loved this one, as its so easy to make/change races without needing a restart. I looked for an updated version, but didn't find it. If anyone would be willing to help me, please let me know. Thanks
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
|
crap, apperently I accidently deleted the set that i had fixed....soo now i'm going back through to REfix. God I hate it when I do stupid things! When I get BACK to that error I'll post it lol
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
|
Ok, I started going through it again, but ATM I cant remember how I fixed this Error
CS0118: Line 28: 'Server.Race' is a 'namespace' but is used like a 'type' I have oh...about 60 of those.....I remember it was something simple...
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#8 (permalink) |
|
Forum Novice
|
nope, that didn't work
Maybe this will help, here's a snippet of the errors. Errors: + Misc/RaceDefinitions.cs: CS0118: Line 28: 'Server.Race' is a 'namespace' but is used like a 'type' CS0118: Line 124: 'Server.Race' is a 'namespace' but is used like a 'type' CS0118: Line 22: 'Server.Race' is a 'namespace' but is used like a 'type' + Customs/Daat99 OWLTR RunUO2[1].0 w-FS Gen2/Scripts/Items/Armor/BaseArmor.cs: CS0118: Line 1242: 'Server.Race' is a 'namespace' but is used like a 'type' + Customs/FS-ATS Gen2 v1[1].0.0 For RunUO v2.0.0/Distros/PlayerMobile.cs: CS0118: Line 529: 'Server.Race' is a 'namespace' but is used like a 'type'
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. Last edited by Gaea; 10-29-2006 at 09:09 PM. |
|
|
|
|
|
#10 (permalink) | |
|
Forum Novice
|
Quote:
lol Damn, I HAD all this stuff done before. I took out all the server.race stuff, but i still got the same errors. Oh heres a look at one of the corresponding warnings too...I know what it's telling me...but (brain freeze) dunno which/what to change I just can't remember ![]() + Items/Minor Artifacts/ML/AegisOfGrace.cs: CS0435: Line 30: The namespace 'Server.Race' in 'c:\BlahBlah\RunUO-2.0-RC1\Scripts\Customs\RaceClassSystem\Race Class System\Commands\RCCommands.cs' conflicts with the imported type 'Server.Race' in 'c:\BlahBlah\RunUO-2.0-RC1\RunUO.exe'. Using the namespace.
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. Last edited by Gaea; 10-29-2006 at 09:33 PM. |
|
|
|
|
|
|
#11 (permalink) |
|
Forum Novice
|
Is it possible (legal?) for you to either upload or paste your racedefinition.cs and RCcommands.cs for me to look at and compare?
I really don't mind doing it myself, I just need to see what I'm not doing. This would help me learn also.
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#12 (permalink) |
|
Forum Expert
|
yeah i can do that.
Hope it helps. RCCommand.cs Code:
/************************************************************************************************/
/**********Echo Dynamic Race Class System V2.0, ©2005********************************************/
/************************************************************************************************/
using System;
using Server;
using Server.Items;
using Server.Targeting;
using System.Collections;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
using System.IO;
using Server.Prompts;
using Server.Commands;
namespace Server.Misc
{
public class RCCommands
{
public static void Initialize()
{
CommandSystem.Register( "RCBegin", AccessLevel.Administrator, new CommandEventHandler( OnInitRaceClass ) );
CommandSystem.Register( "AddRace", AccessLevel.Administrator, new CommandEventHandler( OnAddRace ) );
CommandSystem.Register( "AddClass", AccessLevel.Administrator, new CommandEventHandler( OnAddClass ) );
CommandSystem.Register( "AddBP", AccessLevel.Administrator, new CommandEventHandler( OnAddBP ) );
CommandSystem.Register( "RemoveRace", AccessLevel.Administrator, new CommandEventHandler( OnRemoveRace ) );
CommandSystem.Register( "RemoveClass", AccessLevel.Administrator, new CommandEventHandler( OnRemoveClass ) );
CommandSystem.Register( "RemoveBP", AccessLevel.Administrator, new CommandEventHandler( OnRemoveBP ) );
CommandSystem.Register( "RCRemove", AccessLevel.Administrator, new CommandEventHandler( OnRCRemove ) );
CommandSystem.Register( "RestrictClass", AccessLevel.Administrator, new CommandEventHandler( OnRestrictClass ) );
CommandSystem.Register( "RCclean", AccessLevel.Administrator, new CommandEventHandler( OnClean ) );
CommandSystem.Register( "RaceHues", AccessLevel.Administrator, new CommandEventHandler( OnHue ) );
CommandSystem.Register( "EditSS", AccessLevel.Administrator, new CommandEventHandler( OnShapeChange ) );
CommandSystem.Register( "LoadSB", AccessLevel.Administrator, new CommandEventHandler( OnLoadSpellbook ) );
CommandSystem.Register( "RestrictSB", AccessLevel.Administrator, new CommandEventHandler( OnRestrictSpellbook ) );
CommandSystem.Register( "SyncNames", AccessLevel.Administrator, new CommandEventHandler( OnSyncNames ) );
CommandSystem.Register( "SC", AccessLevel.Player, new CommandEventHandler( OnSC ) );
}
private static void OnInitRaceClass( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool RaceClassOn = false;
foreach (Item items in World.Items.Values)
{
if (items is RCChest){
RaceClassOn = true;}
}
if (RaceClassOn){
from.SendMessage (6, "Race Class System is Already Active");
}
else{
RCChest chest = new RCChest();
chest.Location = new Point3D(from.X+1,from.Y+1,from.Z);
chest.Map = from.Map;
chest.AddItem (new RaceControl());
chest.AddItem (new ClassControl());
Container r_bag = new Bag();
r_bag.Name = "RACES";
chest.AddItem (r_bag);
Container c_bag = new Bag();
c_bag.Name = "CLASSES";
chest.AddItem (c_bag);
Container b_bag = new Bag();
b_bag.Name = "BONUS PACKS";
c_bag.AddItem (b_bag);
c_bag.AddItem (new BonusPackControl());
}
}
private static void OnAddRace( CommandEventArgs e )
{
Mobile from = e.Mobile;
RaceControl r_control = null;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
RaceOrb r_orb = new RaceOrb();
foreach (Item i in World.Items.Values) {
if (i is RaceControl)
r_control = i as RaceControl;
}
if (r_control != null){
r_orb.RaceNumber = r_control.A_Races+1;
r_control.A_Current = r_orb.RaceNumber;}
from.SendGump( new AddRaceGump( from, r_orb ) );
}
}
private static void OnAddClass( CommandEventArgs e )
{
Mobile from = e.Mobile;
ClassControl c_control = null;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
ClassOrb c_orb = new ClassOrb();
foreach (Item i in World.Items.Values) {
if (i is ClassControl)
c_control = i as ClassControl;
}
if (c_control != null){
c_orb.ClassNumber = c_control.A_Classes+1;
c_control.C_Current = c_orb.ClassNumber;}
from.SendGump( new AddClassGump( from, c_orb ) );
}
}
private static void OnAddBP( CommandEventArgs e )
{
Mobile from = e.Mobile;
BonusPackControl b_control = null;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
BonusPackOrb b_orb = new BonusPackOrb();
foreach (Item i in World.Items.Values) {
if (i is BonusPackControl)
b_control = i as BonusPackControl;
}
if (b_control != null){
b_orb.BPNumber = b_control.A_BP+1;
b_control.B_Current = b_orb.BPNumber;}
from.SendGump( new BonusPackGump( from, b_orb ) );
}
}
private static void OnRemoveRace( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new RemoveRaceGump( from ) );
}
}
private static void OnRemoveClass( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new RemoveClassGump( from ) );
}
}
private static void OnRemoveBP( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new RemoveBPGump( from ) );
}
}
private static void OnRCRemove( CommandEventArgs e )
{
Mobile from = e.Mobile;
Bag d_bag = new Bag();
foreach (Item i in World.Items.Values) {
if (i is RCChest)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is RaceControl)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is RaceOrb)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is ClassControl)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is ClassOrb)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is BonusPackControl)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is BonusPackOrb)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is RCCONTROL)
d_bag.AddItem (i);
}
foreach (Item i in World.Items.Values) {
if (i is RaceStone)
d_bag.AddItem (i);
}
d_bag.Delete();
}
private static void OnRestrictClass( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new RestrictClassGump( from ) );
}
}
private static void OnClean( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
Bag c_bag = new Bag();
ClassOrb c_orb = null;
RaceOrb r_orb = null;
BonusPackOrb b_orb = null;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
foreach (Item i in World.Items.Values) {
if (i is ClassOrb) {
c_orb = i as ClassOrb;
if (!c_orb.Activated)
c_bag.AddItem (c_orb);
}
}
foreach (Item i in World.Items.Values) {
if (i is RaceOrb) {
r_orb = i as RaceOrb;
if (!r_orb.Activated)
c_bag.AddItem (r_orb);
}
}
foreach (Item i in World.Items.Values) {
if (i is BonusPackOrb) {
b_orb = i as BonusPackOrb;
if (!b_orb.Activated)
c_bag.AddItem (b_orb);
}
}
c_bag.Delete();
}
}
private static void OnHue( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new HueEditGump( from ) );
}
}
private static void OnShapeChange( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new ShapeChangeGump( from ) );
}
}
private static void OnSC( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
RCCONTROL rc = null;
RaceOrb r_orb = null;
int rc_Exists = from.Backpack.GetAmount( typeof( RCCONTROL ) );
int a_ss = 0;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (rc_Exists != 0) {
rc = from.Backpack.FindItemByType( typeof( RCCONTROL ) ) as RCCONTROL;
foreach (Item i in World.Items.Values) {
if (i is RaceOrb){
r_orb = i as RaceOrb;
if (rc.Race == r_orb.RaceName)
break;
}
}
if (r_active) {
for (int i=0; i<5; i++) {
if (r_orb.BodyValue[i] != 0)
a_ss += 1;
}
if (a_ss == 0)
from.SendMessage (6, "Your Race Cannot Shapeshift");
if (a_ss == 1) {
if (from.BodyMod != 0) {
from.PlaySound( 0x228 );
from.BodyMod = 0;
from.HueMod = -1;
from.NameMod = null;
}
else {
for (int i=0; i<5; i++) {
if (r_orb.BodyValue[i] != 0) {
if (from.Mount != null)
from.Mount.Rider = null;
from.PlaySound( 0x228 );
from.BodyMod = r_orb.BodyValue[i];
from.HueMod = r_orb.SS_Hue[i];
from.NameMod = r_orb.SS_Name[i];
}
}
}
}
if (a_ss > 1) {
if (from.BodyMod != 0) {
from.PlaySound( 0x228 );
from.BodyMod = 0;
from.HueMod = -1;
from.NameMod = null;
}
else
from.SendGump( new PlayerShapeChange( from, r_orb ) );
}
}
}
}
private static void OnLoadSpellbook( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
ClassControl c_control = null;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
foreach (Item i in World.Items.Values) {
if (i is ClassControl)
c_control = i as ClassControl;
}
if (c_control.Loaded_Books == 20)
from.SendMessage( 0x35, "Cannot load anymore Spellbooks" );
else
from.Target = new SpellbookTarget();
}
}
private static void OnRestrictSpellbook( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
from.SendGump( new ResSBGump( from ) );
}
}
private static void OnSyncNames( CommandEventArgs e )
{
Mobile from = e.Mobile;
bool r_active = false;
ClassOrb c_orb = null;
RCCONTROL rc = null;
RaceOrb r_orb = null;
BonusPackOrb b_orb = null;
foreach (Item i in World.Items.Values) {
if (i is RCChest)
r_active = true;
}
if (r_active) {
foreach (Item i in World.Items.Values) {
if (i is ClassOrb) {
c_orb = i as ClassOrb;
if (c_orb.ClassName != c_orb.BackUpName) {
c_orb.Name = c_orb.ClassName + " Orb";
foreach (Item j in World.Items.Values) {
if (j is Bag && j.Name == c_orb.BackUpName + " Class")
j.Name = c_orb.ClassName + " Class";
if (j is Bag && j.Name == c_orb.BackUpName + " Items")
j.Name = c_orb.ClassName + " Items";
if (j is Bag && j.Name == c_orb.BackUpName + " Equip")
j.Name = c_orb.ClassName + " Equip";
if (j is Bag && j.Name == c_orb.BackUpName + " Restricted Armors")
j.Name = c_orb.ClassName + " Restricted Armors";
if (j is Bag && j.Name == c_orb.BackUpName + " Restricted Weapons")
j.Name = c_orb.ClassName + " Restricted Weapons";
}
foreach (Item k in World.Items.Values) {
if (k is RCCONTROL) {
rc = k as RCCONTROL;
if (rc.P_Class == c_orb.BackUpName) {
rc.P_Class = c_orb.ClassName;
}
}
}
c_orb.BackUpName = c_orb.ClassName;
}
}
}
foreach (Item i in World.Items.Values) {
if (i is RaceOrb) {
r_orb = i as RaceOrb;
if (r_orb.RaceName != r_orb.BackUpName) {
r_orb.Name = r_orb.RaceName + " Orb";
foreach (Item j in World.Items.Values) {
if (j is Bag && j.Name == r_orb.BackUpName + " Race")
j.Name = r_orb.RaceName + " Race";
if (j is Bag && j.Name == r_orb.BackUpName + " Items")
j.Name = r_orb.RaceName + " Items";
}
foreach (Item k in World.Items.Values) {
if (k is RCCONTROL) {
rc = k as RCCONTROL;
if (rc.Race == r_orb.BackUpName) {
rc.Race = r_orb.RaceName;
}
}
}
r_orb.BackUpName = r_orb.RaceName;
}
}
}
foreach (Item i in World.Items.Values) {
if (i is BonusPackOrb) {
b_orb = i as BonusPackOrb;
if (b_orb.BPName != b_orb.BackUpName) {
b_orb.Name = b_orb.BPName + " Orb";
foreach (Item j in World.Items.Values) {
if (j is Bag && j.Name == b_orb.BackUpName + " Bonus Pack")
j.Name = b_orb.BPName + " Bonus Pack";
if (j is Bag && j.Name == b_orb.BackUpName + " Items")
j.Name = b_orb.BPName + " Items";
}
foreach (Item k in World.Items.Values) {
if (k is RCCONTROL) {
rc = k as RCCONTROL;
if (rc.BonusPack == b_orb.BackUpName) {
rc.BonusPack = b_orb.BPName;
}
}
}
b_orb.BackUpName = b_orb.BPName;
}
}
}
}
}
}
public class SpellbookTarget : Target
{
public SpellbookTarget() : base( -1, true, TargetFlags.None )
{
}
public SpellbookTarget(Mobile from, Item targeted) : base( -1, true, TargetFlags.None )
{
}
protected override void OnTarget( Mobile from, object targeted )
{
ClassControl c_control = null;
bool isLoaded = false;
foreach (Item i in World.Items.Values) {
if (i is ClassControl)
c_control = i as ClassControl;
}
if ( from.Name == null)
{
from.SendMessage("Your name is not valid fix it now");
return;
}
if ( targeted is Spellbook )
{
Spellbook m_book = (Spellbook)targeted;
for (int i=0; i<20; i++) {
if (m_book.SpellbookType == c_control.LoadBook[i]) {
isLoaded = true;
break;
}
}
if (isLoaded) {
from.SendMessage( 0x35, "That Type of Spellbook has already been loaded");
}
else {
c_control.LoadBook[c_control.Loaded_Books] = m_book.SpellbookType;
c_control.Loaded_Books += 1;
from.SendMessage( 6, m_book.SpellbookType + " Spellbook Loaded" );
m_book.Delete();
}
}
else {
from.SendMessage( 0x35, "That is not a Spellbook" );
}
}
}
}
Code:
using System;
using Server;
namespace Server.Misc
{
public class RaceDefinitions
{
public static void Configure()
{
/* Here we configure all races. Some notes:
*
* 1) The first 32 races are reserved for core use.
* 2) Race 0x7F is reserved for core use.
* 3) Race 0xFF is reserved for core use.
* 4) Changing or removing any predefined races may cause server instability.
*/
RegisterRace( new Human ( 0, 0 ) );
RegisterRace( new Elf ( 1, 1 ) );
}
public static void RegisterRace( Race race )
{
Race.Races[race.RaceIndex] = race;
Race.AllRaces.Add( race );
}
private class Human : Race
{
public Human( int raceID, int raceIndex )
: base( raceID, raceIndex, "Human", "Humans", 400, 401, 402, 403, Expansion.None )
{
}
public override bool ValidateHair( bool female, int itemID )
{
if( itemID == 0 )
return true;
if( (female && itemID == 0x2048) || (!female && itemID == 0x2046 ) )
return false; //Buns & Receeding Hair
if( itemID >= 0x203B && itemID <= 0x203D )
return true;
if( itemID >= 0x2044 && itemID <= 0x204A )
return true;
return false;
}
public override int RandomHair( bool female ) //Random hair doesn't include baldness
{
switch( Utility.Random( 9 ) )
{
case 0: return 0x203B; //Short
case 1: return 0x203C; //Long
case 2: return 0x203D; //Pony Tail
case 3: return 0x2044; //Mohawk
case 4: return 0x2045; //Pageboy
case 5: return 0x2047; //Afro
case 6: return 0x2049; //Pig tails
case 7: return 0x204A; //Krisna
default: return (female ? 0x2046 : 0x2048); //Buns or Receeding Hair
}
}
public override bool ValidateFacialHair( bool female, int itemID )
{
if( itemID == 0 )
return true;
if( female )
return false;
if( itemID >= 0x203E && itemID <= 0x2041 )
return true;
if( itemID >= 0x204B && itemID <= 0x204D )
return true;
return false;
}
public override int RandomFacialHair( bool female )
{
if( female )
return 0;
int rand = Utility.Random( 7 );
return ((rand < 4) ? 0x203E : 0x2047) + rand;
}
public override int ClipSkinHue( int hue )
{
if( hue < 1002 )
return 1002;
else if( hue > 1058 )
return 1058;
else
return hue;
}
public override int RandomSkinHue()
{
return Utility.Random( 1002, 57 ) | 0x8000;
}
public override int ClipHairHue( int hue )
{
if( hue < 1102 )
return 1102;
else if( hue > 1149 )
return 1149;
else
return hue;
}
public override int RandomHairHue()
{
return Utility.Random( 1102, 48 );
}
}
private class Elf : Race
{
private static int[] m_SkinHues = new int[]
{
0x0BF, 0x24D, 0x24E, 0x24F, 0x353, 0x361, 0x367, 0x374,
0x375, 0x376, 0x381, 0x382, 0x383, 0x384, 0x385, 0x389,
0x3DE, 0x3E5, 0x3E6, 0x3E8, 0x3E9, 0x430, 0x4A7, 0x4DE,
0x51D, 0x53F, 0x579, 0x76B, 0x76C, 0x76D, 0x835, 0x903
};
private static int[] m_HairHues = new int[]
{
0x034, 0x035, 0x036, 0x037, 0x038, 0x039, 0x058, 0x08E,
0x08F, 0x090, 0x091, 0x092, 0x101, 0x159, 0x15A, 0x15B,
0x15C, 0x15D, 0x15E, 0x128, 0x12F, 0x1BD, 0x1E4, 0x1F3,
0x207, 0x211, 0x239, 0x251, 0x26C, 0x2C3, 0x2C9, 0x31D,
0x31E, 0x31F, 0x320, 0x321, 0x322, 0x323, 0x324, 0x325,
0x326, 0x369, 0x386, 0x387, 0x388, 0x389, 0x38A, 0x59D,
0x6B8, 0x725, 0x853
};
public Elf( int raceID, int raceIndex )
: base( raceID, raceIndex, "Elf", "Elves", 605, 606, 607, 608, Expansion.ML )
{
}
public override bool ValidateHair( bool female, int itemID )
{
if( itemID == 0 )
return true;
if( (female && (itemID == 0x2FCD || itemID == 0x2FBF)) || (!female && (itemID == 0x2FCC || itemID == 0x2FD0)) )
return false;
if( itemID >= 0x2FBF && itemID <= 0x2FC2 )
return true;
if( itemID >= 0x2FCC && itemID <= 0x2FD1 )
return true;
return false;
}
public override int RandomHair( bool female ) //Random hair doesn't include baldness
{
switch( Utility.Random( 8 ) )
{
case 0: return 0x2FC0; //Long Feather
case 1: return 0x2FC1; //Short
case 2: return 0x2FC2; //Mullet
case 3: return 0x2FCE; //Knob
case 4: return 0x2FCF; //Braided
case 5: return 0x2FD1; //Spiked
case 6: return (female ? 0x2FCC : 0x2FBF); //Flower or Mid-long
default: return (female ? 0x2FD0 : 0x2FCD); //Bun or Long
}
}
public override bool ValidateFacialHair( bool female, int itemID )
{
return (itemID == 0);
}
public override int RandomFacialHair( bool female )
{
return 0;
}
public override int ClipSkinHue( int hue )
{
for( int i = 0; i < m_SkinHues.Length; i++ )
if( m_SkinHues[i] == hue )
return hue;
return m_SkinHues[0];
}
public override int RandomSkinHue()
{
return m_SkinHues[Utility.Random( m_SkinHues.Length )] | 0x8000;
}
public override int ClipHairHue( int hue )
{
for( int i = 0; i < m_HairHues.Length; i++ )
if( m_HairHues[i] == hue )
return hue;
return m_HairHues[0];
}
public override int RandomHairHue()
{
return m_HairHues[Utility.Random( m_HairHues.Length )];
}
}
}
}
|
|
|
|
|
|
#13 (permalink) |
|
Forum Novice
|
Awsome Thanks! Ok, I spotted my problem there, but after fixing a fwe more errors with hair nd beards...I get this...
Code:
+ Customs/Lucid Nagual/[2.0]Lucid's - CFTB v[4].0.2 a/Daat99's OWLTR v2[1]9-2.91/Distros/[2.0]BaseWeapon.cs:
CS0161: Line 570: 'Server.Items.BaseWeapon.CanEquip(Server.Mobile)': not allcode paths return a value
Code:
public override bool CanEquip( Mobile from )
{
if ( !Ethics.Ethic.CheckEquip( from, this ) )
return false;
if( RequiredRace != null && from.Race != RequiredRace )
{
if( RequiredRace == Race.Elf )
from.SendLocalizedMessage( 1072203 ); // Only Elves may use this.
else
from.SendMessage( "Only {0} may use this.", RequiredRace.PluralName );
return false;
}
/******************Edited for Dynamic Race/Class System v2.0*******************************/
if (from.Backpack != null)
{
if (from.Backpack.GetAmount(typeof(RCCONTROL)) != 0)
{
RCCONTROL rc = from.Backpack.FindItemByType(typeof(RCCONTROL)) as RCCONTROL;
foreach (Item i in rc.W_Bag.Items)
{
if (this.GetType() == i.GetType())
{
from.SendMessage(6, "Your Class Cannot Use this Weapon");
return false;
}
}
}
}
/******************************************************************************************/
else if ( from.Dex < DexRequirement )
{
from.SendMessage( "You are not nimble enough to equip that." );
return false;
}
else if ( from.Str < AOS.Scale( StrRequirement, 100 - GetLowerStatReq() ) )
{
from.SendLocalizedMessage( 500213 ); // You are not strong enough to equip that.
return false;
}
else if ( from.Int < IntRequirement )
{
from.SendMessage( "You are not smart enough to equip that." );
return false;
}
else if ( !from.CanBeginAction( typeof( BaseWeapon ) ) )
{
return false;
}
else
{
return base.CanEquip( from );
}
}
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#15 (permalink) |
|
Forum Novice
|
Ok, I've gotten it to work..except that now whn my current players take a weapon or armor off...they cant re equip...any of them New chars cant ever eq anything but clothes
2nd prob is...i have the default set to 3 skills to 50 as it came...but i get the gump after creation to chose them...but no WAY to choose...i.e. No choices. if I log out, and come back, I only have like 14.2 skills, so not even the ones i chose on the original profession gump upon char creation. Any Ideas?
__________________
(\__/) (='.'=)This is Bunny. Copy and paste bunny into your (")_(")signature to help him gain world domination. |
|
|
|
|
|
#17 (permalink) |
|
This is a Title
|
Hello,
First I apologize for not keeping my script updated, but times got hectic and I haven't played UO or had it on my system for about a year. I just wanted to good luck, I wish I could help update this for RunUO 2.0, and all the other changes over the past year. Thanks for trying out my system and I hope you can make it work, means all the hours I spent making it won't be for waste ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|