Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 12-03-2005, 08:56 AM   #1 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default Door with hits

Alright, i saw somebody requesting this script, and i tough a hell, ill just make it, Its a door, but you'l have to hit it 10x before it will "open", funny texts, animations, and effect added when hitting
Attached Files
File Type: zip Bashdoor.zip (1.2 KB, 228 views)
Heartless is offline  
Old 12-03-2005, 09:05 AM   #2 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

Thanks.. ;D il test it right away!


*** EDIT ***

How do i do when i want it to have a higher Yeild? if i set it to 100 ingame, i cant hit it. nothing happends then

Last edited by Tobbe371; 12-03-2005 at 09:14 AM.
Tobbe371 is offline  
Old 12-03-2005, 09:37 AM   #3 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default

ill make a new one, wich allow you to change the yield , look here in about 1 hour
Heartless is offline  
Old 12-03-2005, 10:13 AM   #4 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default

alright, i tried, but somehow, the loop didnt work wel...
Heartless is offline  
Old 12-03-2005, 04:51 PM   #5 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

what could be wrong?

* edit *

Anyone else that got a clue how to make it adjustable hits on the door? would be cool to change the itemid to a wall to,

Last edited by Tobbe371; 12-04-2005 at 01:51 PM.
Tobbe371 is offline  
Old 12-05-2005, 02:32 AM   #6 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 116
Default

I reworked this script, I take no credit except for some cleaning and minor code additions to simplify and add changable yields.

edit: Dec 05, 2005
Made some more edits, see below for the new upload of the script.

Last edited by Chinook; 12-05-2005 at 07:26 PM.
Chinook is offline  
Old 12-05-2005, 11:11 AM   #7 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

Realy nice love it! hope somebody else find this script useable
Tobbe371 is offline  
Old 12-05-2005, 12:18 PM   #8 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

I was hoping someone would code these. They aren't that hard considering Sphere had them back in 1998. Great idea and I may just check it out when I get some time.
XxSP1DERxX is offline  
Old 12-05-2005, 04:57 PM   #9 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default

^^ BashDoor is teh pwnage
Heartless is offline  
Old 12-05-2005, 07:24 PM   #10 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 116
Default

I made some more mods to this script to add in some bug control and admin msg's for set up. Plus I never mentioned that I also added the yields int to the save/load process. Cleaned up the code and added some corrections to the rubble left after the door explodes. Like I said before, I take no credit, just love the script and wanted to share some improvements.


Edit: Dec 06, 2005

Uploaded a new version with Door HP counter, look page 2 in this thread for zip.

Last edited by Chinook; 12-06-2005 at 05:56 PM.
Chinook is offline  
Old 12-05-2005, 09:25 PM   #11 (permalink)
Forum Expert
 
Join Date: Aug 2003
Posts: 737
Send a message via ICQ to georox Send a message via AIM to georox
Default

Reminds me of an old script I made - Walls and statues/structures etc. That got damaged by explosion potions.. and after a point collapsed.. gotta see if i can find the remnants of it!
__________________
georox is offline  
Old 12-06-2005, 03:49 AM   #12 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default

lol, edit the door in whatever way ya want, i just made a quick one to get it started
Heartless is offline  
Old 12-06-2005, 06:31 AM   #13 (permalink)
 
Join Date: Jun 2003
Location: Poland, Zgierz
Age: 23
Posts: 173
Default

great work :P
great idea :P
ultek is offline  
Old 12-06-2005, 12:50 PM   #14 (permalink)
 
Join Date: Dec 2004
Location: Sweden
Posts: 117
Default

hehe thx(NollKoll helped out allot with the idea), but something that would be realy cool, is that you could drag a life bar from the door(or wall) so the players know this door cant last forever. or just a thing that indicates Hit points for the player that bashes wildy on the door and not knowing when its going to break. maby just give up :P
Tobbe371 is offline  
Old 12-06-2005, 03:44 PM   #15 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 45
Posts: 4,435
Default

A life bar or maybe even text messages, like "The door begins to splinter", "The door is about to collapse", etc.
HellRazor is offline  
Old 12-06-2005, 05:54 PM   #16 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 116
Default

I added a server msg that shows the current HP's of the door. Also added another bool called HideHP, this will give you the choice in props to show or hide the doors hitpoints to the player.
Attached Files
File Type: zip Bashdoor.zip (1.7 KB, 29 views)

Last edited by Chinook; 12-06-2005 at 06:31 PM.
Chinook is offline  
Old 12-06-2005, 09:12 PM   #17 (permalink)
Account Terminated
 
Join Date: Dec 2005
Posts: 116
Default

Well I got to thinking of expanding this door into a package with the addition of bashing weapons (like the warhammer), will do extra damage to the door.

To use, just hold or have a bashing weapon in your backpack, double tap for cursor and target the bashable door.

Just replace your basebashing.cs with the one I included and drop the bashingtarget.cs in your scripts folder.

