Got this error when adding yours.Cheetah2003;677631 said:Actually, that would always give the same reward. This fix might be better:
Code:Type reward = m_Decorations[random > m_Decorations.Length - 1 ? m_Decorations.Length - 1 : random];
Errors:
+ CustomScripts/Mondain's Legacy/Items/Aquarium/Aquarium.cs:
CS0103: Line 531: The name 'random' does not exist in the current context
CS0103: Line 531: The name 'random' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
Raider;677641 said:Got this error when adding yours.Code:Errors: + CustomScripts/Mondain's Legacy/Items/Aquarium/Aquarium.cs: CS0103: Line 531: The name 'random' does not exist in the current context CS0103: Line 531: The name 'random' does not exist in the current context Scripts: One or more scripts failed to compile or no script files were found.
Type reward = m_Decorations[Utility.Random(m_Decorations.Length)];
Error 1 'Server.Core' does not contain a definition for 'Set' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Item.cs 2962 9 ConsoleApplication1
Error 2 'Server.Network.NetState' does not contain a definition for 'IsUOTDClient' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 3123 122 ConsoleApplication1
Error 3 'Server.Region' does not contain a definition for 'OnBeforeDeath' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 3743 21 ConsoleApplication1
Error 4 The best overloaded method match for 'Server.Network.NetState.RemoveGump(int)' has some invalid arguments C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6509 6 ConsoleApplication1
Error 5 Argument '1': cannot convert from 'Server.Gumps.Gump' to 'int' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6509 29 ConsoleApplication1
Error 6 'Server.Gumps.Gump' does not contain a definition for 'OnServerClose' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6511 11 ConsoleApplication1
Error 7 'Server.Network.NetState' does not contain a definition for 'ClearGumps' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6536 8 ConsoleApplication1
Error 8 'Server.Gumps.Gump' does not contain a definition for 'OnServerClose' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6541 11 ConsoleApplication1
Error 9 'Server.Core' does not contain a definition for 'Set' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 9580 9 ConsoleApplication1
<Facet name="Felucca">
<!--Mondain's Legacy-->
<region type="MondainTownRegion" priority="50" name="Heartwood">
<rect x="6911" y="255" width="257" height="257" />
<go x="6984" y="337" z="0" />
<entrance x="535" y="995" />
<music name="ElfCity" />
</region>
<region type="MondainRegion" priority="50" name="Painted Caves">
<rect x="6248" y="845" width="80" height="80" />
<go x="6309" y="892" z="0" />
<entrance x="1716" y="2997" />
<music name="Dungeon9" />
</region>
<!--End-->
Just thought you know on osi you can lore the parrot its an animal so just thought i let everyone know i do have a osi account 7 years old and i got 6 parrots.Changed so you can't lore parrots
MalGanis;677739 said:I have some bad news. My motherboard went mental esterday and my comp stopped working. I got my laptop working, but its quite old ==> i can't fix anything until i get a new board. Btw anyone knows whats wrong if motherboard starts beeping (like an alarm) and theres nothing but a power supply connected to it?
MalGanis;677739 said:I have some bad news. My motherboard went mental esterday and my comp stopped working. I got my laptop working, but its quite old ==> i can't fix anything until i get a new board. Btw anyone knows whats wrong if motherboard starts beeping (like an alarm) and theres nothing but a power supply connected to it?
if (m == null) return false;
using System;
using Server;
namespace Server.Items
{
public class MaceAndShieldGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073381; } } // Mace and Shield Reading Glasses
public override int BasePhysicalResistance{ get{ return 25; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public MaceAndShieldGlasses() : base()
{
Hue = 0x1DD;
Attributes.BonusStr = 10;
Attributes.BonusDex = 5;
WeaponAttributes.HitLowerDefend = 30;
}
public MaceAndShieldGlasses( 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();
}
}
public class GlassesOfTheArts : Glasses
{
public override int LabelNumber{ get{ return 1073363; } } // Reading Glasses of the Arts
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 8; } }
public override int BaseColdResistance{ get{ return 8; } }
public override int BasePoisonResistance{ get{ return 4; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public GlassesOfTheArts() : base()
{
Hue = 0x73;
Attributes.BonusInt = 5;
Attributes.BonusStr = 5;
Attributes.BonusHits = 15;
}
public GlassesOfTheArts( 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();
}
}
public class FoldedSteelGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073380; } } // Folded Steel Reading Glasses
public override int BasePhysicalResistance{ get{ return 20; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public FoldedSteelGlasses() : base()
{
Hue = 0x47E;
Attributes.BonusStr = 8;
Attributes.NightSight = 1;
Attributes.DefendChance = 15;
}
public FoldedSteelGlasses( 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();
}
}
public class TradesGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073362; } } // Reading Glasses of the Trades
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public TradesGlasses() : base()
{
Attributes.BonusStr = 10;
Attributes.BonusInt = 10;
}
public TradesGlasses( 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();
}
}
public class LyricalGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073382; } } // Lyrical Reading Glasses
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public LyricalGlasses() : base()
{
Hue = 0x47F;
Attributes.ReflectPhysical = 15;
Attributes.NightSight = 1;
WeaponAttributes.HitLowerDefend = 20;
}
public LyricalGlasses( 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();
}
}
public class AnthropomorphistGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073379; } } // Anthropomorphist Reading Glasses
public override int BasePhysicalResistance{ get{ return 5; } }
public override int BaseFireResistance{ get{ return 5; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 20; } }
public override int BaseEnergyResistance{ get{ return 20; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public AnthropomorphistGlasses() : base()
{
Hue = 0x80;
Attributes.BonusHits = 5;
Attributes.RegenMana = 3;
}
public AnthropomorphistGlasses( 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();
}
}
public class LightOfWayGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073378; } } // Light of Way Reading Glasses
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public LightOfWayGlasses() : base()
{
Hue = 0x256;
Attributes.BonusStr = 7;
Attributes.BonusInt = 5;
Attributes.WeaponDamage = 30;
}
public LightOfWayGlasses( 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();
}
}
public class NecromanticGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073377; } } // Necromantic Reading Glasses
public override int BasePhysicalResistance{ get{ return 0; } }
public override int BaseFireResistance{ get{ return 0; } }
public override int BaseColdResistance{ get{ return 0; } }
public override int BasePoisonResistance{ get{ return 0; } }
public override int BaseEnergyResistance{ get{ return 0; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public NecromanticGlasses() : base()
{
Hue = 0x22D;
Attributes.LowerRegCost = 30;
Attributes.LowerManaCost = 12;
}
public NecromanticGlasses( 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();
}
}
public class WizardsCrystalGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073374; } } // Wizard's Crystal Reading Glasses
public override int BasePhysicalResistance{ get{ return 5; } }
public override int BaseFireResistance{ get{ return 5; } }
public override int BaseColdResistance{ get{ return 5; } }
public override int BasePoisonResistance{ get{ return 5; } }
public override int BaseEnergyResistance{ get{ return 5; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public WizardsCrystalGlasses() : base()
{
Hue = 0x2B0;
Attributes.BonusMana = 10;
Attributes.RegenMana = 3;
Attributes.SpellDamage = 15;
}
public WizardsCrystalGlasses( 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();
}
}
public class MaritimeGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073364; } } // Maritime Reading Glasses
public override int BasePhysicalResistance{ get{ return 3; } }
public override int BaseFireResistance{ get{ return 4; } }
public override int BaseColdResistance{ get{ return 30; } }
public override int BasePoisonResistance{ get{ return 5; } }
public override int BaseEnergyResistance{ get{ return 3; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public MaritimeGlasses() : base()
{
Hue = 0x581;
Attributes.NightSight = 1;
Attributes.Luck = 100;
Attributes.ReflectPhysical = 20;
}
public MaritimeGlasses( 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();
}
}
public class TreasuresAndTrinketsGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073373; } } // Treasures and Trinkets Reading Glasses
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 10; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public TreasuresAndTrinketsGlasses() : base()
{
Hue = 0x5A6; // TODO check
Attributes.BonusInt = 10;
Attributes.BonusHits = 5;
Attributes.SpellDamage = 10;
}
public TreasuresAndTrinketsGlasses( 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();
}
}
public class PoisonedGlasses : Glasses
{
public override int LabelNumber{ get{ return 1073376; } } // Poisoned Reading Glasses
public override int BasePhysicalResistance{ get{ return 10; } }
public override int BaseFireResistance{ get{ return 10; } }
public override int BaseColdResistance{ get{ return 10; } }
public override int BasePoisonResistance{ get{ return 30; } }
public override int BaseEnergyResistance{ get{ return 10; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public PoisonedGlasses() : base()
{
Hue = 0x55C; // TODO check
Attributes.BonusStam = 3;
Attributes.RegenStam = 4;
}
public PoisonedGlasses( 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();
}
}
}
using System;
using Server;
namespace Server.Items
{
public class Glasses : BaseArmor
{
public override int AosStrReq{ get{ return 45; } }
public override int OldStrReq{ get{ return 40; } }
public override int ArmorBase{ get{ return 30; } }
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
private AosWeaponAttributes m_AosWeaponAttributes;
[CommandProperty( AccessLevel.GameMaster )]
public AosWeaponAttributes WeaponAttributes
{
get{ return m_AosWeaponAttributes; }
}
[Constructable]
public Glasses() : base( 0x2FB8 )
{
Weight = 2.0;
}
public Glasses( Serial serial ) : base( serial )
{
}
public override bool CanEquip( Mobile m )
{
if ( !m.NetState.SupportsExpansion( Expansion.ML ) )
{
m.SendLocalizedMessage( 1072791 ); // You must upgrade to Mondain's Legacy in order to use that item.
return false;
}
return true;
}
public override void AppendChildNameProperties( ObjectPropertyList list )
{
base.AppendChildNameProperties( list );
list.Add( 1075085 ); // Requirement: Mondain's Legacy
}
public override void AddResistanceProperties( ObjectPropertyList list )
{
int prop;
if ( (prop = m_AosWeaponAttributes.HitColdArea) != 0 )
list.Add( 1060416, prop.ToString() ); // hit cold area ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitDispel) != 0 )
list.Add( 1060417, prop.ToString() ); // hit dispel ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitEnergyArea) != 0 )
list.Add( 1060418, prop.ToString() ); // hit energy area ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitFireArea) != 0 )
list.Add( 1060419, prop.ToString() ); // hit fire area ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitFireball) != 0 )
list.Add( 1060420, prop.ToString() ); // hit fireball ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitHarm) != 0 )
list.Add( 1060421, prop.ToString() ); // hit harm ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLeechHits) != 0 )
list.Add( 1060422, prop.ToString() ); // hit life leech ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLightning) != 0 )
list.Add( 1060423, prop.ToString() ); // hit lightning ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLowerAttack) != 0 )
list.Add( 1060424, prop.ToString() ); // hit lower attack ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLowerDefend) != 0 )
list.Add( 1060425, prop.ToString() ); // hit lower defense ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitMagicArrow) != 0 )
list.Add( 1060426, prop.ToString() ); // hit magic arrow ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLeechMana) != 0 )
list.Add( 1060427, prop.ToString() ); // hit mana leech ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitPhysicalArea) != 0 )
list.Add( 1060428, prop.ToString() ); // hit physical area ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitPoisonArea) != 0 )
list.Add( 1060429, prop.ToString() ); // hit poison area ~1_val~%
if ( (prop = m_AosWeaponAttributes.HitLeechStam) != 0 )
list.Add( 1060430, prop.ToString() ); // hit stamina leech ~1_val~%
base.AddResistanceProperties( list );
}
private static void SetSaveFlag( ref SaveFlag flags, SaveFlag toSet, bool setIf )
{
if ( setIf )
flags |= toSet;
}
private static bool GetSaveFlag( SaveFlag flags, SaveFlag toGet )
{
return ( (flags & toGet) != 0 );
}
private enum SaveFlag
{
None = 0x00000000,
WeaponAttributes = 0x00000001,
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
SaveFlag flags = SaveFlag.None;
SetSaveFlag( ref flags, SaveFlag.WeaponAttributes, !m_AosWeaponAttributes.IsEmpty );
writer.Write( (int) flags );
if ( GetSaveFlag( flags, SaveFlag.WeaponAttributes ) )
m_AosWeaponAttributes.Serialize( writer );
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
int version = reader.ReadInt();
SaveFlag flags = (SaveFlag) reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.WeaponAttributes ) )
m_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
else
m_AosWeaponAttributes = new AosWeaponAttributes( this );
}
}
}
26/04-08:45 System.Reflection.TargetInvocationException: Exception has been thro
wn by the target of an invocation. ---> System.NullReferenceException: Object re
ference not set to an instance of an object.
at Server.Items.MaceAndShieldGlasses..ctor() in c:\Program Files\RunUO 2.0 SV
N 160\Scripts\MLTeleporter\Glasses1.cs:line 27
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStru
ct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruc
t signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, B
inder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at Server.Commands.Add.Build(Mobile from, ConstructorInfo ctor, Object[] valu
es, String[,] props, PropertyInfo[] realProps, Boolean& sendError) in c:\Program
Files\RunUO 2.0 SVN 160\Scripts\Commands\Add.cs:line 243
at Server.Commands.Add.Build(Mobile from, Point3D start, Point3D end, Constru
ctorInfo ctor, Object[] values, String[,] props, PropertyInfo[] realProps, List`
1 packs) in c:\Program Files\RunUO 2.0 SVN 160\Scripts\Commands\Add.cs:line 312
Ok it complies now can add those glasses but wont show this -->WeaponAttributes.HitLowerDefend = 20;Kamuflaro;677806 said:m_AosWeaponAttributes = new AosWeaponAttributes( this );
put that in the ctor
Raider;677814 said:Ok it complies now can add those glasses but wont show this -->WeaponAttributes.HitLowerDefend = 20;
when i highlight it.
if ( Talisman is BaseTalisman )
{
BaseTalisman talisman = (BaseTalisman) Talisman;
if ( talisman.Protection != null && talisman.Protection.Type != null )
{
Type type = talisman.Protection.Type;
if ( type == from.GetType() )
amount *= 1 - (int) (((double) talisman.Protection.Amount) / 100);
}
}
if ( from != null && Talisman is BaseTalisman )
{
BaseTalisman talisman = (BaseTalisman) Talisman;
if ( talisman.Protection != null && talisman.Protection.Type != null )
{
Type type = talisman.Protection.Type;
if ( type.IsAssignableFrom( from.GetType() ) )
amount *= 1 - (int) (((double) talisman.Protection.Amount) / 100);
}
}