Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 12-11-2004, 11:28 PM   #1 (permalink)
Forum Expert
 
cfaust's Avatar
 
Join Date: Jul 2003
Location: Shreveport, LA
Age: 39
Posts: 426
Send a message via ICQ to cfaust Send a message via AIM to cfaust Send a message via MSN to cfaust
Default 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
Attached Files
File Type: zip BasicWeapon.zip (1.4 KB, 63 views)
__________________
USAF [July 17, 1989 - Current]
cfaust is offline   Reply With Quote
Old 12-17-2004, 01:28 AM   #2 (permalink)
Forum Expert
 
cfaust's Avatar
 
Join Date: Jul 2003
Location: Shreveport, LA
Age: 39
Posts: 426
Send a message via ICQ to cfaust Send a message via AIM to cfaust Send a message via MSN to cfaust
Default

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
__________________
USAF [July 17, 1989 - Current]
cfaust is offline   Reply With Quote
Old 12-17-2004, 02:07 AM   #3 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 24
Posts: 1,805
Send a message via MSN to Pyro-Tech
Default

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
__________________

Pyro-Tech is offline   Reply With Quote
Old 12-17-2004, 02:16 AM   #4 (permalink)
Forum Expert
 
cfaust's Avatar
 
Join Date: Jul 2003
Location: Shreveport, LA
Age: 39
Posts: 426
Send a message via ICQ to cfaust Send a message via AIM to cfaust Send a message via MSN to cfaust
Default

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.
__________________
USAF [July 17, 1989 - Current]
cfaust is offline   Reply With Quote
Old 12-17-2004, 02:36 AM   #5 (permalink)
Forum Expert
 
Pyro-Tech's Avatar
 
Join Date: Oct 2003
Location: Carbondale, IL
Age: 24
Posts: 1,805
Send a message via MSN to Pyro-Tech
Default

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

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?
__________________

Pyro-Tech 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