*I also included my reworked bashdoor.cs*
Attached Files
File Type: zip BashDoor Pkg.zip (3.7 KB, 36 views)
Chinook is offline  
Old 12-07-2005, 05:42 PM   #18 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,261
Default

Nice work! Now I can be even more lazy and just use your script instead of making it myself!

Joeku is offline  
Old 12-08-2005, 11:10 AM   #19 (permalink)
Account Terminated
 
Join Date: Jul 2005
Age: 18
Posts: 455
Default

lol, i made a stupid door.. and now, its pretty cool already
Heartless is offline  
Old 12-08-2005, 04:37 PM   #20 (permalink)
Forum Novice
 
TheNorthStar's Avatar
 
Join Date: Aug 2004
Location: Indiana
Age: 22
Posts: 153
Send a message via AIM to TheNorthStar Send a message via Skype™ to TheNorthStar
Talking My edit

I made some edits to the script, hope you don't mind. I didn't like how it required distro changes, so I fixed that. I changed it so it's more like hit points on the door, and the damage will be based on your weapon. Also you have to be in war mode to damage the door.

I can't seem to attach the rar, so I'm just gonna post the code:

Code:
using System; 
using Server; 
using Server.Gumps; 
using Server.Network;
using Server.Engines.Craft;
using Server.Targeting;
using Server.Items;
using Server.Mobiles;

namespace Server.Items
{
	
   	[FlipableAttribute( 1663, 1664, 1655, 1656 )] 
	public class BashDoor : Item
	{
		private int m_yield = 100;
		private int m_RuinedHue = 1000;

		private bool m_hide;
		private bool m_ruined;

		[CommandProperty( AccessLevel.GameMaster )]
		public int Yield
		{ 
			get{ return m_yield; } 
			set{ m_yield = value; } 
		}
		
		[CommandProperty( AccessLevel.GameMaster )]
		public bool HideHP
		{ 
			get{ return m_hide; } 
			set{ m_hide = value; } 
		}

		[Constructable]
		public BashDoor() : base( 1663 )
		{
			Name = "a door";
			Weight = 31.1;
			Movable = false;
			HideHP = true;
		}

		public BashDoor( Serial serial ) : base( serial )
		{
		}

		public override void OnDoubleClick( Mobile from )
		{
			BaseWeapon weapon = from.Weapon as BaseWeapon;
			if ( !from.InRange( GetWorldLocation(), 1 ) ) 
			{ 
				from.SendLocalizedMessage( 500446 ); // That is too far away. 
			}
 
			else if ( from.Warmode )
			{
				if ( this.m_yield >= 1 && m_ruined == false )
				{
					int damage = 0;
					from.Direction = from.GetDirectionTo( GetWorldLocation() );

					if ( weapon != null )
					{
						weapon.PlaySwingAnimation( from );
						Effects.PlaySound( GetWorldLocation(), Map, weapon.HitSound );
						
						if ( weapon is BaseBashing )
						{
							damage = Utility.Random( weapon.MinDamage, weapon.MaxDamage );
							damage = damage * 2;
							damage += from.Str / 10;
							
							//Effects.SendLocationEffect( new Point3D( this.X, this.Y, this.Z ), from.Map, 14360, 10 );
							
							m_yield -= damage;
						}
						else
						{
							damage = Utility.Random( weapon.MinDamage, weapon.MaxDamage );
							damage += from.Str / 10;
							
							m_yield -= damage;
						}
					}
					else
					{
						damage = from.Str / 10;
						Effects.PlaySound( GetWorldLocation(), Map, Utility.RandomList( 0x3A4, 0x3A6, 0x3A9, 0x3AE, 0x3B4, 0x3B6 ) );
					}
					
					if ( m_hide == false )
					{
						from.SendMessage( "Door Hitpoints = "+ Yield );
					}
				}
				else if ( m_yield <= 0 && m_ruined == false )
				{
					from.Direction = from.GetDirectionTo( GetWorldLocation() );
            			Effects.SendLocationEffect( new Point3D( this.X, this.Y, this.Z ), from.Map, 14000, 10 );
					from.PlaySound( 0x307 );
					new BashDoorTimer( this ).Start();
					ItemID = 4338;
					Name = "Rubble";
					Hue = m_RuinedHue;
					m_yield = 0;
					m_ruined = true;
				}
				else
				{
				}
			}
			else
			{
				from.SendMessage( "This door is locked" );
			}
		}

		private class BashDoorTimer : Timer
		{
			private BashDoor m_Door;

			public BashDoorTimer( BashDoor Door ) : base( TimeSpan.FromMinutes( 1 ))                                                        
			{
				m_Door = Door;
			}

			protected override void OnTick()
			{
				m_Door.Delete();
			}
		}

		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );

			writer.Write( (int) 0 ); // version
			writer.Write( (int)m_yield);
		} 

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();
			switch(version)
			{
				case 0:
					m_yield = reader.ReadInt();
					break;
				default:
					break;
			}
		}
	}
}

Last edited by TheNorthStar; 12-08-2005 at 09:15 PM.
TheNorthStar is offline  
 

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 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5