#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
45
Scripts/Items/Skill Items/Magical/BookOfBushido.cs
Normal file
45
Scripts/Items/Skill Items/Magical/BookOfBushido.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BookOfBushido : Spellbook
|
||||
{
|
||||
public override SpellbookType SpellbookType{ get{ return SpellbookType.Samurai; } }
|
||||
public override int BookOffset{ get{ return 400; } }
|
||||
public override int BookCount{ get{ return 6; } }
|
||||
|
||||
[Constructable]
|
||||
public BookOfBushido() : this( (ulong)0x3F )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BookOfBushido( ulong content ) : base( content, 0x238C )
|
||||
{
|
||||
Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
|
||||
}
|
||||
|
||||
public BookOfBushido( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 && Core.ML )
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Magical/BookOfChivalry.cs
Normal file
45
Scripts/Items/Skill Items/Magical/BookOfChivalry.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BookOfChivalry : Spellbook
|
||||
{
|
||||
public override SpellbookType SpellbookType{ get{ return SpellbookType.Paladin; } }
|
||||
public override int BookOffset{ get{ return 200; } }
|
||||
public override int BookCount{ get{ return 10; } }
|
||||
|
||||
[Constructable]
|
||||
public BookOfChivalry() : this( (ulong)0x3FF )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BookOfChivalry( ulong content ) : base( content, 0x2252 )
|
||||
{
|
||||
Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
|
||||
}
|
||||
|
||||
public BookOfChivalry( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 && Core.ML )
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Skill Items/Magical/BookOfNinjitsu.cs
Normal file
46
Scripts/Items/Skill Items/Magical/BookOfNinjitsu.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BookOfNinjitsu : Spellbook
|
||||
{
|
||||
public override SpellbookType SpellbookType{ get{ return SpellbookType.Ninja; } }
|
||||
public override int BookOffset{ get{ return 500; } }
|
||||
public override int BookCount{ get{ return 8; } }
|
||||
|
||||
|
||||
[Constructable]
|
||||
public BookOfNinjitsu() : this( (ulong)0xFF )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BookOfNinjitsu( ulong content ) : base( content, 0x23A0 )
|
||||
{
|
||||
Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
|
||||
}
|
||||
|
||||
public BookOfNinjitsu( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 && Core.ML )
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs
Normal file
41
Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlankScroll : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BlankScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlankScroll( int amount ) : base( 0xEF3 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return (Core.ML); } }
|
||||
|
||||
public BlankScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Skill Items/Magical/Misc/Bottle.cs
Normal file
43
Scripts/Items/Skill Items/Magical/Misc/Bottle.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bottle : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return (Core.ML); } }
|
||||
|
||||
[Constructable]
|
||||
public Bottle() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bottle( int amount ) : base( 0xF0E )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bottle( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
464
Scripts/Items/Skill Items/Magical/Misc/Moongate.cs
Normal file
464
Scripts/Items/Skill Items/Magical/Misc/Moongate.cs
Normal file
|
|
@ -0,0 +1,464 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Gumps;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[DispellableFieldAttribute]
|
||||
public class Moongate : Item
|
||||
{
|
||||
private Point3D m_Target;
|
||||
private Map m_TargetMap;
|
||||
private bool m_bDispellable;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D Target
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Target;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Target = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Map TargetMap
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TargetMap;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_TargetMap = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Dispellable
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_bDispellable;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_bDispellable = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool ShowFeluccaWarning{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public Moongate() : this( Point3D.Zero, null )
|
||||
{
|
||||
m_bDispellable = true;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Moongate(bool bDispellable) : this( Point3D.Zero, null )
|
||||
{
|
||||
m_bDispellable = bDispellable;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Moongate( Point3D target, Map targetMap ) : base( 0xF6C )
|
||||
{
|
||||
Movable = false;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
m_Target = target;
|
||||
m_TargetMap = targetMap;
|
||||
}
|
||||
|
||||
public Moongate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.Player )
|
||||
return;
|
||||
|
||||
if ( from.InRange( GetWorldLocation(), 1 ) )
|
||||
CheckGate( from, 1 );
|
||||
else
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
if ( m.Player )
|
||||
CheckGate( m, 0 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void CheckGate( Mobile m, int range )
|
||||
{
|
||||
#region Mondain's Legacy
|
||||
if ( m.Hidden && m.AccessLevel == AccessLevel.Player && Core.ML )
|
||||
m.RevealingAction();
|
||||
#endregion
|
||||
|
||||
new DelayTimer( m, this, range ).Start();
|
||||
}
|
||||
|
||||
public virtual void OnGateUsed( Mobile m )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void UseGate( Mobile m )
|
||||
{
|
||||
ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags;
|
||||
|
||||
if ( Factions.Sigil.ExistsOn( m ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
|
||||
}
|
||||
else if ( m_TargetMap == Map.Felucca && m is PlayerMobile && ((PlayerMobile)m).Young )
|
||||
{
|
||||
m.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
|
||||
}
|
||||
else if ( (m.Kills >= 5 && m_TargetMap != Map.Felucca) || ( m_TargetMap == Map.Tokuno && (flags & ClientFlags.Tokuno) == 0 ) || ( m_TargetMap == Map.Malas && (flags & ClientFlags.Malas) == 0 ) || ( m_TargetMap == Map.Ilshenar && (flags & ClientFlags.Ilshenar) == 0 ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
|
||||
}
|
||||
else if ( m.Spell != null )
|
||||
{
|
||||
m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
|
||||
}
|
||||
else if ( m_TargetMap != null && m_TargetMap != Map.Internal )
|
||||
{
|
||||
BaseCreature.TeleportPets( m, m_Target, m_TargetMap );
|
||||
|
||||
m.MoveToWorld( m_Target, m_TargetMap );
|
||||
|
||||
if ( m.AccessLevel == AccessLevel.Player || !m.Hidden )
|
||||
m.PlaySound( 0x1FE );
|
||||
|
||||
OnGateUsed( m );
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendMessage( "This moongate does not seem to go anywhere." );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( m_Target );
|
||||
writer.Write( m_TargetMap );
|
||||
|
||||
// Version 1
|
||||
writer.Write( m_bDispellable );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Target = reader.ReadPoint3D();
|
||||
m_TargetMap = reader.ReadMap();
|
||||
|
||||
if ( version >= 1 )
|
||||
m_bDispellable = reader.ReadBool();
|
||||
}
|
||||
|
||||
public virtual bool ValidateUse( Mobile from, bool message )
|
||||
{
|
||||
if ( from.Deleted || this.Deleted )
|
||||
return false;
|
||||
|
||||
if ( from.Map != this.Map || !from.InRange( this, 1 ) )
|
||||
{
|
||||
if ( message )
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void BeginConfirmation( Mobile from )
|
||||
{
|
||||
if ( IsInTown( from.Location, from.Map ) && !IsInTown( m_Target, m_TargetMap ) || (from.Map != Map.Felucca && TargetMap == Map.Felucca && ShowFeluccaWarning) )
|
||||
{
|
||||
if ( from.AccessLevel == AccessLevel.Player || !from.Hidden )
|
||||
from.Send( new PlaySound( 0x20E, from.Location ) );
|
||||
from.CloseGump( typeof( MoongateConfirmGump ) );
|
||||
from.SendGump( new MoongateConfirmGump( from, this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
EndConfirmation( from );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void EndConfirmation( Mobile from )
|
||||
{
|
||||
if ( !ValidateUse( from, true ) )
|
||||
return;
|
||||
|
||||
UseGate( from );
|
||||
}
|
||||
|
||||
public virtual void DelayCallback( Mobile from, int range )
|
||||
{
|
||||
if ( !ValidateUse( from, false ) || !from.InRange( this, range ) )
|
||||
return;
|
||||
|
||||
if ( m_TargetMap != null )
|
||||
BeginConfirmation( from );
|
||||
else
|
||||
from.SendMessage( "This moongate does not seem to go anywhere." );
|
||||
}
|
||||
|
||||
public static bool IsInTown( Point3D p, Map map )
|
||||
{
|
||||
if ( map == null )
|
||||
return false;
|
||||
|
||||
GuardedRegion reg = (GuardedRegion) Region.Find( p, map ).GetRegion( typeof( GuardedRegion ) );
|
||||
|
||||
return ( reg != null && !reg.IsDisabled() );
|
||||
}
|
||||
|
||||
private class DelayTimer : Timer
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Moongate m_Gate;
|
||||
private int m_Range;
|
||||
|
||||
public DelayTimer( Mobile from, Moongate gate, int range ) : base( TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
m_From = from;
|
||||
m_Gate = gate;
|
||||
m_Range = range;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Gate.DelayCallback( m_From, m_Range );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfirmationMoongate : Moongate
|
||||
{
|
||||
private int m_GumpWidth;
|
||||
private int m_GumpHeight;
|
||||
|
||||
private int m_TitleColor;
|
||||
private int m_MessageColor;
|
||||
|
||||
private int m_TitleNumber;
|
||||
private int m_MessageNumber;
|
||||
|
||||
private string m_MessageString;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int GumpWidth
|
||||
{
|
||||
get{ return m_GumpWidth; }
|
||||
set{ m_GumpWidth = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int GumpHeight
|
||||
{
|
||||
get{ return m_GumpHeight; }
|
||||
set{ m_GumpHeight = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TitleColor
|
||||
{
|
||||
get{ return m_TitleColor; }
|
||||
set{ m_TitleColor = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MessageColor
|
||||
{
|
||||
get{ return m_MessageColor; }
|
||||
set{ m_MessageColor = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TitleNumber
|
||||
{
|
||||
get{ return m_TitleNumber; }
|
||||
set{ m_TitleNumber = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MessageNumber
|
||||
{
|
||||
get{ return m_MessageNumber; }
|
||||
set{ m_MessageNumber = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string MessageString
|
||||
{
|
||||
get{ return m_MessageString; }
|
||||
set{ m_MessageString = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ConfirmationMoongate() : this( Point3D.Zero, null )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ConfirmationMoongate( Point3D target, Map targetMap ) : base( target, targetMap )
|
||||
{
|
||||
}
|
||||
|
||||
public ConfirmationMoongate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Warning_Callback( Mobile from, bool okay, object state )
|
||||
{
|
||||
if ( okay )
|
||||
EndConfirmation( from );
|
||||
}
|
||||
|
||||
public override void BeginConfirmation( Mobile from )
|
||||
{
|
||||
if ( m_GumpWidth > 0 && m_GumpHeight > 0 && m_TitleNumber > 0 && (m_MessageNumber > 0 || m_MessageString != null) )
|
||||
{
|
||||
from.CloseGump( typeof( WarningGump ) );
|
||||
from.SendGump( new WarningGump( m_TitleNumber, m_TitleColor, m_MessageString == null ? (object)m_MessageNumber : (object)m_MessageString, m_MessageColor, m_GumpWidth, m_GumpHeight, new WarningGumpCallback( Warning_Callback ), from ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
base.BeginConfirmation( from );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( m_GumpWidth );
|
||||
writer.WriteEncodedInt( m_GumpHeight );
|
||||
|
||||
writer.WriteEncodedInt( m_TitleColor );
|
||||
writer.WriteEncodedInt( m_MessageColor );
|
||||
|
||||
writer.WriteEncodedInt( m_TitleNumber );
|
||||
writer.WriteEncodedInt( m_MessageNumber );
|
||||
|
||||
writer.Write( m_MessageString );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_GumpWidth = reader.ReadEncodedInt();
|
||||
m_GumpHeight = reader.ReadEncodedInt();
|
||||
|
||||
m_TitleColor = reader.ReadEncodedInt();
|
||||
m_MessageColor = reader.ReadEncodedInt();
|
||||
|
||||
m_TitleNumber = reader.ReadEncodedInt();
|
||||
m_MessageNumber = reader.ReadEncodedInt();
|
||||
|
||||
m_MessageString = reader.ReadString();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MoongateConfirmGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Moongate m_Gate;
|
||||
|
||||
public MoongateConfirmGump( Mobile from, Moongate gate ) : base( Core.AOS ? 110 : 20, Core.AOS ? 100 : 30 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Gate = gate;
|
||||
|
||||
if ( Core.AOS )
|
||||
{
|
||||
Closable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
AddBackground( 0, 0, 420, 280, 5054 );
|
||||
|
||||
AddImageTiled( 10, 10, 400, 20, 2624 );
|
||||
AddAlphaRegion( 10, 10, 400, 20 );
|
||||
|
||||
AddHtmlLocalized( 10, 10, 400, 20, 1062051, 30720, false, false ); // Gate Warning
|
||||
|
||||
AddImageTiled( 10, 40, 400, 200, 2624 );
|
||||
AddAlphaRegion( 10, 40, 400, 200 );
|
||||
|
||||
if ( from.Map != Map.Felucca && gate.TargetMap == Map.Felucca && gate.ShowFeluccaWarning )
|
||||
AddHtmlLocalized( 10, 40, 400, 200, 1062050, 32512, false, true ); // This Gate goes to Felucca... Continue to enter the gate, Cancel to stay here
|
||||
else
|
||||
AddHtmlLocalized( 10, 40, 400, 200, 1062049, 32512, false, true ); // Dost thou wish to step into the moongate? Continue to enter the gate, Cancel to stay here
|
||||
|
||||
AddImageTiled( 10, 250, 400, 20, 2624 );
|
||||
AddAlphaRegion( 10, 250, 400, 20 );
|
||||
|
||||
AddButton( 10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40, 250, 170, 20, 1011036, 32767, false, false ); // OKAY
|
||||
|
||||
AddButton( 210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 240, 250, 170, 20, 1011012, 32767, false, false ); // CANCEL
|
||||
}
|
||||
else
|
||||
{
|
||||
AddPage( 0 );
|
||||
|
||||
AddBackground( 0, 0, 420, 400, 5054 );
|
||||
AddBackground( 10, 10, 400, 380, 3000 );
|
||||
|
||||
AddHtml( 20, 40, 380, 60, @"Dost thou wish to step into the moongate? Continue to enter the gate, Cancel to stay here", false, false );
|
||||
|
||||
AddHtmlLocalized( 55, 110, 290, 20, 1011012, false, false ); // CANCEL
|
||||
AddButton( 20, 110, 4005, 4007, 0, GumpButtonType.Reply, 0 );
|
||||
|
||||
AddHtmlLocalized( 55, 140, 290, 40, 1011011, false, false ); // CONTINUE
|
||||
AddButton( 20, 140, 4005, 4007, 1, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState state, RelayInfo info )
|
||||
{
|
||||
if ( info.ButtonID == 1 )
|
||||
m_Gate.EndConfirmation( m_From );
|
||||
}
|
||||
}
|
||||
}
|
||||
359
Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs
Normal file
359
Scripts/Items/Skill Items/Magical/Misc/PotionKeg.cs
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PotionKeg : Item
|
||||
{
|
||||
private PotionEffect m_Type;
|
||||
private int m_Held;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Held
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Held;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_Held != value )
|
||||
{
|
||||
m_Held = value;
|
||||
UpdateWeight();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public PotionEffect Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PotionKeg() : base( 0x1940 )
|
||||
{
|
||||
UpdateWeight();
|
||||
}
|
||||
|
||||
public virtual void UpdateWeight()
|
||||
{
|
||||
int held = Math.Max( 0, Math.Min( m_Held, 100 ) );
|
||||
|
||||
this.Weight = 20 + ((held * 80) / 100);
|
||||
}
|
||||
|
||||
public PotionKeg( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Type );
|
||||
writer.Write( (int) m_Held );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Type = (PotionEffect)reader.ReadInt();
|
||||
m_Held = reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 1 )
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( UpdateWeight ) );
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
int number;
|
||||
|
||||
if ( m_Held <= 0 )
|
||||
number = 502246; // The keg is empty.
|
||||
else if ( m_Held < 5 )
|
||||
number = 502248; // The keg is nearly empty.
|
||||
else if ( m_Held < 20 )
|
||||
number = 502249; // The keg is not very full.
|
||||
else if ( m_Held < 30 )
|
||||
number = 502250; // The keg is about one quarter full.
|
||||
else if ( m_Held < 40 )
|
||||
number = 502251; // The keg is about one third full.
|
||||
else if ( m_Held < 47 )
|
||||
number = 502252; // The keg is almost half full.
|
||||
else if ( m_Held < 54 )
|
||||
number = 502254; // The keg is approximately half full.
|
||||
else if ( m_Held < 70 )
|
||||
number = 502253; // The keg is more than half full.
|
||||
else if ( m_Held < 80 )
|
||||
number = 502255; // The keg is about three quarters full.
|
||||
else if ( m_Held < 96 )
|
||||
number = 502256; // The keg is very full.
|
||||
else if ( m_Held < 100 )
|
||||
number = 502257; // The liquid is almost to the top of the keg.
|
||||
else
|
||||
number = 502258; // The keg is completely full.
|
||||
|
||||
list.Add( number );
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
int number;
|
||||
|
||||
if ( m_Held <= 0 )
|
||||
number = 502246; // The keg is empty.
|
||||
else if ( m_Held < 5 )
|
||||
number = 502248; // The keg is nearly empty.
|
||||
else if ( m_Held < 20 )
|
||||
number = 502249; // The keg is not very full.
|
||||
else if ( m_Held < 30 )
|
||||
number = 502250; // The keg is about one quarter full.
|
||||
else if ( m_Held < 40 )
|
||||
number = 502251; // The keg is about one third full.
|
||||
else if ( m_Held < 47 )
|
||||
number = 502252; // The keg is almost half full.
|
||||
else if ( m_Held < 54 )
|
||||
number = 502254; // The keg is approximately half full.
|
||||
else if ( m_Held < 70 )
|
||||
number = 502253; // The keg is more than half full.
|
||||
else if ( m_Held < 80 )
|
||||
number = 502255; // The keg is about three quarters full.
|
||||
else if ( m_Held < 96 )
|
||||
number = 502256; // The keg is very full.
|
||||
else if ( m_Held < 100 )
|
||||
number = 502257; // The liquid is almost to the top of the keg.
|
||||
else
|
||||
number = 502258; // The keg is completely full.
|
||||
|
||||
this.LabelTo( from, number );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
if ( m_Held > 0 )
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
|
||||
if ( pack != null && pack.ConsumeTotal( typeof( Bottle ), 1 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502242 ); // You pour some of the keg's contents into an empty bottle...
|
||||
|
||||
BasePotion pot = FillBottle();
|
||||
|
||||
if ( pack.TryDropItem( from, pot, false ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502243 ); // ...and place it into your backpack.
|
||||
from.PlaySound( 0x240 );
|
||||
|
||||
if ( --Held == 0 )
|
||||
from.SendLocalizedMessage( 502245 ); // The keg is now empty.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502244 ); // ...but there is no room for the bottle in your backpack.
|
||||
pot.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Target a bottle
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502246 ); // The keg is empty.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item item )
|
||||
{
|
||||
if ( item is BasePotion )
|
||||
{
|
||||
BasePotion pot = (BasePotion)item;
|
||||
int toHold = Math.Min( 100 - m_Held, pot.Amount );
|
||||
|
||||
if ( toHold <= 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 502233 ); // The keg will not hold any more!
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
Held = toHold;
|
||||
|
||||
from.PlaySound( 0x240 );
|
||||
|
||||
from.SendLocalizedMessage( 502237 ); // You place the empty bottle in your backpack.
|
||||
|
||||
item.Consume( toHold );
|
||||
|
||||
if( !item.Deleted )
|
||||
item.Bounce( from );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502238 ); // You don't have room for the empty bottle in your backpack.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( pot.PotionEffect != m_Type )
|
||||
{
|
||||
from.SendLocalizedMessage( 502236 ); // You decide that it would be a bad idea to mix different types of potions.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( GiveBottle( from, toHold ) )
|
||||
{
|
||||
Held += toHold;
|
||||
|
||||
from.PlaySound( 0x240 );
|
||||
|
||||
from.SendLocalizedMessage( 502237 ); // You place the empty bottle in your backpack.
|
||||
|
||||
item.Consume( toHold );
|
||||
|
||||
if( !item.Deleted )
|
||||
item.Bounce( from );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502238 ); // You don't have room for the empty bottle in your backpack.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502232 ); // The keg is not designed to hold that type of object.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GiveBottle( Mobile m, int amount )
|
||||
{
|
||||
Container pack = m.Backpack;
|
||||
|
||||
Bottle bottle = new Bottle( amount );
|
||||
|
||||
if ( pack == null || !pack.TryDropItem( m, bottle, false ) )
|
||||
{
|
||||
bottle.Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public BasePotion FillBottle()
|
||||
{
|
||||
switch ( m_Type )
|
||||
{
|
||||
default:
|
||||
case PotionEffect.Nightsight: return new NightSightPotion();
|
||||
|
||||
case PotionEffect.CureLesser: return new LesserCurePotion();
|
||||
case PotionEffect.Cure: return new CurePotion();
|
||||
case PotionEffect.CureGreater: return new GreaterCurePotion();
|
||||
|
||||
case PotionEffect.Agility: return new AgilityPotion();
|
||||
case PotionEffect.AgilityGreater: return new GreaterAgilityPotion();
|
||||
|
||||
case PotionEffect.Strength: return new StrengthPotion();
|
||||
case PotionEffect.StrengthGreater: return new GreaterStrengthPotion();
|
||||
|
||||
case PotionEffect.PoisonLesser: return new LesserPoisonPotion();
|
||||
case PotionEffect.Poison: return new PoisonPotion();
|
||||
case PotionEffect.PoisonGreater: return new GreaterPoisonPotion();
|
||||
case PotionEffect.PoisonDeadly: return new DeadlyPoisonPotion();
|
||||
|
||||
case PotionEffect.Refresh: return new RefreshPotion();
|
||||
case PotionEffect.RefreshTotal: return new TotalRefreshPotion();
|
||||
|
||||
case PotionEffect.HealLesser: return new LesserHealPotion();
|
||||
case PotionEffect.Heal: return new HealPotion();
|
||||
case PotionEffect.HealGreater: return new GreaterHealPotion();
|
||||
|
||||
case PotionEffect.ExplosionLesser: return new LesserExplosionPotion();
|
||||
case PotionEffect.Explosion: return new ExplosionPotion();
|
||||
case PotionEffect.ExplosionGreater: return new GreaterExplosionPotion();
|
||||
|
||||
case PotionEffect.Conflagration: return new ConflagrationPotion();
|
||||
case PotionEffect.ConflagrationGreater: return new GreaterConflagrationPotion();
|
||||
|
||||
case PotionEffect.ConfusionBlast: return new ConfusionBlastPotion();
|
||||
case PotionEffect.ConfusionBlastGreater: return new GreaterConfusionBlastPotion();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
TileData.ItemTable[0x1940].Height = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
321
Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs
Normal file
321
Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Prompts;
|
||||
using Server.Multis;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1f14, 0x1f15, 0x1f16, 0x1f17 )]
|
||||
public class RecallRune : Item
|
||||
{
|
||||
private string m_Description;
|
||||
private bool m_Marked;
|
||||
private Point3D m_Target;
|
||||
private Map m_TargetMap;
|
||||
private BaseHouse m_House;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
if ( m_House != null && !m_House.Deleted )
|
||||
{
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (Item) m_House );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
writer.Write( (string) m_Description );
|
||||
writer.Write( (bool) m_Marked );
|
||||
writer.Write( (Point3D) m_Target );
|
||||
writer.Write( (Map) m_TargetMap );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_House = reader.ReadItem() as BaseHouse;
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Description = reader.ReadString();
|
||||
m_Marked = reader.ReadBool();
|
||||
m_Target = reader.ReadPoint3D();
|
||||
m_TargetMap = reader.ReadMap();
|
||||
|
||||
CalculateHue();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public BaseHouse House
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_House != null && m_House.Deleted )
|
||||
House = null;
|
||||
|
||||
return m_House;
|
||||
}
|
||||
set{ m_House = value; CalculateHue(); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Description;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Description = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public bool Marked
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Marked;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_Marked != value )
|
||||
{
|
||||
m_Marked = value;
|
||||
CalculateHue();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public Point3D Target
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Target;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Target = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.Counselor, AccessLevel.GameMaster )]
|
||||
public Map TargetMap
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TargetMap;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_TargetMap != value )
|
||||
{
|
||||
m_TargetMap = value;
|
||||
CalculateHue();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CalculateHue()
|
||||
{
|
||||
if ( !m_Marked )
|
||||
Hue = 0;
|
||||
else if ( m_TargetMap == Map.Trammel )
|
||||
Hue = (House != null ? 0x47F : 50);
|
||||
else if ( m_TargetMap == Map.Felucca )
|
||||
Hue = (House != null ? 0x66D : 0);
|
||||
else if ( m_TargetMap == Map.Ilshenar )
|
||||
Hue = (House != null ? 0x55F : 1102);
|
||||
else if ( m_TargetMap == Map.Malas )
|
||||
Hue = (House != null ? 0x55F : 1102);
|
||||
else if ( m_TargetMap == Map.Tokuno )
|
||||
Hue = (House != null ? 0x47F : 1154);
|
||||
}
|
||||
|
||||
public void Mark( Mobile m )
|
||||
{
|
||||
m_Marked = true;
|
||||
|
||||
bool setDesc = false;
|
||||
if ( Core.AOS )
|
||||
{
|
||||
m_House = BaseHouse.FindHouseAt( m );
|
||||
|
||||
if ( m_House == null )
|
||||
{
|
||||
m_Target = m.Location;
|
||||
m_TargetMap = m.Map;
|
||||
}
|
||||
else
|
||||
{
|
||||
HouseSign sign = m_House.Sign;
|
||||
|
||||
if ( sign != null )
|
||||
m_Description = sign.Name;
|
||||
else
|
||||
m_Description = null;
|
||||
|
||||
if ( m_Description == null || (m_Description = m_Description.Trim()).Length == 0 )
|
||||
m_Description = "an unnamed house";
|
||||
|
||||
setDesc = true;
|
||||
|
||||
int x = m_House.BanLocation.X;
|
||||
int y = m_House.BanLocation.Y + 2;
|
||||
int z = m_House.BanLocation.Z;
|
||||
|
||||
Map map = m_House.Map;
|
||||
|
||||
if ( map != null && !map.CanFit( x, y, z, 16, false, false ) )
|
||||
z = map.GetAverageZ( x, y );
|
||||
|
||||
m_Target = new Point3D( x, y, z );
|
||||
m_TargetMap = map;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_House = null;
|
||||
m_Target = m.Location;
|
||||
m_TargetMap = m.Map;
|
||||
}
|
||||
|
||||
if( !setDesc )
|
||||
m_Description = BaseRegion.GetRuneNameFor( Region.Find( m_Target, m_TargetMap ) );
|
||||
|
||||
CalculateHue();
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
private const string RuneFormat = "a recall rune for {0}";
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_Marked )
|
||||
{
|
||||
string desc;
|
||||
|
||||
if ( (desc = m_Description) == null || (desc = desc.Trim()).Length == 0 )
|
||||
desc = "an unknown location";
|
||||
|
||||
if ( m_TargetMap == Map.Tokuno )
|
||||
list.Add( (House != null ? 1063260 : 1063259), RuneFormat, desc ); // ~1_val~ (Tokuno Islands)[(House)]
|
||||
else if ( m_TargetMap == Map.Malas )
|
||||
list.Add( (House != null ? 1062454 : 1060804), RuneFormat, desc ); // ~1_val~ (Malas)[(House)]
|
||||
else if ( m_TargetMap == Map.Felucca )
|
||||
list.Add( (House != null ? 1062452 : 1060805), RuneFormat, desc ); // ~1_val~ (Felucca)[(House)]
|
||||
else if ( m_TargetMap == Map.Trammel )
|
||||
list.Add( (House != null ? 1062453 : 1060806), RuneFormat, desc ); // ~1_val~ (Trammel)[(House)]
|
||||
else
|
||||
list.Add( (House != null ? "{0} ({1})(House)" : "{0} ({1})"), String.Format( RuneFormat, desc ), m_TargetMap );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
if ( m_Marked )
|
||||
{
|
||||
string desc;
|
||||
|
||||
if ( (desc = m_Description) == null || (desc = desc.Trim()).Length == 0 )
|
||||
desc = "an unknown location";
|
||||
|
||||
if ( m_TargetMap == Map.Tokuno )
|
||||
LabelTo( from, (House != null ? 1063260 : 1063259), String.Format( RuneFormat, desc ) ); // ~1_val~ (Tokuno Islands)[(House)]
|
||||
else if ( m_TargetMap == Map.Malas )
|
||||
LabelTo( from, (House != null ? 1062454 : 1060804), String.Format( RuneFormat, desc ) ); // ~1_val~ (Malas)[(House)]
|
||||
else if ( m_TargetMap == Map.Felucca )
|
||||
LabelTo( from, (House != null ? 1062452 : 1060805), String.Format( RuneFormat, desc ) ); // ~1_val~ (Felucca)[(House)]
|
||||
else if ( m_TargetMap == Map.Trammel )
|
||||
LabelTo( from, (House != null ? 1062453 : 1060806), String.Format( RuneFormat, desc ) ); // ~1_val~ (Trammel)[(House)]
|
||||
else
|
||||
LabelTo( from, (House != null ? "{0} ({1})(House)" : "{0} ({1})"), String.Format( RuneFormat, desc ), m_TargetMap );
|
||||
}
|
||||
else
|
||||
{
|
||||
LabelTo( from, "an unmarked recall rune" );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
int number;
|
||||
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
number = 1042001; // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( House != null )
|
||||
{
|
||||
number = 1062399; // You cannot edit the description for this rune.
|
||||
}
|
||||
else if ( m_Marked )
|
||||
{
|
||||
number = 501804; // Please enter a description for this marked object.
|
||||
|
||||
from.Prompt = new RenamePrompt( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
number = 501805; // That rune is not yet marked.
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( number );
|
||||
}
|
||||
|
||||
private class RenamePrompt : Prompt
|
||||
{
|
||||
private RecallRune m_Rune;
|
||||
|
||||
public RenamePrompt( RecallRune rune )
|
||||
{
|
||||
m_Rune = rune;
|
||||
}
|
||||
|
||||
public override void OnResponse( Mobile from, string text )
|
||||
{
|
||||
if ( m_Rune.House == null && m_Rune.Marked )
|
||||
{
|
||||
m_Rune.Description = text;
|
||||
from.SendLocalizedMessage( 1010474 ); // The etching on the rune has been changed.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RecallRune() : base( 0x1F14 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
CalculateHue();
|
||||
}
|
||||
|
||||
public RecallRune( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Magical/MysticSpellbook.cs
Normal file
45
Scripts/Items/Skill Items/Magical/MysticSpellbook.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MysticSpellbook : Spellbook
|
||||
{
|
||||
public override SpellbookType SpellbookType { get { return SpellbookType.Mystic; } }
|
||||
|
||||
public override int BookOffset { get { return 677; } }
|
||||
public override int BookCount { get { return 16; } }
|
||||
|
||||
[Constructable]
|
||||
public MysticSpellbook()
|
||||
: this( (ulong) 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MysticSpellbook( ulong content )
|
||||
: base( content, 0x2D9D )
|
||||
{
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
|
||||
public MysticSpellbook( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Skill Items/Magical/NecromancerSpellbook.cs
Normal file
45
Scripts/Items/Skill Items/Magical/NecromancerSpellbook.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NecromancerSpellbook : Spellbook
|
||||
{
|
||||
public override SpellbookType SpellbookType{ get{ return SpellbookType.Necromancer; } }
|
||||
public override int BookOffset{ get{ return 100; } }
|
||||
public override int BookCount{ get{ return ((Core.SE) ? 17 : 16); } }
|
||||
|
||||
[Constructable]
|
||||
public NecromancerSpellbook() : this( (ulong)0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NecromancerSpellbook( ulong content ) : base( content, 0x2253 )
|
||||
{
|
||||
Layer = (Core.ML ? Layer.OneHanded : Layer.Invalid);
|
||||
}
|
||||
|
||||
public NecromancerSpellbook( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 && Core.ML )
|
||||
Layer = Layer.OneHanded;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AgilityPotion : BaseAgilityPotion
|
||||
{
|
||||
public override int DexOffset{ get{ return 10; } }
|
||||
public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 2.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public AgilityPotion() : base( PotionEffect.Agility )
|
||||
{
|
||||
}
|
||||
|
||||
public AgilityPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseAgilityPotion : BasePotion
|
||||
{
|
||||
public abstract int DexOffset{ get; }
|
||||
public abstract TimeSpan Duration{ get; }
|
||||
|
||||
public BaseAgilityPotion( PotionEffect effect ) : base( 0xF08, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseAgilityPotion( 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();
|
||||
}
|
||||
|
||||
public bool DoAgility( Mobile from )
|
||||
{
|
||||
// TODO: Verify scaled; is it offset, duration, or both?
|
||||
if ( Spells.SpellHelper.AddStatOffset( from, StatType.Dex, Scale( from, DexOffset ), Duration ) )
|
||||
{
|
||||
from.FixedEffect( 0x375A, 10, 15 );
|
||||
from.PlaySound( 0x1E7 );
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 502173 ); // You are already under a similar effect.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( DoAgility( from ) )
|
||||
{
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterAgilityPotion : BaseAgilityPotion
|
||||
{
|
||||
public override int DexOffset{ get{ return 20; } }
|
||||
public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 2.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterAgilityPotion() : base( PotionEffect.AgilityGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterAgilityPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
275
Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs
Normal file
275
Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.Craft;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum PotionEffect
|
||||
{
|
||||
Nightsight,
|
||||
CureLesser,
|
||||
Cure,
|
||||
CureGreater,
|
||||
Agility,
|
||||
AgilityGreater,
|
||||
Strength,
|
||||
StrengthGreater,
|
||||
PoisonLesser,
|
||||
Poison,
|
||||
PoisonGreater,
|
||||
PoisonDeadly,
|
||||
Refresh,
|
||||
RefreshTotal,
|
||||
HealLesser,
|
||||
Heal,
|
||||
HealGreater,
|
||||
ExplosionLesser,
|
||||
Explosion,
|
||||
ExplosionGreater,
|
||||
Conflagration,
|
||||
ConflagrationGreater,
|
||||
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,
|
||||
Invisibility,
|
||||
Parasitic,
|
||||
Darkglow,
|
||||
}
|
||||
|
||||
public abstract class BasePotion : Item, ICraftable, ICommodity
|
||||
{
|
||||
private PotionEffect m_PotionEffect;
|
||||
|
||||
public PotionEffect PotionEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_PotionEffect;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_PotionEffect = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return (Core.ML); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041314 + (int)m_PotionEffect; } }
|
||||
|
||||
public BasePotion( int itemID, PotionEffect effect ) : base( itemID )
|
||||
{
|
||||
m_PotionEffect = effect;
|
||||
|
||||
Stackable = Core.ML;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BasePotion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool RequireFreeHand{ get{ return true; } }
|
||||
|
||||
public static bool HasFreeHand( Mobile m )
|
||||
{
|
||||
Item handOne = m.FindItemOnLayer( Layer.OneHanded );
|
||||
Item handTwo = m.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( handTwo is BaseWeapon )
|
||||
handOne = handTwo;
|
||||
if ( handTwo is BaseRanged )
|
||||
{
|
||||
BaseRanged ranged = (BaseRanged) handTwo;
|
||||
|
||||
if ( ranged.Balanced )
|
||||
return true;
|
||||
}
|
||||
|
||||
return ( handOne == null || handTwo == null );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !Movable )
|
||||
return;
|
||||
|
||||
if ( from.InRange( this.GetWorldLocation(), 1 ) )
|
||||
{
|
||||
if (!RequireFreeHand || HasFreeHand(from))
|
||||
{
|
||||
if (this is BaseExplosionPotion && Amount > 1)
|
||||
{
|
||||
BasePotion pot = (BasePotion)Activator.CreateInstance(this.GetType());
|
||||
|
||||
if (pot != null)
|
||||
{
|
||||
Amount--;
|
||||
|
||||
if (from.Backpack != null && !from.Backpack.Deleted)
|
||||
{
|
||||
from.Backpack.DropItem(pot);
|
||||
}
|
||||
else
|
||||
{
|
||||
pot.MoveToWorld(from.Location, from.Map);
|
||||
}
|
||||
pot.Drink( from );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Drink( from );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502172); // You must have a free hand to drink a potion.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502138 ); // That is too far away for you to use
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_PotionEffect );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_PotionEffect = (PotionEffect)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( version == 0 )
|
||||
Stackable = Core.ML;
|
||||
}
|
||||
|
||||
public abstract void Drink( Mobile from );
|
||||
|
||||
public static void PlayDrinkEffect( Mobile m )
|
||||
{
|
||||
m.RevealingAction();
|
||||
|
||||
m.PlaySound( 0x2D6 );
|
||||
|
||||
#region Dueling
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( m ) )
|
||||
m.AddToBackpack( new Bottle() );
|
||||
#endregion
|
||||
|
||||
if ( m.Body.IsHuman && !m.Mounted )
|
||||
m.Animate( 34, 5, 1, true, false, 0 );
|
||||
}
|
||||
|
||||
public static int EnhancePotions( Mobile m )
|
||||
{
|
||||
int EP = AosAttributes.GetValue( m, AosAttribute.EnhancePotions );
|
||||
int skillBonus = m.Skills.Alchemy.Fixed / 330 * 10;
|
||||
|
||||
if ( Core.ML && EP > 50 && m.AccessLevel <= AccessLevel.Player )
|
||||
EP = 50;
|
||||
|
||||
return ( EP + skillBonus );
|
||||
}
|
||||
|
||||
public static TimeSpan Scale( Mobile m, TimeSpan v )
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return v;
|
||||
|
||||
double scalar = 1.0 + ( 0.01 * EnhancePotions( m ) );
|
||||
|
||||
return TimeSpan.FromSeconds( v.TotalSeconds * scalar );
|
||||
}
|
||||
|
||||
public static double Scale( Mobile m, double v )
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return v;
|
||||
|
||||
double scalar = 1.0 + ( 0.01 * EnhancePotions( m ) );
|
||||
|
||||
return v * scalar;
|
||||
}
|
||||
|
||||
public static int Scale( Mobile m, int v )
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return v;
|
||||
|
||||
return AOS.Scale( v, 100 + EnhancePotions( m ) );
|
||||
}
|
||||
|
||||
public override bool StackWith( Mobile from, Item dropped, bool playSound )
|
||||
{
|
||||
if( dropped is BasePotion && ((BasePotion)dropped).m_PotionEffect == m_PotionEffect )
|
||||
return base.StackWith( from, dropped, playSound );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#region ICraftable Members
|
||||
|
||||
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
if ( craftSystem is DefAlchemy )
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
|
||||
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 )
|
||||
{
|
||||
PotionKeg keg = kegs[i];
|
||||
|
||||
if ( keg == null )
|
||||
continue;
|
||||
|
||||
if ( keg.Held <= 0 || keg.Held >= 100 )
|
||||
continue;
|
||||
|
||||
if ( keg.Type != PotionEffect )
|
||||
continue;
|
||||
|
||||
++keg.Held;
|
||||
|
||||
Consume();
|
||||
from.AddToBackpack( new Bottle() );
|
||||
|
||||
return -1; // signal placed in keg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,347 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseConflagrationPotion : BasePotion
|
||||
{
|
||||
public abstract int MinDamage{ get; }
|
||||
public abstract int MaxDamage{ get; }
|
||||
|
||||
public override bool RequireFreeHand{ get{ return false; } }
|
||||
|
||||
public BaseConflagrationPotion( PotionEffect effect ) : base( 0xF06, effect )
|
||||
{
|
||||
Hue = 0x489;
|
||||
}
|
||||
|
||||
public BaseConflagrationPotion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062725 ); // You can not use that potion while paralyzed.
|
||||
return;
|
||||
}
|
||||
|
||||
int delay = GetDelay( from );
|
||||
|
||||
if ( delay > 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
return;
|
||||
}
|
||||
|
||||
ThrowTarget targ = from.Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
return;
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
if ( !m_Users.Contains( from ) )
|
||||
m_Users.Add( from );
|
||||
|
||||
from.Target = new ThrowTarget( this );
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
private List<Mobile> m_Users = new List<Mobile>();
|
||||
|
||||
public void Explode_Callback( object state )
|
||||
{
|
||||
object[] states = (object[]) state;
|
||||
|
||||
Explode( (Mobile) states[ 0 ], (Point3D) states[ 1 ], (Map) states[ 2 ] );
|
||||
}
|
||||
|
||||
public virtual void Explode( Mobile from, Point3D loc, Map map )
|
||||
{
|
||||
if ( Deleted || map == null )
|
||||
return;
|
||||
|
||||
Consume();
|
||||
|
||||
// Check if any other players are using this potion
|
||||
for ( int i = 0; i < m_Users.Count; i ++ )
|
||||
{
|
||||
ThrowTarget targ = m_Users[ i ].Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
Target.Cancel( from );
|
||||
}
|
||||
|
||||
// Effects
|
||||
Effects.PlaySound( loc, map, 0x20C );
|
||||
|
||||
for ( int i = -2; i <= 2; i ++ )
|
||||
{
|
||||
for ( int j = -2; j <= 2; j ++ )
|
||||
{
|
||||
Point3D p = new Point3D( loc.X + i, loc.Y + j, loc.Z );
|
||||
|
||||
if ( map.CanFit( p, 12, true, false ) && from.InLOS( p ) )
|
||||
new InternalItem( from, p, map, MinDamage, MaxDamage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Delay
|
||||
private static Hashtable m_Delay = new Hashtable();
|
||||
|
||||
public static void AddDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null )
|
||||
timer.Stop();
|
||||
|
||||
m_Delay[ m ] = Timer.DelayCall( TimeSpan.FromSeconds( 30 ), new TimerStateCallback( EndDelay_Callback ), m );
|
||||
}
|
||||
|
||||
public static int GetDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null && timer.Next > DateTime.UtcNow )
|
||||
return (int) (timer.Next - DateTime.UtcNow).TotalSeconds;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static void EndDelay_Callback( object obj )
|
||||
{
|
||||
if ( obj is Mobile )
|
||||
EndDelay( (Mobile) obj );
|
||||
}
|
||||
|
||||
public static void EndDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.Stop();
|
||||
m_Delay.Remove( m );
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private class ThrowTarget : Target
|
||||
{
|
||||
private BaseConflagrationPotion m_Potion;
|
||||
|
||||
public BaseConflagrationPotion Potion
|
||||
{
|
||||
get{ return m_Potion; }
|
||||
}
|
||||
|
||||
public ThrowTarget( BaseConflagrationPotion potion ) : base( 12, true, TargetFlags.None )
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
|
||||
return;
|
||||
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
|
||||
if ( p == null || from.Map == null )
|
||||
return;
|
||||
|
||||
// Add delay
|
||||
BaseConflagrationPotion.AddDelay( from );
|
||||
|
||||
SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
IEntity to;
|
||||
|
||||
if ( p is Mobile )
|
||||
to = (Mobile)p;
|
||||
else
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), from.Map );
|
||||
|
||||
Effects.SendMovingEffect( from, to, 0xF0D, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.5 ), new TimerStateCallback( m_Potion.Explode_Callback ), new object[] { from, new Point3D( p ), from.Map } );
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalItem : Item
|
||||
{
|
||||
private Mobile m_From;
|
||||
private int m_MinDamage;
|
||||
private int m_MaxDamage;
|
||||
private DateTime m_End;
|
||||
private Timer m_Timer;
|
||||
|
||||
public Mobile From{ get{ return m_From; } }
|
||||
|
||||
public override bool BlocksFit{ get{ return true; } }
|
||||
|
||||
public InternalItem( Mobile from, Point3D loc, Map map, int min, int max ) : base( 0x398C )
|
||||
{
|
||||
Movable = false;
|
||||
Light = LightType.Circle300;
|
||||
|
||||
MoveToWorld( loc, map );
|
||||
|
||||
m_From = from;
|
||||
m_End = DateTime.UtcNow + TimeSpan.FromSeconds( 10 );
|
||||
|
||||
SetDamage( min, max );
|
||||
|
||||
m_Timer = new InternalTimer( this, m_End );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
}
|
||||
|
||||
public InternalItem( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public int GetDamage(){ return Utility.RandomMinMax( m_MinDamage, m_MaxDamage ); }
|
||||
|
||||
private void SetDamage( int min, int max )
|
||||
{
|
||||
/* new way to apply alchemy bonus according to Stratics' calculator.
|
||||
this gives a mean to values 25, 50, 75 and 100. Stratics' calculator is outdated.
|
||||
Those goals will give 2 to alchemy bonus. It's not really OSI-like but it's an approximation. */
|
||||
|
||||
m_MinDamage = min;
|
||||
m_MaxDamage = max;
|
||||
|
||||
if( m_From == null )
|
||||
return;
|
||||
|
||||
int alchemySkill = m_From.Skills.Alchemy.Fixed;
|
||||
int alchemyBonus = alchemySkill / 125 + alchemySkill / 250 ;
|
||||
|
||||
m_MinDamage = Scale( m_From, m_MinDamage + alchemyBonus );
|
||||
m_MaxDamage = Scale( m_From, m_MaxDamage + alchemyBonus );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_From );
|
||||
writer.Write( (DateTime) m_End );
|
||||
writer.Write( (int) m_MinDamage );
|
||||
writer.Write( (int) m_MaxDamage );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_From = reader.ReadMobile();
|
||||
m_End = reader.ReadDateTime();
|
||||
m_MinDamage = reader.ReadInt();
|
||||
m_MaxDamage = reader.ReadInt();
|
||||
|
||||
m_Timer = new InternalTimer( this, m_End );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
if ( Visible && m_From != null && (!Core.AOS || m != m_From) && SpellHelper.ValidIndirectTarget( m_From, m ) && m_From.CanBeHarmful( m, false ) )
|
||||
{
|
||||
m_From.DoHarmful( m );
|
||||
|
||||
AOS.Damage( m, m_From, GetDamage(), 0, 100, 0, 0, 0 );
|
||||
m.PlaySound( 0x208 );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private InternalItem m_Item;
|
||||
private DateTime m_End;
|
||||
|
||||
public InternalTimer( InternalItem item, DateTime end ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
m_Item = item;
|
||||
m_End = end;
|
||||
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Item.Deleted )
|
||||
return;
|
||||
|
||||
if ( DateTime.UtcNow > m_End )
|
||||
{
|
||||
m_Item.Delete();
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
Mobile from = m_Item.From;
|
||||
|
||||
if ( m_Item.Map == null || from == null )
|
||||
return;
|
||||
|
||||
List<Mobile> mobiles = new List<Mobile>();
|
||||
|
||||
foreach( Mobile mobile in m_Item.GetMobilesInRange( 0 ) )
|
||||
mobiles.Add( mobile );
|
||||
|
||||
for( int i = 0; i < mobiles.Count; i++ )
|
||||
{
|
||||
Mobile m = mobiles[i];
|
||||
|
||||
if ( (m.Z + 16) > m_Item.Z && (m_Item.Z + 12) > m.Z && (!Core.AOS || m != from) && SpellHelper.ValidIndirectTarget( from, m ) && from.CanBeHarmful( m, false ) )
|
||||
{
|
||||
if ( from != null )
|
||||
from.DoHarmful( m );
|
||||
|
||||
AOS.Damage( m, from, m_Item.GetDamage(), 0, 100, 0, 0, 0 );
|
||||
m.PlaySound( 0x208 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ConflagrationPotion : BaseConflagrationPotion
|
||||
{
|
||||
public override int MinDamage{ get{ return 2; } }
|
||||
public override int MaxDamage{ get{ return 4; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1072095; } } // a Conflagration potion
|
||||
|
||||
[Constructable]
|
||||
public ConflagrationPotion() : base( PotionEffect.Conflagration )
|
||||
{
|
||||
}
|
||||
|
||||
public ConflagrationPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterConflagrationPotion : BaseConflagrationPotion
|
||||
{
|
||||
public override int MinDamage{ get{ return 4; } }
|
||||
public override int MaxDamage{ get{ return 8; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1072098; } } // a Greater Conflagration potion
|
||||
|
||||
[Constructable]
|
||||
public GreaterConflagrationPotion() : base( PotionEffect.ConflagrationGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterConflagrationPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
using Server.Mobiles;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseConfusionBlastPotion : BasePotion
|
||||
{
|
||||
public abstract int Radius{ get; }
|
||||
|
||||
public override bool RequireFreeHand{ get{ return false; } }
|
||||
|
||||
public BaseConfusionBlastPotion( PotionEffect effect ) : base( 0xF06, effect )
|
||||
{
|
||||
Hue = 0x48D;
|
||||
}
|
||||
|
||||
public BaseConfusionBlastPotion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062725 ); // You can not use that potion while paralyzed.
|
||||
return;
|
||||
}
|
||||
|
||||
int delay = GetDelay( from );
|
||||
|
||||
if ( delay > 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
|
||||
return;
|
||||
}
|
||||
|
||||
ThrowTarget targ = from.Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
return;
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
if ( !m_Users.Contains( from ) )
|
||||
m_Users.Add( from );
|
||||
|
||||
from.Target = new ThrowTarget( this );
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
private List<Mobile> m_Users = new List<Mobile>();
|
||||
|
||||
public void Explode_Callback( object state )
|
||||
{
|
||||
object[] states = (object[]) state;
|
||||
|
||||
Explode( (Mobile) states[ 0 ], (Point3D) states[ 1 ], (Map) states[ 2 ] );
|
||||
}
|
||||
|
||||
public virtual void Explode( Mobile from, Point3D loc, Map map )
|
||||
{
|
||||
if ( Deleted || map == null )
|
||||
return;
|
||||
|
||||
Consume();
|
||||
|
||||
// Check if any other players are using this potion
|
||||
for ( int i = 0; i < m_Users.Count; i ++ )
|
||||
{
|
||||
ThrowTarget targ = m_Users[ i ].Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
Target.Cancel( from );
|
||||
}
|
||||
|
||||
// Effects
|
||||
Effects.PlaySound( loc, map, 0x207 );
|
||||
|
||||
Geometry.Circle2D( loc, map, Radius, new DoEffect_Callback( BlastEffect ), 270, 90 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 0.3 ), new TimerStateCallback( CircleEffect2 ), new object[] { loc, map } );
|
||||
|
||||
foreach ( Mobile mobile in map.GetMobilesInRange( loc, Radius ) )
|
||||
{
|
||||
if ( mobile is BaseCreature )
|
||||
{
|
||||
BaseCreature mon = (BaseCreature) mobile;
|
||||
|
||||
if ( mon.Controlled || mon.Summoned )
|
||||
continue;
|
||||
|
||||
mon.Pacify( from, DateTime.UtcNow + TimeSpan.FromSeconds( 5.0 ) ); // TODO check
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Effects
|
||||
public virtual void BlastEffect( Point3D p, Map map )
|
||||
{
|
||||
if ( map.CanFit( p, 12, true, false ) )
|
||||
Effects.SendLocationEffect( p, map, 0x376A, 4, 9 );
|
||||
}
|
||||
|
||||
public void CircleEffect2( object state )
|
||||
{
|
||||
object[] states = (object[]) state;
|
||||
|
||||
Geometry.Circle2D( (Point3D)states[0], (Map)states[1], Radius, new DoEffect_Callback( BlastEffect ), 90, 270 );
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Delay
|
||||
private static Hashtable m_Delay = new Hashtable();
|
||||
|
||||
public static void AddDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null )
|
||||
timer.Stop();
|
||||
|
||||
m_Delay[ m ] = Timer.DelayCall( TimeSpan.FromSeconds( 60 ), new TimerStateCallback( EndDelay_Callback ), m );
|
||||
}
|
||||
|
||||
public static int GetDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null && timer.Next > DateTime.UtcNow )
|
||||
return (int) (timer.Next - DateTime.UtcNow).TotalSeconds;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static void EndDelay_Callback( object obj )
|
||||
{
|
||||
if ( obj is Mobile )
|
||||
EndDelay( (Mobile) obj );
|
||||
}
|
||||
|
||||
public static void EndDelay( Mobile m )
|
||||
{
|
||||
Timer timer = m_Delay[ m ] as Timer;
|
||||
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.Stop();
|
||||
m_Delay.Remove( m );
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private class ThrowTarget : Target
|
||||
{
|
||||
private BaseConfusionBlastPotion m_Potion;
|
||||
|
||||
public BaseConfusionBlastPotion Potion
|
||||
{
|
||||
get{ return m_Potion; }
|
||||
}
|
||||
|
||||
public ThrowTarget( BaseConfusionBlastPotion potion ) : base( 12, true, TargetFlags.None )
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
|
||||
return;
|
||||
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
|
||||
if ( p == null || from.Map == null )
|
||||
return;
|
||||
|
||||
// Add delay
|
||||
BaseConfusionBlastPotion.AddDelay( from );
|
||||
|
||||
SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
IEntity to;
|
||||
|
||||
if ( p is Mobile )
|
||||
to = (Mobile)p;
|
||||
else
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), from.Map );
|
||||
|
||||
Effects.SendMovingEffect( from, to, 0xF0D, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Explode_Callback ), new object[] { from, new Point3D( p ), from.Map } );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ConfusionBlastPotion : BaseConfusionBlastPotion
|
||||
{
|
||||
public override int Radius{ get{ return 5; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1072105; } } // a Confusion Blast potion
|
||||
|
||||
[Constructable]
|
||||
public ConfusionBlastPotion() : base( PotionEffect.ConfusionBlast )
|
||||
{
|
||||
}
|
||||
|
||||
public ConfusionBlastPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterConfusionBlastPotion : BaseConfusionBlastPotion
|
||||
{
|
||||
public override int Radius{ get{ return 7; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1072108; } } // a Greater Confusion Blast potion
|
||||
|
||||
[Constructable]
|
||||
public GreaterConfusionBlastPotion() : base( PotionEffect.ConfusionBlastGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterConfusionBlastPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CureLevelInfo
|
||||
{
|
||||
private Poison m_Poison;
|
||||
private double m_Chance;
|
||||
|
||||
public Poison Poison
|
||||
{
|
||||
get{ return m_Poison; }
|
||||
}
|
||||
|
||||
public double Chance
|
||||
{
|
||||
get{ return m_Chance; }
|
||||
}
|
||||
|
||||
public CureLevelInfo( Poison poison, double chance )
|
||||
{
|
||||
m_Poison = poison;
|
||||
m_Chance = chance;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BaseCurePotion : BasePotion
|
||||
{
|
||||
public abstract CureLevelInfo[] LevelInfo{ get; }
|
||||
|
||||
public BaseCurePotion( PotionEffect effect ) : base( 0xF07, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseCurePotion( 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();
|
||||
}
|
||||
|
||||
public void DoCure( Mobile from )
|
||||
{
|
||||
bool cure = false;
|
||||
|
||||
CureLevelInfo[] info = LevelInfo;
|
||||
|
||||
for ( int i = 0; i < info.Length; ++i )
|
||||
{
|
||||
CureLevelInfo li = info[i];
|
||||
|
||||
if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
|
||||
{
|
||||
cure = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( cure && from.CurePoison( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500231 ); // You feel cured of poison!
|
||||
|
||||
from.FixedEffect( 0x373A, 10, 15 );
|
||||
from.PlaySound( 0x1E0 );
|
||||
}
|
||||
else if ( !cure )
|
||||
{
|
||||
from.SendLocalizedMessage( 500232 ); // That potion was not strong enough to cure your ailment!
|
||||
}
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( TransformationSpellHelper.UnderTransformation( from, typeof( Spells.Necromancy.VampiricEmbraceSpell ) ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1061652 ); // The garlic in the potion would surely kill you.
|
||||
}
|
||||
else if ( from.Poisoned )
|
||||
{
|
||||
DoCure( from );
|
||||
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
from.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
|
||||
from.PlaySound( 0x1E0 );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042000 ); // You are not poisoned.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CurePotion : BaseCurePotion
|
||||
{
|
||||
private static CureLevelInfo[] m_OldLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 1.00 ), // 100% chance to cure lesser poison
|
||||
new CureLevelInfo( Poison.Regular, 0.75 ), // 75% chance to cure regular poison
|
||||
new CureLevelInfo( Poison.Greater, 0.50 ), // 50% chance to cure greater poison
|
||||
new CureLevelInfo( Poison.Deadly, 0.15 ) // 15% chance to cure deadly poison
|
||||
};
|
||||
|
||||
private static CureLevelInfo[] m_AosLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 1.00 ),
|
||||
new CureLevelInfo( Poison.Regular, 0.95 ),
|
||||
new CureLevelInfo( Poison.Greater, 0.75 ),
|
||||
new CureLevelInfo( Poison.Deadly, 0.50 ),
|
||||
new CureLevelInfo( Poison.Lethal, 0.25 )
|
||||
};
|
||||
|
||||
public override CureLevelInfo[] LevelInfo{ get{ return Core.AOS ? m_AosLevelInfo : m_OldLevelInfo; } }
|
||||
|
||||
[Constructable]
|
||||
public CurePotion() : base( PotionEffect.Cure )
|
||||
{
|
||||
}
|
||||
|
||||
public CurePotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterCurePotion : BaseCurePotion
|
||||
{
|
||||
private static CureLevelInfo[] m_OldLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 1.00 ), // 100% chance to cure lesser poison
|
||||
new CureLevelInfo( Poison.Regular, 1.00 ), // 100% chance to cure regular poison
|
||||
new CureLevelInfo( Poison.Greater, 1.00 ), // 100% chance to cure greater poison
|
||||
new CureLevelInfo( Poison.Deadly, 0.75 ), // 75% chance to cure deadly poison
|
||||
new CureLevelInfo( Poison.Lethal, 0.25 ) // 25% chance to cure lethal poison
|
||||
};
|
||||
|
||||
private static CureLevelInfo[] m_AosLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 1.00 ),
|
||||
new CureLevelInfo( Poison.Regular, 1.00 ),
|
||||
new CureLevelInfo( Poison.Greater, 1.00 ),
|
||||
new CureLevelInfo( Poison.Deadly, 0.95 ),
|
||||
new CureLevelInfo( Poison.Lethal, 0.75 )
|
||||
};
|
||||
|
||||
public override CureLevelInfo[] LevelInfo{ get{ return Core.AOS ? m_AosLevelInfo : m_OldLevelInfo; } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterCurePotion() : base( PotionEffect.CureGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterCurePotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LesserCurePotion : BaseCurePotion
|
||||
{
|
||||
private static CureLevelInfo[] m_OldLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 0.75 ), // 75% chance to cure lesser poison
|
||||
new CureLevelInfo( Poison.Regular, 0.50 ), // 50% chance to cure regular poison
|
||||
new CureLevelInfo( Poison.Greater, 0.15 ) // 15% chance to cure greater poison
|
||||
};
|
||||
|
||||
private static CureLevelInfo[] m_AosLevelInfo = new CureLevelInfo[]
|
||||
{
|
||||
new CureLevelInfo( Poison.Lesser, 0.75 ),
|
||||
new CureLevelInfo( Poison.Regular, 0.50 ),
|
||||
new CureLevelInfo( Poison.Greater, 0.25 )
|
||||
};
|
||||
|
||||
public override CureLevelInfo[] LevelInfo{ get{ return Core.AOS ? m_AosLevelInfo : m_OldLevelInfo; } }
|
||||
|
||||
[Constructable]
|
||||
public LesserCurePotion() : base( PotionEffect.CureLesser )
|
||||
{
|
||||
}
|
||||
|
||||
public LesserCurePotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,309 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseExplosionPotion : BasePotion
|
||||
{
|
||||
public abstract int MinDamage { get; }
|
||||
public abstract int MaxDamage { get; }
|
||||
|
||||
public override bool RequireFreeHand{ get{ return false; } }
|
||||
|
||||
private static bool LeveledExplosion = false; // Should explosion potions explode other nearby potions?
|
||||
private static bool InstantExplosion = false; // Should explosion potions explode on impact?
|
||||
private static bool RelativeLocation = false; // Is the explosion target location relative for mobiles?
|
||||
private const int ExplosionRange = 2; // How long is the blast radius?
|
||||
|
||||
public BaseExplosionPotion( PotionEffect effect ) : base( 0xF0D, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseExplosionPotion( 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();
|
||||
}
|
||||
|
||||
public virtual object FindParent( Mobile from )
|
||||
{
|
||||
Mobile m = this.HeldBy;
|
||||
|
||||
if ( m != null && m.Holding == this )
|
||||
return m;
|
||||
|
||||
object obj = this.RootParent;
|
||||
|
||||
if ( obj != null )
|
||||
return obj;
|
||||
|
||||
if ( Map == Map.Internal )
|
||||
return from;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
public List<Mobile> Users { get { return m_Users; } }
|
||||
|
||||
private List<Mobile> m_Users;
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
|
||||
return;
|
||||
}
|
||||
|
||||
ThrowTarget targ = from.Target as ThrowTarget;
|
||||
this.Stackable = false; // Scavenged explosion potions won't stack with those ones in backpack, and still will explode.
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
return;
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
if ( m_Users == null )
|
||||
m_Users = new List<Mobile>();
|
||||
|
||||
if ( !m_Users.Contains( from ) )
|
||||
m_Users.Add( from );
|
||||
|
||||
from.Target = new ThrowTarget( this );
|
||||
|
||||
if ( m_Timer == null )
|
||||
{
|
||||
from.SendLocalizedMessage( 500236 ); // You should throw it now!
|
||||
|
||||
if( Core.ML )
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.25 ), 5, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 3.6 seconds explosion delay
|
||||
else
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[]{ from, 3 } ); // 2.6 seconds explosion delay
|
||||
}
|
||||
}
|
||||
|
||||
private void Detonate_OnTick( object state )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
object[] states = (object[])state;
|
||||
Mobile from = (Mobile)states[0];
|
||||
int timer = (int)states[1];
|
||||
|
||||
object parent = FindParent( from );
|
||||
|
||||
if ( timer == 0 )
|
||||
{
|
||||
Point3D loc;
|
||||
Map map;
|
||||
|
||||
if ( parent is Item )
|
||||
{
|
||||
Item item = (Item)parent;
|
||||
|
||||
loc = item.GetWorldLocation();
|
||||
map = item.Map;
|
||||
}
|
||||
else if ( parent is Mobile )
|
||||
{
|
||||
Mobile m = (Mobile)parent;
|
||||
|
||||
loc = m.Location;
|
||||
map = m.Map;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Explode( from, true, loc, map );
|
||||
m_Timer = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( parent is Item )
|
||||
((Item)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
|
||||
else if ( parent is Mobile )
|
||||
((Mobile)parent).PublicOverheadMessage( MessageType.Regular, 0x22, false, timer.ToString() );
|
||||
|
||||
states[1] = timer - 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void Reposition_OnTick( object state )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
object[] states = (object[])state;
|
||||
Mobile from = (Mobile)states[0];
|
||||
IPoint3D p = (IPoint3D)states[1];
|
||||
Map map = (Map)states[2];
|
||||
|
||||
Point3D loc = new Point3D( p );
|
||||
|
||||
if ( InstantExplosion )
|
||||
Explode( from, true, loc, map );
|
||||
else
|
||||
MoveToWorld( loc, map );
|
||||
}
|
||||
|
||||
private class ThrowTarget : Target
|
||||
{
|
||||
private BaseExplosionPotion m_Potion;
|
||||
|
||||
public BaseExplosionPotion Potion
|
||||
{
|
||||
get{ return m_Potion; }
|
||||
}
|
||||
|
||||
public ThrowTarget( BaseExplosionPotion potion ) : base( 12, true, TargetFlags.None )
|
||||
{
|
||||
m_Potion = potion;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Potion.Deleted || m_Potion.Map == Map.Internal )
|
||||
return;
|
||||
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
|
||||
if ( p == null )
|
||||
return;
|
||||
|
||||
Map map = from.Map;
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
|
||||
SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
from.RevealingAction();
|
||||
|
||||
IEntity to;
|
||||
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), map );
|
||||
|
||||
if( p is Mobile )
|
||||
{
|
||||
if( !RelativeLocation ) // explosion location = current mob location.
|
||||
p = ((Mobile)p).Location;
|
||||
else
|
||||
to = (Mobile)p;
|
||||
}
|
||||
|
||||
Effects.SendMovingEffect( from, to, m_Potion.ItemID, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
|
||||
if( m_Potion.Amount > 1 )
|
||||
{
|
||||
Mobile.LiftItemDupe( m_Potion, 1 );
|
||||
}
|
||||
|
||||
m_Potion.Internalize();
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
|
||||
}
|
||||
}
|
||||
|
||||
public void Explode( Mobile from, bool direct, Point3D loc, Map map )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
Consume();
|
||||
|
||||
for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
|
||||
{
|
||||
Mobile m = m_Users[i];
|
||||
ThrowTarget targ = m.Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Potion == this )
|
||||
Target.Cancel( m );
|
||||
}
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
|
||||
Effects.PlaySound(loc, map, 0x307);
|
||||
|
||||
Effects.SendLocationEffect(loc, map, 0x36B0, 9, 10, 0, 0);
|
||||
int alchemyBonus = 0;
|
||||
|
||||
if ( direct )
|
||||
alchemyBonus = (int)(from.Skills.Alchemy.Value / (Core.AOS ? 5 : 10));
|
||||
|
||||
IPooledEnumerable eable = LeveledExplosion ? (IPooledEnumerable)map.GetObjectsInRange( loc, ExplosionRange ) : (IPooledEnumerable)map.GetMobilesInRange( loc, ExplosionRange );
|
||||
ArrayList toExplode = new ArrayList();
|
||||
|
||||
int toDamage = 0;
|
||||
|
||||
foreach ( object o in eable )
|
||||
{
|
||||
if ( o is Mobile && (from == null || (SpellHelper.ValidIndirectTarget( from, (Mobile)o ) && from.CanBeHarmful( (Mobile)o, false ))))
|
||||
{
|
||||
toExplode.Add( o );
|
||||
++toDamage;
|
||||
}
|
||||
else if ( o is BaseExplosionPotion && o != this )
|
||||
{
|
||||
toExplode.Add( o );
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
int min = Scale( from, MinDamage );
|
||||
int max = Scale( from, MaxDamage );
|
||||
|
||||
for ( int i = 0; i < toExplode.Count; ++i )
|
||||
{
|
||||
object o = toExplode[i];
|
||||
|
||||
if ( o is Mobile )
|
||||
{
|
||||
Mobile m = (Mobile)o;
|
||||
|
||||
if ( from != null )
|
||||
from.DoHarmful( m );
|
||||
|
||||
int damage = Utility.RandomMinMax( min, max );
|
||||
|
||||
damage += alchemyBonus;
|
||||
|
||||
if ( !Core.AOS && damage > 40 )
|
||||
damage = 40;
|
||||
else if ( Core.AOS && toDamage > 2 )
|
||||
damage /= toDamage - 1;
|
||||
|
||||
AOS.Damage( m, from, damage, 0, 100, 0, 0, 0 );
|
||||
}
|
||||
else if ( o is BaseExplosionPotion )
|
||||
{
|
||||
BaseExplosionPotion pot = (BaseExplosionPotion)o;
|
||||
|
||||
pot.Explode( from, false, pot.GetWorldLocation(), pot.Map );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ExplosionPotion : BaseExplosionPotion
|
||||
{
|
||||
public override int MinDamage { get { return 10; } }
|
||||
public override int MaxDamage { get { return 20; } }
|
||||
|
||||
[Constructable]
|
||||
public ExplosionPotion() : base( PotionEffect.Explosion )
|
||||
{
|
||||
}
|
||||
|
||||
public ExplosionPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterExplosionPotion : BaseExplosionPotion
|
||||
{
|
||||
public override int MinDamage { get { return Core.AOS ? 20 : 15; } }
|
||||
public override int MaxDamage { get { return Core.AOS ? 40 : 30; } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterExplosionPotion() : base( PotionEffect.ExplosionGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterExplosionPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LesserExplosionPotion : BaseExplosionPotion
|
||||
{
|
||||
public override int MinDamage { get { return 5; } }
|
||||
public override int MaxDamage { get { return 10; } }
|
||||
|
||||
[Constructable]
|
||||
public LesserExplosionPotion() : base( PotionEffect.ExplosionLesser )
|
||||
{
|
||||
}
|
||||
|
||||
public LesserExplosionPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseHealPotion : BasePotion
|
||||
{
|
||||
public abstract int MinHeal { get; }
|
||||
public abstract int MaxHeal { get; }
|
||||
public abstract double Delay { get; }
|
||||
|
||||
public BaseHealPotion( PotionEffect effect ) : base( 0xF0C, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHealPotion( 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();
|
||||
}
|
||||
|
||||
public void DoHeal( Mobile from )
|
||||
{
|
||||
int min = Scale( from, MinHeal );
|
||||
int max = Scale( from, MaxHeal );
|
||||
|
||||
from.Heal( Utility.RandomMinMax( min, max ) );
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( from.Hits < from.HitsMax )
|
||||
{
|
||||
if ( from.Poisoned || MortalStrike.IsWounded( from ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x22, 1005000 ); // You can not heal yourself in your current state.
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( from.BeginAction( typeof( BaseHealPotion ) ) )
|
||||
{
|
||||
DoHeal( from );
|
||||
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( Delay ), new TimerStateCallback( ReleaseHealLock ), from );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x22, 500235 ); // You must wait 10 seconds before using another healing potion.
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1049547 ); // You decide against drinking this potion, as you are already at full health.
|
||||
}
|
||||
}
|
||||
|
||||
private static void ReleaseHealLock( object state )
|
||||
{
|
||||
((Mobile)state).EndAction( typeof( BaseHealPotion ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterHealPotion : BaseHealPotion
|
||||
{
|
||||
public override int MinHeal { get { return (Core.AOS ? 20 : 9); } }
|
||||
public override int MaxHeal { get { return (Core.AOS ? 25 : 30); } }
|
||||
public override double Delay{ get{ return 10.0; } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterHealPotion() : base( PotionEffect.HealGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterHealPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HealPotion : BaseHealPotion
|
||||
{
|
||||
public override int MinHeal { get { return (Core.AOS ? 13 : 6); } }
|
||||
public override int MaxHeal { get { return (Core.AOS ? 16 : 20); } }
|
||||
public override double Delay{ get{ return (Core.AOS ? 8.0 : 10.0); } }
|
||||
|
||||
[Constructable]
|
||||
public HealPotion() : base( PotionEffect.Heal )
|
||||
{
|
||||
}
|
||||
|
||||
public HealPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LesserHealPotion : BaseHealPotion
|
||||
{
|
||||
public override int MinHeal { get { return (Core.AOS ? 6 : 3); } }
|
||||
public override int MaxHeal { get { return (Core.AOS ? 8 : 10); } }
|
||||
public override double Delay{ get{ return (Core.AOS ? 3.0 : 10.0); } }
|
||||
|
||||
[Constructable]
|
||||
public LesserHealPotion() : base( PotionEffect.HealLesser )
|
||||
{
|
||||
}
|
||||
|
||||
public LesserHealPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Skill Items/Magical/Potions/NightSight.cs
Normal file
52
Scripts/Items/Skill Items/Magical/Potions/NightSight.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NightSightPotion : BasePotion
|
||||
{
|
||||
[Constructable]
|
||||
public NightSightPotion() : base( 0xF06, PotionEffect.Nightsight )
|
||||
{
|
||||
}
|
||||
|
||||
public NightSightPotion( 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();
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( from.BeginAction( typeof( LightCycle ) ) )
|
||||
{
|
||||
new LightCycle.NightSightTimer( from ).Start();
|
||||
from.LightLevel = LightCycle.DungeonLevel / 2;
|
||||
|
||||
from.FixedParticles( 0x376A, 9, 32, 5007, EffectLayer.Waist );
|
||||
from.PlaySound( 0x1E3 );
|
||||
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "You already have nightsight." );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BasePoisonPotion : BasePotion
|
||||
{
|
||||
public abstract Poison Poison{ get; }
|
||||
|
||||
public abstract double MinPoisoningSkill{ get; }
|
||||
public abstract double MaxPoisoningSkill{ get; }
|
||||
|
||||
public BasePoisonPotion( PotionEffect effect ) : base( 0xF0A, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BasePoisonPotion( 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();
|
||||
}
|
||||
|
||||
public void DoPoison( Mobile from )
|
||||
{
|
||||
from.ApplyPoison( from, Poison );
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
DoPoison( from );
|
||||
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DeadlyPoisonPotion : BasePoisonPotion
|
||||
{
|
||||
public override Poison Poison{ get{ return Poison.Deadly; } }
|
||||
|
||||
public override double MinPoisoningSkill{ get{ return 95.0; } }
|
||||
public override double MaxPoisoningSkill{ get{ return 100.0; } }
|
||||
|
||||
[Constructable]
|
||||
public DeadlyPoisonPotion() : base( PotionEffect.PoisonDeadly )
|
||||
{
|
||||
}
|
||||
|
||||
public DeadlyPoisonPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterPoisonPotion : BasePoisonPotion
|
||||
{
|
||||
public override Poison Poison{ get{ return Poison.Greater; } }
|
||||
|
||||
public override double MinPoisoningSkill{ get{ return 60.0; } }
|
||||
public override double MaxPoisoningSkill{ get{ return 100.0; } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterPoisonPotion() : base( PotionEffect.PoisonGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterPoisonPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LesserPoisonPotion : BasePoisonPotion
|
||||
{
|
||||
public override Poison Poison{ get{ return Poison.Lesser; } }
|
||||
|
||||
public override double MinPoisoningSkill{ get{ return 0.0; } }
|
||||
public override double MaxPoisoningSkill{ get{ return 60.0; } }
|
||||
|
||||
[Constructable]
|
||||
public LesserPoisonPotion() : base( PotionEffect.PoisonLesser )
|
||||
{
|
||||
}
|
||||
|
||||
public LesserPoisonPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PoisonPotion : BasePoisonPotion
|
||||
{
|
||||
public override Poison Poison{ get{ return Poison.Regular; } }
|
||||
|
||||
public override double MinPoisoningSkill{ get{ return 30.0; } }
|
||||
public override double MaxPoisoningSkill{ get{ return 70.0; } }
|
||||
|
||||
[Constructable]
|
||||
public PoisonPotion() : base( PotionEffect.Poison )
|
||||
{
|
||||
}
|
||||
|
||||
public PoisonPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseRefreshPotion : BasePotion
|
||||
{
|
||||
public abstract double Refresh{ get; }
|
||||
|
||||
public BaseRefreshPotion( PotionEffect effect ) : base( 0xF0B, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseRefreshPotion( 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();
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( from.Stam < from.StamMax )
|
||||
{
|
||||
from.Stam += Scale( from, (int)(Refresh * from.StamMax) );
|
||||
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage( "You decide against drinking this potion, as you are already at full stamina." );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RefreshPotion : BaseRefreshPotion
|
||||
{
|
||||
public override double Refresh{ get{ return 0.25; } }
|
||||
|
||||
[Constructable]
|
||||
public RefreshPotion() : base( PotionEffect.Refresh )
|
||||
{
|
||||
}
|
||||
|
||||
public RefreshPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class TotalRefreshPotion : BaseRefreshPotion
|
||||
{
|
||||
public override double Refresh{ get{ return 1.0; } }
|
||||
|
||||
[Constructable]
|
||||
public TotalRefreshPotion() : base( PotionEffect.RefreshTotal )
|
||||
{
|
||||
}
|
||||
|
||||
public TotalRefreshPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseStrengthPotion : BasePotion
|
||||
{
|
||||
public abstract int StrOffset{ get; }
|
||||
public abstract TimeSpan Duration{ get; }
|
||||
|
||||
public BaseStrengthPotion( PotionEffect effect ) : base( 0xF09, effect )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseStrengthPotion( 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();
|
||||
}
|
||||
|
||||
public bool DoStrength( Mobile from )
|
||||
{
|
||||
// TODO: Verify scaled; is it offset, duration, or both?
|
||||
if ( Spells.SpellHelper.AddStatOffset( from, StatType.Str, Scale( from, StrOffset ), Duration ) )
|
||||
{
|
||||
from.FixedEffect( 0x375A, 10, 15 );
|
||||
from.PlaySound( 0x1E7 );
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 502173 ); // You are already under a similar effect.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Drink( Mobile from )
|
||||
{
|
||||
if ( DoStrength( from ) )
|
||||
{
|
||||
BasePotion.PlayDrinkEffect( from );
|
||||
|
||||
if ( !Engines.ConPVP.DuelContext.IsFreeConsume( from ) )
|
||||
this.Consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterStrengthPotion : BaseStrengthPotion
|
||||
{
|
||||
public override int StrOffset{ get{ return 20; } }
|
||||
public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 2.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public GreaterStrengthPotion() : base( PotionEffect.StrengthGreater )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterStrengthPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StrengthPotion : BaseStrengthPotion
|
||||
{
|
||||
public override int StrOffset{ get{ return 10; } }
|
||||
public override TimeSpan Duration{ get{ return TimeSpan.FromMinutes( 2.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public StrengthPotion() : base( PotionEffect.Strength )
|
||||
{
|
||||
}
|
||||
|
||||
public StrengthPotion( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
558
Scripts/Items/Skill Items/Magical/Runebook.cs
Normal file
558
Scripts/Items/Skill Items/Magical/Runebook.cs
Normal file
|
|
@ -0,0 +1,558 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
using Server.Engines.Craft;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Runebook : Item, ISecurable, ICraftable
|
||||
{
|
||||
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;
|
||||
private int m_DefaultIndex;
|
||||
private SecureLevel m_Level;
|
||||
private Mobile m_Crafter;
|
||||
|
||||
private DateTime m_NextUse;
|
||||
|
||||
private List<Mobile> m_Openers = new List<Mobile>();
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime NextUse
|
||||
{
|
||||
get{ return m_NextUse; }
|
||||
set{ m_NextUse = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Crafter
|
||||
{
|
||||
get{ return m_Crafter; }
|
||||
set{ m_Crafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get{ return m_Level; }
|
||||
set{ m_Level = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Description;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Description = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurCharges
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_CurCharges;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_CurCharges = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxCharges
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_MaxCharges;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_MaxCharges = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Mobile> Openers
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Openers;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Openers = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return 1041267; } } // runebook
|
||||
|
||||
[Constructable]
|
||||
public Runebook( int maxCharges ) : base( Core.AOS ? 0x22C5 : 0xEFA )
|
||||
{
|
||||
Weight = (Core.SE ? 1.0 : 3.0);
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x461;
|
||||
|
||||
Layer = (Core.AOS ? Layer.Invalid : Layer.OneHanded);
|
||||
|
||||
m_Entries = new List<RunebookEntry>();
|
||||
|
||||
m_MaxCharges = maxCharges;
|
||||
|
||||
m_DefaultIndex = -1;
|
||||
|
||||
m_Level = SecureLevel.CoOwners;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Runebook() : this( Core.SE ? 12 : 6 )
|
||||
{
|
||||
}
|
||||
|
||||
public List<RunebookEntry> Entries
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Entries;
|
||||
}
|
||||
}
|
||||
|
||||
public RunebookEntry Default
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_DefaultIndex >= 0 && m_DefaultIndex < m_Entries.Count )
|
||||
return m_Entries[m_DefaultIndex];
|
||||
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( value == null )
|
||||
m_DefaultIndex = -1;
|
||||
else
|
||||
m_DefaultIndex = m_Entries.IndexOf( value );
|
||||
}
|
||||
}
|
||||
|
||||
public Runebook( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool AllowEquipedCast( Mobile from )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 3 );
|
||||
|
||||
writer.Write( (byte) m_Quality );
|
||||
|
||||
writer.Write( m_Crafter );
|
||||
|
||||
writer.Write( (int) m_Level );
|
||||
|
||||
writer.Write( m_Entries.Count );
|
||||
|
||||
for ( int i = 0; i < m_Entries.Count; ++i )
|
||||
m_Entries[i].Serialize( writer );
|
||||
|
||||
writer.Write( m_Description );
|
||||
writer.Write( m_CurCharges );
|
||||
writer.Write( m_MaxCharges );
|
||||
writer.Write( m_DefaultIndex );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
if( Core.SE && Weight == 3.0 )
|
||||
Weight = 1.0;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_Quality = (BookQuality) reader.ReadByte();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_Crafter = reader.ReadMobile();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_Level = (SecureLevel)reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
m_Entries = new List<RunebookEntry>( count );
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
m_Entries.Add( new RunebookEntry( reader ) );
|
||||
|
||||
m_Description = reader.ReadString();
|
||||
m_CurCharges = reader.ReadInt();
|
||||
m_MaxCharges = reader.ReadInt();
|
||||
m_DefaultIndex = reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DropRune( Mobile from, RunebookEntry e, int index )
|
||||
{
|
||||
if ( m_DefaultIndex > index )
|
||||
m_DefaultIndex -= 1;
|
||||
else if ( m_DefaultIndex == index )
|
||||
m_DefaultIndex = -1;
|
||||
|
||||
m_Entries.RemoveAt( index );
|
||||
|
||||
RecallRune rune = new RecallRune();
|
||||
|
||||
rune.Target = e.Location;
|
||||
rune.TargetMap = e.Map;
|
||||
rune.Description = e.Description;
|
||||
rune.House = e.House;
|
||||
rune.Marked = true;
|
||||
|
||||
from.AddToBackpack( rune );
|
||||
|
||||
from.SendLocalizedMessage( 502421 ); // You have removed the rune.
|
||||
}
|
||||
|
||||
public bool IsOpen( Mobile toCheck )
|
||||
{
|
||||
NetState ns = toCheck.NetState;
|
||||
|
||||
if ( ns != null ) {
|
||||
foreach ( Gump gump in ns.Gumps ) {
|
||||
RunebookGump bookGump = gump as RunebookGump;
|
||||
|
||||
if ( bookGump != null && bookGump.Book == this ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool DisplayLootType{ get{ return Core.AOS; } }
|
||||
|
||||
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~
|
||||
|
||||
if ( m_Description != null && m_Description.Length > 0 )
|
||||
list.Add( m_Description );
|
||||
}
|
||||
|
||||
public override bool OnDragLift( Mobile from )
|
||||
{
|
||||
if ( from.HasGump( typeof( RunebookGump ) ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500169 ); // You cannot pick that up.
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ( Mobile m in m_Openers )
|
||||
if ( IsOpen( m ) )
|
||||
m.CloseGump( typeof( RunebookGump ) );
|
||||
|
||||
m_Openers.Clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
if ( m_Description != null && m_Description.Length > 0 )
|
||||
LabelTo( from, m_Description );
|
||||
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( m_Crafter != null )
|
||||
LabelTo( from, 1050043, m_Crafter.Name );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), (Core.ML ? 3 : 1) ) && CheckAccess( from ) )
|
||||
{
|
||||
if ( RootParent is BaseCreature )
|
||||
{
|
||||
from.SendLocalizedMessage( 502402 ); // That is inaccessible.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( DateTime.UtcNow < m_NextUse )
|
||||
{
|
||||
from.SendLocalizedMessage( 502406 ); // This book needs time to recharge.
|
||||
return;
|
||||
}
|
||||
|
||||
from.CloseGump( typeof( RunebookGump ) );
|
||||
from.SendGump( new RunebookGump( from, this ) );
|
||||
|
||||
m_Openers.Add( from );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnTravel()
|
||||
{
|
||||
if ( !Core.SA )
|
||||
m_NextUse = DateTime.UtcNow + UseDelay;
|
||||
}
|
||||
|
||||
public override void OnAfterDuped( Item newItem )
|
||||
{
|
||||
Runebook book = newItem as Runebook;
|
||||
|
||||
if ( book == null )
|
||||
return;
|
||||
|
||||
book.m_Entries = new List<RunebookEntry>();
|
||||
|
||||
for ( int i = 0; i < m_Entries.Count; i++ )
|
||||
{
|
||||
RunebookEntry entry = m_Entries[i];
|
||||
|
||||
book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
|
||||
}
|
||||
}
|
||||
|
||||
public bool CheckAccess( Mobile m )
|
||||
{
|
||||
if ( !IsLockedDown || m.AccessLevel >= AccessLevel.GameMaster )
|
||||
return true;
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house != null && house.IsAosRules && (house.Public ? house.IsBanned( m ) : !house.HasAccess( m )) )
|
||||
return false;
|
||||
|
||||
return ( house != null && house.HasSecureAccess( m, m_Level ) );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( dropped is RecallRune )
|
||||
{
|
||||
if ( IsLockedDown && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
from.SendLocalizedMessage( 502413, null, 0x35 ); // That cannot be done while the book is locked down.
|
||||
}
|
||||
else if ( IsOpen( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1005571 ); // You cannot place objects in the book while viewing the contents.
|
||||
}
|
||||
else if ( m_Entries.Count < 16 )
|
||||
{
|
||||
RecallRune rune = (RecallRune)dropped;
|
||||
|
||||
if ( rune.Marked && rune.TargetMap != null )
|
||||
{
|
||||
m_Entries.Add( new RunebookEntry( rune.Target, rune.TargetMap, rune.Description, rune.House ) );
|
||||
|
||||
dropped.Delete();
|
||||
|
||||
from.Send( new PlaySound( 0x42, GetWorldLocation() ) );
|
||||
|
||||
string desc = rune.Description;
|
||||
|
||||
if ( desc == null || (desc = desc.Trim()).Length == 0 )
|
||||
desc = "(indescript)";
|
||||
|
||||
from.SendMessage( desc );
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502409 ); // This rune does not have a marked location.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502401 ); // This runebook is full.
|
||||
}
|
||||
}
|
||||
else if ( dropped is RecallScroll )
|
||||
{
|
||||
if ( m_CurCharges < m_MaxCharges )
|
||||
{
|
||||
from.Send( new PlaySound( 0x249, GetWorldLocation() ) );
|
||||
|
||||
int amount = dropped.Amount;
|
||||
|
||||
if ( amount > (m_MaxCharges - m_CurCharges) )
|
||||
{
|
||||
dropped.Consume( m_MaxCharges - m_CurCharges );
|
||||
m_CurCharges = m_MaxCharges;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_CurCharges += amount;
|
||||
dropped.Delete();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502410 ); // This book already has the maximum amount of charges.
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#region ICraftable Members
|
||||
|
||||
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
int charges = 5 + quality + (int)(from.Skills[SkillName.Inscribe].Value / 30);
|
||||
|
||||
if ( charges > 10 )
|
||||
charges = 10;
|
||||
|
||||
MaxCharges = (Core.SE ? charges * 2 : charges);
|
||||
|
||||
if ( makersMark )
|
||||
Crafter = from;
|
||||
|
||||
m_Quality = (BookQuality) ( quality - 1 );
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class RunebookEntry
|
||||
{
|
||||
private Point3D m_Location;
|
||||
private Map m_Map;
|
||||
private string m_Description;
|
||||
private BaseHouse m_House;
|
||||
|
||||
public Point3D Location
|
||||
{
|
||||
get{ return m_Location; }
|
||||
}
|
||||
|
||||
public Map Map
|
||||
{
|
||||
get{ return m_Map; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get{ return m_Description; }
|
||||
}
|
||||
|
||||
public BaseHouse House
|
||||
{
|
||||
get{ return m_House; }
|
||||
}
|
||||
|
||||
public RunebookEntry( Point3D loc, Map map, string desc, BaseHouse house )
|
||||
{
|
||||
m_Location = loc;
|
||||
m_Map = map;
|
||||
m_Description = desc;
|
||||
m_House = house;
|
||||
}
|
||||
|
||||
public RunebookEntry( GenericReader reader )
|
||||
{
|
||||
int version = reader.ReadByte();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_House = reader.ReadItem() as BaseHouse;
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Location = reader.ReadPoint3D();
|
||||
m_Map = reader.ReadMap();
|
||||
m_Description = reader.ReadString();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Serialize( GenericWriter writer )
|
||||
{
|
||||
if ( m_House != null && !m_House.Deleted )
|
||||
{
|
||||
writer.Write( (byte) 1 ); // version
|
||||
|
||||
writer.Write( m_House );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
writer.Write( m_Location );
|
||||
writer.Write( m_Map );
|
||||
writer.Write( m_Description );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EarthquakeScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public EarthquakeScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EarthquakeScroll( int amount ) : base( 56, 0x1F65, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public EarthquakeScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EnergyVortexScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public EnergyVortexScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EnergyVortexScroll( int amount ) : base( 57, 0x1F66, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public EnergyVortexScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ResurrectionScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ResurrectionScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ResurrectionScroll( int amount ) : base( 58, 0x1F67, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectionScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonAirElementalScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonAirElementalScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonAirElementalScroll( int amount ) : base( 59, 0x1F68, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonAirElementalScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonDaemonScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonDaemonScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonDaemonScroll( int amount ) : base( 60, 0x1F69, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonDaemonScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonEarthElementalScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonEarthElementalScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonEarthElementalScroll( int amount ) : base( 61, 0x1F6A, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonEarthElementalScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonFireElementalScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonFireElementalScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonFireElementalScroll( int amount ) : base( 62, 0x1F6B, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonFireElementalScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonWaterElementalScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonWaterElementalScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonWaterElementalScroll( int amount ) : base( 63, 0x1F6C, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonWaterElementalScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BladeSpiritsScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public BladeSpiritsScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BladeSpiritsScroll( int amount ) : base( 32, 0x1F4D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BladeSpiritsScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DispelFieldScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public DispelFieldScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DispelFieldScroll( int amount ) : base( 33, 0x1F4E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DispelFieldScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IncognitoScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public IncognitoScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IncognitoScroll( int amount ) : base( 34, 0x1F4F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public IncognitoScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MagicReflectScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public MagicReflectScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MagicReflectScroll( int amount ) : base( 35, 0x1F50, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MagicReflectScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MindBlastScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public MindBlastScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MindBlastScroll( int amount ) : base( 36, 0x1F51, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MindBlastScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ParalyzeScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ParalyzeScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ParalyzeScroll( int amount ) : base( 37, 0x1F52, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ParalyzeScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PoisonFieldScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public PoisonFieldScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PoisonFieldScroll( int amount ) : base( 38, 0x1F53, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public PoisonFieldScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SummonCreatureScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SummonCreatureScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SummonCreatureScroll( int amount ) : base( 39, 0x1F54, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SummonCreatureScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ClumsyScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ClumsyScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ClumsyScroll( int amount ) : base( 0, 0x1F2E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ClumsyScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CreateFoodScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public CreateFoodScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CreateFoodScroll( int amount ) : base( 1, 0x1F2F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CreateFoodScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FeeblemindScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public FeeblemindScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FeeblemindScroll( int amount ) : base( 2, 0x1F30, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public FeeblemindScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HealScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public HealScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HealScroll( int amount ) : base( 3, 0x1F31, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public HealScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MagicArrowScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public MagicArrowScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MagicArrowScroll( int amount ) : base( 4, 0x1F32, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MagicArrowScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NightSightScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public NightSightScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NightSightScroll( int amount ) : base( 5, 0x1F33, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public NightSightScroll( Serial ser ) : base(ser)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ReactiveArmorScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ReactiveArmorScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ReactiveArmorScroll( int amount ) : base( 6, 0x1F2D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ReactiveArmorScroll( Serial ser ) : base(ser)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WeakenScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public WeakenScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WeakenScroll( int amount ) : base( 7, 0x1F34, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public WeakenScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ArchProtectionScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ArchProtectionScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArchProtectionScroll( int amount ) : base( 25, 0x1F46, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ArchProtectionScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ArchCureScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ArchCureScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArchCureScroll( int amount ) : base( 24, 0x1F45, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ArchCureScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CurseScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public CurseScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CurseScroll( int amount ) : base( 26, 0x1F47, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CurseScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FireFieldScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public FireFieldScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FireFieldScroll( int amount ) : base( 27, 0x1F48, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public FireFieldScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GreaterHealScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public GreaterHealScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GreaterHealScroll( int amount ) : base( 28, 0x1F49, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public GreaterHealScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LightningScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public LightningScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LightningScroll( int amount ) : base( 29, 0x1F4A, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public LightningScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ManaDrainScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public ManaDrainScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ManaDrainScroll( int amount ) : base( 30, 0x1F4B, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ManaDrainScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RecallScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RecallScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RecallScroll( int amount ) : base( 31, 0x1F4C, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public RecallScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AnimatedWeaponScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public AnimatedWeaponScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AnimatedWeaponScroll( int amount )
|
||||
: base( 683, 0x2DA4, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public AnimatedWeaponScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BombardScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public BombardScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BombardScroll( int amount )
|
||||
: base( 688, 0x2DA9, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BombardScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CleansingWindsScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public CleansingWindsScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CleansingWindsScroll( int amount )
|
||||
: base( 687, 0x2DA8, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CleansingWindsScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EagleStrikeScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public EagleStrikeScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EagleStrikeScroll( int amount )
|
||||
: base( 682, 0x2DA3, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public EagleStrikeScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EnchantScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public EnchantScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EnchantScroll( int amount )
|
||||
: base( 680, 0x2DA1, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public EnchantScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HailStormScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public HailStormScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HailStormScroll( int amount )
|
||||
: base( 690, 0x2DAB, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public HailStormScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HealingStoneScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public HealingStoneScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HealingStoneScroll( int amount )
|
||||
: base( 678, 0x2D9F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public HealingStoneScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MassSleepScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public MassSleepScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MassSleepScroll( int amount )
|
||||
: base( 686, 0x2DA7, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MassSleepScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NetherBoltScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public NetherBoltScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NetherBoltScroll( int amount )
|
||||
: base( 677, 0x2D9E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public NetherBoltScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NetherCycloneScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public NetherCycloneScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NetherCycloneScroll( int amount )
|
||||
: base( 691, 0x2DAC, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public NetherCycloneScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PurgeMagicScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public PurgeMagicScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PurgeMagicScroll( int amount )
|
||||
: base( 679, 0x2DA0, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public PurgeMagicScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RisingColossusScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RisingColossusScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RisingColossusScroll( int amount )
|
||||
: base( 692, 0x2DAD, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public RisingColossusScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SleepScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SleepScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SleepScroll( int amount )
|
||||
: base( 681, 0x2DA2, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SleepScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpellPlagueScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SpellPlagueScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpellPlagueScroll( int amount )
|
||||
: base( 689, 0x2DAA, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpellPlagueScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpellTriggerScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public SpellTriggerScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpellTriggerScroll( int amount )
|
||||
: base( 685, 0x2DA6, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpellTriggerScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneFormScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public StoneFormScroll()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public StoneFormScroll( int amount )
|
||||
: base( 684, 0x2DA5, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public StoneFormScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AnimateDeadScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public AnimateDeadScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AnimateDeadScroll( int amount ) : base( 100, 0x2260, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public AnimateDeadScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BloodOathScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public BloodOathScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodOathScroll( int amount ) : base( 101, 0x2261, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BloodOathScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CorpseSkinScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public CorpseSkinScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CorpseSkinScroll( int amount ) : base( 102, 0x2262, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CorpseSkinScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CurseWeaponScroll : SpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public CurseWeaponScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CurseWeaponScroll( int amount ) : base( 103, 0x2263, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CurseWeaponScroll( 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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue