Full Version : Drop Problem on Monster
xmlspawner >>Scripting Support >>Drop Problem on Monster


<< Prev | Next >>

StarRyder- 05-08-2008
its a monster i maked up from an existing one ingame a champ to a special monster of the month but it just wont drop the rare its suppose can someone look st it i know im damn close tho thx all


[CODE]
using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
[CorpseName("a Mephitis From the Undergrouds corpse")]
public class MephitisMotm : BaseCreature
{
[Constructable]
public MephitisMotm()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 173;
Name = "Mephitis From the Undergrouds";

BaseSoundID = 0x183;

SetStr( 650, 800 );
SetDex( 102, 300 );
SetInt( 402, 600 );

SetHits( 2400, 3000 );
SetStam( 105, 600 );

SetDamage( 21, 33 );

SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Poison, 50 );

SetResistance( ResistanceType.Physical, 75, 80 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 60, 70 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 60, 70 );

SetSkill( SkillName.MagicResist, 70.7, 140.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );

Fame = 10000;
Karma = -10000;
Tamable = false;

VirtualArmor = 80;
}

public override void GenerateLoot()
{
AddLoot(LootPack.UltraRich, 4);

PackGem();
PackGem();
PackPotion();
PackGold(1000, 1825);
PackScroll(2, 8);
PackMagicItems(3, 5, 0.95, 0.95);
PackMagicItems(4, 5, 0.80, 0.65) ;
PackMagicItems(4, 5, 0.80, 0.65);
PackSlayer();

if switch (Utility.Random( 10 )) ///mistake but want like here a 1 out of 10 possible PackItem
///with 6 possiblity drop 6 differnet spider webs that
///are already in Giantweb.cs

if switch (Utility.Random(6))
{
case 0: PackItem(new GiantWeb1()); break;
case 1: PackItem(new GiantWeb2()); break;
case 2: PackItem(new GiantWeb3()); break;
case 3: PackItem(new GiantWeb4()); break;
case 4: PackItem(new GiantWeb5()); break;
case 5: PackItem(new GiantWeb6()); break;
//{



}
}
public override bool HasBreath { get { return true; } } // fire breath enabled
public override int Meat { get { return 5; } }
public override HideType HideType { get { return HideType.Barbed; } }
public override bool AlwaysMurderer { get { return true; } }
public override bool AutoDispel { get { return true; } }
public override double AutoDispelChance { get { return 1.0; } }
public override bool BardImmune { get { return !Core.SE; } }
public override bool Unprovokable { get { return Core.SE; } }
public override bool Uncalmable { get { return Core.SE; } }
//public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override Poison HitPoison{ get{ return Poison.Lethal; } }

public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );

// TODO: Web ability
}

public MephitisMotm(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();
}
}
}[/QUOTE]

i know im close but cant get it any please would be mostly appreciated thannks to all
and i was always here just was very bzy with shard
keep all the great work going smile.gif

