New Creature Script doesn't work

Dezzie

Well-Known Member
Oct 26, 2013
86
9
57
Shard Name
Darkness Forsaken
Donate
Donate money to this user
Can someone tell me why this script doesn't work. It compiles fine, but won't add the creature in game. I made it for a quest I'm making. I used an existing script (that works) and just made a few changes to it.
Post automatically merged:

Here is the script not in an attached format.

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "a shaman corpse" )]
public class TribalShaman : BaseCreature
{
public override WeaponAbility GetWeaponAbility()
{
return Utility.RandomBool() ? WeaponAbility.WhirlwindAttack : WeaponAbility.ParalyzingBlow;
}

public override bool IgnoreYoungProtection { get { return Core.ML; } }

[Constructable]
public TribalShaman() : base( AIType.AI_Wizard, FightMode.Weakest, 10, 1, 0.015, 0.075 )
{
Name = NameList.RandomName( "ancient lich" );
Title = "Tribal Shaman";
Body = (this.Female = Utility.RandomBool()) ? 0x191 : 0x190;
Hue = 33380;
SetStr( 2300 );
SetDex( 300 );
SetInt( 1000 );
SetStam( 300 );
SetMana( 3000 );
SetHits( 1500 );

SetDamage( 20, 30 );

SetDamageType( ResistanceType.Cold, 100 );

SetResistance( ResistanceType.Physical, 70 );
SetResistance( ResistanceType.Fire, 70 );
SetResistance( ResistanceType.Cold, 70 );
SetResistance( ResistanceType.Poison, 70 );
SetResistance( ResistanceType.Energy, 70 );

SetSkill( SkillName.Necromancy, 60.0 );
SetSkill( SkillName.SpiritSpeak, 140.0 );
SetSkill( SkillName.EvalInt, 120.0 );
SetSkill( SkillName.Magery, 140.0 );
SetSkill( SkillName.Meditation, 1200.0 );
SetSkill( SkillName.MagicResist, 120.0 );
SetSkill( SkillName.Tactics, 120.0 );
SetSkill( SkillName.Wrestling, 120.0 );
SetSkill(SkillName.Macing, 120.0);
SetSkill(SkillName.Spellweaving, 120.0);
SetSkill(SkillName.Poisoning, 120.0);

Fame = 15000;
Karma = -15000;

VirtualArmor = 54;
PackGold(3000, 5000);

PackItem(new Bandage(30));
AddItem(new AncientWildStaff(Hue = 2456));
AddItem(new BoneArms(Hue = 2456));
AddItem(new BoneLegs(Hue = 2456));
AddItem(new BearMask(Hue = 1150));

}

public override void GenerateLoot()
{
AddLoot( LootPack.UltraRich, 2 );
AddLoot(LootPack.Gems, 5);
}
public override bool ReacquireOnMovement { get { return !Controlled; } }
public override bool AutoDispel { get { return !Controlled; } }
public override OppositionGroup OppositionGroup
{
get{ return OppositionGroup.FeyAndUndead; }
}
private bool m_SpeedBoost;

public override void OnDamage(int amount, Mobile from, bool willKill)
{
CheckSpeedBoost();
base.OnDamage(amount, from, willKill);
}

private const double SpeedBoostScalar = 1.2;

private void CheckSpeedBoost()
{
if (Hits < (HitsMax / 4))
{
if (!m_SpeedBoost)
{
ActiveSpeed /= SpeedBoostScalar;
PassiveSpeed /= SpeedBoostScalar;
m_SpeedBoost = true;
}
}
else if (m_SpeedBoost)
{
ActiveSpeed *= SpeedBoostScalar;
PassiveSpeed *= SpeedBoostScalar;
m_SpeedBoost = false;
}
}

public override int GetIdleSound()
{
return 0x2CE;
}

public override int GetDeathSound()
{
return 0x2C1;
}

public override int GetHurtSound()
{
return 0x2D1;
}

public override int GetAttackSound()
{
return 0x2C8;
}
public override bool CanRummageCorpses { get { return true; } }
public virtual bool BreathImmune { get { return true; } }
public override bool AlwaysMurderer { get { return true; } }
public override bool BardImmune{ get{ return true; } }
public override bool Unprovokable{ get{ return true; } }
public override bool AreaPeaceImmune{ get{ return true; } }
public override bool CanHeal { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Lethal; } }

public override int TreasureMapLevel{ get{ return 5; } }

public TribalShaman( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();

if ( BaseSoundID == 357 )
BaseSoundID = -1;
}
}
}
 

Attachments

Lagatha

Well-Known Member
Aug 28, 2016
114
19
Idaho. USA
Line 18 AI_Wizard I change to AI_Mage
public TribalShaman() : base( AIType.AI_Mage, FightMode.Weakest, 10, 1, 0.015, 0.075 )
{
it works now
 
  • Like
Reactions: Dezzie

Dezzie

Well-Known Member
Oct 26, 2013
86
9
57
Shard Name
Darkness Forsaken
Donate
Donate money to this user
I also had to change this:

AddItem(new AncientWildStaff(Hue = 2456));
AddItem(new BoneArms(Hue = 2456));
AddItem(new BoneLegs(Hue = 2456));
AddItem(new BearMask(Hue = 1150));

I took out the hue reference and it worked.

:)

Thank you though for taking a look at it, I appreciate the feedback.
 
  • Like
Reactions: Lagatha