using System;
using System.Collections.Generic;
using Server;
using Server.Network;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
namespace Server.Engines.InstancedPeerless
{
public class PeerlessKeyBrazier : AddonComponent
{
public override int LabelNumber { get { return 1024622; } } // altar
private PeerlessPlatform m_Platform;
private Item m_Key;
[CommandProperty( AccessLevel.GameMaster )]
public PeerlessPlatform Platform { get { return m_Platform; } }
[CommandProperty( AccessLevel.GameMaster )]
public Item Key { get { return m_Key; } set { m_Key = value; } }
public PeerlessKeyBrazier( PeerlessPlatform platform )
: base( 0x19BB )
{
Hue = 0x15F;
Light = LightType.Circle300;
m_Platform = platform;
}
public PeerlessKeyBrazier( Serial serial )
: base( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
if ( from.Map != Map || !from.InRange( Location, 2 ) )
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
}
else if ( m_Platform.Summoner != null && m_Platform.Summoner != from )
{
SendLocalizedMessageTo( from, 502221 ); // Someone else is already using this item.
}
else if ( m_Key != null && !m_Key.Deleted )
{
SendLocalizedMessageTo( from, 1112701 ); // I've already accepted your offering.
}
else
{
from.SendMessage("你想要犧牲什麼呢?");
from.BeginTarget( 10, false, TargetFlags.None, new TargetCallback( Sacrifice_Callback ) );
}
}
public void Sacrifice_Callback( Mobile from, object state )
{
Item targeted = state as Item;
if ( targeted == null || targeted.Deleted )
return;
if ( from.Map != Map || !from.InRange( Location, 2 ) )
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
}
else if ( m_Key != null && !m_Key.Deleted )
{
SendLocalizedMessageTo( from, 502221 ); // Someone else is already using this item.
}
else if ( !targeted.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1049486 ); // You can only sacrifice items that are in your backpack!
}
else if ( targeted.GetType() != m_Platform.KeyType )
{
from.SendMessage("我不希望這樣!");
Effects.SendBoltEffect( from );
}
else
{
targeted.Movable = false;
targeted.MoveToWorld( new Point3D( X, Y, Z + 1 ), Map );
Effects.SendLocationEffect( targeted.Location, targeted.Map, 0x3728, 10 );
Effects.PlaySound( targeted.Location, targeted.Map, 0x29 );
m_Key = targeted;
m_Platform.Summoner = from;
m_Platform.Validate();
}
}
public override void OnAfterDelete()
{
if ( m_Key != null )
m_Key.Delete();
base.OnAfterDelete();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( m_Platform );
writer.Write( m_Key );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Platform = reader.ReadItem() as PeerlessPlatform;
m_Key = reader.ReadItem();
if ( m_Platform == null )
Delete();
if ( m_Key != null )
{
m_Key.Delete();
m_Key = null;
}
break;
}
}
}
}
}
using System;
namespace Server.Items
{
public class DraconicOrbKey : PeerlessKey
{
[Constructable]
public DraconicOrbKey()
: base(0x573F)
{
this.Weight = 1;
this.Hue = 0x35; // TODO check
}
public DraconicOrbKey(Serial serial)
: base(serial)
{
}
public override int Lifespan
{
get
{
return 21600;
}
}
public override int LabelNumber
{
get
{
return 1113515;
}
}// Draconic Orb
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 class DraconicOrbKeyRed : PeerlessKey
{
[Constructable]
public DraconicOrbKeyRed()
: base(0x573F)
{
this.Weight = 1;
this.Hue = 33; // TODO check
}
public DraconicOrbKeyRed(Serial serial)
: base(serial)
{
}
public override int Lifespan
{
get
{
return 21600;
}
}
public override int LabelNumber
{
get
{
return 1113515;
}
}// Draconic Orb
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 class DraconicOrbKeyOrange : PeerlessKey
{
[Constructable]
public DraconicOrbKeyOrange()
: base(0x573F)
{
this.Weight = 1;
this.Hue = 1260; // TODO check
}
public DraconicOrbKeyOrange(Serial serial)
: base(serial)
{
}
public override int Lifespan
{
get
{
return 21600;
}
}
public override int LabelNumber
{
get
{
return 1113515;
}
}// Draconic Orb
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 class DraconicOrbKeyBlue : PeerlessKey
{
[Constructable]
public DraconicOrbKeyBlue()
: base(0x573F)
{
this.Weight = 1;
this.Hue = 5; // TODO check
}
public DraconicOrbKeyBlue(Serial serial)
: base(serial)
{
}
public override int Lifespan
{
get
{
return 21600;
}
}
public override int LabelNumber
{
get
{
return 1113515;
}
}// Draconic Orb
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();
}
}
}
using System;
namespace Server.Items
{
public class RareSerpentEgg1 : PeerlessKey
{
[Constructable]
public RareSerpentEgg1()
: base(0x41BF)
{
this.Weight = 1.0;
this.Hue = 2207;// comes in either white, blue, yellow, or red
}
public RareSerpentEgg1(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1112575;
}
}// a rare serpent egg
public override int Lifespan
{
get
{
return 43200;
}
}
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 class RareSerpentEgg2 : PeerlessKey
{
[Constructable]
public RareSerpentEgg2()
: base(0x41BF)
{
this.Weight = 1.0;
this.Hue = 1641;
}
public RareSerpentEgg2(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1112575;
}
}// a rare serpent egg
public override int Lifespan
{
get
{
return 43200;
}
}
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 class RareSerpentEgg3 : PeerlessKey
{
[Constructable]
public RareSerpentEgg3()
: base(0x41BF)
{
this.Weight = 1.0;
this.Hue = 0;// plain hued one
}
public RareSerpentEgg3(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1112575;
}
}// a rare serpent egg
public override int Lifespan
{
get
{
return 43200;
}
}
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 class RareSerpentEgg4 : PeerlessKey
{
[Constructable]
public RareSerpentEgg4()
: base(0x41BF)
{
this.Weight = 1.0;
this.Hue = 2121;
}
public RareSerpentEgg4(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1112575;
}
}// a rare serpent egg
public override int Lifespan
{
get
{
return 43200;
}
}
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();
}
}
}
Like this
Well, my code format has changed.
Can you give me as much detail explaining and help? My server has only two altars are not currently fully functional.
Thank you very much friends with administrator.
If you modify the DragonBall name: DraconicOrb also works, but the long wisdom Monster names are: DraconicOrbKey,DraconicOrbKeyRed, DraconicOrbKeyOrange,DraconicOrbKeyBlue, these names are not in use, it is also SERVUO the original script, Monster files is AccurateSpawn.xml
st code then use the code tags
Decoration: CreateWorld.cs
Monsters: xmlloda AccurateSpawn.xml (SERVUO downloads)
You mean the new system only using the DraconicOrb
Do not apply DraconicOrbRED Dragon Ball?
Is that because I'm using AccurateSpawn.xml (SERVUO downloads) caused by?
OK, I'll testI do not know if accuratespawns.xml contains the mini champs. You should use the spawns that are included with the repo.
Run these commands.
[xmlunload AccurateSpawn.xml
[xmlload spawns
You should then have the latest spawns which includes the mini champs.
Yes, only use DraconicOrb
Hello administrator, can know, the Forum is the latest and most comprehensive set of brushes on files provided use is to blame? If I can provide an accurate address, my English is not very good.OK, I'll test
[xmlunload AccurateSpawn.xml
[xmlload spawns
You mean the new system only using the DraconicOrb
Do not apply DraconicOrbRED Dragon Ball?
Is that because I'm using AccurateSpawn.xml (SERVUO downloads) caused by?
Hello administrator, can know, the Forum is the latest and most comprehensive set of brushes on files provided use is to blame? If I can provide an accurate address, my English is not very good.
OK, I got it.I am sorry, I do not understand. Do you mean the latest files? They can always be found at the repo https://github.com/ServUO/ServUO
[xmlunload will remove any spawns that are found in your game world that are listed in the xml file you are supplying.
[xmlload will do the opposite, it adds all the spawns in the files that are supplied, in this case in the spawns folder in the root of your servuo server folder.
You are correct the first way.
Yes, in the root directory.The correct way is number 1.
You have to make sure accuratespawn.xml is in the root of your servuo folder.
Yes, in the root directory.
If the establishment of a new world, you must use method 1?
Right, I get it, thank you!If you are creating a new world and you have not used accuratespawn.xml then you only need to use the command [xmlload spawns
Right, I get it, thank you!
[Xmlloda spawnsOld
SpawnsOld binder is under Refresh something?
Access to snake egg snake hole in the is not it?spawnsOld are old spawns and are not recommended to be used. They are just there for people who may want to use them and will be removed from the repo in the future. The spawns folder contains the latest spawns and are the most accurate.
Abyss, the altar, no snakes were found holes in SerpentNest.spawnsOld are old spawns and are not recommended to be used. They are just there for people who may want to use them and will be removed from the repo in the future. The spawns folder contains the latest spawns and are the most accurate.
Administrator, Medusa's copy, just use RareSerpentEgg, not RareSerpentEgg1.RareSerpentEgg2.RareSerpentEgg3RareSerpentEgg4?spawnsOld are old spawns and are not recommended to be used. They are just there for people who may want to use them and will be removed from the repo in the future. The spawns folder contains the latest spawns and are the most accurate.
We use essential cookies to make this site work, and optional cookies to enhance your experience.