RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Almost automatic weapon script maker

cfaust

Wanderer
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
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
 

Attachments

  • BasicWeapon.zip
    1.4 KB · Views: 90

cfaust

Wanderer
has anyone found this useful? If so I can work out some others for other items, NPCs, etc., eventually working up to an actual program.

If not I won't bother
 

Pyro-Tech

Knight
i haven't gotten to mess with this, but i have seen other shard emulators that have things like this to automatically make items/npc's/monsters/ ect. and it helped out a bit for doing the mundane stuff......it would be great for quick things in an RP shard for a quick quest or event setup if we had a complete program

i think it would be worth the time and effort....and i will try this out and see how it works for me

thanks :D
 

cfaust

Wanderer
My uber skills in batch are a bit rusty, but I can get back in to it with little difficulty; I used to use batch and quick basic to do all kinds of stuff on my old 286 and 386 *dreams* those were the days.
 

Pyro-Tech

Knight
i still have 2 computers....one is a 486 (ithink...pre-pentium anyways) and an old p75 mhz

hehe....i should try to install UO on one of those....or both :D

but yeah a program to do some automatic things would be cool......helpfull for some, but cheap and demeaning for others.....problem you would have is an increase in Uber weaps on the script submission but.....we get that now though don't we?
 

Kaimasin

Wanderer
i find this scritp uber usefull XD - im pretty new to scripting so this makes custamizing weapons easy enough :D thx alot ++karma :D
 
Top