QUOTE |
public virtual void OnThink() { if (EnableRummaging && CanRummageCorpses && !Summoned && !Controlled && DateTime.Now >= m_NextRummageTime) { double min, max; if (ChanceToRummage > Utility.RandomDouble() && Rummage()) { min = MinutesToNextRummageMin; max = MinutesToNextRummageMax; // ARTEGORDONMOD // flag mobs that have rummaged XmlAttach.AttachTo(this, new XmlData("HasRummaged")); } else { min = MinutesToNextChanceMin; max = MinutesToNextChanceMax; } double delay = min + (Utility.RandomDouble() * (max - min)); m_NextRummageTime = DateTime.Now + TimeSpan.FromMinutes(delay); } if (CanBreath && DateTime.Now >= m_NextBreathTime) // tested: controled dragons do breath fire, what about summoned skeletal dragons? { Mobile target = this.Combatant; if (target != null && target.Alive && !target.IsDeadBondedPet && CanBeHarmful(target) && target.Map == this.Map && !IsDeadBondedPet && target.InRange(this, BreathRange) && InLOS(target) && !BardPacified) BreathStart(target); m_NextBreathTime = DateTime.Now + TimeSpan.FromSeconds(BreathMinDelay + (Utility.RandomDouble() * BreathMaxDelay)); } } |
QUOTE |
// ARTEGORDONMOD // smartspawning control public virtual bool HoldSmartSpawning { get { // dont smartspawn paragons if (IsParagon) return true; if (this is BaseChampion) return true; // dont smartspawn mobs that have rummaged if (XmlAttach.FindAttachment(this, typeof(XmlData), "HasRummaged") != null) return true; // dont smartspawn mobs that have been stolen from if (StolenFrom) return true; // dont smartspawn socketed/socketable mobs if(XmlAttach.FindAttachment(this, typeof(XmlSockets)) != null || XmlAttach.FindAttachment(this, typeof(XmlSocketable)) != null) return true; return false; } } |
CODE |
// ARTEGORDONMOD // smartspawning control public virtual bool HoldSmartSpawning { get { // dont smartspawn paragons if (IsParagon) return true; if (this is BaseChampion) return true; // dont smartspawn mobs that have rummaged if (XmlAttach.FindAttachment(this, typeof(XmlData), "HasRummaged") != null) return true; // dont smartspawn mobs that have been stolen from if (StolenFrom) return true; // dont smartspawn socketed/socketable mobs if(XmlAttach.FindAttachment(this, typeof(XmlSockets)) != null || XmlAttach.FindAttachment(this, typeof(XmlSocketable)) != null) return true; return false; } } |
CODE |
// ARTEGORDONMOD // smartspawning control public virtual bool HoldSmartSpawning { get { // dont smartspawn paragons if (IsParagon) return true; // dont smartspawn champs if (this is BaseChampion) return true; // dont smartspawn mobs that have rummaged if (XmlAttach.FindAttachment(this, typeof(XmlData), "HasRummaged") != null) return true; return false; } } |
CODE |
RunUO - [www.runuo.com] Version 1.0.0, Build 36918 Scripts: Compiling C# scripts...failed (4 errors, 2 warnings) - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0246: (line 730, column 61) The type or namespace name 'XmlData' could not be found (are you missing a using directive or an assembly reference?) - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0246: (line 730, column 23) The type or namespace name 'XmlAttach' could not be found (are you missing a using directive or an assembly reference?) - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0246: (line 4843, colum n 45) The type or namespace name 'XmlData' could not be found (are you missing a using directive or an assembly reference?) - Error: Scripts\Engines\AI\Creature\BaseCreature.cs: CS0246: (line 4843, colum n 16) The type or namespace name 'XmlAttach' could not be found (are you missing a using directive or an assembly reference?) - Warning: Scripts\Customs\ExplodeCommand\Explode.cs: CS0183: (line 38, column 28) The given expression is always of the provided ('Server.Mobile') type - Warning: Scripts\Customs\ExplodeCommand\Explode.cs: CS0183: (line 44, column 28) The given expression is always of the provided ('Server.Mobile') type Scripts: One or more scripts failed to compile or no script files were found. - Press return to exit, or R to try again. |
CODE |
using Server.Engines.XmlSpawner2; |