Jump to content

Absorb Items Spell script?


Millinescence

Recommended Posts

Hello~ I'm new to the forums and a novice at modding. I just got the Oblivion Construction Set and I'm trying to make my own spell called Absorb Items. What it does is simple, it's supposed to remove all items from a target and put them in your inventory, that or have them all be dropped onto the ground for the player to pick up. There's a function called "removeallitems" but that just takes all their items and permanently removes them from the character.
Link to comment
Share on other sites

In theory, what you could try is something the CS Wiki suggests: RemoveAllItems TargetContainerID

 

What that means is, all the items are put into a container, rather than simply destroyed. You'd have to also create a permanent container for the items to be put into-- I'm afraid I've got no idea how you'd put them straight into your inventory-- and you'd need to work out how to specify that a specific NPC's items are the ones you want (GetSelf?).

 

I'm sorry I can't be of more concrete help, but I'm pretty sure this CAN be done!

Link to comment
Share on other sites

In theory, what you could try is something the CS Wiki suggests: RemoveAllItems TargetContainerID

 

What that means is, all the items are put into a container, rather than simply destroyed. You'd have to also create a permanent container for the items to be put into-- I'm afraid I've got no idea how you'd put them straight into your inventory-- and you'd need to work out how to specify that a specific NPC's items are the ones you want (GetSelf?).

 

I'm sorry I can't be of more concrete help, but I'm pretty sure this CAN be done!

A permanent container? Hmmm....the Bag of Holding mod comes to mind. Which I just happen to have. I need to find the formID for that bag though. Thanks so much~! Cookie for you :3

 

Edit:

I've tried the alphanumerical ID that the CS gave me for the BoH, and I got an error about an "invalid object reference to parameter container (optional)". I even tried references to the well in Skingrad, still gave me that same error.

Edited by Millinescence
Link to comment
Share on other sites

The alphanumerical won't work-- not for custom items. What you want is the reference editor ID. I haven't got the CS in front of me, but the CS will help with this.

 

What you'll need to be doing is to find where the BoH is physically located-- you can find that under Activators > Containers. Go there, open up the properties tab from the cell, and you should see the RefID: http://cs.elderscrolls.com/constwiki/index.php/Image:Tut_img_10.jpg

 

The RefID is what you'll use to identify the container. So you'd have something like this in your script:

 

NPCReferenceEditorID.removeallitems ContainerReferenceID

 

Hope this makes a bit more sense.

Link to comment
Share on other sites

The alphanumerical won't work-- not for custom items. What you want is the reference editor ID. I haven't got the CS in front of me, but the CS will help with this.

 

What you'll need to be doing is to find where the BoH is physically located-- you can find that under Activators > Containers. Go there, open up the properties tab from the cell, and you should see the RefID: http://cs.elderscrolls.com/constwiki/index.php/Image:Tut_img_10.jpg

It's located in Vilverin (player.coc Vilverin04) where the necromancer lives....that is until you pick it up. Then the container itself will be in your inventory, which is what makes it so handy. But what version of CS is that image? Activators and Containers are a separate category on the one I have. (My version is 1.2.404)

Link to BoH mod

Link to comment
Share on other sites

have you tried;

 

ref.removeallitems player

 

? As the player is considered a persistent referance, this should work just fine, and very direct.

 

As for the ref, you could try something like "set ref to GetSelf".

 

 

 

Lucifer

 

EDIT

 

I have confirmed my suspicions :yes:

 

This is the script...;

 

scn AAAStealAllEffect

 

ref Self

 

begin ScriptEffectStart

set Self to GetSelf

Self.removeallitems player

end

 

Works like a charm. Hope this helped.

 

 

Lucifer

Edited by GreatLucifer
Link to comment
Share on other sites

EDIT

 

I have confirmed my suspicions :yes:

 

This is the script...;

 

scn AAAStealAllEffect

 

ref Self

 

begin ScriptEffectStart

set Self to GetSelf

Self.removeallitems player

end

 

Works like a charm. Hope this helped.

 

 

Lucifer

OMGs! Thanks so much~! ^-^ I just got done testing your script and it does exactly what I wanted it to do. Here's your well-deserved cookie :thumbsup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...