Jump to content

Code check and how do I keep it running?


Recommended Posts

So would this work?

Scriptname CaDW_Block_Null_Item extends Quest

Keyword property CaDW_WeaponModMissing auto
ObjectReference property CaDW_RPWW_Container auto

Event OnQuestInit()
  RegisterForMenuOpenCloseEvent("BarterMenu")
endEvent

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
	if (asMenuName== "BarterMenu")
		if (abOpening)
			Game.GetPlayer().RemoveItem(CaDW_WeaponModMissing, -1, true, CaDW_RPWW_Container)
		else
			CaDW_RPWW_Container.RemoveItem(CaDW_WeaponModMissing, -1, true, game.getplayer())
		endif
	endif
endEvent
Link to comment
Share on other sites

I have read somewhere that you cannot move items to container if it isn't loaded. I don't remmember what was the solution, but making alias of your container reference will probably force it to be loaded when quest is loaded. Edited by shavkacagarikia
Link to comment
Share on other sites

Weird. Have you tried making alias of your container reference? It's easy, go to quest alias tab, then make new reference alias. Inside for fill ttpe choose specific reference and point to your container. Click okeys and that should be all.
Link to comment
Share on other sites

Hi, just got back home.

 

Made it an alias and still no luck. Did the trading standing on the container. I used console to unlock the unlockable container and you can definitely tell if it is empty or not when locked.

 

It definitely getting to that line of the script as it removes items from inv but dousnt arrive at the container.

 

Odd it works fine with a formlist for the workbench but I switch it to a keyword for trading and the line dousnt work anymore.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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