Almost automatic weapon script maker
This is provided as is; it works for me, should work for you..
This is what the code looks like after you have entered the proper information
There is a batch file included called testPowerSword.bat
contents of testPowerSword.bat
Basically you could do this from a command shell in windows; from the directory you have unzipped the files in to type the following:
makeweapon <WeaponName> <Base> <Flipable Atr 1> <Flipable Atr 2> <Prime Abil> <Sec Abil> <Skill Req> <Wep Type> <Anim>
Or you can just create a new batch file using the one provided.
The main file is a simple batch file, all it does is take the information you provide and make a working weapon script, provided you haven't entered something wrong.
The weapon name can not have any spaces; you can add the "Name This" line to the script after you have generated it. The flipable attribute line is commented out, as I didn't test actually using that line, but it's there just in case.
Just something I've used to reduce typing; you should go in and adjust the number to suit your needs before actually using the weapon.
Updated: Added some additional information for folks who aren't sure how; comments added as well to point out custom information.
Updated: Corrected a typo in the script generator batch file changed Blessed to LootType.Blessed
This is provided as is; it works for me, should work for you..
This is what the code looks like after you have entered the proper information
Code:
using System;
using Server.Network;
using Server.Items;
//
namespace Server.Items
{
//[FlipableAttribute( 0xF5E, 0xF5F )]
public class PowerSword : BaseSword
{
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.BleedAttack; } }
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.ArmorIgnore; } }
//
public override int AosStrengthReq{ get{ return 20; } }
public override int AosMinDamage{ get{ return 9; } }
public override int AosMaxDamage{ get{ return 11; } }
public override int AosSpeed{ get{ return 53; } }
//
public override int OldStrengthReq{ get{ return 10; } }
public override int OldMinDamage{ get{ return 3; } }
public override int OldMaxDamage{ get{ return 28; } }
public override int OldSpeed{ get{ return 53; } }
//
public override int DefHitSound{ get{ return 0x23C; } }
public override int DefMissSound{ get{ return 0x238; } }
//
public override int InitMinHits{ get{ return 31; } }
public override int InitMaxHits{ get{ return 90; } }
//
public override SkillName DefSkill{ get{ return SkillName.Swords; } }
public override WeaponType DefType{ get{ return WeaponType.Piercing; } }
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.Pierce1H; } }
//
[Constructable]
public PowerSword() : base( 0xF5E )
{
Weight = 2.0;
Name = "Change this Name"; //Rename the Item here
Hue = 1645; //change the color; or comment this line out
LootType = LootType.Blessed; //Blessed or Regular, maybe comment this line out
}
//
public PowerSword( Serial serial ) : base( serial )
{
}
//
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
//
writer.Write( (int) 1 ); // version
}
//
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
//
int version = reader.ReadInt();
//
if ( Weight == 1.0 )
Weight = 2.0;
if(version==0)
Name=null;
}
}
}
There is a batch file included called testPowerSword.bat
contents of testPowerSword.bat
Code:
call makeweapon.bat PowerSword BaseSword 0xF5E 0xF5F BleedAttack ArmorIgnore Swords Piercing Pierce1H
Basically you could do this from a command shell in windows; from the directory you have unzipped the files in to type the following:
makeweapon <WeaponName> <Base> <Flipable Atr 1> <Flipable Atr 2> <Prime Abil> <Sec Abil> <Skill Req> <Wep Type> <Anim>
Or you can just create a new batch file using the one provided.
The main file is a simple batch file, all it does is take the information you provide and make a working weapon script, provided you haven't entered something wrong.
The weapon name can not have any spaces; you can add the "Name This" line to the script after you have generated it. The flipable attribute line is commented out, as I didn't test actually using that line, but it's there just in case.
Just something I've used to reduce typing; you should go in and adjust the number to suit your needs before actually using the weapon.
Updated: Added some additional information for folks who aren't sure how; comments added as well to point out custom information.
Updated: Corrected a typo in the script generator batch file changed Blessed to LootType.Blessed