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 02-20-2006, 02:20 AM   #1 (permalink)
Forum Novice
 
Evil Jason's Avatar
 
Join Date: Jan 2005
Location: The People's Republic of Massachusetts
Age: 34
Posts: 158
Cool Killable Guards

Well, I have been searching for a good way to make guards killable. I did use Greystar's killable guards script, but i had some crash issues with it.

So I was forced to do some searching for other ways to do it. And here is the working result.

After MUCH looking, i found a baseguard.cs by Sirens Song which allowed the guards to have an AI of a basecreature. It can be found here: http://www.runuo.com/forums/showthre...642#post328642
I replaced my baseguard.cs with it and then edited the following sections of warriorguard.cs and archerguard.cs:

I commented out the highlighted sections.

Code:
else
				{ // <instakill>
					TeleportTo( target );
					target.BoltEffect( 0 );

					if ( target is BaseCreature )
					{
						((BaseCreature) target).NoKillAwards = true;
					}

					//target.Damage( target.HitsMax, m_Owner );
					//target.Kill(); // just in case, maybe Damage is overriden on some shard

					if ( target.Corpse != null && !target.Player )
					{
						target.Corpse.Delete();
					}

					m_Owner.Focus = null;
					Stop();
And of course I edited the stats for the guards which can be found here:
Code:
public WarriorGuard( Mobile target ) : base( target )
		{
			InitStats( 150, 120, 50 );
			Title = "the guard";
and here:
Code:
public ArcherGuard( Mobile target ) : base( target )
		{
			InitStats( 100, 125, 25 );
			Title = "the guard";
I then started up my server and POOF! I now have killable guards. I realize that this method is by no means as intricate as what Greystar did, but it works.

if you want the guards to leave a corpse when they die just comment out the lines in red below in baseguard.cs:

Code:
 /*public override bool OnBeforeDeath()
        {
            Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);

            PlaySound(0x1FE);

            Delete();

            return false;
        }*/
I figure this could be a very simple way for folks to get killable guards without a ton of script replacement, and NO crashes.

~Jason
__________________
So long and thanks for all the fish. :D

時々私poop
Quote:
Welcome to Thunderdome, Bitch.

Last edited by Evil Jason; 02-27-2006 at 04:33 PM.
Evil Jason is offline  
Old 02-20-2006, 09:33 AM   #2 (permalink)
Forum Novice
 
Evil Jason's Avatar
 
Join Date: Jan 2005
Location: The People's Republic of Massachusetts
Age: 34
Posts: 158
Wink Because it is not a custom script release.

Quote:
Originally Posted by Seanchen.net
Why was this post as a stock script fix, when its not...

Because it is not a custom script release,nothing in it is completely custom, merely a bunch of modifications to existing scripts. Which is what the title of the forum said: 'Stock script fixes and modifications'.


~Jason
__________________
So long and thanks for all the fish. :D

時々私poop
Quote:
Welcome to Thunderdome, Bitch.

Last edited by Evil Jason; 02-20-2006 at 10:05 AM.
Evil Jason 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