|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 36
Posts: 221
|
Hey,
I am trying to figure out how the heck to put RaelisDragonDust from Xanthos Evo System as loot on Dragon Corpses. But every time I add it, I keep getting the following error: Errors: + Mobiles/Monsters/Reptile/Magic/Dragon.cs: CS0103: Line 54: The name 'RaelisDragonDust' does not exist in the current c ontext Here is my Dragon.cs script that I edited: Code:
using System;
using Server;
using Server.Items;
using Xanthos.Interfaces;
namespace Server.Mobiles
{
[CorpseName( "a dragon corpse" )]
public class Dragon : BaseCreature
{
[Constructable]
public Dragon () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a dragon";
Body = Utility.RandomList( 12, 59 );
BaseSoundID = 362;
SetStr( 796, 825 );
SetDex( 86, 105 );
SetInt( 436, 475 );
SetHits( 478, 495 );
SetDamage( 16, 22 );
SetDamageType( ResistanceType.Physical, 100 );
SetResistance( ResistanceType.Physical, 55, 65 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 25, 35 );
SetResistance( ResistanceType.Energy, 35, 45 );
SetSkill( SkillName.EvalInt, 30.1, 40.0 );
SetSkill( SkillName.Magery, 30.1, 40.0 );
SetSkill( SkillName.MagicResist, 99.1, 100.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 90.1, 92.5 );
Fame = 15000;
Karma = -15000;
VirtualArmor = 60;
Tamable = true;
ControlSlots = 3;
MinTameSkill = 93.9;
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
AddLoot( LootPack.Gems, 8 );
AddLoot( RaelisDragonDust, 25 );
}
public override bool ReacquireOnMovement{ get{ return !Controlled; } }
public override bool HasBreath{ get{ return true; } } // fire breath enabled
public override bool AutoDispel{ get{ return !Controlled; } }
public override int TreasureMapLevel{ get{ return 4; } }
public override int Meat{ get{ return 19; } }
public override int Hides{ get{ return 20; } }
public override HideType HideType{ get{ return HideType.Barbed; } }
public override int Scales{ get{ return 7; } }
public override ScaleType ScaleType{ get{ return ( Body == 12 ? ScaleType.Yellow : ScaleType.Red ); } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override bool CanAngerOnTame { get { return true; } }
public Dragon( 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();
}
}
}
Help would be greatly appreciated. Thanks, Sean Last edited by seanandre; 08-23-2008 at 01:24 PM. Reason: Wrong Error Posted |
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,370
|
Maybe try AddLoot( DragonDust, 25 ); instead? See how it adds on the server. Do you have to type [add RaelisDragonDust or [add DragonDust?
__________________
May you have the strength of eagles' wings, the faith and courage to fly to new heights, and the wisdom of the universe to carry you there. |
|
|
|
|
|
#3 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 36
Posts: 221
|
I tried changing it to AddLoot( DragonDust, 25 ); and got the same error.
Errors: + Mobiles/Monsters/Reptile/Magic/Dragon.cs: CS0103: Line 54: The name 'DragonDust' does not exist in the current context When I add it manually I have to use [add RaelisDragonDust That's the name of it. I tried adding it as a pack item and got 3 errors, what a nightmare LOL! When I was running RunUO 1.0 I didn't have all these problems. I used to have the dragon dust on the dragons with no problems, but everything seems to have changed in 2.0. Sean |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Apr 2006
Posts: 188
|
Need to add the dragon dust as a PackItem, not as loot.
__________________
http://www.crypticrealms.com |
|
|
|
|
|
#5 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 36
Posts: 221
|
Okay, I did this just now in the Constructable method:
PackItem( new RaelisDragonDust( 25 ) ); And I get this error: Errors: + Mobiles/Monsters/Reptile/Magic/Dragon.cs: CS0246: Line 45: The type or namespace name 'RaelisDragonDust' could not be found (are you missing a using directive or an assembly reference?) CS1502: Line 45: The best overloaded method match for 'Server.Mobiles.BaseCr eature.PackItem(Server.Item)' has some invalid arguments CS1503: Line 45: Argument '1': cannot convert from 'RaelisDragonDust' to 'Se rver.Item' Not sure if puting it in the Constructable method is the correct placement, but when I view other monsters on my shard with the PackItem method that's where they always are. Sean Sean |
|
|
|
|
|
#6 (permalink) |
|
Forum Novice
Join Date: Apr 2006
Posts: 188
|
Try:
PackItem( new RaelisDragonDust( ) );
__________________
http://www.crypticrealms.com |
|
|
|
|
|
#7 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 36
Posts: 221
|
Same error.
PackItem( new RaelisDragonDust( ) ); Gives the same error: Errors: + Mobiles/Monsters/Reptile/Magic/Dragon.cs: CS0246: Line 45: The type or namespace name 'RaelisDragonDust' could not be found (are you missing a using directive or an assembly reference?) CS1502: Line 45: The best overloaded method match for 'Server.Mobiles.BaseCr eature.PackItem(Server.Item)' has some invalid arguments CS1503: Line 45: Argument '1': cannot convert from 'RaelisDragonDust' to 'Se rver.Item' |
|
|
|
|
|
#8 (permalink) |
|
Forum Novice
Join Date: Apr 2006
Posts: 188
|
I'm stumped. I have the dust added as a PackItem the same way except I use the Raelis evo system converted to 2.0 by TimeinaBottle and it calls the dragon dust as DragonDust. Not sure what your problem is. Hopefully someone smarter than I will come along. If I think of something I'll let you know.
__________________
http://www.crypticrealms.com |
|
|
|
|
|
#10 (permalink) |
|
Forum Novice
Join Date: May 2005
Age: 36
Posts: 221
|
Here is the RaelisDragonDust script:
Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Xanthos.Evo
{
public class RaelisDragonDust : BaseEvoDust
{
[Constructable]
public RaelisDragonDust() : this( 1 )
{
}
[Constructable]
public RaelisDragonDust( int amount ) : base( amount )
{
Amount = amount;
Name = "Dragon Dust";
Hue = 1153;
}
public RaelisDragonDust( Serial serial ) : base ( serial )
{
}
public override BaseEvoDust NewDust()
{
return new RaelisDragonDust();
}
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();
}
}
}
Sean |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|