Author Topic: Silicone Scout treasure help?  (Read 349 times)

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Silicone Scout treasure help?
« on: November 18, 2011, 11:39:27 pm »


                I would like help making the monsters drop the items instead of having them drop loot bags or treasure. If anyone is familiar with this system I would appreciate the help.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #1 on: November 19, 2011, 03:23:56 am »


               You'll probably want to modify the monsters' on death script to check their inventory for droppable items (being sure to check equipment slots as well as just inventory), then have the script copy those items to the monster's location (or within a few feet) before destroying the items from it's inventory.

I seem to recall that Silicon Scout's system may have a script in place to do this with placeables (scattering items when placeables are destroyed).  Not sure of the script name or the variable option(s) needed for this, and I'm not sure if it works for creatures (it's not an option I use for my PW).  If I remember correctly, all of the scripts in that package start with "ss_".  It is likely included in the documentation that comes with the system as well.
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #2 on: November 19, 2011, 06:14:47 am »


               From what I have read in the pdf  the ss_toss works only if player opens monster inventory or chest.So maybe the ss_toss can be tweeked?
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #3 on: November 19, 2011, 03:56:42 pm »


               You could just add in a few lines for slotted items:
int nPercentDrop = d100();

object oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
if (nPercentDrop >90)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem), GetLocation(OBJECT_SELF));

object oItem1 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND);
if (nPercentDrop > 88)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem1), GetLocation(OBJECT_SELF));


object oItem2 = GetItemInSlot(INVENTORY_SLOT_CHEST);
if (nPercentDrop >85)
CreateObject(OBJECT_TYPE_ITEM, GetResRef(oItem2), GetLocation(OBJECT_SELF));
Just make sure the items are not marked as droppable, or you may get two drops. Another thing I do is do a loop on some spawns where it marks an item as droppable from the inventory of the npc.

// ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** //
     object oItem = GetFirstItemInInventory(OBJECT_SELF);
    while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
    {
     if (d100()>85)
     {
     SetDroppableFlag(oItem, TRUE);
     }
    oItem = GetNextItemInInventory(OBJECT_SELF);
    }

So sometimes you hit the jackpot though I only put this on npc's with a few items.
               
               

               


                     Modifié par ffbj, 19 novembre 2011 - 04:01 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #4 on: November 19, 2011, 06:16:46 pm »


               Ok so I have the ss_treasure script in the onspawn script nw_c2_default9.

Like this

ExecuteScript('ss_tresure",OBJECT_SELF);

then add this to the nw_c2_defualt9 

object oItem = GetFirstItemInInventory(OBJECT_SELF);
    while (GetIsObjectValid(oItem)&& GetDroppableFlag(oItem)== FALSE)
    {
     if (d100()>85)
     {
     SetDroppableFlag(oItem, TRUE);
     }
    oItem = GetNextItemInInventory(OBJECT_SELF);
    }
               
               

               


                     Modifié par Knight_Shield, 19 novembre 2011 - 06:19 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #5 on: November 19, 2011, 07:23:56 pm »


               Sure I guess though I don't know what the exe does.  Anyway it will loop through the inv of the object_self and if d100 is greater than 85, a 15% chance, any item with no droppable  flag set will drop on the death of object-self.
               
               

               


                     Modifié par ffbj, 19 novembre 2011 - 07:24 .
                     
                  


            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Silicone Scout treasure help?
« Reply #6 on: November 19, 2011, 11:25:21 pm »


               EDIT: Ok found this         http://social.biowar...2/index/5110769  

I put that script in as and Execute at the top of nw_c2_default7
               
               

               


                     Modifié par Knight_Shield, 22 novembre 2011 - 11:41 .