|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
I don't have time to check this, but will this work right for my character, his serial is 0x1. Here is the script.
[code:1]using System; using Server; namespace Server.Items { public class YAYsBane : Kryss { public override int LabelNumber{ get{ return 1061106; } } // Axe of the Heavens public override int ArtifactRarity{ get{ return 60; } } public override int InitMinHits{ get{ return 255; } } public override int InitMaxHits{ get{ return 255; } } [Constructable] public YAYsBane() { Hue = 1153; Name = "The Bane of YAY"; // TODO: Repond Slayer WeaponAttributes.HitFireball = 50; WeaponAttributes.HitHarm = 50; WeaponAttributes.HitLightning = 50; WeaponAttributes.HitDispel = 50; WeaponAttributes.HitMagicArrow = 50; WeaponAttributes.HitLeechHits = 50; WeaponAttributes.HitLeechMana = 50; WeaponAttributes.HitLeechStam = 50; WeaponAttributes.HitLowerAttack = 50; WeaponAttributes.HitLowerDefend = 50; WeaponAttributes.SelfRepair = 170; Attributes.AttackChance = 15; Attributes.CastRecovery = 1; Attributes.CastSpeed = 1; Attributes.DefendChance = 15; Attributes.SpellChanneling = 1; Attributes.WeaponDamage = 60; WeaponAttributes.ResistFireBonus = 20; WeaponAttributes.ResistPoisonBonus = 20; WeaponAttributes.ResistColdBonus = 20; LootType = LootType.Blessed; } public YAYsBane( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } public override void OnDoubleClick( Mobile from ) { if ( from.Serial == 0x1 ) } public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); } } }[/code:1] I'm talking about his part I just added it. [code:1] } public override void OnDoubleClick( Mobile from ) { if ( from.Serial == 0x1 ) } [/code:1] |
|
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
|
Yes it will work!
mine is much more deeper but here ya can look at it... [code:1] ///////////////////////////////////////////////////////// // Scripted by BKW of Awaken Lands, Future Online Game // // URL: www.awakenlands.com // // © 2004, By Fanatsy World Entertainment // ///////////////////////////////////////////////////////// /**********PLEASE DO NOT REMOVE THIS HEADER*************/ using System; using System.Collections; using Server; using Server.Items; using Server.Mobiles; using Server.Network; namespace Server.Items { public abstract class BaseMagicalJewel : Item { private AccessLevel m_AccessLevel; private bool m_TurnedOn; public abstract int Body{ get; } public virtual int StaffSerial{ get{ return 0x0; } } public virtual int ItemHue{ get{ return 0; } } public abstract string ItemName{ get; } public virtual Layer ItemLayer{ get{ return Layer; } } public virtual bool UsingLayers{ get{ return false; } } public virtual string Message{ get{ return "of the Ancient World"; } } public virtual bool RegenHits{ get{ return false; } } public virtual bool RegenMana{ get{ return false; } } public virtual bool RegenStam{ get{ return false; } } public abstract string OldTitle{ get; } public abstract string OldName{ get; } public virtual int OldHue{ get{ return 0; } } public virtual int OldKarma{ get{ return 0; } } public virtual int OldFame{ get{ return 0; } } public abstract string NewName{ get; } public virtual string NewTitle{ get{ return ""; } } public virtual int NewHue{ get{ return 0; } } public virtual int NewKarma{ get{ return 0; } } public virtual int NewFame{ get{ return 0; } } public virtual int EffectID{ get{ return 0x0; } } public virtual int EffectHue{ get{ return 0; } } public virtual int EffectID2{ get{ return 0x0; } } public virtual int EffectHue2{ get{ return 0; } } public virtual int EffectID3{ get{ return 0x0; } } public virtual int EffectHue3{ get{ return 0; } } public virtual int EffectID4{ get{ return 0x0; } } public virtual int EffectHue4{ get{ return 0; } } public virtual int EffectID5{ get{ return 0x0; } } public virtual int EffectHue5{ get{ return 0; } } public virtual int EffectSpeed{ get{ return 5; } } public virtual int EffectDur{ get{ return 32; } } public virtual int Effect{ get{ return 250; } } public virtual int EffectRenMode{ get{ return 250; } } public virtual bool UsingBolts{ get{ return false; } } public virtual int BoltEffectHue{ get{ return 0; } } public virtual int BoltsAmount { get { return 0; } } public virtual int PlaySound{ get{ return -1; } } [CommandProperty( AccessLevel.Administrator )] public AccessLevel AccessLevel { get{ return m_AccessLevel; } set{ m_AccessLevel = value; } } [CommandProperty( AccessLevel.GameMaster )] public bool TurnedOn { get{ return m_TurnedOn; } set{ m_TurnedOn = value; } } public BaseMagicalJewel( AccessLevel level, int itemID ) : base( itemID ) { Name = this.ItemName; Hue = this.ItemHue; Layer = this.ItemLayer; Stackable = false; Weight = 0.0; Movable = true; LootType = LootType.Blessed; m_AccessLevel = level; m_TurnedOn = true; } public BaseMagicalJewel( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 1 ); // version writer.Write( (bool)m_TurnedOn ); writer.Write( (int) m_AccessLevel ); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 1: { m_TurnedOn = (bool)reader.ReadBool(); goto case 0; } case 0: { m_AccessLevel = (AccessLevel)reader.ReadInt(); break; } } } public bool Validate() { object root = RootParent; if ( root is Mobile && ((Mobile)root).AccessLevel < m_AccessLevel ) { Delete(); return false; } return true; } public override void OnSingleClick( Mobile from ) { if ( Validate() ) base.OnSingleClick( from ); } public override void OnDoubleClick( Mobile from ) { ALPlayerMobile m = ((ALPlayerMobile )from ); if ( Parent != from ) if ( from.AccessLevel <= AccessLevel.GameMaster ) from.SendMessage( "You have found a item that you cannot use, it will now vanish..." ); if ( from.AccessLevel <= AccessLevel.GameMaster ) Delete() ; if ( this.UsingLayers != true ) { if ( m.ChangeForm != true && from.Serial == this.StaffSerial && m_TurnedOn != false ) { from.Say( "*" + this.OldName + " transforms into {0} true form*", from.Female ? "her" : "his" ); from.Name = this.NewName; from.BodyMod = this.Body; from.Title = this.NewTitle; from.Hue = this.NewHue; from.FixedParticles( this.EffectID, this.EffectSpeed, this.EffectDur, this.EffectHue, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID2, this.EffectSpeed, this.EffectDur, this.EffectHue2, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID3, this.EffectSpeed, this.EffectDur, this.EffectHue3, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID4, this.EffectSpeed, this.EffectDur, this.EffectHue4, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID5, this.EffectSpeed, this.EffectDur, this.EffectHue5, this.Effect, this.EffectRenMode, EffectLayer.Waist ); if ( this.UsingBolts != false && this.BoltsAmount > 0 ) { for ( int i = 0; i < this.BoltsAmount; ++i ) { from.BoltEffect( this.BoltEffectHue ); } } else if ( this.UsingBolts != false ) { from.BoltEffect( this.BoltEffectHue ); } Regeneration(m); from.PlaySound( this.PlaySound ); from.Karma = this.NewKarma; from.Fame = this.NewFame; m.ChangeForm = true; } else if ( m.ChangeForm != false && from.Serial == this.StaffSerial ) { from.Say( "*" + this.OldName + " transforms into {0} normal form*", from.Female ? "her" : "his" ); from.BodyMod = 0; from.Name = this.OldName; from.Title = this.OldTitle; from.Hue = this.OldHue; from.FixedParticles( this.EffectID, this.EffectSpeed, this.EffectDur, this.EffectHue, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID2, this.EffectSpeed, this.EffectDur, this.EffectHue2, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID3, this.EffectSpeed, this.EffectDur, this.EffectHue3, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID4, this.EffectSpeed, this.EffectDur, this.EffectHue4, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID5, this.EffectSpeed, this.EffectDur, this.EffectHue5, this.Effect, this.EffectRenMode, EffectLayer.Waist ); if ( this.UsingBolts != false && this.BoltsAmount > 0 ) { for ( int i = 0; i < this.BoltsAmount; ++i ) { from.BoltEffect( this.BoltEffectHue ); } } else if ( this.UsingBolts != false ) { from.BoltEffect( this.BoltEffectHue ); } from.PlaySound( this.PlaySound ); from.Karma = this.OldKarma; from.Fame = this.OldFame; m.ChangeForm = false; } else { from.SendMessage ( 38, "You are not " + this.OldName + ", you may not use this." ); m.ChangeForm = false; Delete(); } } } public override bool OnEquip( Mobile from ) { if ( Parent != from ) if ( from.AccessLevel <= AccessLevel.GameMaster ) from.SendMessage( "You have found a item that you cannot use, it will now vanish..." ); if ( from.AccessLevel <= AccessLevel.GameMaster ) Delete() ; ALPlayerMobile m = ((ALPlayerMobile )from ); if ( from.Serial == this.StaffSerial && m_TurnedOn != true ) { from.SendMessage( this.NewHue, "{0}, the magical effect of this item has been turned off!", this.OldName ); } else if ( m.ChangeForm != true && from.Serial == this.StaffSerial && m_TurnedOn != false ) { from.Say( "*" + this.OldName + " transforms into {0} true form*", from.Female ? "her" : "his" ); from.Name = this.NewName; from.BodyMod = this.Body; from.Title = this.NewTitle; from.Hue = this.NewHue; from.FixedParticles( this.EffectID, this.EffectSpeed, this.EffectDur, this.EffectHue, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID2, this.EffectSpeed, this.EffectDur, this.EffectHue2, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID3, this.EffectSpeed, this.EffectDur, this.EffectHue3, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID4, this.EffectSpeed, this.EffectDur, this.EffectHue4, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID5, this.EffectSpeed, this.EffectDur, this.EffectHue5, this.Effect, this.EffectRenMode, EffectLayer.Waist ); if ( this.UsingBolts != false && this.BoltsAmount > 0 ) { for ( int i = 0; i < this.BoltsAmount; ++i ) { from.BoltEffect( this.BoltEffectHue ); } } else if ( this.UsingBolts != false ) { from.BoltEffect( this.BoltEffectHue ); } Regeneration(m); from.PlaySound( this.PlaySound ); from.Karma = this.NewKarma; from.Fame = this.NewFame; m.ChangeForm = true; } else { from.SendMessage ( 38, "You are not " + this.OldName + ", you may not use this." ); m.ChangeForm = false; Delete(); } return true; } public override void OnRemoved( object parent ) { if ( parent is Mobile ) { Mobile from = (Mobile)parent; ALPlayerMobile m = ((ALPlayerMobile )from ); if ( from.Serial == this.StaffSerial && m_TurnedOn != true ) { return; } else if ( m.ChangeForm != true && from.Serial == this.StaffSerial && m_TurnedOn != false ) { from.Say( "*" + this.OldName + " transforms into {0} true form*", from.Female ? "her" : "his" ); from.Name = this.NewName; from.BodyMod = this.Body; from.Title = this.NewTitle; from.Hue = this.NewHue; from.FixedParticles( this.EffectID, this.EffectSpeed, this.EffectDur, this.EffectHue, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID2, this.EffectSpeed, this.EffectDur, this.EffectHue2, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID3, this.EffectSpeed, this.EffectDur, this.EffectHue3, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID4, this.EffectSpeed, this.EffectDur, this.EffectHue4, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID5, this.EffectSpeed, this.EffectDur, this.EffectHue5, this.Effect, this.EffectRenMode, EffectLayer.Waist ); if ( this.UsingBolts != false && this.BoltsAmount > 0 ) { for ( int i = 0; i < this.BoltsAmount; ++i ) { from.BoltEffect( this.BoltEffectHue ); } } else if ( this.UsingBolts != false ) { from.BoltEffect( this.BoltEffectHue ); } from.PlaySound( this.PlaySound ); from.Karma = this.NewKarma; from.Fame = this.NewFame; m.ChangeForm = true; } else if ( m.ChangeForm != false && from.Serial == this.StaffSerial ) { from.Say( "*" + this.OldName + " transforms into {0} normal form*", from.Female ? "her" : "his" ); from.BodyMod = 0; from.Name = this.OldName; from.Title = this.OldTitle; from.Hue = this.OldHue; from.FixedParticles( this.EffectID, this.EffectSpeed, this.EffectDur, this.EffectHue, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID2, this.EffectSpeed, this.EffectDur, this.EffectHue2, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID3, this.EffectSpeed, this.EffectDur, this.EffectHue3, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID4, this.EffectSpeed, this.EffectDur, this.EffectHue4, this.Effect, this.EffectRenMode, EffectLayer.Waist ); from.FixedParticles( this.EffectID5, this.EffectSpeed, this.EffectDur, this.EffectHue5, this.Effect, this.EffectRenMode, EffectLayer.Waist ); if ( this.UsingBolts != false && this.BoltsAmount > 0 ) { for ( int i = 0; i < this.BoltsAmount; ++i ) { from.BoltEffect( this.BoltEffectHue ); } } else if ( this.UsingBolts != false ) { from.BoltEffect( this.BoltEffectHue ); } from.PlaySound( this.PlaySound ); from.Karma = this.OldKarma; from.Fame = this.OldFame; m.ChangeForm = false; } } } public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); if ( this.OldName != null ) list.Add( 1060847, "This Belongs to\t{0}", this.OldName ); if ( this.UsingLayers != false && this.NewName != null ) list.Add( 1050039, "{0}\t{1}", this.NewName, this.Message ); } public void Regeneration( ALPlayerMobile from ) { if ( this.RegenHits != false ) { new RegenHitsTimer(from).Start(); } if ( this.RegenMana != false ) { new RegenManaTimer(from).Start(); } if ( this.RegenStam != false ) { new RegenStamTimer(from).Start(); } } public class RegenHitsTimer : Timer { private ALPlayerMobile from; public RegenHitsTimer( ALPlayerMobile m ) : base ( TimeSpan.FromSeconds( 3.0 ), TimeSpan.FromSeconds( 3.0 ) ) { from = m; } protected override void OnTick() { if ( from.ChangeForm != false ) { from.Hits += 5; } else { Stop(); } } } public class RegenManaTimer : Timer { private ALPlayerMobile from; public RegenManaTimer( ALPlayerMobile m ) : base ( TimeSpan.FromSeconds( 3.0 ), TimeSpan.FromSeconds( 3.0 ) ) { from = m; } protected override void OnTick() { if ( from.ChangeForm != false ) { from.Mana += 5; } else { Stop(); } } } public class RegenStamTimer : Timer { private ALPlayerMobile from; public RegenStamTimer( ALPlayerMobile m ) : base ( TimeSpan.FromSeconds( 3.0 ), TimeSpan.FromSeconds( 3.0 ) ) { from = m; } protected override void OnTick() { if ( from.ChangeForm != false ) { from.Stam += 5; } else { Stop(); } } } public override bool VerifyMove( Mobile from ) { return ( from.AccessLevel >= m_AccessLevel ); } } } [/code:1]
__________________
Creator of Genesis :: genesisworlds.com -- Genesis is the next replacement program for UO Landscaper & Dragon |
|
|
|
|
|
#4 (permalink) | |
|
Account Terminated
|
Quote:
public override void OnDoubleClick( Mobile from ) { if ( from.Serial == 0x1 ) } So you know this makes no sense whats so ever. 1) Your Mobiles serial isn't ever going to be 0x1 so that makes no sense there. 2) OnDoubleClick is never called when you equip something. 3) That would do nothing at this point as OnDoubleClick doesn't handle equip event in any form whats so ever. 4) Keep trying. |
|
|
|
|
|
|
#7 (permalink) | ||
|
Account Terminated
|
Quote:
Also a program CANNOT program for you. I know every program that has been posted on these forums since I have been here since the start infact only a few days after they were started. Thats also not why I canot go into the newb forum so why don't you shut the hell up before I show you why I can't go into the newb forum. |
||
|
|
|
|
|
#9 (permalink) |
|
Forum Expert
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
|
It won't change it thats true, it is detecting to see if his serial is 0x1 if it isn't it won't do nothing on the double click... look how i did mine, it has SERIAL on it too and it works 100%...
__________________
Creator of Genesis :: genesisworlds.com -- Genesis is the next replacement program for UO Landscaper & Dragon |
|
|
|
|
|
#10 (permalink) |
|
Account Terminated
|
Well checking the serial makes no sense.
I would check the account but thats just me :-) Would allow only your account to use the item. Also I still say using onDoubleClick event would do nothing at all. The code has no way to be stopped as its a void, and you can "return" anything. OnEquip is a bool you can with that. |
|
|
|
|
|
#11 (permalink) |
|
Forum Expert
Join Date: Oct 2003
Location: Spokane Valley, WA
Age: 24
Posts: 1,528
|
aye hehe i got both in my script for items with doubleclick and items with no double click hehe
__________________
Creator of Genesis :: genesisworlds.com -- Genesis is the next replacement program for UO Landscaper & Dragon |
|
|
|
|
|
#12 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
Crack177, I know it may be hard, but if there was a program to let you program, then where does it stop? Somewhere down the line, you have to stop using programs to make a program. What you are asking for is impossible becuase it would be endless.
|
|
|
|
|
|
#13 (permalink) |
|
Since you guys are experts I changed it. I am just trying to find out how to use C# with Ultima Online. I have found some stuff but it's just stupid stuff. Here is my edited version of it.
[code:1]using System; using Server; namespace Server.Items { public class YAYsBane : Kryss { public override int LabelNumber{ get{ return 1061106; } } // Axe of the Heavens public override int ArtifactRarity{ get{ return 60; } } public override int InitMinHits{ get{ return 255; } } public override int InitMaxHits{ get{ return 255; } } [Constructable] public YAYsBane() { Hue = 1153; Name = "The Bane of YAY"; // TODO: Repond Slayer WeaponAttributes.HitFireball = 50; WeaponAttributes.HitHarm = 50; WeaponAttributes.HitLightning = 50; WeaponAttributes.HitDispel = 50; WeaponAttributes.HitMagicArrow = 50; WeaponAttributes.HitLeechHits = 50; WeaponAttributes.HitLeechMana = 50; WeaponAttributes.HitLeechStam = 50; WeaponAttributes.HitLowerAttack = 50; WeaponAttributes.HitLowerDefend = 50; WeaponAttributes.SelfRepair = 170; Attributes.AttackChance = 15; Attributes.CastRecovery = 1; Attributes.CastSpeed = 1; Attributes.DefendChance = 15; Attributes.SpellChanneling = 1; Attributes.WeaponDamage = 60; WeaponAttributes.ResistFireBonus = 20; WeaponAttributes.ResistPoisonBonus = 20; WeaponAttributes.ResistColdBonus = 20; LootType = LootType.Blessed; } public YAYsBane( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } public override void OnEquip( Mobile from ) { if ( from.Serial == 0x1 ) } public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); } } }[/code:1] Here is the error. [code:1] - Error: Scripts\Coustom Scripts\All Scripts\Artis\Copy of YAYsBane.cs: CS0508: (line 53, column 25) 'Server.Items.YAYsBane.OnEquip(Server.Mobile)': cannot change return type when overriding inherited member 'Server.Items.BaseWeapon.OnEquip(Server.Mobile)'[/code:1] |
|
|
|
|
|
|
#14 (permalink) | |
|
I R TEH POSTING!!1!eleven
Join Date: Jan 2004
Posts: 1,617
|
How is OnEquip() defined in the ancestor?
Cheers, Ignacio
__________________
Get your C# documentation today! Quote:
abralka@doramail.com |
|
|
|
|
|
|
#16 (permalink) | |
|
I R TEH POSTING!!1!eleven
Join Date: Jan 2004
Posts: 1,617
|
This line here:
[code:1] public class YAYsBane : Kryss[/code:1] indicates that the YAYsBane class inherits directly from the Kryss class. The Kryss class also inherits from another class, and so on up to System.Object. All those classes are YAYsBane's ancestors. Along that chain of inheritance, one of the classes declares a method called "OnEquip". Compare the declaration on the ancestor with the declaration on your new class. Cheers, Ignacio
__________________
Get your C# documentation today! Quote:
abralka@doramail.com |
|
|
|
|
|
|
#19 (permalink) | |
|
I R TEH POSTING!!1!eleven
Join Date: Jan 2004
Posts: 1,617
|
Right. Look at how it's declared there, and look how you've declared it in the other script.
Cheers, Ignacio
__________________
Get your C# documentation today! Quote:
abralka@doramail.com |
|
|
|
|
|
|
#20 (permalink) |
|
Ok I changed it and this is what I did.
[code:1]using System; using Server; namespace Server.Items { public class YAYsBane : Kryss { public override int LabelNumber{ get{ return 1061106; } } // Axe of the Heavens public override int ArtifactRarity{ get{ return 60; } } public override int InitMinHits{ get{ return 255; } } public override int InitMaxHits{ get{ return 255; } } [Constructable] public YAYsBane() { Hue = 1153; Name = "The Bane of YAY"; // TODO: Repond Slayer WeaponAttributes.HitFireball = 50; WeaponAttributes.HitHarm = 50; WeaponAttributes.HitLightning = 50; WeaponAttributes.HitDispel = 50; WeaponAttributes.HitMagicArrow = 50; WeaponAttributes.HitLeechHits = 50; WeaponAttributes.HitLeechMana = 50; WeaponAttributes.HitLeechStam = 50; WeaponAttributes.HitLowerAttack = 50; WeaponAttributes.HitLowerDefend = 50; WeaponAttributes.SelfRepair = 170; Attributes.AttackChance = 15; Attributes.CastRecovery = 1; Attributes.CastSpeed = 1; Attributes.DefendChance = 15; Attributes.SpellChanneling = 1; Attributes.WeaponDamage = 60; WeaponAttributes.ResistFireBonus = 20; WeaponAttributes.ResistPoisonBonus = 20; WeaponAttributes.ResistColdBonus = 20; LootType = LootType.Blessed; } public YAYsBane( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); } public override bool OnEquip( Mobile m ) { if ( from.Serial == 0x1) return false; else return base.OnEquip( m ); } public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); } } }[/code:1] I get this error. [code:1] - Error: Scripts\Coustom Scripts\All Scripts\Artis\Copy of YAYsBane.cs: CS0246: (line 55, column 9) The type or namespace name 'from' could not be found (are you missing a using directive or an assembly reference?)[/code:1] |
|
|
|
|
|
|
#21 (permalink) |
|
Ok I fixed it. Here is the finally copy. [code:1]*/Script made by Crack177. **********TO USE THIS SCRIPT YOU MUST LEAVE THIS HEADER**********/* using System; using Server; namespace Server.Items { public class YAYsBane : Kryss { public override int LabelNumber{ get{ return 1061106; } } // Axe of the Heavens public overrid |