Im pretty awful at this but I'd like to learn, there's a few script sequences that I cannot get right, thanks for your help




+1 to x skill upon double-clicking x item

C#:
public override void OnDoubleClick(

            Mobile from // The entity (in most cases the player) which clicked on the item

        ) {

            // Check if the item is in the user's backpack before using

            if ( !this.IsChildOf( from.Backpack ) ) {

                // That must be in your pack for you to use it.

                from.SendLocalizedMessage( 1042001 );

            } else {

                from.PlaySound(0x55); // Just a random sound ID



         [B]       XXTHIS IS WHERE I NEED HELPXX // What would be the command to add +1 to X skill?[/B]

            }

        }





What would I need to change for a buff to be given to the player who did the killing blow on the monster?

C#:
public override bool OnBeforeDeath( )

from.AddStatMod( new StatMod( StatType.Str, 10, TimeSpan.FromMinutes( 5.0 ) ) );





Id like to make wielding a certain item improve your healing power

C#:
int toHeal;

                if (Core.AOS)
                {
                    toHeal = this.Caster.Skills.Magery.Fixed / 120;
                    toHeal += Utility.RandomMinMax(1, 4);

                    if (Core.SE && this.Caster != m)
                        toHeal = (int)(toHeal * 1.5);
                }
                else
                {
                    toHeal = (int)(this.Caster.Skills[SkillName.Magery].Value * 0.1);
                    toHeal += Utility.Random(1, 5);
                }
[B] Else, here, I am unsure what kind of command i'd have to add here to make X item enhance healing power[/B]

                //m.Heal( toHeal, Caster );
                SpellHelper.Heal(toHeal, m, this.Caster);

                m.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
                m.PlaySound(0x1F2);
            }



Toggle PVP mode that gives you a bonus BUT everyone but party/allies are orange to you

C#:
public override void OnDoubleClick(Mobile from)

        {

        Account acct = (Account)from.Account;

        acct.SetTag((from.Name) + ("PVP"), "true");

        from.SendMessageSendMessage("You are now PVP");
m.Title = "[PVP]";

        }
 
I don't think posting a laundry list of script problems in one post is a good idea, but start with these
script additions first.

For on equip situation:

add this...
Code:
SkillBonuses.SetValues(0, SkillName.Healing, 10.0);

*Healing bonus is already Handled however*

Look @ Bandage.cs [line 489] The healing bonus (enhanced bandys and Asclepius bonus' are handled here):
Code:
  if (item is Asclepius || item is GargishAsclepius)
                    m_HealingBonus += 15;

For Double-Click item that gives skill bonus check out my bellows script I uploaded
 

Attachments

  • Bellows.cs
    8.9 KB · Views: 7
Last edited:
Back