KILLER SCRIPT! WE LOVE IT!
Question for you, (and maybe this isn't the right place to put it... but I figure since it involves these deeds...)
I'm using The Avalon Script Creator (which is pretty cool) to make a custom monster that will drop these deeds. I've made what I call a 'Weapon Elemental' that will have a chance to drop a weapon enhancement deed. All is great, until it tries to define the loot on the monster. When I try to compile, I get this:
Code:
Errors:
+ Customs/Enhancement Deeds/Deed Guardians/WeaponElemental.cs:
CS0246: Line 56: The type or namespace name 'WeaponEnhancementDeed' could no
t be found (are you missing a using directive or an assembly reference?)
CS1502: Line 56: The best overloaded method match for 'Server.Items.Containe
r.DropItem(Server.Item)' has some invalid arguments
CS1503: Line 56: Argument '1': cannot convert from 'WeaponEnhancementDeed' t
o 'Server.Item'
Now, the deeds are there... because I can use them and add them using the WeaponEnhancementDeed on an [add command. I guess, what I'm trying to figure out is to I need to place these deeds in a different folder, or am I doing something that it doesn't recognize the deed first, before the mobile is loaded? (I checked to make sure it's spelled right.)
Here's my mobile script that was generated:
Code:
/*
* Scripter : Nadious
* Author : Lord Mashadow // Avalon Team
* Generator : Avalon Script Creator
* Created at : 7/31/2007 5:08:11 PM
* Thank you for using this tool, feel free to visit our web site www.avalon.gen.tr
*/
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Mobiles
{
[CorpseName( "Weapon Elemental Corpse" )]
public class WeaponElemental : BaseCreature
{
[Constructable]
public WeaponElemental() : base( AIType.AI_Melee, FightMode.Aggressor, 30, 1, 0.3, 0.5 )
{
this.Name = "Weapon Elemental";
this.Hue = 32;
this.Body = 14;
this.BaseSoundID = 616;
this.SetStr( 300 );
this.SetDex( 150 );
this.SetInt( 160 );
this.SetHits( 160 );
this.SetDamage( 30, 60 );
this.SetDamageType( ResistanceType.Physical, 100 );
this.SetDamageType( ResistanceType.Fire, 10 );
this.SetResistance( ResistanceType.Physical, 50 );
this.SetResistance( ResistanceType.Cold, 30 );
this.SetResistance( ResistanceType.Fire, 30 );
this.SetResistance( ResistanceType.Energy, 30 );
this.SetResistance( ResistanceType.Poison, 30 );
this.Fame = 5000;
this.Karma = 4000;
this.VirtualArmor = 70;
}
public override bool AutoDispel{ get{ return true; } }
public override bool CanRummageCorpses{ get{ return true; } }
public override bool Unprovokable{ get{ return true; } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( 10 < Utility.Random(100))
return;
c.DropItem( new Gold(1000));
c.DropItem( new WeaponEnhancementDeed(1));
c.DropItem( new IronOre(25));
c.DropItem( new SulfurousAsh(10));
}
public override WeaponAbility GetWeaponAbility()
{
switch ( Utility.Random(3 ) )
{
default:
case 0: return WeaponAbility.ConcussionBlow;
case 1: return WeaponAbility.Dismount;
case 2: return WeaponAbility.Dismount;
}
}
public WeaponElemental( 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();
}
}
}
Any ideas? Gotta be something simple.... I'm sure it's something so easy that even I should have been able to fix it.