Full Version : Baseboat
xmlspawner >>XMLSiege Discussion >>Baseboat


<< Prev | Next >>

Hanse of DL- 07-01-2006
I hate to ask what is more then likley a simple question, but in the baseboat.cs, where would you place this code?

CODE

// add a siege attachment with 500 hits, 60% fire resistance, 20% physical resistance
XmlAttach.AttachTo(this, new XmlSiege(500,60,20));

Thank you for assistance

ArteGordon- 07-01-2006
add it to the BaseBoat constructor, like this

CODE

 public BaseBoat() : base( 0x4000 )
 {

  // automatically add an xmlsiege attachment to this object
    XmlAttach.AttachTo(this, new XmlSiege());

  m_DecayTime = DateTime.Now + BoatDecayDelay;

  m_TillerMan = new TillerMan( this );
  m_Hold = new Hold( this );

  m_PPlank = new Plank( this, PlankSide.Port, 0 );
  m_SPlank = new Plank( this, PlankSide.Starboard, 0 );

  m_PPlank.MoveToWorld( new Point3D( X + PortOffset.X, Y + PortOffset.Y, Z ), Map );
  m_SPlank.MoveToWorld( new Point3D( X + StarboardOffset.X, Y + StarboardOffset.Y, Z ), Map );

  Facing = Direction.North;

  m_NextNavPoint = -1;

  Movable = false;

  m_Instances.Add( this );
 }

Hanse of DL- 07-01-2006
Thank you so very much!

ArteGordon- 07-01-2006
I would also take a look at the optional mods if you plan on putting the cannons on boats.

http://xmlspawner.15.forumer.com/index.php?showtopic=374

Hanse of DL- 07-01-2006
yes, I have them on the boat. I am very impressed with this system, to the point where I am seekng others scripts less and less.

penndragon- 07-21-2006
QUOTE (ArteGordon @ July 01, 2006 09:28 pm)
add it to the BaseBoat constructor, like this

CODE

 public BaseBoat() : base( 0x4000 )
 {

  // automatically add an xmlsiege attachment to this object
    XmlAttach.AttachTo(this, new XmlSiege());

  m_DecayTime = DateTime.Now + BoatDecayDelay;

  m_TillerMan = new TillerMan( this );
  m_Hold = new Hold( this );

  m_PPlank = new Plank( this, PlankSide.Port, 0 );
  m_SPlank = new Plank( this, PlankSide.Starboard, 0 );

  m_PPlank.MoveToWorld( new Point3D( X + PortOffset.X, Y + PortOffset.Y, Z ), Map );
  m_SPlank.MoveToWorld( new Point3D( X + StarboardOffset.X, Y + StarboardOffset.Y, Z ), Map );

  Facing = Direction.North;

  m_NextNavPoint = -1;

  Movable = false;

  m_Instances.Add( this );
 }

I added this to my base boat and it works great.... however now all the boat masts are blue..... is there a way to fix this? The houses don't show blue and I am using the same code for them....

ArteGordon- 07-22-2006
the blue coloring is used to temporarily identify objects that have been given the siege attachment.
The boats show it because boat multis use the mast as their handle. Houses have an invisible handle so you dont see it.

If you dont want it to do that, just comment out this line in xmlsiege.cs

QUOTE

  public override void OnAttach()
  {
  base.OnAttach();

  if (AttachedTo is Item)
  {
    StoreOriginalItemID((Item)AttachedTo);
    StoreOriginalHue((Item)AttachedTo);
    // temporarily adjust hue to indicate attachment
    //((Item)AttachedTo).Hue = ShowSiegeColor;
  }
  else
    Delete();
  }

Torquemada- 08-13-2006
Can this also be added to the Deeds?

ArteGordon- 08-13-2006
QUOTE (Torquemada @ August 13, 2006 09:36 pm)
Can this also be added to the Deeds?

if you add the attachment in the boat constructor, you dont need to do anything with the deeds. It will be automatically added to the boat as soon as it is created.

Torquemada- 08-13-2006
i added that line as shown hell just cut and pasted gota error right off the bat

ArteGordon- 08-13-2006
QUOTE (Torquemada @ August 13, 2006 11:26 pm)
i added that line as shown hell just cut and pasted gota error right off the bat

you need to add this to the beginning of the script

CODE

using Server.Engines.XmlSpawner2;

Torquemada- 08-13-2006
aye all current and upto date with Runuo 2.0.0RRC1

Torquemada- 08-13-2006
Ok got it i stole that one from pendragon heheh