added:ML aquariums, ML potions,runebook and spellbook makers mark, two new runic tools, NPC vendor updates
This commit is contained in:
parent
028b5ad696
commit
cbd45b53b8
59 changed files with 3351 additions and 53 deletions
|
|
@ -196,12 +196,6 @@ namespace Server.Items
|
|||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int AddonNumber{ get{ return m_AddonNumber; } set{ m_AddonNumber = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Hunter{ get{ return m_Hunter; } set{ m_Hunter = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int AnimalWeight{ get{ return m_AnimalWeight; } set{ m_AnimalWeight = value; InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber{ get{ return m_AddonNumber; } }
|
||||
|
||||
[Constructable]
|
||||
|
|
@ -388,9 +382,10 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
public TrophyDeed( TaxidermyKit.TrophyInfo info, Mobile hunter, int animalWeight )
|
||||
: this( info.NorthID + 7, info.NorthID, info.DeedNumber, info.AddonNumber, hunter, animalWeight )
|
||||
: this( info.NorthID + 7, info.NorthID, info.DeedNumber, info.AddonNumber )
|
||||
{
|
||||
}
|
||||
|
||||
public TrophyDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,13 +93,13 @@ namespace Server.Items
|
|||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Held == 0 )
|
||||
return 1041084; // A specially lined keg for potions.
|
||||
else if( m_Type >= PotionEffect.Conflagration )
|
||||
return 1072658 + (int) m_Type - (int) PotionEffect.Conflagration;
|
||||
else
|
||||
return ( 1041620 + (int)m_Type );
|
||||
{
|
||||
if( m_Held > 0 && ( int )m_Type >= ( int )PotionEffect.Conflagration )
|
||||
{
|
||||
return 1072658 + ( int )m_Type - ( int )PotionEffect.Conflagration;
|
||||
}
|
||||
|
||||
return (m_Held > 0 ? 1041620 + (int)m_Type : 1041641);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -230,6 +230,14 @@ namespace Server.Items
|
|||
}
|
||||
else if ( m_Held == 0 )
|
||||
{
|
||||
#region Mondain's Legacy
|
||||
if ( (int) pot.PotionEffect >= (int) PotionEffect.Invisibility )
|
||||
{
|
||||
from.SendLocalizedMessage( 502232 ); // The keg is not designed to hold that type of object.
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
if ( GiveBottle( from, toHold ) )
|
||||
{
|
||||
m_Type = pot.PotionEffect;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
39
Scripts/Items/Skill Items/Magical/Potions/DarkglowPotion.cs
Normal file
39
Scripts/Items/Skill Items/Magical/Potions/DarkglowPotion.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
111
Scripts/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs
Normal file
111
Scripts/Items/Skill Items/Magical/Potions/InvisibilityPotion.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Skill Items/Magical/Potions/ParasiticPotion.cs
Normal file
39
Scripts/Items/Skill Items/Magical/Potions/ParasiticPotion.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,15 @@ namespace Server.Items
|
|||
{
|
||||
public static readonly TimeSpan UseDelay = TimeSpan.FromSeconds( 7.0 );
|
||||
|
||||
private BookQuality m_Quality;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BookQuality Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ m_Quality = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
private List<RunebookEntry> m_Entries;
|
||||
private string m_Description;
|
||||
private int m_CurCharges, m_MaxCharges;
|
||||
|
|
@ -169,7 +178,9 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 2 );
|
||||
writer.Write( (int) 3 );
|
||||
|
||||
writer.Write( (byte) m_Quality );
|
||||
|
||||
writer.Write( m_Crafter );
|
||||
|
||||
|
|
@ -199,6 +210,11 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_Quality = (BookQuality) reader.ReadByte();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
|
|
@ -272,6 +288,9 @@ namespace Server.Items
|
|||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Quality == BookQuality.Exceptional )
|
||||
list.Add( 1063341 ); // exceptional
|
||||
|
||||
if ( m_Crafter != null )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
|
@ -452,6 +471,8 @@ namespace Server.Items
|
|||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
m_Quality = (BookQuality) ( quality - 1 );
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,31 @@ namespace Server.Items
|
|||
Arcanist
|
||||
}
|
||||
|
||||
public enum BookQuality
|
||||
{
|
||||
Regular,
|
||||
Exceptional,
|
||||
}
|
||||
|
||||
public class Spellbook : Item, ICraftable, ISlayer
|
||||
{
|
||||
private string m_EngravedText;
|
||||
private BookQuality m_Quality;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string EngravedText
|
||||
{
|
||||
get{ return m_EngravedText; }
|
||||
set{ m_EngravedText = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BookQuality Quality
|
||||
{
|
||||
get{ return m_Quality; }
|
||||
set{ m_Quality = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.OpenSpellbookRequest += new OpenSpellbookRequestEventHandler( EventSink_OpenSpellbookRequest );
|
||||
|
|
@ -552,6 +575,12 @@ namespace Server.Items
|
|||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Quality == BookQuality.Exceptional )
|
||||
list.Add( 1063341 ); // exceptional
|
||||
|
||||
if ( m_EngravedText != null )
|
||||
list.Add( 1072305, m_EngravedText ); // Engraved: ~1_INSCRIPTION~
|
||||
|
||||
if ( m_Crafter != null )
|
||||
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
|
||||
|
|
@ -689,7 +718,12 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 3 ); // version
|
||||
writer.Write( (int) 5 ); // version
|
||||
|
||||
writer.Write( (byte) m_Quality );
|
||||
|
||||
writer.Write( (string) m_EngravedText );
|
||||
|
||||
writer.Write( m_Crafter );
|
||||
|
||||
writer.Write( (int)m_Slayer );
|
||||
|
|
@ -710,6 +744,18 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 5:
|
||||
{
|
||||
m_Quality = (BookQuality) reader.ReadByte();
|
||||
|
||||
goto case 4;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
m_EngravedText = reader.ReadString();
|
||||
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
|
|
@ -808,7 +854,7 @@ namespace Server.Items
|
|||
1 // 1 property : 1/4 : 25%
|
||||
};
|
||||
|
||||
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
int magery = from.Skills.Magery.BaseFixedPoint;
|
||||
|
||||
|
|
@ -851,6 +897,8 @@ namespace Server.Items
|
|||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
m_Quality = (BookQuality) ( quality - 1 );
|
||||
|
||||
return quality;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1028, 0x1029 )]
|
||||
public class RunicDovetailSaw : BaseRunicTool
|
||||
{
|
||||
public override CraftSystem CraftSystem{ get{ return DefCarpentry.CraftSystem; } }
|
||||
|
|
@ -15,40 +16,20 @@ namespace Server.Items
|
|||
|
||||
if ( index >= 1 && index <= 6 )
|
||||
return 1072633 + index;
|
||||
|
||||
return 1011196; // dovetail saw
|
||||
|
||||
return 1024137; // dovetail saw
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
int index = CraftResources.GetIndex( Resource );
|
||||
|
||||
if ( index >= 1 && index <= 6 )
|
||||
return;
|
||||
|
||||
if ( !CraftResources.IsStandard( Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Constructable]
|
||||
public RunicDovetailSaw( CraftResource resource ) : base( resource, 0x1029 )
|
||||
public RunicDovetailSaw( CraftResource resource ) : base( resource, 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RunicDovetailSaw( CraftResource resource, int uses ) : base( resource, uses, 0x1029 )
|
||||
public RunicDovetailSaw( CraftResource resource, int uses ) : base( resource, uses, 0x1028 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue