X
Xanthos
Guest
Thanks for the report seanandre.
I have uploaded a new shrink system 1.16 that fixes this problem.
I have uploaded a new shrink system 1.16 that fixes this problem.
public override void AlterMeleeDamageTo( Mobile to, ref int damage )
{
base.AlterMeleeDamageTo( to, ref damage ); //added to make sure it finishes being used where it supposed to be used
}
public override void AlterSpellDamageTo( Mobile to, ref int damage )
{
base.AlterSpellDamageTo( to, ref damage ); //added to make sure it finishes being used where it supposed to be used
}
Xanthos said:I designed it to work so that they would have to be in harm's way to gain EP. Obviously if they are taking damage they are returning the attack. I just didn't want to encourge a situation where there is no risk to the Evo.
Xanthos said:Ok my guess is you are getting errors about unknown classes or types. In that case use the fully qualified name. For instance a MercenaryDeed is in the Xanthos.Evo namespace, so instead of:
new MercenaryDeed()
you would use:
new Xanthos.Evo.MercenaryDeed()
using System;
using Server;
namespace Xanthos.Evo
{
public sealed class RaelisDragonSpec : BaseEvoSpec
{
// This class implements a singleton pattern; meaning that no matter how many times the
// Instance attribute is used, there will only ever be one of these created in the entire system.
// Copy this template and give it a new name. Assign all of the data members of the EvoSpec
// base class in the constructor. Your subclass must not be abstract.
// Never call new on this class, use the Instance attribute to get the instance instead.
RaelisDragonSpec()
{
m_Tamable = true;
m_MinTamingToHatch = 99.9;
m_PercentFemaleChance = 0.02; // Made small to limit access to eggs.
m_GuardianEggOrDeedChance = .01;
m_AlwaysHappy = false;
m_ProducesYoung = true;
m_PregnancyTerm = 0.10;
m_AbsoluteStatValues = false;
m_MaxEvoResistance = 100;
m_MaxTrainingStage = 3;
m_Skills = new SkillName[7] { SkillName.Magery, SkillName.EvalInt, SkillName.Meditation, SkillName.MagicResist,
SkillName.Tactics, SkillName.Wrestling, SkillName.Anatomy };
m_MinSkillValues = new int[7] { 50, 50, 50, 15, 19, 19, 19 };
m_MaxSkillValues = new int[7] { 120, 120, 110, 110, 100, 100, 100 };
[COLOR="Red"]m_Hue = Utility.RandomList( 1157, 1175, 1172, 1170, 2703, 2473, 2643, 1156, 2704, 2734, 2669, 2621, 2859, 2716, 2791, 2927, 2974, 1161, 2717, 2652, 2821, 2818, 2730, 2670, 2678, 2630, 2641, 2644, 2592, 2543, 2526, 2338, 2339, 1793, 1980, 1983 );[/COLOR]
m_Stages = new BaseEvoStage[] { new RaelisDragonStageOne(), new RaelisDragonStageTwo(),
new RaelisDragonStageThree(), new RaelisDragonStageFour(),
new RaelisDragonStageFive(), new RaelisDragonStageSix(),
new RaelisDragonStageSeven() };
}
// These next 2 lines facilitate the singleton pattern. In your subclass only change the
// BaseEvoSpec class name to your subclass of BaseEvoSpec class name and uncomment both lines.
public static RaelisDragonSpec Instance { get { return Nested.instance; } }
class Nested { static Nested() { } internal static readonly RaelisDragonSpec instance = new RaelisDragonSpec();}
}
// Define a subclass of BaseEvoStage for each stage in your creature and place them in the
// array in your subclass of BaseEvoSpec. See the example classes for how to do this.
// Your subclass must not be abstract.
public class RaelisDragonStageOne : BaseEvoStage
{
public RaelisDragonStageOne()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 25000; EpMinDivisor = 10; EpMaxDivisor = 5; DustMultiplier = 20;
BaseSoundID = 0xDB;
BodyValue = 52; ControlSlots = 2; MinTameSkill = 99.9; VirtualArmor = 30;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = new ResistanceType[1] { ResistanceType.Physical };
MinDamages = new int[1] { 100 };
MaxDamages = new int[1] { 100 };
ResistanceTypes = new ResistanceType[1] { ResistanceType.Physical };
MinResistances = new int[1] { 15 };
MaxResistances = new int[1] { 15 };
DamageMin = 11; DamageMax = 17; HitsMin = 200; HitsMax = 250;
StrMin = 296; StrMax = 325; DexMin = 56; DexMax = 75; IntMin = 76; IntMax = 96;
}
}
public class RaelisDragonStageTwo : BaseEvoStage
{
public RaelisDragonStageTwo()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 75000; EpMinDivisor = 20; EpMaxDivisor = 10; DustMultiplier = 20;
BaseSoundID = 219;
BodyValue = 89; VirtualArmor = 40;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinDamages = new int[5] { 100, 25, 25, 25, 25 };
MaxDamages = new int[5] { 100, 25, 25, 25, 25 };
ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinResistances = new int[5] { 20, 20, 20, 20, 20 };
MaxResistances = new int[5] { 20, 20, 20, 20, 20 };
DamageMin = 1; DamageMax = 1; HitsMin= 500; HitsMax = 500;
StrMin = 200; StrMax = 200; DexMin = 20; DexMax = 20; IntMin = 30; IntMax = 30;
}
}
public class RaelisDragonStageThree : BaseEvoStage
{
public RaelisDragonStageThree()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 175000; EpMinDivisor = 30; EpMaxDivisor = 20; DustMultiplier = 20;
BaseSoundID = 0x5A;
BodyValue = 0xCE; VirtualArmor = 50;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = null;
MinDamages = null;
MaxDamages = null;
ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinResistances = new int[5] { 40, 40, 40, 40, 40 };
MaxResistances = new int[5] { 40, 40, 40, 40, 40 };
DamageMin = 1; DamageMax = 1; HitsMin= 100; HitsMax = 100;
StrMin = 100; StrMax = 100; DexMin = 10; DexMax = 10; IntMin = 20; IntMax = 20;
}
}
public class RaelisDragonStageFour : BaseEvoStage
{
public RaelisDragonStageFour()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 3750000; EpMinDivisor = 50; EpMaxDivisor = 40; DustMultiplier = 20;
BaseSoundID = 362;
BodyValue = 60; ControlSlots = 3; MinTameSkill = 119.9; VirtualArmor = 60;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = null;
MinDamages = null;
MaxDamages = null;
ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinResistances = new int[5] { 60, 60, 60, 60, 60 };
MaxResistances = new int[5] { 60, 60, 60, 60, 60 };
DamageMin = 1; DamageMax = 1; HitsMin= 100; HitsMax = 100;
StrMin = 100; StrMax = 100; DexMin = 10; DexMax = 10; IntMin = 120; IntMax = 120;
}
}
public class RaelisDragonStageFive : BaseEvoStage
{
public RaelisDragonStageFive()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 7750000; EpMinDivisor = 160; EpMaxDivisor = 40; DustMultiplier = 20;
BodyValue = 59; VirtualArmor = 70;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinDamages = new int[5] { 100, 50, 50, 50, 50 };
MaxDamages = new int[5] { 100, 50, 50, 50, 50 };
ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinResistances = new int[5] { 80, 80, 80, 80, 80 };
MaxResistances = new int[5] { 80, 80, 80, 80, 80 };
DamageMin = 5; DamageMax = 5; HitsMin= 100; HitsMax = 100;
StrMin = 100; StrMax = 100; DexMin = 20; DexMax = 20; IntMin = 120; IntMax = 120;
}
}
public class RaelisDragonStageSix : BaseEvoStage
{
public RaelisDragonStageSix()
{
EvolutionMessage = "has evolved";
NextEpThreshold = 15000000; EpMinDivisor = 540; EpMaxDivisor = 480; DustMultiplier = 20;
BodyValue = 46; VirtualArmor = 170;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = null;
MinDamages = null;
MaxDamages = null;
ResistanceTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinResistances = new int[5] { 98, 98, 98, 98, 98 };
MaxResistances = new int[5] { 98, 98, 98, 98, 98 };
DamageMin = 5; DamageMax = 5; HitsMin= 100; HitsMax = 100;
StrMin = 100; StrMax = 100; DexMin = 20; DexMax = 20; IntMin = 120; IntMax = 120;
}
}
public class RaelisDragonStageSeven : BaseEvoStage
{
public RaelisDragonStageSeven()
{
Title = "The Ancient Dragon";
EvolutionMessage = "has evolved to its highest form and is now an Ancient Dragon";
NextEpThreshold = 0; EpMinDivisor = 740; EpMaxDivisor = 660; DustMultiplier = 20;
BaseSoundID = 362;
BodyValue = 172; ControlSlots = 4; VirtualArmor = 270;
[COLOR="Red"]Hue = SetHue;[/COLOR]
DamagesTypes = new ResistanceType[5] { ResistanceType.Physical, ResistanceType.Fire, ResistanceType.Cold,
ResistanceType.Poison, ResistanceType.Energy };
MinDamages = new int[5] { 100, 75, 75, 75, 75 };
MaxDamages = new int[5] { 100, 75, 75, 75, 75 };
ResistanceTypes = null;
MinResistances = null;
MaxResistances = null;
DamageMin = 15; DamageMax = 15; HitsMin= 1350; HitsMax = 1400;
StrMin = 125; StrMax = 125; DexMin = 125; DexMax = 35; IntMin = 125; IntMax = 125;
}
}
}
#region AuthorHeader
//
// EvoSystem version 1.15, by Xanthos
//
//
#endregion AuthorHeader
using System;
using Server;
namespace Xanthos.Evo
{
public abstract class BaseEvoSpec
{
// This class implements a singleton pattern; meaning that no matter how many times the
// Instance attribute is used, there will only ever be one of these created in the entire system.
// Copy this template and give it a new name. Assign all of the data members of the EvoSpec
// base class in the constructor. Your subclass must not be abstract.
// Never call new on this class, use the Instance attribute to get the instance instead.
public int MountStage { get{ return m_MountStage; } }
public int MaxTrainingStage { get { return m_MaxTrainingStage; } }
public bool Tamable { get { return m_Tamable; } }
public double MinTamingToHatch { get{ return m_MinTamingToHatch; } }
public double PercentFemaleChance { get{ return m_PercentFemaleChance; } }
public double GuardianEggOrDeedChance { get{ return m_GuardianEggOrDeedChance; } }
public double PackSpecialItemChance { get{ return m_PackSpecialItemChance; } }
public bool AlwaysHappy { get{ return m_AlwaysHappy; } }
public bool ProducesYoung { get{ return m_ProducesYoung; } }
public double PregnancyTerm { get{ return m_PregnancyTerm; } }
public double HatchDuration { get{ return m_HatchDuration; } }
public bool AbsoluteStatValues { get{ return m_AbsoluteStatValues; } }
public int FameLevel { get{ return m_FameLevel; } }
public int KarmaLevel { get{ return m_KarmaLevel; } }
public SkillName [] Skills { get{ return m_Skills; } }
public int [] MinSkillValues { get{ return m_MinSkillValues; } }
public int [] MaxSkillValues { get{ return m_MaxSkillValues; } }
public int MaxEvoResistance { get{ return m_MaxEvoResistance; } }
public BaseEvoStage [] Stages { get{ return m_Stages; } }
[COLOR="Red"]public int SetHue { get{ return m_Hue; } }[/COLOR]
protected BaseEvoSpec() { }
protected int m_MountStage; // At what stage can player mount (only BaseEvoMount)?
protected int m_MaxTrainingStage; // At what stage can evo no longer train against training elementals?
protected bool m_Tamable; // Is it or not?
protected double m_MinTamingToHatch; // Skill required - independent of requirement to tame one gone wild.
protected double m_PercentFemaleChance; // Chance to spawn as female - important for population control
protected double m_GuardianEggOrDeedChance; // Chance to produce an egg or deed as loot - Guardians only
protected double m_PackSpecialItemChance; // Small chance to pack a special item in construction of the Evo
protected bool m_AlwaysHappy; // Keeps it wonderfully happy if true, otherwise needs food like other pets.
protected bool m_ProducesYoung; // Does the species produce offspring?
protected double m_PregnancyTerm; // Days between mating and producing an egg (1.00 = one day, 0.01 = 15 minutes).
protected double m_HatchDuration; // Days of egg incubation time (1.00 = one day, 0.01 = 15 minutes).
protected bool m_AbsoluteStatValues; // Set or add str, dex, int, hits, damage at each stage.
protected int m_FameLevel; // 1 - 5
protected int m_KarmaLevel; // 0 - 5
protected BaseEvoStage [] m_Stages; // The list of stages.
protected SkillName [] m_Skills; // List of skill names and min/max values
protected int [] m_MinSkillValues;
protected int [] m_MaxSkillValues;
protected int m_MaxEvoResistance; // The cap even with mods (i.e. armor, et.) on.
[COLOR="Red"]protected int m_Hue; // List of possible hues for the evo.[/COLOR]
// These next 2 lines facilitate the singleton pattern. In your subclass only change the
// BaseEvoSpec class name to your subclass of BaseEvoSpec class name and uncomment both lines.
// public static BaseEvoSpec Instance { get { return Nested.instance; } }
// class Nested { static Nested() { } internal static readonly BaseEvoSpec instance = new BaseEvoSpec();}
}
// Define a subclass of BaseEvoStage for each stage in your creature and place them in the
// array in your subclass of BaseEvoSpec. See the example classes for how to do this.
// Your subclass must not be abstract.
public abstract class BaseEvoStage
{
public string Title;
public string EvolutionMessage;
public int NextEpThreshold;
public int EpMinDivisor;
public int EpMaxDivisor;
public int DustMultiplier;
public int BaseSoundID;
public int BodyValue;
[COLOR="Red"]public int SetHue;
public int Hue;[/COLOR]
public int ControlSlots;
public double MinTameSkill;
public int VirtualArmor;
public ResistanceType [] DamagesTypes;
public int [] MinDamages;
public int [] MaxDamages;
public ResistanceType [] ResistanceTypes;
public int [] MinResistances;
public int [] MaxResistances;
// These next 10 can be relative or absolute depending on your EvoSpec.AbsoluteStatValues
public int DamageMin;
public int DamageMax;
public int HitsMin;
public int HitsMax;
public int StrMin;
public int StrMax;
public int DexMin;
public int DexMax;
public int IntMin;
public int IntMax;
}
}
public int SetHue { get{ return m_Hue; } }
public int Hue { get{ return m_Hue; } }
Joeku said:*smacks self in face*
Alari used "FoodType" as a definition for items. What happened was, there was a "BaseCreature FoodType" and an "Item FoodType." Since the Mercenary.cs script used items (using Server.Items it recognized both food types. Simple fix; I changed Alari's "FoodType" to "ItemFoodType" and all of the classes that used it, which turned out to be only one item. I'll leave this post for future FoodType problems.
RunUO - [[url]www.runuo.com][/url] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
- Error: Scripts\Custom\Xanthos\EVO\Mercenary\Mercenary.cs: CS0104: (line 105,
column 19) 'FoodType' is an ambiguous reference
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Not enough context - post the error please.Dango's Slave said:I keep getting an error that says (line 20, column 39) the type or namespace name "Translocation Item" could not be found <are you missing an directive or an assembly reference?> how do i fix it without hitting 5 million errors please reply