View Single Post
Old 06-02-2004, 12:41 AM   #15 (permalink)
flipside
Forum Expert
 
flipside's Avatar
 
Join Date: Nov 2002
Location: the city of angels
Age: 20
Posts: 661
Send a message via ICQ to flipside
Default

I tried modifying the PerfectSkull.cs to enchance both weapons and shields to give spell channeling, fast cast and fast cast recovery, here my the code I used followed by errors,
Code:
		               	  int EnhanceChance = Utility.Random( 1 );
		               	  int DestroyChance = Utility.Random( 500 );
		               	  
		               	  if ( EnhanceChance == 0 ) // Success
				    {
			                  Weapon.UsedSockets += 1;
			                  Weapon.WeaponAttributes.HitLeechHits += 4;
			                  Weapon.WeaponAttributes.SpellChanneling += 1;
					  Weapon.WeaponAttributes.CastSpeed += 1;
					  Weapon.WeaponAttributes.CastRecovery += 1;
						Weapon.Hue = 1109;
			                  
			                  Weapon.AugmentList = Weapon.AugmentList + "\n" + m_Augmentation.Name;
			                  from.PlaySound( 0x2A ); // Anvil
			                  from.SendMessage( "You have successfully enhanced the weapon!" );
			                  m_Augmentation.Delete();
			          }
Quote:
Originally Posted by errors
Scripts: Compiling C# scripts...failed (8 errors, 0 warnings)
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Amethysts\FlawedAmethyst.c
s: CS1502: (line 80, column 41) The best overloaded method match for 'Server.Uti
lity.Random(int)' has some invalid arguments
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Amethysts\FlawedAmethyst.c
s: CS1503: (line 80, column 57) Argument '1': cannot convert from 'double' to 'i
nt'
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0117: (line 87, column 22) 'Server.AosWeaponAttributes' does not contain a defin
ition for 'SpellChanneling'
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0117: (line 88, column 8) 'Server.AosWeaponAttributes' does not contain a defini
tion for 'CastSpeed'
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0117: (line 89, column 8) 'Server.AosWeaponAttributes' does not contain a defini
tion for 'CastRecovery'
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0246: (line 150, column 22) The type or namespace name 'Weapon' could not be fou
nd (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0246: (line 151, column 8) The type or namespace name 'Weapon' could not be foun
d (are you missing a using directive or an assembly reference?)
- Error: Scripts\Custom\Diablo 2\Sockets\Socket Gems\Skulls\PerfectSkull.cs: CS
0246: (line 152, column 8) The type or namespace name 'Weapon' could not be foun
d (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
It says it doesn't contain a definition for those three things, but if that's the case what would I use to add those features?
flipside is offline   Reply With Quote