sheivan
Member
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
What would I need to change for a buff to be given to the player who did the killing blow on the monster?
Id like to make wielding a certain item improve your healing power
Toggle PVP mode that gives you a bonus BUT everyone but party/allies are orange to you
+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]";
}