Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 03-17-2008, 06:48 AM   #1 (permalink)
Lurker
 
Join Date: Jan 2006
Location: Obersiebenbrunn / Austria /Europe
Posts: 6
Default Killed by his own Pet

hi all

I am running an RUNO 2.0 Server with "Harvest System" and "Yard and Garden System".

A Player with 100 Animal Taming and 100 Animal Lore has tamed a Hiryu and used him for guarding. If the Hiryu tries to attack a Monster he cannot reach, he turns back and killed his Master.

Any suggestions, where i can begin to search the Problem?

grettings, Kruzi
Kruzitirkn is offline   Reply With Quote
Old 03-17-2008, 07:27 AM   #2 (permalink)
Forum Novice
 
Karmageddon's Avatar
 
Join Date: Jul 2003
Location: NY
Age: 38
Posts: 963
Default

Well the only time that a pet will attack it's master is if the player is guilded and the pet has an area attack that hits the player. Oh wait it may also happen in felucca under felucca rules. But an easy fix to this would be to take the area attack away from the creature. But there are probably different and harder ways to fix this also.
__________________

Your fate is sealed in the end of Time.....
Karmageddon is offline   Reply With Quote
Old 03-17-2008, 07:52 AM   #3 (permalink)
Lurker
 
Join Date: Jan 2006
Location: Obersiebenbrunn / Austria /Europe
Posts: 6
Default

Its nothing of it. I can reproduce it.

I tamed a Dire Wolf and brought it to my House in Luna. I "stayed" it before the Houses Garden (you can leave the Garden only trough a Door). Than I say "Hiryu guard me" and released the Wolf. The Wolf attacked me, the Hiryu tried to protect me, couldn't reach the Wolf, and killed me instantly.
Kruzitirkn is offline   Reply With Quote
Old 03-17-2008, 12:47 PM   #4 (permalink)
Forum Master
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,777
Send a message via Yahoo to Lord_Greywolf
Default

don't think it has to do with gardens at all

try making a "hand made" room some place, and it will probably do the same thing

it is probably using some sort of attack on the wolf
biut the attack does not hurt the wolf because of the walls (line of sight is broken)
but can hurt you

i would go through the hiryu's script and look to see how it targets its area attack, and make sure its owner is not added in, etc
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 03-17-2008, 01:58 PM   #5 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

I've been attacked by my own pet before if it can't reach it's target... it was however on RunUO 1.0 and previous... haven't tamed anything yet in 2.0 but I think it may have to do with something in the BaseAI.cs file somewhere.
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 03-17-2008, 02:07 PM   #6 (permalink)
Forum Novice
 
Join Date: Jan 2008
Posts: 162
Default

in the baseAI engine script....add a conditional statement within the AcquireFocusMob boolean foreach that checks to see if it is its master

something like this:

Code:
foreach( Mobile m in eable )
{
if ( m == m_Mobile.ControlMaster )
continue;
}
__________________
Scarand is offline   Reply With Quote
Old 03-18-2008, 08:03 AM   #7 (permalink)
Lurker
 
Join Date: Jan 2006
Location: Obersiebenbrunn / Austria /Europe
Posts: 6
Default

doesnt help

i put a sendmessage in and got no message, so i think, he newer reached this point.

Code:
foreach( Mobile m in eable )
m_Mobile.SendMessage( "in AcquireFocusMob" );
{
if ( m == m_Mobile.ControlMaster )
continue;
}
how can i activate this DebugSay statements?
Kruzitirkn is offline   Reply With Quote
Old 03-18-2008, 08:58 AM   #8 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

Quote:
Originally Posted by Kruzitirkn View Post
doesnt help

i put a sendmessage in and got no message, so i think, he newer reached this point.

Code:
foreach( Mobile m in eable )
m_Mobile.SendMessage( "in AcquireFocusMob" );
{
if ( m == m_Mobile.ControlMaster )
continue;
}
how can i activate this DebugSay statements?
activate Debug mode on the mobile itself. (IE Set the debug entry to true)
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 03-18-2008, 12:03 PM   #9 (permalink)
Lurker
 
Join Date: Jan 2006
Location: Obersiebenbrunn / Austria /Europe
Posts: 6
Default

i got it!

@Greystar: debug helps
@Scarand: you were quiet close

in baseAI.cs / AcquireFocusMob:

Code:
if( m_Mobile.ControlTarget == null || m_Mobile.ControlTarget.Deleted || !m_Mobile.ControlTarget.Alive || m_Mobile.ControlTarget.IsDeadBondedPet || !m_Mobile.InRange( m_Mobile.ControlTarget, m_Mobile.RangePerception * 2 ) )
{
	m_Mobile.FocusMob = null;
	return false;
}
else
{
	m_Mobile.FocusMob = m_Mobile.ControlTarget;
	return (m_Mobile.FocusMob != null);
}
i changed to:

Code:
if( m_Mobile.ControlTarget == null || m_Mobile.ControlTarget.Deleted || !m_Mobile.ControlTarget.Alive || m_Mobile.ControlTarget.IsDeadBondedPet || !m_Mobile.InRange( m_Mobile.ControlTarget, m_Mobile.RangePerception * 2 ) )
{
	m_Mobile.FocusMob = null;
	return false;
}
else
{
		// Let's not kill my master...
		if ( m_Mobile.ControlTarget == m_Mobile.ControlMaster )
			m_Mobile.FocusMob = null;
		else
			m_Mobile.FocusMob = m_Mobile.ControlTarget;
		return (m_Mobile.FocusMob != null);
and it works great!

thanks to all
Kruzitirkn 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