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!

Skinning corpses & Sounds

moemakki

Wanderer
Skinning corpses & Sounds

What code is needed in order to skin a cropse with a bladed item, also what code should I add to my animal scripts in order for them to make sounds (Death sounds, attack sounds, get hit sounds, and natural 'wandering around' sounds)
 

Oculus

Sorceror
You might be able to figure out the skinning by looking at the "scripts/targets/BladedItemTarget.cs" script.

All I can offer, I couldn't script even if my live depended upon it :p
 
A

Allmight

Guest
Sounds

When it comes to sounds you can only make the deathsound yet. Beta 6 will have support for all sounds, but for now you have to be satisfied with the DeathSound.

The Mobile class contains a method called GetDeathSound() wich you have to override in the npc's class. RunUO calls that method when npc dies, and the method returns the sound ID back for the server to play.

Here follows an example how to override and calculate a random deathsound to play and return that sounds to the server. This example is for a giant spider...

[code:1] // Returns the deathsound to play when mobile dies
public override int GetDeathSound()
{
int snd = Utility.Random( 2 );

switch( snd )
{
case 0: return 0x186;
case 1: return 0x187;
default: return 0x187;
}
}
[/code:1]

The other sounds will function similary from what i have heard, but they won't be available until beta 6.
 
Top