Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 08-23-2008, 01:18 PM   #1 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default How Do You Put Evo Dragon Dust As Loot On Dragon Corpses?

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();
		}
	}
}
The part that I edited is in RED.

Help would be greatly appreciated.

Thanks,
Sean

Last edited by seanandre; 08-23-2008 at 01:24 PM. Reason: Wrong Error Posted
seanandre is offline   Reply With Quote
Old 08-23-2008, 01:26 PM   #2 (permalink)
Forum Expert
 
Hammerhand's Avatar
 
Join Date: Jan 2006
Location: Look behind you....
Age: 44
Posts: 1,370
Default

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.
Hammerhand is offline   Reply With Quote
Old 08-23-2008, 02:17 PM   #3 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default

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
seanandre is offline   Reply With Quote
Old 08-23-2008, 02:48 PM   #4 (permalink)
Forum Novice
 
Join Date: Apr 2006
Posts: 188
Default

Need to add the dragon dust as a PackItem, not as loot.
__________________
http://www.crypticrealms.com
homergz is offline   Reply With Quote
Old 08-23-2008, 03:19 PM   #5 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default

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
seanandre is offline   Reply With Quote
Old 08-23-2008, 03:21 PM   #6 (permalink)
Forum Novice
 
Join Date: Apr 2006
Posts: 188
Default

Try:

PackItem( new RaelisDragonDust( ) );
__________________
http://www.crypticrealms.com
homergz is offline   Reply With Quote
Old 08-23-2008, 03:31 PM   #7 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default

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'
seanandre is offline   Reply With Quote
Old 08-23-2008, 03:43 PM   #8 (permalink)
Forum Novice
 
Join Date: Apr 2006
Posts: 188
Default

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
homergz is offline   Reply With Quote
Old 08-23-2008, 03:52 PM   #9 (permalink)
Forum Novice
 
Join Date: Dec 2005
Posts: 608
Default

post the realisdust script please
__________________
Add your scripts!
Script Library for custom RunUO scripts >> sunny-productions.eu
b0b01 is offline   Reply With Quote
Old 08-23-2008, 04:07 PM   #10 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default

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();
		}
	}
}
Thanks for trying guys, I really appreciate it.

Sean
seanandre is offline   Reply With Quote
Old 08-23-2008, 04:16 PM   #11 (permalink)
Newbie
 
Sixkillers's Avatar
 
Join Date: May 2006
Location: Czech Republic
Posts: 78
Default

You shloud add
Code:
 using Xanthos.Evo;
to the Dragon.cs.
Sixkillers is offline   Reply With Quote
Old 08-23-2008, 04:39 PM   #12 (permalink)
Forum Novice
 
Join Date: May 2005
Age: 36
Posts: 221
Default

AWESOME!

Gee why didn't I think of that LOL! It WORKS!

Thanks everyone!

Sean
seanandre is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5