Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 06-08-2008, 11:11 PM   #1 (permalink)
Newbie
 
Join Date: May 2008
Posts: 38
Default Can anyone plz help a newbie?

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?
Nikoru is offline   Reply With Quote
Old 06-08-2008, 11:29 PM   #2 (permalink)
Forum Expert
 
Hammerhand's Avatar
 
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,227
Default

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;
}
It should show as BloodDrinker now.
__________________
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.
Hammerhand is offline   Reply With Quote
Old 06-09-2008, 12:25 AM   #3 (permalink)
Newbie
 
Join Date: May 2008
Posts: 38
Default hmm...

Quote:
Originally Posted by Hammerhand View Post
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;
}[/code]
It should show as BloodDrinker now.
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.
Thats what it does when i add Name = BloodDrinker;
Nikoru is offline   Reply With Quote
Old 06-09-2008, 12:39 AM   #4 (permalink)
Newbie
 
Join Date: May 2008
Posts: 38
Default hey one more qustion also..

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.
i was trying to add hit lighting mod to a peice of armor how do i go about doing that?
Nikoru is offline   Reply With Quote
Old 06-09-2008, 12:48 AM   #5 (permalink)
Forum Expert
 
Hammerhand's Avatar
 
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,227
Default

I forgot one little thing.. The name needs to be this way.
Code:
Name = "BloodDrinker";
Needs the " at both ends.
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.
Hammerhand is offline   Reply With Quote
Old 06-09-2008, 02:36 AM   #6 (permalink)
Newbie
 
Join Date: May 2008
Posts: 38
Default thanks

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
Nikoru is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5