Callandor2k- 05-08-2008
CODE

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
   [CorpseName("a Mephitis From the Undergrouds corpse")]
   public class MephitisMotm : BaseCreature
   {
       [Constructable]
       public MephitisMotm()
           : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
       {
           Body = 173;
           Name = "Mephitis From the Undergrouds";

           BaseSoundID = 0x183;

           SetStr(650, 800);
           SetDex(102, 300);
           SetInt(402, 600);

           SetHits(2400, 3000);
           SetStam(105, 600);

           SetDamage(21, 33);

           SetDamageType(ResistanceType.Physical, 50);
           SetDamageType(ResistanceType.Poison, 50);

           SetResistance(ResistanceType.Physical, 75, 80);
           SetResistance(ResistanceType.Fire, 60, 70);
           SetResistance(ResistanceType.Cold, 60, 70);
           SetResistance(ResistanceType.Poison, 100);
           SetResistance(ResistanceType.Energy, 60, 70);

           SetSkill(SkillName.MagicResist, 70.7, 140.0);
           SetSkill(SkillName.Tactics, 97.6, 100.0);
           SetSkill(SkillName.Wrestling, 97.6, 100.0);

           Fame = 10000;
           Karma = -10000;
           Tamable = false;

           VirtualArmor = 80;
       }

       public override void GenerateLoot()
       {
           AddLoot(LootPack.UltraRich, 4);

           PackGem();
           PackGem();
           PackPotion();
           PackGold(1000, 1825);
           PackScroll(2, 8);
           PackMagicItems(3, 5, 0.95, 0.95);
           PackMagicItems(4, 5, 0.80, 0.65);
           PackMagicItems(4, 5, 0.80, 0.65);
           PackSlayer();

           if (Utility.Random(10) == 4) // Has a 1 in 10 chance to drop a web if a 4 is rolled.  Change the 4 to whatever number you want. between 0 and 10.

               switch (Utility.Random(6))
               {
                   case 0: PackItem(new GiantWeb1()); break;
                   case 1: PackItem(new GiantWeb2()); break;
                   case 2: PackItem(new GiantWeb3()); break;
                   case 3: PackItem(new GiantWeb4()); break;
                   case 4: PackItem(new GiantWeb5()); break;
                   case 5: PackItem(new GiantWeb6()); break;
               }
       }
       public override bool HasBreath { get { return true; } } // fire breath enabled
       public override int Meat { get { return 5; } }
       public override HideType HideType { get { return HideType.Barbed; } }
       public override bool AlwaysMurderer { get { return true; } }
       public override bool AutoDispel { get { return true; } }
       public override double AutoDispelChance { get { return 1.0; } }
       public override bool BardImmune { get { return !Core.SE; } }
       public override bool Unprovokable { get { return Core.SE; } }
       public override bool Uncalmable { get { return Core.SE; } }
       //public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
       public override Poison PoisonImmune { get { return Poison.Lethal; } }
       public override Poison HitPoison { get { return Poison.Lethal; } }

       public override void OnGotMeleeAttack(Mobile attacker)
       {
           base.OnGotMeleeAttack(attacker);

           // TODO: Web ability
       }

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


Try that. I cleaned it up a little bit for ya. Should work though.

StarRyder- 05-10-2008
Thanks a Million smile.gif i o yea one smile.gif
Thumbs Up !!

StarRyder- 05-11-2008
ProBlem Still !!! have a problem I Even triend this > PackItem(new GiantWeb1()); <,Still wont drop even that,your solotion was looking good but didnt work ,i tried to add a packitem which it should drop every time didnt even drop that ??im lost here

CODE

using System;
using Server;
using Server.Items;

namespace Server.Mobiles
{
  [CorpseName("a Mephitis From the Undergrouds corpse")]
  public class MephitisMotm : BaseCreature
  {
      [Constructable]
      public MephitisMotm()
          : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
      {
          Body = 173;
          Name = "Mephitis From the Undergrouds";

          BaseSoundID = 0x183;

          SetStr(650, 800);
          SetDex(102, 300);
          SetInt(402, 600);

          SetHits(2400, 3000);
          SetStam(105, 600);

          SetDamage(21, 33);

          SetDamageType(ResistanceType.Physical, 50);
          SetDamageType(ResistanceType.Poison, 50);

          SetResistance(ResistanceType.Physical, 75, 80);
          SetResistance(ResistanceType.Fire, 60, 70);
          SetResistance(ResistanceType.Cold, 60, 70);
          SetResistance(ResistanceType.Poison, 100);
          SetResistance(ResistanceType.Energy, 60, 70);

          SetSkill(SkillName.MagicResist, 70.7, 140.0);
          SetSkill(SkillName.Tactics, 97.6, 100.0);
          SetSkill(SkillName.Wrestling, 97.6, 100.0);

          Fame = 10000;
          Karma = -10000;
          Tamable = false;

          VirtualArmor = 80;
      }

      public override void GenerateLoot()
      {
          AddLoot(LootPack.UltraRich, 4);

          PackGem();
          PackGem();
          PackPotion();
          PackGold(1000, 1825);
          PackScroll(2, 8);
          PackMagicItems(3, 5, 0.95, 0.95);
          PackMagicItems(4, 5, 0.80, 0.65);
          PackMagicItems(4, 5, 0.80, 0.65);
          PackSlayer();
          PackItem(new GiantWeb1()); //even this didnt drop a dam web im lost here ?

          if (Utility.Random(10) == 4) // Has a 1 in 10 chance to drop a web if a 4 is rolled.  Change the 4 to whatever number you want. between 0 and 10.

              switch (Utility.Random(6))
              {
                  case 0: PackItem(new GiantWeb1()); break;
                  case 1: PackItem(new GiantWeb2()); break;
                  case 2: PackItem(new GiantWeb3()); break;
                  case 3: PackItem(new GiantWeb4()); break;
                  case 4: PackItem(new GiantWeb5()); break;
                  case 5: PackItem(new GiantWeb6()); break;
              }
      }
      public override bool HasBreath { get { return true; } } // fire breath enabled
      public override int Meat { get { return 5; } }
      public override HideType HideType { get { return HideType.Barbed; } }
      public override bool AlwaysMurderer { get { return true; } }
      public override bool AutoDispel { get { return true; } }
      public override double AutoDispelChance { get { return 1.0; } }
      public override bool BardImmune { get { return !Core.SE; } }
      public override bool Unprovokable { get { return Core.SE; } }
      public override bool Uncalmable { get { return Core.SE; } }
      //public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
      public override Poison PoisonImmune { get { return Poison.Lethal; } }
      public override Poison HitPoison { get { return Poison.Lethal; } }

      public override void OnGotMeleeAttack(Mobile attacker)
      {
          base.OnGotMeleeAttack(attacker);

          // TODO: Web ability
      }

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