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!

Id wand

corytoneill

Sorceror
When i'm using id wands and try to id an unidentified wand it doesn't come up with the wand type. I have to click on it for it to show. It's weird because id wands show properties of armor/weps on use, but not wands. Anyone have an idea of how to make it so that it shows the id on use of the id wand so i don't have to click it?
I'm using Pre-Aos obviously. Runuo 2.0
 

pooka01

Sorceror
if it is pre AOS, use:
Code:
public override void OnDoubleClick(Mobile from)
{
 base.OnDoubleClick(from);
 from.LabelTo(from, "type: {0}", this.WandEffect);
}

or simply:
Code:
public override void OnDoubleClick(Mobile from)
{
 from.LabelTo(from, "a wand of {0}", this.WandEffect);
}

up to you, untested tho.
 

corytoneill

Sorceror
I tried to make an edit to itemidentification.cs, but that didn't work. I still have to manually click on the wand to show what kind of wand it is, instead of automatically coming up.


Code:
        [PlayerVendorTarget]
        private class InternalTarget : Target
        {
            public InternalTarget() :  base ( 8, false, TargetFlags.None )
            {
                AllowNonlocal = true;
            }
           
 
            protected override void OnTarget( Mobile from, object o )
            {
                if ( o is Item )
                {
                    if ( from.CheckTargetSkill( SkillName.ItemID, o, 0, 100 ) )
                    {
                        if ( o is BaseWeapon )
                            ((BaseWeapon)o).Identified = true;
                        else if ( o is BaseArmor )
                            ((BaseArmor)o).Identified = true;
 
                        if ( !Core.AOS )
                            ((Item)o).OnSingleClick( from );
                    }
                    else
                    {
                        from.SendLocalizedMessage( 500353 ); // You are not certain...
                    }
                }
                else if ( o is Mobile )
                {
                    ((Mobile)o).OnSingleClick( from );
                }
-------------------------------------------------------------------------------------------------------
                                              EDIT
                        else if ( o is BaseWand )
                {
                    ((BaseWand)o).OnSingleClick( from );
                }
 

pooka01

Sorceror
Oh i already have that on my server xD
here's the code:

Code:
     else if ( o is BaseWand && ((BaseWand)o).Identified )
     {
      LabelTo( from, "Effect: {0}", ((BaseWand)o).Effect );
      LabelTo( from, "Charges: {0}", ((BaseWand)o).Charges );
     }
 
Top