Jump to content

Yrdolf

Members
  • Posts

    5
  • Joined

  • Last visited

Nexus Mods Profile

About Yrdolf

Yrdolf's Achievements

Newbie

Newbie (1/14)

  • First Post
  • One Year In
  • Week One Done
  • One Month Later
  • Conversation Starter

Recent Badges

0

Reputation

  1. Well, now I took your script and the WaitGameTime was the problem why the chest did not open anymore :rolleyes: . But now, the script don't stop with adding items to the chest. Even if I remove all the items of the chest it will add items. :confused: Is there a way to told the script to Add the Item only one time? Edit: Forget the last problem, I have solved it and now my script is complete. :wink: Thank you all for your help :thumbsup:
  2. Hm, yes this solved the "Blocking Problem" :biggrin: but the Items still don't duplicate. I think there is something wrong that the script doesn't know to add the Items to the Chest but I don't know what.
  3. Thanks for your replys. I tried some of your solutions. The ObjectReference Property works, now the script can compile, the "Ingredient Filter" works and the BlockActivation too. But now, if I place Items in that Chest, they will not duplicate. Before in my Script above the Item that was added to the Chest was Duplicated as many times as it was added (For example, i've added 2 Wheat and after 24 hours the Chest had 4 Wheat) And the second problem is, that the Chest will not stop to Block but i've told it to stop blocking after the 24 hours. Scriptname duplicateItem extends ObjectReference {Duplicates an Item in a chest.} ;Propertys ObjectReference Property Chest Auto ;Functions Function AddItem(Form akItemToAdd, int aiCount = 1, bool abSilent = false) native Function WaitGameTime(float afHours) native global ;Events, If the player adds an Item to the chest, it will be duplicated after 24 hours and you can do this again after 168 hours (one week) Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if akBaseItem as Ingredient BlockActivation() Utility.WaitGameTime(24) Chest.AddItem(akBaseItem, aiItemCount, true) BlockActivation(false) Else RemoveItem(akBaseItem, aiItemCount, true, akSourceContainer) ; if it is not an ingredient, return it to the player EndIf EndEvent
  4. Thanks for the fast reply I've added it under my Chest Property but it does not work. A new error appears (No viable alternate at input "=")
  5. Hi everyone I have a problem with my script that sould work like the archmage chest of Oblivion. Every time I want to compile it the CK says "AddItem is not a function or does not exist". I've tried to let the Items move into the players inventory by using "Game.GetPlayer()" and this works but if I use "Chest" it says it is not a function. Here it is: ;Propertys Container Property Chest Auto ;Functions Function AddItem(Form akItemToAdd, int aiCount = 1, bool abSilent = false) native Function WaitGameTime(float afHours) native global Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Utility.WaitGameTime(24) ; Game.GetPlayer().AddItem(akBaseItem, aiItemCount, false) Chest.AddItem(akBaseItem, aiItemCount, true) Utility.WaitGameTime(168) EndEvent I can't find my fault. I hope anyone else can help me.
×
×
  • Create New...