|
||
|
|||||||
| New Join Forum So your new to RunUO and looking to work with people that are new, this is the place. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: May 2008
Posts: 38
|
using System;
using Server.Network; using Server.Items; namespace Server.Items { [FlipableAttribute( 0xEC3, 0xEC2 )] public class BloodDrinker : BaseKnife { public override int ArtifactRarity{ get{ return 3; } } public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.BleedAttack; } } public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.InfectiousStrike; } } public override int AosStrengthReq{ get{ return 10; } } public override int AosMinDamage{ get{ return 11; } } public override int AosMaxDamage{ get{ return 13; } } public override int AosSpeed{ get{ return 46; } } public override int OldStrengthReq{ get{ return 10; } } public override int OldMinDamage{ get{ return 2; } } public override int OldMaxDamage{ get{ return 13; } } public override int OldSpeed{ get{ return 40; } } public override int InitMinHits{ get{ return 500; } } public override int InitMaxHits{ get{ return 500; } } [Constructable] public BloodDrinker() : base( 0xEC3 ) { Hue = 55; WeaponAttributes.HitLightning = 75; WeaponAttributes.HitLeechMana = 100; Attributes.WeaponSpeed = 40; Attributes.WeaponDamage = 100; Weight = 2.0; } public BloodDrinker( 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(); if ( Weight == 1.0 ) Weight = 2.0; } } } Thats my script for a new weapon, I did take a look thru the search files but couldnt find anything involving the name. . . So what my problem is when i create this weapon in the game it says Cleaver as the name instead of Blood Drinker, can anyone tell me what my problem is? |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,227
|
2 things actually. When posting a script or part of one, you need to use the code button. Looks like this.. #
Now, as for the name, do it like so.. Code:
[Constructable]
public BloodDrinker() : base( 0xEC3 )
{
Hue = 55;
Name = BloodDrinker;
WeaponAttributes.HitLightning = 75;
WeaponAttributes.HitLeechMana = 100;
Attributes.WeaponSpeed = 40;
Attributes.WeaponDamage = 100;
Weight = 2.0;
}
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. |
|
|
|
|
|
#3 (permalink) | |
|
Newbie
Join Date: May 2008
Posts: 38
|
Quote:
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 1 warnings)
Warnings:
+ Customs/Dueling/Base/DuelRestartProtocol.cs:
CS0162: Line 158: Unreachable code detected
Errors:
+ Customs/Custom Items/Blood Drinker.cs:
CS0118: Line 30: 'Server.Items.BloodDrinker' is a 'type' but is used like a
'variable'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
|
|
|
|
|
|
|
#4 (permalink) |
|
Newbie
Join Date: May 2008
Posts: 38
|
Code:
RunUO - [www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 1 warnings)
Warnings:
+ Customs/Dueling/Base/DuelRestartProtocol.cs:
CS0162: Line 158: Unreachable code detected
Errors:
+ Customs/Custom Items/Mythical Chest.cs:
CS0103: Line 33: The name 'WeaponAttributes' does not exist in the current c
ontext
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
|
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,227
|
I forgot one little thing.. The name needs to be this way.
Code:
Name = "BloodDrinker"; As for the armor problem, I dont think you can add weapon attributes to armor. You dont "hit" the monster with the armor.
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. |
|
|
|
|
|
#6 (permalink) |
|
Newbie
Join Date: May 2008
Posts: 38
|
thanks alot man that has helped me a ton. I am still very new at this. As a matter of a fact i can't write any code myself i am just good at looking at stuff and guessing at what does what. I am going to start some tutorials soon in c#. If you find out you can add hit lighting to armor plz post it here and agian thanks
![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|