Jump to content

item multiplier


gi543

Recommended Posts

hi,

 

i was thinking for a mod that should be simple.

just like a box and a terminal atached to it, you put some items in the box, on the terminal you select the desired amount of each item, and presto, you open the box and there is from every item you've put in the box the selected amount.

for example:

i put in the box:

1 power helmet

2 rifles

5 10mm pistols

10 chinese pistols

 

i go in the terminal, and select the desired amount from a list of amounts, in this case

i select 5

 

i exit the terminal

go to the box

i open the box

and i find:

5 power helmets

5 rifles

5 10mm pistols

5 chinese pistols

 

you guys get the idea?

it simply sets every amount of item to the selected amount

and on the terminal you have a selection of for example:

amount 5

amount 10

amount 15

amount 20

amount 50

amount 100

 

 

it is kinda similar to the ammo pres in the pitt, so i think the script should be possible.

 

i hope someone does this

and thanx in advance

 

kind regards

gi543

Link to comment
Share on other sites

Slightly confusing, are you trying to say to make a terminal that will give you an equivalent exchange, give extra power armors and not as many power armor helmet, and you receive 5 power armors, and 5 helmets?

 

Sorry if that's not the case, then I just do not get it.

Link to comment
Share on other sites

Until recently, this wasn't possible. However, as of the latest FOSE betas, it is. Something like this should do it:

ref rLinkedRef
ref rCurrentItem

int iNumItems
int iItemIndex

int iNumOutput ; Number of each item to output, arbitrarily set to 5 at the moment
int iDifference

Begin OnActivate

set iNumOutput to 5
set rLinkedRef to GetLinkedRef ; The scripted reference's linked ref should be the container
set iNumItems to rLinkedRef.GetNumItems
set iItemIndex to 0

Label 10
if iItemIndex < iNumItems

	set rCurrentItem to rLinkedRef.GetInventoryObject iItemIndex
	set iDifference to iNumOutput - rLinkedRef.GetItemCount rCurrentItem
	if iDifference < 0
		set iDifference to -iDifference
		rLinkedRef.RemoveItem rCurrentItem iDifference
	elseif iDifference
		rLinkedRef.AddItem rCurrentItem iDifference
	endif

	set iItemIndex to iItemIndex + 1
	Goto 10
endif


End

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

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