Aller au contenu

Photo

Silicone Scout treasure help?


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
 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.

#2
The Amethyst Dragon

The Amethyst Dragon
  • Members
  • 1 882 messages
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.

#3
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
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?

#4
ffbj

ffbj
  • Members
  • 593 messages
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 .


#5
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
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 .


#6
ffbj

ffbj
  • Members
  • 593 messages
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 .


#7
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
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 .