I found a script pack with lots of dye tubs and a deed/gump to select the tub you want. I edited the gump script to make a script for a slayer deed selection gump.

Both scripts work... You can create the deeds [add AllDyeTubsDeed You can add the items to the token vendor stone for purchase. You cannot add the item directly to a critters loot. PackItem(new SuperSlayerDeeds());

Since I can add it the token vendor stone there is not really a problem - except I am trying to wrap my head around the code. I want to know *why* these items won't add directly to a critter's loot. I have added other items with no problem. Both deeds are 'namespace Server.Items' The critter has 'using Server.Items;' in it. I am probably overlooking something very obvious...

Ok, with further testing I found you cannot add the barkeep deed or holiday tree deed as loot either. But you can add the dragon barding deed? Seems odd....

To quote one of the Filipino sailors on my old ship: "Teach me - I want to learn!" :)
 

Attachments

  • Deed - All Dye Tubs.cs
    13.6 KB · Views: 3
  • Super Slayer Deeds.cs
    4.9 KB · Views: 1
This may be an overly obvious question but, what happens when you add the deed using PackItem? Does it not compile with an error, or does it just fail to drop to the pack?
 
It complies fine - just does not drop.

I did not notice that they were blessed and the dragon barding deed is not.

I tried adding it straight to the pack, and tried the OnBeforeDeath and neither one worked. Here is the 2 ways I tried the OnBeforeDeath. I keep getting dragon barding deeds... nothing else. (I did them one test at a time, not both at once)
Code:
  #region loot test
  public override bool OnBeforeDeath()
  {
  switch (Utility.Random(6))
  {
  case 0: PackItem(new SuperSlayerDeeds()); break;
  case 1: PackItem(new LesserSlayerDeed()); break;
  case 2: PackItem(new SlayerRemovalDeed()); break;
  case 3: PackItem(new MinorArtifactDeed()); break;
  case 4: PackItem(new HolidayTreeDeed()); break;
  case 5: PackItem(new DragonBardingDeed());break;
  }
   
  return base.OnBeforeDeath();
  }

  #endregion
     
     
     
     
     
      #region loot test
  public override bool OnBeforeDeath()
  {
  PackItem(new SuperSlayerDeeds());
  PackItem(new LesserSlayerDeed());
  PackItem(new SlayerRemovalDeed());
  PackItem(new MinorArtifactDeed()); 
  PackItem(new HolidayTreeDeed());
  PackItem(new DragonBardingDeed());

  return base.OnBeforeDeath();
  }

  #endregion
 
Try this..
Code:
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

  switch (Utility.Random(6))
  {
          case 0: PackItem(new SuperSlayerDeeds()); break;
          case 1: PackItem(new LesserSlayerDeed()); break;
          case 2: PackItem(new SlayerRemovalDeed()); break;
          case 3: PackItem(new MinorArtifactDeed()); break;
          case 4: PackItem(new HolidayTreeDeed()); break;
          case 5: PackItem(new DragonBardingDeed());break;

            }
        }
 
I just killed about 30 Fan Dancers, and there was no extra drop at all. Not even the dragon barding deed. After I tried that I took out the utility random and tried again. It should have dropped everything on every kill and it dropped nothing on another 30 kills... hmm...

Code:
#region Loot Test
  public override void OnDeath(Container c)
  {
  base.OnDeath(c);
  
  PackItem(new SuperSlayerDeeds());
  PackItem(new LesserSlayerDeed());
  PackItem(new SlayerRemovalDeed());
  PackItem(new MinorArtifactDeed());
  PackItem(new HolidayTreeDeed());
  PackItem(new DragonBardingDeed());
  }

#endregion

~Edit~
I switched it to this and get the dragon barding some... but not the other stuff. So it works... for the unblessed deed.
Code:
  public override bool OnBeforeDeath()
  {
  switch (Utility.Random(4))
  {
  case 0: PackItem(new SuperSlayerDeeds()); break;
  case 1: PackItem(new LesserSlayerDeed()); break;
  case 2: PackItem(new DragonBardingDeed()); break;
  case 3: PackItem(new DragonBardingDeed()); break;
  }

  return base.OnBeforeDeath();
  }

  #endregion
 
Last edited:
Sorry, for OnDeath (Container c) its c.DropItem, not PackItem

Code:
public override void OnDeath (Container c) // (random chance)

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);
            if (0.50 > Utility.RandomDouble()) // 50% chance to drop
            {      
                c.DropItem(new YourItemHere());        
            }
        }
----------------------------------------
public override void OnDeath (Container c) // (drops everytime)

        public override void OnDeath(Container c)
        {
            base.OnDeath(c);
            {        
                c.DropItem(new YourItemHere());         
            }

        }
 
Hey cool! It works. So you have to do that with blessed items, it seems? I am still trying to figure it all out :)

~Edit~
I tried adding in the switch utility and it works too. Now to play with settings. Maybe 0.1 instead of 0.5 We will play around with it and see. Thanks a lot for your help.

Code:
  #region loot test
  public override void OnDeath(Container c) // (random chance)

  {
  base.OnDeath(c);
  if (0.50 > Utility.RandomDouble()) // 50% chance to drop
  switch (Utility.Random(4))
  {
  case 0: c.DropItem(new SuperSlayerDeeds()); break;
  case 1: c.DropItem(new LesserSlayerDeed()); break;
  case 2: c.DropItem(new SlayerRemovalDeed()); break;
  case 3: c.DropItem(new MinorArtifactDeed()); break;
  }
  }
  #endregion
 
Last edited:
Yup. Blessed items dont drop without "special" help. Just like a players blessed items go into their pack when they die.
 
It was driving me crazy (crazier?) I was looking at the scripts trying to figure out why it worked on some items and not others. I just did not see the 'blessed' because I was not looking for it. I did not realize that was an issue :)

we need to learn something every day...and it is my bedtime - I almost did not learn anything today ha ha :p
 
Back