Full Version : UNEQUIP question
xmlspawner >>Q&A >>UNEQUIP question
<< Prev | Next >>
olsyke- 04-01-2006
well it seems i really make my way using this forums as a support , but theres quite a few things that turn out pretty hard for me since English isnt my foreign language...
and this is my problem -> im making a samurai mob, and am trying to unequip all his stuff.
Samurai
/UNEQUIP,Pants,delete
/UNEQUIP,Shoes,delete
/UNEQUIP,Arms,delete
/UNEQUIP,OneHanded,delete
thats as far as i got , since i cant figure out the proper keywords for "Chest" and "Helmet" i tried all i could think of like , Chest, Body, Shirt, Helmet, Head, Hat.. but that all doesnt seem to work for me
i know this is a very noobish question, but if you could answer this, and even tell me where i would find out such things on my own i would really appreciate this
i tried to find the answer here on the forums but had no luck, so if there is some obvious Post that i just missed, dont be angry with me
ArteGordon- 04-01-2006
this is from the RunUO docs describing the Layer enum which contains all of the valid layers

QUOTE
Layer (Enum) Invalid = 0, FirstValid = 1, OneHanded = 1, TwoHanded = 2,
Shoes = 3,
Pants = 4,
Shirt = 5,
Helm = 6,
Gloves = 7,
Ring = 8,
Unused_x9 = 9,
Neck = 10,
Hair = 11,
Waist = 12,
InnerTorso = 13,
Bracelet = 14,
Unused_xF = 15,
FacialHair = 16,
MiddleTorso = 17,
Earrings = 18,
Arms = 19,
Cloak = 20,
Backpack = 21,
OuterTorso = 22,
OuterLegs = 23,
InnerLegs = 24,
LastUserValid = 24,
Mount = 25,
ShopBuy = 26,
ShopResale = 27,
ShopSell = 28,
Bank = 29,
LastValid = 29

olsyke- 04-01-2006
great!
thank you for your patience with me ^^
olsyke- 04-01-2006
hmm another issue...
i tried this...
Samurai
/UNEQUIP,InnerTorso,delete
/UNEQUIP,MiddleTorso,delete
/UNEQUIP,OuterTorso,delete
but somehow i cant get rid of the Leather Do this guy is wearing...
when i hit respawn for a short moment he looks completely stripped off but then the leather do returns
ArteGordon- 04-01-2006
If you post the script for him I can take a look.
olsyke- 04-01-2006

CODE
using System; using Server; using Server.Items; namespace Server.Mobiles {
public class Samurai : BaseCreature
{
[Constructable]
public Samurai() : base( AIType.AI_Melee, FightMode.Agressor, 22, 1, 0.2, 1.0 )
{
Title = "the samurai";
if ( Female = Utility.RandomBool() )
{
Body = 0x191;
Name = NameList.RandomName( "female" );
}
else
{
Body = 0x190;
Name = NameList.RandomName( "male" );
}
SetSkill( SkillName.Parry, 80.0, 100.0 );
SetSkill( SkillName.Swords, 80.0, 100.0 );
SetSkill( SkillName.ArmsLore, 80.0, 100.0 );
SetSkill( SkillName.Bushido, 80.0, 100.0 );
AddItem( new DecorativePlateKabuto() );
AddItem( new LeatherDo() );
AddItem( new LeatherDo() );
AddItem( new PlateSuneate() );
AddItem( new LeatherHiroSode() );
AddItem( new Wakizashi() );
int lowHue = GetRandomHue();
AddItem( new SamuraiTabi( lowHue ) );
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new ShortHair( Utility.RandomHairHue() ) ); break;
case 1: AddItem( new TwoPigTails( Utility.RandomHairHue() ) ); break;
case 2: AddItem( new ReceedingHair( Utility.RandomHairHue() ) ); break;
case 3: AddItem( new KrisnaHair( Utility.RandomHairHue() ) ); break;
}
PackGold( 200, 250 );
}
public override bool CanTeach{ get{ return true; } }
public override bool ClickTitle{ get{ return false; } } // Do not display 'the samurai' when single-clicking
private static int GetRandomHue()
{
switch ( Utility.Random( 6 ) )
{
default:
case 0: return 0;
case 1: return Utility.RandomBlueHue();
case 2: return Utility.RandomGreenHue();
case 3: return Utility.RandomRedHue();
case 4: return Utility.RandomYellowHue();
case 5: return Utility.RandomNeutralHue();
}
}
public Samurai( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

might wanna add this goes far beyond my understanding ^^
olsyke- 04-01-2006
ahhh but after browsing throu it i can see that the leather do is added twice if im right !
ArteGordon- 04-01-2006
hehe. yeah, I was just going to point that out.
olsyke- 04-01-2006
yea still it was you who solved te problem for me , thank you !
olsyke- 04-01-2006
hmm well i just stumbled yet upon another issue
i tried
samurai
/equip/<plategloves/hue/996/loottype/blessed>
and altough the npc is not wearing anything (since i stripped him off before) the gloves are sent to the backpack
same with any other thing i try to equip to him
and then i found out that i cant even manually dress him with stuff (paperdoll)
taking something off him is no problem but i cant dress him again ? why is that ?
*edit* okay on further investigation i found out it is something about the "body" attributes that npc's have some have 0x191 and some have 0x190 and these can not be dressed from ingame
i have tried [set body 0x191 on my mob but it says "this is not properly formated"
any ideas ?
Fafnir- 04-01-2006
He may lack the strength to wear the plate. I ran into this issue once. It seems if you do not say what his strength should be, the random numbers are quite low.
olsyke- 04-01-2006
hell you are right ! for some reason this npc had his str set to 1 !
sometimes it small things that keep you from proceeding a long time