#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
37
Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs
Normal file
37
Scripts/Engines/Quests/Witch Apprentice/Items/Cauldron.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Cauldron : Item
|
||||
{
|
||||
public override string DefaultName
|
||||
{
|
||||
get { return "a cauldron"; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cauldron() : base( 0x9ED )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Cauldron( 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 System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Misc;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Hag
|
||||
{
|
||||
public class HagApprenticeCorpse : Corpse
|
||||
{
|
||||
private static Mobile GetOwner()
|
||||
{
|
||||
Mobile apprentice = new Mobile();
|
||||
|
||||
apprentice.Hue = Utility.RandomSkinHue();
|
||||
apprentice.Female = false;
|
||||
apprentice.Body = 0x190;
|
||||
|
||||
apprentice.Delete();
|
||||
|
||||
return apprentice;
|
||||
}
|
||||
|
||||
private static List<Item> GetEquipment()
|
||||
{
|
||||
return new List<Item>();
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
list.Add( "a charred corpse" );
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int hue = Notoriety.GetHue( NotorietyHandlers.CorpseNotoriety( from, this ) );
|
||||
|
||||
from.Send( new AsciiMessage( Serial, ItemID, MessageType.Label, hue, 3, "", "a charred corpse" ) );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HagApprenticeCorpse() : base( GetOwner(), GetEquipment() )
|
||||
{
|
||||
Direction = Direction.South;
|
||||
|
||||
foreach ( Item item in EquipItems )
|
||||
{
|
||||
DropItem( item );
|
||||
}
|
||||
}
|
||||
|
||||
public HagApprenticeCorpse( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Open( Mobile from, bool checkSelfLoot )
|
||||
{
|
||||
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
return;
|
||||
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is WitchApprenticeQuest )
|
||||
{
|
||||
FindApprenticeObjective obj = qs.FindObjective( typeof( FindApprenticeObjective ) ) as FindApprenticeObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
if ( obj.Corpse == this )
|
||||
{
|
||||
obj.Complete();
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1055047 ); // You examine the corpse, but it doesn't fit the description of the particular apprentice the Hag tasked you with finding.
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SendLocalizedMessageTo( from, 1055048 ); // You examine the corpse, but find nothing of interest.
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Engines/Quests/Witch Apprentice/Items/HagCauldron.cs
Normal file
40
Scripts/Engines/Quests/Witch Apprentice/Items/HagCauldron.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HagCauldron : BaseAddon
|
||||
{
|
||||
|
||||
[Constructable]
|
||||
public HagCauldron()
|
||||
{
|
||||
AddonComponent pot;
|
||||
pot = new AddonComponent(2420);
|
||||
AddComponent(pot, 0, 0, 0); //pot w/ support
|
||||
|
||||
AddonComponent fire;
|
||||
fire = new AddonComponent(4012); //fire pit
|
||||
fire.Light = LightType.Circle150;
|
||||
AddComponent(fire, 0, 0, 0);
|
||||
}
|
||||
|
||||
public HagCauldron( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
76
Scripts/Engines/Quests/Witch Apprentice/Items/HagStew.cs
Normal file
76
Scripts/Engines/Quests/Witch Apprentice/Items/HagStew.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HagStew : BaseAddon
|
||||
{
|
||||
|
||||
[Constructable]
|
||||
public HagStew()
|
||||
{
|
||||
AddonComponent stew;
|
||||
stew = new AddonComponent(2416);
|
||||
stew.Name = "stew";
|
||||
stew.Visible = true;
|
||||
AddComponent(stew, 0, 0, -7); //stew
|
||||
}
|
||||
|
||||
public override void OnComponentUsed(AddonComponent stew, Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
from.SendMessage("You are too far away.");
|
||||
else
|
||||
{
|
||||
{
|
||||
stew.Visible = false;
|
||||
|
||||
BreadLoaf hagstew = new BreadLoaf(); //this decides your fillrate
|
||||
hagstew.Eat(from);
|
||||
|
||||
Timer m_timer = new ShowStew(stew);
|
||||
m_timer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ShowStew : Timer
|
||||
{
|
||||
private AddonComponent stew;
|
||||
|
||||
public ShowStew(AddonComponent ac) : base(TimeSpan.FromSeconds(30))
|
||||
{
|
||||
stew = ac;
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( stew.Visible == false )
|
||||
{
|
||||
Stop();
|
||||
stew.Visible = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HagStew( 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,90 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Engines.Quests.Hag
|
||||
{
|
||||
public class HangoverCure : Item
|
||||
{
|
||||
private int m_Uses;
|
||||
|
||||
public override int LabelNumber{ get{ return 1055060; } } // Grizelda's Extra Strength Hangover Cure
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Uses
|
||||
{
|
||||
get{ return m_Uses; }
|
||||
set{ m_Uses = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HangoverCure() : base( 0xE2B )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x2D;
|
||||
|
||||
m_Uses = 20;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1042038 ); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_Uses > 0 )
|
||||
{
|
||||
from.PlaySound( 0x2D6 );
|
||||
from.SendLocalizedMessage( 501206 ); // An awful taste fills your mouth.
|
||||
|
||||
if ( from.BAC > 0 )
|
||||
{
|
||||
from.BAC = 0;
|
||||
from.SendLocalizedMessage( 501204 ); // You are now sober!
|
||||
}
|
||||
|
||||
m_Uses--;
|
||||
}
|
||||
else
|
||||
{
|
||||
Delete();
|
||||
from.SendLocalizedMessage( 501201 ); // There wasn't enough left to have any effect.
|
||||
}
|
||||
}
|
||||
|
||||
public HangoverCure( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.WriteEncodedInt( m_Uses );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Uses = reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Uses = 20;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
77
Scripts/Engines/Quests/Witch Apprentice/Items/MagicFlute.cs
Normal file
77
Scripts/Engines/Quests/Witch Apprentice/Items/MagicFlute.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Engines.Quests.Hag
|
||||
{
|
||||
public class MagicFlute : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1055051; } } // magic flute
|
||||
|
||||
[Constructable]
|
||||
public MagicFlute() : base( 0x1421 )
|
||||
{
|
||||
Hue = 0x8AB;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 1042292 ); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
from.PlaySound( 0x3D );
|
||||
|
||||
PlayerMobile player = from as PlayerMobile;
|
||||
|
||||
if ( player != null )
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if ( qs is WitchApprenticeQuest )
|
||||
{
|
||||
FindZeefzorpulObjective obj = qs.FindObjective( typeof( FindZeefzorpulObjective ) ) as FindZeefzorpulObjective;
|
||||
|
||||
if ( obj != null && !obj.Completed )
|
||||
{
|
||||
if ( ( player.Map != Map.Trammel && player.Map != Map.Felucca ) || !player.InRange( obj.ImpLocation, 8 ) )
|
||||
{
|
||||
player.SendLocalizedMessage( 1055053 ); // Nothing happens. Zeefzorpul must not be hiding in this area.
|
||||
}
|
||||
else if ( player.InRange( obj.ImpLocation, 4 ) )
|
||||
{
|
||||
Delete();
|
||||
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage( 1055052 ); // The flute sparkles. Zeefzorpul must be in a good hiding place nearby.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MagicFlute( 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.Engines.Quests.Hag
|
||||
{
|
||||
public class MoonfireBrew : Item
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1055065; } } // a bottle of magical moonfire brew
|
||||
|
||||
[Constructable]
|
||||
public MoonfireBrew() : base( 0xF04 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public MoonfireBrew( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue