numerous fixes for Aquariums
world item, non-osi tool "webstone" added Aquarium how-to book added
This commit is contained in:
parent
7d8bbffd5f
commit
216824a9b4
5 changed files with 171 additions and 20 deletions
|
|
@ -165,6 +165,8 @@ namespace Server.Items
|
|||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
bool truefalse = true;
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house == null || !house.IsCoOwner( from ) )
|
||||
|
|
@ -182,13 +184,15 @@ namespace Server.Items
|
|||
if ( dropped is FishBowl )
|
||||
{
|
||||
FishBowl bowl = (FishBowl) dropped;
|
||||
|
||||
if ( bowl.Empty )
|
||||
return false;
|
||||
|
||||
if ( AddFish( from, bowl.Fish ) )
|
||||
bowl.InvalidateProperties();
|
||||
|
||||
|
||||
if( !bowl.Empty )
|
||||
{
|
||||
if( AddFish( from, bowl.Fish ) )
|
||||
{
|
||||
bowl.InvalidateProperties();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
|
@ -215,6 +219,7 @@ namespace Server.Items
|
|||
}
|
||||
else if ( dropped is BaseBeverage )
|
||||
{
|
||||
|
||||
BaseBeverage beverage = (BaseBeverage) dropped;
|
||||
|
||||
if ( beverage.IsEmpty || !beverage.Pourable || beverage.Content != BeverageType.Water )
|
||||
|
|
@ -228,16 +233,16 @@ namespace Server.Items
|
|||
|
||||
from.PlaySound( 0x4E );
|
||||
from.SendLocalizedMessage( 1074260, "" + 1 ); // ~1_NUM~ unit(s) of water have been added to the aquarium.
|
||||
return false;
|
||||
truefalse = false;
|
||||
}
|
||||
else if ( !AddDecoration( from, dropped ) )
|
||||
return false;
|
||||
|
||||
InvalidateProperties();
|
||||
truefalse = false;
|
||||
|
||||
from.CloseGump( typeof( AquariumGump ) );
|
||||
|
||||
return true;
|
||||
|
||||
InvalidateProperties();
|
||||
|
||||
return truefalse;
|
||||
}
|
||||
|
||||
public override void OnChop( Mobile from )
|
||||
|
|
@ -300,7 +305,7 @@ namespace Server.Items
|
|||
else
|
||||
list.Add( 1074254, "{0}\t{1}\t{2}", m_Water.Added, m_Water.Maintain, m_Water.Improve ); // Water Added: ~1_CUR~ Maintain: ~2_NEED~ Improve: ~3_GROW~
|
||||
|
||||
list.Add( 1073841, "{0}\t{1}\t{2}", Items.Count, MaxItems, TotalWeight ); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones
|
||||
//list.Add( 1073841, "{0}\t{1}\t{2}", Items.Count, MaxItems, TotalWeight ); // Contents: ~1_COUNT~/~2_MAXCOUNT~ items, ~3_WEIGHT~ stones
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
|
|
@ -702,6 +707,8 @@ namespace Server.Items
|
|||
m_LiveCreatures += 1;
|
||||
|
||||
from.SendLocalizedMessage( 1073632, "#" + fish.LabelNumber ); // You add the following creature to your aquarium: ~1_FISH~
|
||||
|
||||
InvalidateProperties();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -728,7 +735,8 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 1073635, "#" + item.LabelNumber ); // You add the following decoration to your aquarium: ~1_NAME~
|
||||
else
|
||||
from.SendLocalizedMessage( 1073635, item.Name ); // You add the following decoration to your aquarium: ~1_NAME~
|
||||
|
||||
|
||||
InvalidateProperties();
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ namespace Server.Items
|
|||
{
|
||||
Weight = 1.0;
|
||||
|
||||
if ( 0.01 > Utility.RandomDouble() )
|
||||
Hue = Utility.RandomList( m_Hues );
|
||||
Hue = ( 0.01 > Utility.RandomDouble() ) ? Utility.RandomList( m_Hues ) : 0x240;
|
||||
}
|
||||
|
||||
public AquariumFishingNet( Serial serial ) : base( serial )
|
||||
|
|
@ -172,6 +171,7 @@ namespace Server.Items
|
|||
{
|
||||
if ( !bowl.Deleted && bowl.Empty )
|
||||
{
|
||||
fish.StopTimer();
|
||||
bowl.AddItem( fish );
|
||||
bowl.InvalidateProperties();
|
||||
m_Player.SendLocalizedMessage( 1074489 ); // A live creature jumps into the fish bowl in your pack!
|
||||
|
|
|
|||
132
Scripts/Items/Books/Defined/NewAquariumBook.cs
Normal file
132
Scripts/Items/Books/Defined/NewAquariumBook.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NewAquariumBook : BlueBook
|
||||
{
|
||||
public static readonly BookContent Content = new BookContent
|
||||
(
|
||||
"Your New Aquarium", "Les Bilgewater",
|
||||
new BookPageInfo
|
||||
(
|
||||
"Welcome to the",
|
||||
"wonderful world",
|
||||
"of aquarium ownership.",
|
||||
"With a little time and",
|
||||
"skill your aquarium can",
|
||||
"become a work of art!"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"Catching Fish:",
|
||||
"You will need to",
|
||||
"aquire a fishing net,",
|
||||
"and a number of fish",
|
||||
"bowls, from your local",
|
||||
"fisherman.",
|
||||
"To use the net,",
|
||||
"select it from your"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"backpack, and cast it",
|
||||
"into shallow water.",
|
||||
"Then we wait.",
|
||||
" The fish will be so",
|
||||
"happy to be in your",
|
||||
"aquarium, they will",
|
||||
"jump right into your",
|
||||
"fish bowl when caught!"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"Just take them home",
|
||||
"and pour them into",
|
||||
"your aquarium, and",
|
||||
"BING! You have a happy",
|
||||
"new addition to your",
|
||||
"collection!"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"Caring for our",
|
||||
"Underwater Allies:",
|
||||
"",
|
||||
" Fish need clean",
|
||||
"water and food to",
|
||||
"survive.",
|
||||
" Our aquarium comes",
|
||||
"with a status monitoring"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"aid. Must be Magic!",
|
||||
" Just look at the",
|
||||
"front of your aquarium",
|
||||
"(mouse over). See the",
|
||||
"helpful and friendly",
|
||||
"guide? It tells how much",
|
||||
"food and water is",
|
||||
"needed to maintain,"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"and improve the quality",
|
||||
"of your tank.",
|
||||
" You dont want to",
|
||||
"overfeed your fish",
|
||||
"very often. In fact,",
|
||||
"you only want to feed",
|
||||
"them every other day.",
|
||||
"But, remember to keep"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"the water strong and",
|
||||
"healthy, and add more",
|
||||
"on a regular basis",
|
||||
"to keep your aquarium",
|
||||
"a pretty, sparkely blue.",
|
||||
"",
|
||||
" Well, I hope you",
|
||||
"get as much enjoyment,"
|
||||
),
|
||||
new BookPageInfo
|
||||
(
|
||||
"collecting a beautiful",
|
||||
"array of our fine, finned,",
|
||||
"friends from the sea,",
|
||||
"as I do!",
|
||||
"",
|
||||
"Happy Fishing!"
|
||||
)
|
||||
);
|
||||
|
||||
public override BookContent DefaultContent{ get{ return Content; } }
|
||||
|
||||
[Constructable]
|
||||
public NewAquariumBook() : base( false )
|
||||
{
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public NewAquariumBook( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int)0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,12 +30,13 @@ namespace Server.Mobiles
|
|||
Add( new GenericBuyInfo( typeof( FishingPole ), 15, 20, 0xDC0, 0 ) );
|
||||
|
||||
#region Mondain's Legacy
|
||||
Add( new GenericBuyInfo( typeof( AquariumFishingNet ), 250, 20, 0xDC8, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumFishingNet ), 250, 20, 0xDC8, 0x240 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumFood ), 62, 20, 0xEFC, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( FishBowl ), 6312, 20, 0x241C, 0x482 ) );
|
||||
Add( new GenericBuyInfo( typeof( VacationWafer ), 67, 20, 0x971, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumNorthDeed ), 150000, 1, 0x14F0, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumEastDeed ), 150000, 1, 0x14F0, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumNorthDeed ), 250002, 20, 0x14F0, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( AquariumEastDeed ), 250002, 20, 0x14F0, 0 ) );
|
||||
Add( new GenericBuyInfo( typeof( NewAquariumBook ), 15, 20, 0xFF2, 0 ) );
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
10
Scripts/SpecialSystems/README.TXT
Normal file
10
Scripts/SpecialSystems/README.TXT
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
IMPORTANT NOTE
|
||||
--------------
|
||||
|
||||
The contents of this directory, are not necessarily OSI-accurate, or even based on
|
||||
OSI features. Simply, its a small collection of useful tools and systems that a
|
||||
shard admin may find big help.
|
||||
|
||||
We know its not accurate, we know it cant be made accurate, so .. :)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue