#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
73
Scripts/Items/Skill Items/Ninjitsu/SmokeBomb.cs
Normal file
73
Scripts/Items/Skill Items/Ninjitsu/SmokeBomb.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SmokeBomb : Item
|
||||
{
|
||||
[Constructable]
|
||||
public SmokeBomb() : base( 0x2808 )
|
||||
{
|
||||
Stackable = Core.ML;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public SmokeBomb( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
// The item must be in your backpack to use it.
|
||||
from.SendLocalizedMessage( 1060640 );
|
||||
}
|
||||
else if ( from.Skills.Ninjitsu.Value < 50.0 )
|
||||
{
|
||||
// You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
|
||||
from.SendLocalizedMessage( 1063013, "50\tNinjitsu" );
|
||||
}
|
||||
else if (Core.TickCount - from.NextSkillTime < 0)
|
||||
{
|
||||
// You must wait a few seconds before you can use that item.
|
||||
from.SendLocalizedMessage( 1070772 );
|
||||
}
|
||||
else if ( from.Mana < 10 )
|
||||
{
|
||||
// You don't have enough mana to do that.
|
||||
from.SendLocalizedMessage( 1049456 );
|
||||
}
|
||||
else
|
||||
{
|
||||
SkillHandlers.Hiding.CombatOverride = true;
|
||||
|
||||
if ( from.UseSkill( SkillName.Hiding ) )
|
||||
{
|
||||
from.Mana -= 10;
|
||||
|
||||
from.FixedParticles( 0x3709, 1, 30, 9904, 1108, 6, EffectLayer.RightFoot );
|
||||
from.PlaySound( 0x22F );
|
||||
|
||||
Consume();
|
||||
}
|
||||
|
||||
SkillHandlers.Hiding.CombatOverride = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue