RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Can you make a static follow a mobile?

UOT

Knight
[code:1]m_BalrogflameColumn.Location = new Point3D(Location.X, Location.Y + 1, Location.Z);[/code:1]
Just do the same for the rest.
 
Idea, Balrog, Gothmog

I'll just make like 8 differen't flames! I don't really want it to move around him... that would be cool i guess... lol But meh! I'll just stick with my old idea! Thanks a bunch!
 
Okay...

Okay... here's what i got... for my balrogflamecolumn.cs

[code:1]using System;
using Server.Network;

namespace Server.Items
{
public class BalrogflameColumn : Item
{
public BalrogflameColumn1() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn1( 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 BalrogflameColumn2() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn2( 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 BalrogflameColumn3() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn3( 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 BalrogflameColumn4() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn4( 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 BalrogflameColumn5() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn5( 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 BalrogflameColumn6() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn6( 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 BalrogflameColumn7() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn7( 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 BalrogflameColumn8() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn8( 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();
}
}
}[/code:1]






And here's my Gothmog...





[code:1]// By Azmodan, Thanks to everyone who helped me make this script!
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "Gothmog's corpse" )]
public class Gothmog : BaseCreature
{
private Balrogflame m_Balrogflame;
private BalrogflameColumn1 m_BalrogflameColumn1;
private BalrogflameColumn2 m_BalrogflameColumn2;
private BalrogflameColumn3 m_BalrogflameColumn3;
private BalrogflameColumn4 m_BalrogflameColumn4;
private BalrogflameColumn5 m_BalrogflameColumn5;
private BalrogflameColumn6 m_BalrogflameColumn6;
private BalrogflameColumn7 m_BalrogflameColumn7;
private BalrogflameColumn8 m_BalrogflameColumn8;
[Constructable]
public Gothmog () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Balrogflame = new Balrogflame();
m_BalrogflameColumn1 = new BalrogflameColumn1();
m_BalrogflameColumn2 = new BalrogflameColumn2();
m_BalrogflameColumn3 = new BalrogflameColumn3();
m_BalrogflameColumn4 = new BalrogflameColumn4();
m_BalrogflameColumn5 = new BalrogflameColumn5();
m_BalrogflameColumn6 = new BalrogflameColumn6();
m_BalrogflameColumn7 = new BalrogflameColumn7();
m_BalrogflameColumn8 = new BalrogflameColumn8();
Name = "Gothmog";
Title = "The strongest of the Demon's of Might";
Body = 40;
Hue = 0x485;
BaseSoundID = 357;

SetStr( 2500, 3500 );
SetDex( 350, 400 );
SetInt( 375, 650 );

SetHits( 750, 1000 );

SetDamage( 25, 40 );

SetDamageType( ResistanceType.Physical, 100 );
SetDamageType( ResistanceType.Fire, 100 );

SetResistance( ResistanceType.Physical, 200, 300 );
SetResistance( ResistanceType.Fire, 250, 550 );
SetResistance( ResistanceType.Cold, 0, 0 );
SetResistance( ResistanceType.Poison, 0 );
SetResistance( ResistanceType.Energy, 25, 50 );

SetSkill( SkillName.Anatomy, 50.0, 95.0 );
SetSkill( SkillName.EvalInt, 100.0, 155.0 );
SetSkill( SkillName.Magery, 100.0, 155.0 );
SetSkill( SkillName.Meditation, 25.0, 90.0 );
SetSkill( SkillName.Tactics, 100.0, 150.0 );
SetSkill( SkillName.Wrestling, 100.0, 150.0 );

Fame = 35000;
Karma = -35000;

VirtualArmor = 150;

PackGold( 5000, 10000 );
PackScroll( 15, 25 );
PackArmor( 10, 10 );
PackWeapon( 15, 15 );
PackWeapon( 15, 15 );
PackSlayer();
}

protected override void OnLocationChange( Point3D oldLocation )
{
base.OnLocationChange(oldLocation);
if ( m_BalrogflameColumn1 != null && !m_BalrogflameColumn1.Deleted )
if ( m_Balrogflame != null && !m_Balrogflame.Deleted )
m_BalrogflameColumn1.Location = new Point3D(Location.X - 1, Location.Y + 1, Location.Z); // Top level (left) x-1 y+1
m_BalrogflameColumn2.Location = new Point3D(Location.X, Location.Y + 1, Location.Z); // Top level (Middle) x y+1
m_BalrogflameColumn3.Location = new Point3D(Location.X + 1, Location.Y + 1, Location.Z); // Top level (right) x+1 y+1
m_BalrogflameColumn4.Location = new Point3D(Location.X - 1, Location.Y, Location.Z); // Middle level (left) x-1 y
//There is no middle... It is going to be the explosion graphics in the middle... i might swap them later if it looks bad. (middle) -----
m_BalrogflameColumn5.Location = new Point3D(Location.X + 1, Location.Y, Location.Z); // Middle level (right) x+1 y
m_BalrogflameColumn6.Location = new Point3D(Location.X - 1, Location.Y - 1, Location.Z); // Bottem level (left) x-1 y-1
m_BalrogflameColumn7.Location = new Point3D(Location.X, Location.Y - 1, Location.Z); // Bottem level (Middle) x y-1
m_BalrogflameColumn8.Location = new Point3D(Location.X + 1, Location.Y - 1, Location.Z); // Bottem level (right) x+1 y-1
m_Balrogflame.Location = this.Location;
m_BalrogflameColumn.Map = Map;
m_Balrogflame.Map = Map;
}
public override bool CanRummageCorpses{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override int TreasureMapLevel{ get{ return 5; } }
public override int Meat{ get{ return 50; } }

public Gothmog( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}[/code:1]




Now here's my errors!




[code:1]Scripts: Compiling C# scripts...failed (10 errors, 0 warnings)
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1520: (line 8, column 10) Class
, struct, or interface method must have a return type
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1002: (line 8, column 31) ; exp
ected
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 10, column 12) Inva
lid token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 11, column 9) Inval
id token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 12, column 10) Inva
lid token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 12, column 31) Inva
lid token ';' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 15, column 10) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 19, column 19) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 26, column 19) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1022: (line 33, column 1) Type
or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
[/code:1]
 

Phantom

Knight
<sigh>

Go look up the property syntax to do an if statment.

if ( something = something_else )

isn't correct I can tell you ( its close ).
 
Are you saying the errors are somewhere else?

Wait wait wait wait... Are you saying the error's are on the Mobile? (Gothmog)

:Edit:
Okay... i found and if statement...

[code:1]
if [ condition ]
then
code to run if true
else
code to run if false
fi
[/code:1]

Dosen't really look right though. :\
 
The code?

Well... since i didn't get the if statement I just randomly came up with this!

[code:1]
if ( m_BalrogflameColumn1 != null
else !m_BalrogflameColumn1.Deleted )
if ( m_Balrogflame != null
else !m_Balrogflame.Deleted )[/code:1]

I'm not sure if it needs the brackets... But the error still comes up either way. :\
 

Phantom

Knight
You posted the wrong class for the errors dude...

Post everything in the file that has the errors ( don't ask why just do it ).
 
The code?

I did post the entire file. I will again though.





BalrogflameColumn



[code:1]using System;
using Server.Network;

namespace Server.Items
{
public class BalrogflameColumn : Item
{
public BalrogflameColumn1() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn1( 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 BalrogflameColumn2() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn2( 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 BalrogflameColumn3() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn3( 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 BalrogflameColumn4() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn4( 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 BalrogflameColumn5() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn5( 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 BalrogflameColumn6() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn6( 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 BalrogflameColumn7() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn7( 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 BalrogflameColumn8() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn8( 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();
}
}
}[/code:1]





Gothmog




[code:1]// By Azmodan, Thanks to everyone who helped me make this script!
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName( "Gothmog's corpse" )]
public class Gothmog : BaseCreature
{
private Balrogflame m_Balrogflame;
private BalrogflameColumn1 m_BalrogflameColumn1;
private BalrogflameColumn2 m_BalrogflameColumn2;
private BalrogflameColumn3 m_BalrogflameColumn3;
private BalrogflameColumn4 m_BalrogflameColumn4;
private BalrogflameColumn5 m_BalrogflameColumn5;
private BalrogflameColumn6 m_BalrogflameColumn6;
private BalrogflameColumn7 m_BalrogflameColumn7;
private BalrogflameColumn8 m_BalrogflameColumn8;
[Constructable]
public Gothmog () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Balrogflame = new Balrogflame();
m_BalrogflameColumn1 = new BalrogflameColumn1();
m_BalrogflameColumn2 = new BalrogflameColumn2();
m_BalrogflameColumn3 = new BalrogflameColumn3();
m_BalrogflameColumn4 = new BalrogflameColumn4();
m_BalrogflameColumn5 = new BalrogflameColumn5();
m_BalrogflameColumn6 = new BalrogflameColumn6();
m_BalrogflameColumn7 = new BalrogflameColumn7();
m_BalrogflameColumn8 = new BalrogflameColumn8();
Name = "Gothmog";
Title = "The strongest of the Demon's of Might";
Body = 40;
Hue = 0x485;
BaseSoundID = 357;

SetStr( 2500, 3500 );
SetDex( 350, 400 );
SetInt( 375, 650 );

SetHits( 750, 1000 );

SetDamage( 25, 40 );

SetDamageType( ResistanceType.Physical, 100 );
SetDamageType( ResistanceType.Fire, 100 );

SetResistance( ResistanceType.Physical, 200, 300 );
SetResistance( ResistanceType.Fire, 250, 550 );
SetResistance( ResistanceType.Cold, 0, 0 );
SetResistance( ResistanceType.Poison, 0 );
SetResistance( ResistanceType.Energy, 25, 50 );

SetSkill( SkillName.Anatomy, 50.0, 95.0 );
SetSkill( SkillName.EvalInt, 100.0, 155.0 );
SetSkill( SkillName.Magery, 100.0, 155.0 );
SetSkill( SkillName.Meditation, 25.0, 90.0 );
SetSkill( SkillName.Tactics, 100.0, 150.0 );
SetSkill( SkillName.Wrestling, 100.0, 150.0 );

Fame = 35000;
Karma = -35000;

VirtualArmor = 150;

PackGold( 5000, 10000 );
PackScroll( 15, 25 );
PackArmor( 10, 10 );
PackWeapon( 15, 15 );
PackWeapon( 15, 15 );
PackSlayer();
}

protected override void OnLocationChange( Point3D oldLocation )
{
base.OnLocationChange(oldLocation);
if ( m_BalrogflameColumn1 != null
else !m_BalrogflameColumn1.Deleted )
if ( m_Balrogflame != null
else !m_Balrogflame.Deleted )
m_BalrogflameColumn1.Location = new Point3D(Location.X - 1, Location.Y + 1, Location.Z); // Top level (left) x-1 y+1
m_BalrogflameColumn2.Location = new Point3D(Location.X, Location.Y + 1, Location.Z); // Top level (Middle) x y+1
m_BalrogflameColumn3.Location = new Point3D(Location.X + 1, Location.Y + 1, Location.Z); // Top level (right) x+1 y+1
m_BalrogflameColumn4.Location = new Point3D(Location.X - 1, Location.Y, Location.Z); // Middle level (left) x-1 y
//There is no middle... It is going to be the explosion graphics in the middle... i might swap them later if it looks bad. (middle) -----
m_BalrogflameColumn5.Location = new Point3D(Location.X + 1, Location.Y, Location.Z); // Middle level (right) x+1 y
m_BalrogflameColumn6.Location = new Point3D(Location.X - 1, Location.Y - 1, Location.Z); // Bottem level (left) x-1 y-1
m_BalrogflameColumn7.Location = new Point3D(Location.X, Location.Y - 1, Location.Z); // Bottem level (Middle) x y-1
m_BalrogflameColumn8.Location = new Point3D(Location.X + 1, Location.Y - 1, Location.Z); // Bottem level (right) x+1 y-1
m_Balrogflame.Location = this.Location;
m_BalrogflameColumn.Map = Map;
m_Balrogflame.Map = Map;
}
public override bool CanRummageCorpses{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override int TreasureMapLevel{ get{ return 5; } }
public override int Meat{ get{ return 50; } }

public Gothmog( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}[/code:1]





Balrogflame




[code:1]using System;
using Server.Network;

namespace Server.Items
{

public class Balrogflame : Item
{
[Constructable]
public Balrogflame() : base( 0x36BD )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}
public Balrogflame( 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();
}
}
}[/code:1]







The errors (The hole error thingy)





[code:1]Scripts: Compiling C# scripts...failed (10 errors, 0 warnings)
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1520: (line 8, column 10) Class
, struct, or interface method must have a return type
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1002: (line 8, column 31) ; exp
ected
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 10, column 12) Inva
lid token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 11, column 9) Inval
id token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 12, column 10) Inva
lid token '=' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1519: (line 12, column 31) Inva
lid token ';' in class, struct, or interface member declaration
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 15, column 10) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 19, column 19) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1518: (line 26, column 19) Expe
cted class, delegate, enum, interface, or struct
- Error: Scripts\Custom\BalrogflameColumn.cs: CS1022: (line 33, column 1) Type
or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
[/code:1]





There ya go! And Thanks for the help :D
 

Phantom

Knight
All of these:
public BalrogflameColumn3() : base( 0x3709 )
{
Movable = false;
Name = "Balrog's Flame";
Light = LightType.Circle300;
}

public BalrogflameColumn3( 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();
}
}

Are not classes they are not even legal...

Fix them.
 
My portable mounts : Intro

Awsome! It works... but my stupid 'Portable mounts' don't! :\ Not my lucky day!

The Portablemount.cs (Their just ethy's but don't go to the ethy hue... Pretty cool! lol)

[code:1]using System;
using Server.Mobiles;
using Server.Items;
using Server.Spells;

namespace Server.Mobiles
{
public class PortableMounts : Item, IMount, IMountItem
{
private int m_MountedID;
private int m_RegularID;
private Mobile m_Rider;

[Constructable]
public PortableMounts( int itemID, int mountID ) : base( itemID )
{
m_MountedID = mountID;
m_RegularID = itemID;
m_Rider = null;

Layer = Layer.Invalid;

LootType = LootType.Blessed;
}

[CommandProperty( AccessLevel.GameMaster )]
public int MountedID
{
get
{
return m_MountedID;
}
set
{
if ( m_MountedID != value )
{
m_MountedID = value;

if ( m_Rider != null )
ItemID = value;
}
}
}

[CommandProperty( AccessLevel.GameMaster )]
public int RegularID
{
get
{
return m_RegularID;
}
set
{
if ( m_RegularID != value )
{
m_RegularID = value;

if ( m_Rider == null )
ItemID = value;
}
}
}

public PortableMounts( Serial serial ) : base( serial )
{
}

public override bool DisplayLootType{ get{ return false; } }

public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
else if ( !from.CanBeginAction( typeof( BaseMount ) ) )
from.SendLocalizedMessage( 1040024 ); // You are still too dazed from being knocked off your mount to ride!
else if ( from.Mounted )
from.SendLocalizedMessage( 1005583 ); // Please dismount first.
else if ( from.IsBodyMod && !from.Body.IsHuman )
from.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
else if ( Multis.DesignContext.Check( from ) )
new EtherealSpell( this, from ).Cast();
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );

writer.Write( (int) 0 ); // version
writer.Write( (int)m_MountedID );
writer.Write( (int)m_RegularID );
writer.Write( m_Rider );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
LootType = LootType.Blessed;

int version = reader.ReadInt();

switch ( version )
{
case 1: reader.ReadInt(); goto case 0;
case 0:
{
m_MountedID = reader.ReadInt();
m_RegularID = reader.ReadInt();
m_Rider = reader.ReadMobile();

if ( m_MountedID == 0x3EA2 )
m_MountedID = 0x3EAA;

break;
}
}
}

public override DeathMoveResult OnParentDeath( Mobile parent )
{
Rider = null;//get off, move to pack

return DeathMoveResult.RemainEquiped;
}

public static void Dismount( Mobile m )
{
IMount mount = m.Mount;

if ( mount != null )
mount.Rider = null;
}

[CommandProperty( AccessLevel.GameMaster )]
public Mobile Rider
{
get
{
return m_Rider;
}
set
{
if ( value != m_Rider )
{
if ( value == null )
{
Internalize();
UnmountMe();

m_Rider = value;
}
else
{
if ( m_Rider != null )
Dismount( m_Rider );

Dismount( value );

m_Rider = value;

MountMe();
}
}
}
}

public void UnmountMe()
{
Container bp = m_Rider.Backpack;

ItemID = m_RegularID;
Layer = Layer.Invalid;
Movable = true;

if ( bp != null )
{
bp.DropItem( this );
}
else
{
Point3D loc = m_Rider.Location;
Map map = m_Rider.Map;

if ( map == null || map == Map.Internal )
{
loc = m_Rider.LogoutLocation;
map = m_Rider.LogoutMap;
}

MoveToWorld( loc, map );
}
}

public void MountMe()
{
ItemID = m_MountedID;
Layer = Layer.Mount;
Movable = false;

ProcessDelta();
m_Rider.ProcessDelta();
m_Rider.EquipItem( this );
m_Rider.ProcessDelta();
ProcessDelta();
}

public IMount Mount
{
get
{
return this;
}
}

private class EtherealSpell : Spell
{
private static SpellInfo m_Info = new SpellInfo( "Ethereal Mount", "", SpellCircle.Second, 230 );

private EtherealMount m_Mount;
private Mobile m_Rider;

public EtherealSpell( EtherealMount mount, Mobile rider ) : base( rider, null, m_Info )
{
m_Rider = rider;
m_Mount = mount;
}

public override bool ClearHandsOnCast{ get{ return false; } }
public override bool RevealOnCast{ get{ return false; } }

public override TimeSpan GetCastRecovery()
{
return TimeSpan.Zero;
}

public override TimeSpan GetCastDelay()
{
return TimeSpan.FromSeconds( 5.0 );
}

public override int GetMana()
{
return 0;
}

public override bool ConsumeReagents()
{
return true;
}

public override bool CheckFizzle()
{
return true;
}

public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
{
if ( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
return false;

return true;
}

public override void OnDisturb( DisturbType type, bool message )
{
if ( message )
Caster.SendLocalizedMessage( 1049455 ); // You have been disrupted while attempting to summon your ethereal mount!

//m_Mount.UnmountMe();
}

public override void OnCast()
{
if ( !m_Mount.Deleted && m_Mount.Rider == null && m_Mount.IsChildOf( m_Rider.Backpack ) )
m_Mount.Rider = m_Rider;

FinishSequence();
}
}
}

public class PortableHorse : PortableMounts
{
public override int LabelNumber{ get{ return 1041298; } } // Ethereal Horse Statuette

[Constructable]
public PortableHorse() : base( 0x20DD, 0x3EAA )
{
}

public PortableHorse( 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();

if ( Name == "a Portable horse" )
Name = null;

if ( ItemID == 0x2124 )
ItemID = 0x20DD;
}
}

public class PortableLlama : PortableMounts
{
public override int LabelNumber{ get{ return 1041300; } } // Portable Llama Statuette

[Constructable]
public PortableLlama() : base( 0x20F6, 0x3EAB )
{
}

public PortableLlama( 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();

if ( Name == "a Portable llama" )
Name = null;
}
}

public class PortableOstard : PortableMounts
{
public override int LabelNumber{ get{ return 1041299; } } // Portable Ostard Statuette

[Constructable]
public PortableOstard() : base( 0x2135, 0x3EAC )
{
}

public PortableOstard( 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();

if ( Name == "a Portable ostard" )
Name = null;
}
}

public class PortableRidgeback : PortableMounts
{
public override int LabelNumber{ get{ return 1049747; } } // Portable Ridgeback Statuette

[Constructable]
public PortableRidgeback() : base( 0x2615, 0x3E9A )
{
}

public PortableRidgeback( 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();

if ( Name == "a Portable ridgeback" )
Name = null;
}
}

public class PortableUnicorn : PortableMounts
{
public override int LabelNumber{ get{ return 1049745; } } // Portable Unicorn Statuette

[Constructable]
public PortableUnicorn() : base( 0x25CE, 0x3E9B )
{
}

public PortableUnicorn( 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();

if ( Name == "a Portable unicorn" )
Name = null;
}
}

public class PortableBeetle : PortableMounts
{
public override int LabelNumber{ get{ return 1049748; } } // Portable Beetle Statuette

[Constructable]
public PortableBeetle() : base( 0x260F, 0x3E97 )
{
}

public PortableBeetle( 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();

if ( Name == "a Portable beetle" )
Name = null;
}
}

public class PortableKirin : PortableMounts
{
public override int LabelNumber{ get{ return 1049746; } } // Portable Ki-Rin Statuette

[Constructable]
public PortableKirin() : base( 0x25A0, 0x3E9C )
{
}

public PortableKirin( 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();

if ( Name == "a Portable kirin" )
Name = null;
}
}

public class PortableSwampDragon : PortableMounts
{
public override int LabelNumber{ get{ return 1049749; } } // Portable Swamp Dragon Statuette

[Constructable]
public PortableSwampDragon() : base( 0x2619, 0x3E98 )
{
Name = "a Portable swamp dragon";
}

public PortableSwampDragon( 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();

if ( Name == "a Portable swamp dragon" )
Name = null;
}
}
}[/code:1]






And here's my error (It has alot of warnings from my old script... Hmm...)



[code:1]Scripts: Compiling C# scripts...failed (2 errors, 30 warnings)
- Warning: Scripts\Custom\MetalMaking\ProspectorsTool.cs: CS0162: (line 137, co
lumn 5) Unreachable code detected
- Warning: Scripts\Custom\SlayersQuest\SlayerQuestGump.cs: CS0219: (line 26, co
lumn 39) The variable 'initialState' is assigned but its value is never used
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 77, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 78, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 79, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 80, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 81, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 82, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 83, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 84, column 71) Possib
le mistaken null statement
- Warning: Scripts\Custom\BalrogOfMoria.cs: CS0642: (line 85, column 57) Possib
le mistaken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 78, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 79, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 80, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 81, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 82, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 83, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 84, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 85, column 71) Possible mis
taken null statement
- Warning: Scripts\Custom\Gothmog.cs: CS0642: (line 86, column 57) Possible mis
taken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 77, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 78, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 79, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 80, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 81, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 82, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 83, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 84, column 71) Possible
mistaken null statement
- Warning: Scripts\Custom\Lungorthin.cs: CS0642: (line 85, column 57) Possible
mistaken null statement
- Error: Scripts\Custom\PortableMounts.cs: CS1502: (line 81, column 5) The best
overloaded method match for 'Server.Mobiles.PortableMounts.EtherealSpell.Ethere
alSpell(Server.Mobiles.EtherealMount, Server.Mobile)' has some invalid arguments

