#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
132
Scripts/Items/Special/Gifts/HearthOfHomeFire.cs
Normal file
132
Scripts/Items/Special/Gifts/HearthOfHomeFire.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HearthOfHomeFire : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new HearthOfHomeFireDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public HearthOfHomeFire( bool east )
|
||||
{
|
||||
if ( east )
|
||||
{
|
||||
AddLightComponent( new AddonComponent( 0x2352 ), 0, 0, 0 );
|
||||
AddLightComponent( new AddonComponent( 0x2358 ), 0, -1, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLightComponent( new AddonComponent( 0x2360 ), 0, 0, 0 );
|
||||
AddLightComponent( new AddonComponent( 0x2366 ), -1, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
private void AddLightComponent( AddonComponent component, int x, int y, int z )
|
||||
{
|
||||
component.Light = LightType.Circle150;
|
||||
|
||||
AddComponent( component, x, y, z );
|
||||
}
|
||||
|
||||
public HearthOfHomeFire( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class HearthOfHomeFireDeed : BaseAddonDeed
|
||||
{
|
||||
private bool m_East;
|
||||
|
||||
public override BaseAddon Addon{ get{ return new HearthOfHomeFire( m_East ); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1062919; } } // Hearth of the Home Fire
|
||||
|
||||
[Constructable]
|
||||
public HearthOfHomeFireDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.CloseGump( typeof( InternalGump ) );
|
||||
from.SendGump( new InternalGump( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
private void SendTarget( Mobile m )
|
||||
{
|
||||
base.OnDoubleClick( m );
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private HearthOfHomeFireDeed m_Deed;
|
||||
|
||||
public InternalGump( HearthOfHomeFireDeed deed ) : base( 150, 50 )
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
AddBackground( 0, 0, 350, 250, 0xA28 );
|
||||
|
||||
AddItem( 90, 52, 0x2367 );
|
||||
AddItem( 112, 35, 0x2360 );
|
||||
AddButton( 70, 35, 0x868, 0x869, 1, GumpButtonType.Reply, 0 ); // South
|
||||
|
||||
AddItem( 220, 35, 0x2352 );
|
||||
AddItem( 242, 52, 0x2358 );
|
||||
AddButton( 185, 35, 0x868, 0x869, 2, GumpButtonType.Reply, 0 ); // East
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Deed.Deleted || info.ButtonID == 0 )
|
||||
return;
|
||||
|
||||
m_Deed.m_East = (info.ButtonID != 1);
|
||||
m_Deed.SendTarget( sender.Mobile );
|
||||
}
|
||||
}
|
||||
|
||||
public HearthOfHomeFireDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Special/Gifts/HolySword.cs
Normal file
45
Scripts/Items/Special/Gifts/HolySword.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HolySword : Longsword
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1062921; } } // The Holy Sword
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public HolySword()
|
||||
{
|
||||
Hue = 0x482;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Slayer = SlayerName.Silver;
|
||||
|
||||
Attributes.WeaponDamage = 40;
|
||||
WeaponAttributes.SelfRepair = 10;
|
||||
WeaponAttributes.LowerStatReq = 100;
|
||||
WeaponAttributes.UseBestSkill = 1;
|
||||
}
|
||||
|
||||
public HolySword( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Special/Gifts/LeggingsOfEmbers.cs
Normal file
48
Scripts/Items/Special/Gifts/LeggingsOfEmbers.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LeggingsOfEmbers : PlateLegs
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1062911; } } // Royal Leggings of Embers
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 15; } }
|
||||
public override int BaseFireResistance{ get{ return 25; } }
|
||||
public override int BaseColdResistance{ get{ return 0; } }
|
||||
public override int BasePoisonResistance{ get{ return 15; } }
|
||||
public override int BaseEnergyResistance{ get{ return 15; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public LeggingsOfEmbers()
|
||||
{
|
||||
Hue = 0x2C;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
ArmorAttributes.SelfRepair = 10;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
}
|
||||
|
||||
public LeggingsOfEmbers( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
223
Scripts/Items/Special/Gifts/RoseOfTrinsic.cs
Normal file
223
Scripts/Items/Special/Gifts/RoseOfTrinsic.cs
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x234C, 0x234D )]
|
||||
public class RoseOfTrinsic : Item, ISecurable
|
||||
{
|
||||
private static readonly TimeSpan m_SpawnTime = TimeSpan.FromHours( 4.0 );
|
||||
|
||||
private int m_Petals;
|
||||
private DateTime m_NextSpawnTime;
|
||||
private SpawnTimer m_SpawnTimer;
|
||||
|
||||
private SecureLevel m_Level;
|
||||
|
||||
public override int LabelNumber{ get{ return 1062913; } } // Rose of Trinsic
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get{ return m_Level; }
|
||||
set{ m_Level = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Petals
|
||||
{
|
||||
get{ return m_Petals; }
|
||||
set
|
||||
{
|
||||
if ( value >= 10 )
|
||||
{
|
||||
m_Petals = 10;
|
||||
|
||||
StopSpawnTimer();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( value <= 0 )
|
||||
m_Petals = 0;
|
||||
else
|
||||
m_Petals = value;
|
||||
|
||||
StartSpawnTimer( m_SpawnTime );
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RoseOfTrinsic() : base( 0x234D )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
m_Petals = 0;
|
||||
StartSpawnTimer( TimeSpan.FromMinutes( 1.0 ) );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
list.Add( 1062925, Petals.ToString() ); // Petals: ~1_COUNT~
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
private void StartSpawnTimer( TimeSpan delay )
|
||||
{
|
||||
StopSpawnTimer();
|
||||
|
||||
m_SpawnTimer = new SpawnTimer( this, delay );
|
||||
m_SpawnTimer.Start();
|
||||
|
||||
m_NextSpawnTime = DateTime.UtcNow + delay;
|
||||
}
|
||||
|
||||
private void StopSpawnTimer()
|
||||
{
|
||||
if ( m_SpawnTimer != null )
|
||||
{
|
||||
m_SpawnTimer.Stop();
|
||||
m_SpawnTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
private class SpawnTimer : Timer
|
||||
{
|
||||
private RoseOfTrinsic m_Rose;
|
||||
|
||||
public SpawnTimer( RoseOfTrinsic rose, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Rose = rose;
|
||||
|
||||
Priority = TimerPriority.OneMinute;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Rose.Deleted )
|
||||
return;
|
||||
|
||||
m_Rose.m_SpawnTimer = null;
|
||||
m_Rose.Petals++;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
else if ( Petals > 0 )
|
||||
{
|
||||
from.AddToBackpack( new RoseOfTrinsicPetal( Petals ) );
|
||||
Petals = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public RoseOfTrinsic( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Petals );
|
||||
writer.WriteDeltaTime( (DateTime) m_NextSpawnTime );
|
||||
writer.WriteEncodedInt( (int) m_Level );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Petals = reader.ReadEncodedInt();
|
||||
m_NextSpawnTime = reader.ReadDeltaTime();
|
||||
m_Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
|
||||
if ( m_Petals < 10 )
|
||||
StartSpawnTimer( m_NextSpawnTime - DateTime.UtcNow );
|
||||
}
|
||||
}
|
||||
|
||||
public class RoseOfTrinsicPetal : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1062926; } } // Petal of the Rose of Trinsic
|
||||
|
||||
[Constructable]
|
||||
public RoseOfTrinsicPetal() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RoseOfTrinsicPetal( int amount ) : base( 0x1021 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
||||
Weight = 1.0;
|
||||
Hue = 0xE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
else if ( from.GetStatMod( "RoseOfTrinsicPetal" ) != null )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062927 ); // You have eaten one of these recently and eating another would provide no benefit.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.PlaySound( 0x1EE );
|
||||
from.AddStatMod( new StatMod( StatType.Str, "RoseOfTrinsicPetal", 5, TimeSpan.FromMinutes( 5.0 ) ) );
|
||||
|
||||
Consume();
|
||||
}
|
||||
}
|
||||
|
||||
public RoseOfTrinsicPetal( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Special/Gifts/SamuraiHelm.cs
Normal file
52
Scripts/Items/Special/Gifts/SamuraiHelm.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x236C, 0x236D )]
|
||||
public class SamuraiHelm : BaseArmor
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1062923; } } // Ancient Samurai Helm
|
||||
|
||||
public override int BasePhysicalResistance{ get{ return 15; } }
|
||||
public override int BaseFireResistance{ get{ return 10; } }
|
||||
public override int BaseColdResistance{ get{ return 10; } }
|
||||
public override int BasePoisonResistance{ get{ return 15; } }
|
||||
public override int BaseEnergyResistance{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public SamuraiHelm() : base( 0x236C )
|
||||
{
|
||||
Weight = 5.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Attributes.DefendChance = 15;
|
||||
ArmorAttributes.SelfRepair = 10;
|
||||
ArmorAttributes.LowerStatReq = 100;
|
||||
ArmorAttributes.MageArmor = 1;
|
||||
}
|
||||
|
||||
public SamuraiHelm( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Special/Gifts/ShaminoCrossbow.cs
Normal file
43
Scripts/Items/Special/Gifts/ShaminoCrossbow.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ShaminoCrossbow : RepeatingCrossbow
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1062915; } } // Shamino’s Best Crossbow
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public ShaminoCrossbow()
|
||||
{
|
||||
Hue = 0x504;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Attributes.AttackChance = 15;
|
||||
Attributes.WeaponDamage = 40;
|
||||
WeaponAttributes.SelfRepair = 10;
|
||||
WeaponAttributes.LowerStatReq = 100;
|
||||
}
|
||||
|
||||
public ShaminoCrossbow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
83
Scripts/Items/Special/Gifts/TapestryOfSosaria.cs
Normal file
83
Scripts/Items/Special/Gifts/TapestryOfSosaria.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Multis;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x234E, 0x234F )]
|
||||
public class TapestryOfSosaria : Item, ISecurable
|
||||
{
|
||||
private SecureLevel m_Level;
|
||||
|
||||
public override int LabelNumber{ get{ return 1062917; } } // The Tapestry of Sosaria
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get{ return m_Level; }
|
||||
set{ m_Level = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TapestryOfSosaria() : base( 0x234E )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.CloseGump( typeof( InternalGump ) );
|
||||
from.SendGump( new InternalGump() );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
public InternalGump() : base( 50, 50 )
|
||||
{
|
||||
AddImage( 0, 0, 0x2C95 );
|
||||
}
|
||||
}
|
||||
|
||||
public TapestryOfSosaria( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
|
||||
writer.WriteEncodedInt( (int) m_Level );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_Level = (SecureLevel) reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue