added:ML aquariums, ML potions,runebook and spellbook makers mark, two new runic tools, NPC vendor updates

This commit is contained in:
xavier 2011-10-23 03:38:07 +00:00
parent 028b5ad696
commit cbd45b53b8
59 changed files with 3351 additions and 53 deletions

View file

@ -32,7 +32,10 @@ namespace Server.Items
MaskOfDeath, // Mask of Death is not available in OSI but does exist in cliloc files
MaskOfDeathGreater, // included in enumeration for compatability if later enabled by OSI
ConfusionBlast,
ConfusionBlastGreater
ConfusionBlastGreater,
Invisibility,
Parasitic,
Darkglow,
}
public abstract class BasePotion : Item, ICraftable, ICommodity
@ -78,11 +81,10 @@ namespace Server.Items
if ( handTwo is BaseWeapon )
handOne = handTwo;
if ( handOne is BaseRanged )
if ( handTwo is BaseRanged )
{
BaseRanged ranged = (BaseRanged) handOne;
BaseRanged ranged = (BaseRanged) handTwo;
if ( ranged.Balanced )
return true;
}
@ -234,6 +236,9 @@ namespace Server.Items
if ( pack != null )
{
if ( (int) PotionEffect >= (int) PotionEffect.Invisibility )
return 1;
List<PotionKeg> kegs = pack.FindItemsByType<PotionKeg>();
for ( int i = 0; i < kegs.Count; ++i )

View file

@ -102,7 +102,7 @@ namespace Server.Items
foreach ( Mobile mobile in map.GetMobilesInRange( loc, Radius ) )
{
if ( mobile is BaseCreature && ( Notoriety.Compute ( from, mobile ) != Notoriety.Innocent ))
if ( mobile is BaseCreature )
{
BaseCreature mon = (BaseCreature) mobile;

View file

@ -0,0 +1,39 @@
using System;
using Server;
namespace Server.Items
{
public class DarkglowPotion : BasePoisonPotion
{
public override Poison Poison{ get{ return Poison.Greater; } } /* MUST be restored when prerequisites are done */
public override double MinPoisoningSkill{ get{ return 95.0; } }
public override double MaxPoisoningSkill{ get{ return 100.0; } }
public override int LabelNumber{ get{ return 1072849; } } // Darkglow Poison
[Constructable]
public DarkglowPotion() : base( PotionEffect.Darkglow )
{
Hue = 0x96;
}
public DarkglowPotion( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,111 @@
using System;
using System.Collections;
using Server;
namespace Server.Items
{
public class InvisibilityPotion : BasePotion
{
public override int LabelNumber{ get{ return 1072941; } } // Potion of Invisibility
[Constructable]
public InvisibilityPotion() : base( 0xF0A, PotionEffect.Invisibility )
{
Hue = 0x48D;
}
public InvisibilityPotion( Serial serial ) : base( serial )
{
}
public override void Drink( Mobile from )
{
if ( from.Hidden )
{
from.SendLocalizedMessage( 1073185 ); // You are already unseen.
return;
}
if ( HasTimer( from ) )
{
from.SendLocalizedMessage( 1073186 ); // An invisibility potion is already taking effect on your person.
return;
}
Consume();
m_Table[ from ] = Timer.DelayCall( TimeSpan.FromSeconds( 2 ), new TimerStateCallback( Hide_Callback ), from );
PlayDrinkEffect( from );
}
private static void Hide_Callback( object obj )
{
if ( obj is Mobile )
Hide( (Mobile) obj );
}
public static void Hide( Mobile m )
{
Effects.SendLocationParticles( EffectItem.Create( new Point3D( m.X, m.Y, m.Z + 16 ), m.Map, EffectItem.DefaultDuration ), 0x376A, 10, 15, 5045 );
m.PlaySound( 0x3C4 );
m.Hidden = true;
BuffInfo.RemoveBuff( m, BuffIcon.HidingAndOrStealth );
BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.Invisibility, 1075825 ) ); //Invisibility/Invisible
RemoveTimer( m );
Timer.DelayCall( TimeSpan.FromSeconds( 30 ), new TimerStateCallback( EndHide_Callback ), m );
}
private static void EndHide_Callback( object obj )
{
if ( obj is Mobile )
EndHide( (Mobile) obj );
}
public static void EndHide( Mobile m )
{
m.RevealingAction();
RemoveTimer( m );
}
private static Hashtable m_Table = new Hashtable();
public static bool HasTimer( Mobile m )
{
return m_Table[ m ] != null;
}
public static void RemoveTimer( Mobile m )
{
Timer t = (Timer) m_Table[ m ];
if ( t != null )
{
t.Stop();
m_Table.Remove( m );
}
}
public static void Iterrupt( Mobile m )
{
m.SendLocalizedMessage( 1073187 ); // The invisibility effect is interrupted.
RemoveTimer( m );
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -0,0 +1,39 @@
using System;
using Server;
namespace Server.Items
{
public class ParasiticPotion : BasePoisonPotion
{
public override Poison Poison{ get{ return Poison.Greater; } } /* public override Poison Poison{ get{ return Poison.Darkglow; } } MUST be restored when prerequisites are done */
public override double MinPoisoningSkill{ get{ return 95.0; } }
public override double MaxPoisoningSkill{ get{ return 100.0; } }
public override int LabelNumber{ get{ return 1072848; } } // Parasitic Poison
[Constructable]
public ParasiticPotion() : base( PotionEffect.Parasitic )
{
Hue = 0x17C;
}
public ParasiticPotion( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}