- Error: Scripts\Custom\PortableMounts.cs: CS1503: (line 81, column 24) Argumen
t '1': cannot convert from 'Server.Mobiles.PortableMounts' to 'Server.Mobiles.Et
herealMount'
- Warning: Scripts\Custom\TravelTile.cs: CS0219: (line 128, column 10) The vari
able 'initialState' is assigned but its value is never used
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
[/code:1]
 
did you just switch to a whole new script?! i was waiting to see your garthmlog thing. the last working version i downloaded was way cool (though the flames did stay after death.) is that the last working version ? is this concluded?

its a very cool idea you have. you should post it in in submisions no?
 
New guy

Ya... true. I guess i should! There's 3 of them... Gothmog, Lungorthin, and BalrogOfMoria... I don't know how to make the flames go away after death. That would also rock! lol... Well i'll put them into the script submissions! Type in "Balrog" and you should find it! Thanks for the help everyone!!!!!!!!!!!
 

UOT

Knight
Re: New guy

IHaveRegistered said:
I don't know how to make the flames go away after death. That would also rock! lol...

[code:1]public override void OnDeath( container c )
{
m_Balrogflame.Delete();
m_BalrogflameColumn1.Delete();
.....
etc.
base.OnDeath(c);
}[/code:1] ;)
 
Top