Не понял на счет кода создания и одевания... Наемника можно одевать и раздевать как угодно. Ниже скину полный скрипт если это важно.
А в момент снятия оружия? Наемников можно одевать и раздевать, то есть я например дам ему какой нибудь арт, у этого арта изменится тип урона, а при снятии надо заставить ранку возвращать нужный тип урона получается, и если бы у всех оружий был бы физ урон 100% то это ничего еще, но не будет ли геморно и много строк чтобы ранка считывала дефолтный тип урона?
Может проще прописать наложение консекруса постоянное в руках моба? Меня устраивают оба варианта.
Ниже код. На мусор в коде не обращаем внимание.
Код
using System;
using System.Collections;
using Server.Items;
using Server.ContextMenus;
using Server.Misc;
using Server.Network;
using System.Collections.Generic;
using Server;
using Server.Mobiles;
namespace Server.Mobiles
{
public class Esquire : BaseCreature
{
public override bool ShowFameTitle{ get{ return false; } }
[Constructable]
public Esquire() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.18, 0.36 )
{
Title = "the esquire";
Hue = Utility.RandomSkinHue();
if ( this.Female = Utility.RandomBool() )
{
Body = 0x191;
Name = NameList.RandomName( "female" );
AddItem( new Doublet( Utility.RandomMetalHue() ) );
}
else
{
Body = 0x190;
Name = NameList.RandomName( "male" );
AddItem( new Surcoat( Utility.RandomMetalHue() ) );
}
SetStr( 150 );
SetDex( 150 );
SetInt( 150 );
SetSkill( SkillName.Fencing, 90 );
SetSkill( SkillName.Macing, 90 );
SetSkill( SkillName.MagicResist, 90 );
SetSkill( SkillName.Swords, 90);
SetSkill( SkillName.Tactics, 90 );
SetSkill( SkillName.Wrestling, 90 );
Fame = 0;
Team = 77;
/*SetDamageType( ResistanceType.Physical, 20 );
SetDamageType( ResistanceType.Fire, 20 );
SetDamageType( ResistanceType.Cold, 20 );
SetDamageType( ResistanceType.Poison, 20 );
SetDamageType( ResistanceType.Energy, 20 );*/
AddItem( new ThighBoots());
AddItem( new FancyShirt( Utility.RandomMetalHue() ));
AddItem( new Cloak( Utility.RandomMetalHue() ));
AddItem( new LeatherGloves());
AddItem( new LongPants( Utility.RandomMetalHue() ));
AddItem( new FeatheredHat( Utility.RandomMetalHue() ));
AddItem( new LeatherChest());
switch ( Utility.Random( 14 ))
{
case 0: AddItem( new Longsword() ); break;
case 1: AddItem( new Scimitar() ); break;
case 2: AddItem( new Broadsword() ); break;
case 3: AddItem( new Spear() ); break;
case 4: AddItem( new VikingSword() ); break;
case 5: AddItem( new Halberd() ); break;
case 6: AddItem( new WarAxe() ); break;
case 7: AddItem( new Maul() ); break;
case 8: AddItem( new Mace() ); break;
case 9: AddItem( new Pike() ); break;
case 10: AddItem( new Cutlass() ); break;
case 11: AddItem( new Katana() ); break;
case 12: AddItem( new Kryss() ); break;
case 13: AddItem( new HammerPick() ); break;
}
Utility.AssignRandomHair( this );
}
public override int GetMaxResistance( ResistanceType type )
{
if ( AccessLevel > AccessLevel.Player )
return int.MaxValue;
int max = (type == ResistanceType.Physical) ? (( AccessLevel > AccessLevel.Player ) ? int.MaxValue : 80) : 70;
if ( type != ResistanceType.Physical && 60 < max && Spells.Fourth.CurseSpell.UnderEffect( this ) )
max = 60;
if( Core.ML && this.Race == Race.Elf && type == ResistanceType.Energy )
max += 5; //Intended to go after the 60 max from curse
return max;
}
public override bool AllowEquipFrom( Mobile from )
{
return ControlMaster == from || base.AllowEquipFrom(from);
}
#region Pack Animal Methods
public override bool OnBeforeDeath()
{
if ( !base.OnBeforeDeath() )
return false;
PackAnimal.CombineBackpacks( this );
return true;
}
public override DeathMoveResult GetInventoryMoveResultFor( Item item )
{
return DeathMoveResult.MoveToCorpse;
}
public override bool IsSnoop( Mobile from )
{
if ( PackAnimal.CheckAccess( this, from ) )
return false;
return base.IsSnoop( from );
}
public override bool OnDragDrop( Mobile from, Item item )
{
if ( CheckFeed( from, item ) )
return true;
if ( PackAnimal.CheckAccess( this, from ) )
{
AddToBackpack( item );
return true;
}
return base.OnDragDrop( from, item );
}
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
{
return PackAnimal.CheckAccess( this, from );
}
public override bool CheckNonlocalLift( Mobile from, Item item )
{
return PackAnimal.CheckAccess( this, from );
}
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
PackAnimal.GetContextMenuEntries( this, from, list );
}
#endregion
public Esquire( 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();
}
}
}