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!

Pet Death, Tell Owner Modification

Viago

Knight
Pet Death, Tell Owner Modification

ok, when i was a shard owner/scripter i got tierd of some players asking what happend to my poor lil pet (not to sound like an ass) but i put this Verry easy mod in Base creature. It will simply tell the owner that thier pet has (name) died.....(name) being the name of the pet.

find: BaseCreature.cs

Find/Search for ling:
Code:
				base.OnDeath( c );

add ABOVE
Code:
				if ( ControlMaster != null )
				{
				owner.SendMessage("Your Pet {0} Has been killed", this.Name.ToString());
				}

this will tell the owner that thier pet, Horse hasd died, or pet dragon. or what ever its name is.

you can modify it further if you wish, to display a more noticable gump, or posibly even the murder???

let me know how its workign for you :eek:
 

mjw1201

Wanderer
.

says "owner" cant be found

change to
ControlMaster.SendMessage("Your Pet {0} Has been killed",

and also would be really cool if sum1 would make into a gump so it would show up even if the pet dies while the person is logged out also..cuz this only shows up the exact moment the pet is killed
 
Here is what I used:

Code:
//Begin Pet Death Announce ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
																	    //
				if ( ControlMaster != null )										    //
				{													    //
				ControlMaster.SendMessage(33, "[PET DEATH!] Your pet {0} Has been slain in battle!", this.Name.ToString()); //
				}													    //
																	    //
//End Pet Death Announce /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I am including a pic of the text also so you can see what it looks like in the game.



I think it looks nice and is a great little addition :)
 
Here is a gump version this zip contains both versions (message and gump)

Thanks to:

Viago for the original code and idea
and
Greystar for helping me get the gump to function properly

Images:

Gump Version:


Message Version:


Installation:
There is a readme in the zip explaining the installation it is a simple mod.
 

Attachments

  • PetDeathAnnounce1.0b.rar
    1.6 KB · Views: 113

LowCastle

Wanderer
No pet death gump

@Evil Lord Kirby

You did not include the pet death gump. Just the instructions. I'll grab the gump from the other thread, but I wanted to let you know.
 
The attachment has been corrected. It was like 6a.m. when I finished this and I deleted the wrong file from the archive before uploading it lol. this is the correct attachment and should work fine but if there are any more problems in it please let me know.
 
I believe this will be my final version of this system. This version will send both a message and gump.

The message read "WARNING! [PET DEATH!]" in red and the gump will be sent displaying the details (same gump as above)

I am including the gump and a modified distro basecreature.cs it contains 2 edits one at the top and one near the bottom both clearly marked.
 

Attachments

  • Pet Death Announce 2.0.rar
    23 KB · Views: 113

Boulder

Sorceror
pet death

it works fine but
when you kill monster its ghost apairs till you run off screen and you come back and its gone. any clue
 

LowCastle

Wanderer
Boulder said:
it works fine but
when you kill monster its ghost apairs till you run off screen and you come back and its gone. any clue

The only time I have seen this type of thing is when I use the [seeall command (a custom script I got from these forums). That is normal as long as it isn't a player who doesn't have access to the [seeall command.
 

DevXLX

Sorceror
This does not seem to work if the pet dies to creatures?

Added it to my test shard, killed my tamed pet with [kill, and got the announcement.

Then i ressed it and let a balron kill it a few times, no messages came.

??
 
I only tested this myself with the kill command but I see no reason it would be any different when something else kills it lol. Try getting a pet you have bonded to you as the owner and as a player access level account killed by stuff see if it changes anything.
 
hi there all. im new to gump making but i wanted to start with somthing good.

now as i love this script, ive made my own gump, but a big thanks to. Doomsday Dragon. evil lord kirby.Viago, and all/.
its not much as ive just started, where b4 i would use others and put in what i wanted. but with the program i can do it myself. i forgot to add ofther bits when i started to try it. as in what calls upon it. to open. a book i click to open it. to see how it looks in game would be cool/. thanks.

just put PetDeathGump in you customs folder. all the best.

also add is BaseCreature.cs if you have a edited one in your system just open my and copy the parts marked

Code:
//Begin Pet Death Announce //
//End Pet Death Announce   //

well i hope you like it

View attachment 7455

View attachment 7456
 

Attachments

  • PetDeathGump.JPG
    PetDeathGump.JPG
    21.8 KB · Views: 74
  • Pet Death Announce.rar
    22.7 KB · Views: 33
Top