Jump to content

CreateItem()


Miloch

Recommended Posts

When run from CRE scripts, do these commands automatically put the item in the first available inventory slot, or what?

 

IIRC, CreateItem() actually puts the item in the Magic Weapon slot!... this caused a lot of problems in early versions of SCS, before I shifted to GiveItemCreate().

Link to comment

I had a note of the funkiness with these somewhere (IESDP forum?) when we were all investigating.

 

Basically, it fills from the bottom up (the magically-created weapon, as DavidW says) for NPCs; when used with PCs, it should fill from the top down (IIRC). TakePartyItem() follows the same rules.

Link to comment

I found this. Basically, I want to have a cre take an item from a party if they have it and put it in the first available inventory slot. So it looks like I want to go with something like:

IF
 PartyHasItem("myitem")
THEN
 RESPONSE #100
TakePartyItem("myitem")
DestroyItem("myitem")
GiveItemCreate("myitem","mycre",0,0,0)
END

It's fine if it's stealable in this particular case. There are other items where I want the CRE to wear it actually, so I'm thinking TakePartyItem("myhelm") and FillSlot(SLOT_HELMET) should be fine for that. Except the IESDP entry for FillSlot() says it "will look for any items... in the inventory, and move the first it comes across..." into the slot. So does it matter if it's not in the inventory but in the magic weapon slot?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...