|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#2 (permalink) |
|
Forum Expert
|
So you want to make it so that if a person is holding a paticular item and goes into warmode with it, it broadcast to the world "PLAYERNAME has equiped ITEMNAME"?
__________________
Father Time Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "Holy Hell......What a ride!!!" Server: UO: Extinction ICQ: 146563794 FatherTime@UOExtinction.com UO: Extinction homepage UO: Extinction forum |
|
|
|
|
|
#4 (permalink) |
|
Forum Expert
|
Hmm, well WarMode is stored in Mobile.cs which is part of the core. Short of altering that script then recompiling the core that isn’t really possible (that I am aware of at this time, I haven’t had much time to research this issue).
Rather then making it send a global message every time someone goes into war mode while holding the weapon I would make it so when a person equips the item it sends the message. I would do this for three reasons 1) People tend to spam in and out of war mode when hiding to keep their opponent from revealing them by walking into them (which would result in a very annoying server spam) 2) because it makes more sense to warn the players when the person begins to wield the weapon, not when they go into war mode and intend to use it (from a role-playing perspective, because you are unaware of a persons intentions). 3) It’s a lot easier to code the on equip method then it is the entering in and out of war mode method. To accomplish this you would add an OnEquip override into the item in question. Something like this: Code:
public override bool OnEquip( Mobile from )
{
World.Broadcast( 0x35, true, "{0} has equiped a {1}.", from.RawName.ToString(), this.Name.ToString() );
base.OnEquip( from );
}
"Bob has equipped a Glacial Spear". Personally in my opinion spamming bob's every action to the entire server could get fairly annoying over time, so I would suggest having this message only be send to the people in bobs remote area, either via MobilesInRange or via Region. I hope this was helpful, good luck with your project!
__________________
Father Time Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "Holy Hell......What a ride!!!" Server: UO: Extinction ICQ: 146563794 FatherTime@UOExtinction.com UO: Extinction homepage UO: Extinction forum Last edited by vermillion2083; 07-17-2008 at 01:39 PM. |
|
|
|
|
|
#5 (permalink) |
|
Newbie
Join Date: Dec 2005
Posts: 29
|
hehe, the world broadcast is to learning pruposes, but helped a lot
![]() when equiping the item, is possible to add some kind of "event" and in this event we override the players triggers or i cant modify the original player trigger without modifing Mobiles.cs |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|