Alchemy Sorter Script not working

Post » Wed Jun 20, 2012 6:31 am

Hi

I'm trying to implement an Alchemy Sorter Script for Skyrim
The original Oblivion Script ran somethinmg like this.

Scriptname SorterShort TotalBegin OnActivateIf Player.getitemcount  AntlersLarge >= 1				Set TOTAL = GetItemCount  AntlersLarge				Player.removeitem AntlersLarge TOTAL				AntlersLargeCHESTREF.additem AntlersLarge TOTALEndifIf Player.getitemcount  AntlersSmall >= 1				Set TOTAL = GetItemCount  AntlersSmall				Player.removeitem AntlersSmall TOTAL				AntlersSmallCHESTREF.additem AntlersSmall TOTALEndifEnd

Where AntlersLargeCHESTREF was a referenced example of a unique labelled container. (I've only shown the first two of a much longer script)
I've set about translating this to SKYRIM
1. I created unique lablled containers for all the ingredients
2. I then gave each a Reference name.
3. I wrote the script below.


Scriptname DTOMSorterScript extends ObjectReference{A script to sort Alchemicals into REF jars}Int TOTALIngredient Property AntlersLarge  AutoIngredient Property AntlersSmall  AutoContainer Property AntlersLargeCHESTREF  AutoContainer Property AntlersSmallCHESTREF  AutoEvent OnActivate(ObjectReference akActionRef)If (Game.GetPlayer().GetItemCount(AntlersLarge) >= 1)	   TOTAL =  Game.GetPlayer().GetItemCount(AntlersLarge)	   Game.GetPlayer().RemoveItem(AntlersLarge, TOTAL)	   AntlersLargeCHESTREF.AddItem(AntlersLarge, TOTAL, 1)EndifIf (Game.GetPlayer().GetItemCount(AntlersSmall) >= 1)	   TOTAL =  Game.GetPlayer().GetItemCount(AntlersSmall)	   Game.GetPlayer().RemoveItem(AntlersSmall, TOTAL)	   AntlersSmallCHESTREF.AddItem(AntlersSmall, TOTAL, 1)EndifEndEvent

This produced this when compiled

Compiling "DTOMSorterScript"...
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DTOMSorterScript.psc(15,23): AddItem is not a function or does not exist
c:\program files (x86)\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\DTOMSorterScript.psc(20,22): AddItem is not a function or does not exist
No output generated for DTOMSorterScript, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on DTOMSorterScript

I'm confused since the additem follows the syntax in the CK wiki.
Also do I really haved to declare properties for every ingredient and Container as seems to be the case. It's such an inelegant solution.

Any help?
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Wed Jun 20, 2012 12:38 am

The issue is exactly what the compiler says it is, there is no AddItem function defined on http://www.creationkit.com/Container_Script (and http://www.creationkit.com/Form_Script).
Your containers should be addressed as http://www.creationkit.com/ObjectReference_Script, which have an http://www.creationkit.com/ObjectReference.AddItem_%28Papyrus%29 function.

Weird, you are explicitly passing a count for AddItem but not for RemoveItem, it should be one or the other, explicit or implicit, not mixed.

P.S.: A simple , Container, would have shown you that with Sublime Text. (Because there are still people not using it, beats me why)
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Wed Jun 20, 2012 3:49 am

The issue is exactly what the compiler says it is, there is no AddItem function defined on http://www.creationkit.com/Container_Script (and http://www.creationkit.com/Form_Script).
Your containers should be addressed as http://www.creationkit.com/ObjectReference_Script, which have an http://www.creationkit.com/ObjectReference.AddItem_%28Papyrus%29 function.

Weird, you are explicitly passing a count for AddItem but not for RemoveItem, it should be one or the other, explicit or implicit, not mixed.

P.S.: A simple , Container, would have shown you that with Sublime Text. (Because there are still people not using it, beats me why)

Thanks for that I'll get on it.
I'm afraid I don't really get the second part. What do you mean by explicit and Implicit?
Also what do mean by CTRL P, containers etc. Where should I use CTRL P, the CK, the Wiki, or this forum. I am a very confused bunny.
User avatar
Ernesto Salinas
 
Posts: 3399
Joined: Sat Nov 03, 2007 2:19 pm

Post » Wed Jun 20, 2012 1:27 am

Use this as example:

Scriptname NNWSortierButtonSkript extends ObjectReferenceimport UtilityIngredient[] Property ZutatenListe  Auto {Zutaten Array - Beinhaltet alle Ingredentien des Spiels in englisch alphabetischer Reihenfolge}ObjectReference Property KisteAB  Auto {Containerobjekte - Start mit A - B}ObjectReference Property KisteCD  Auto ObjectReference Property KisteEF  AutoObjectReference Property KisteGH  AutoObjectReference Property KisteIJ  AutoObjectReference Property KisteKL  AutoObjectReference Property KisteMN  AutoObjectReference Property KisteOP  AutoObjectReference Property KisteQR  AutoObjectReference Property KisteST  AutoObjectReference Property KisteUV  AutoObjectReference Property KisteWX  AutoObjectReference Property KisteYZ  Auto{Containerobjekte - Ende YZ}int zahl = 0Message Property FertigText  Auto{Nachricht - Einsortieren beendet}Message Property NNWSortierMeldungBitteWarten Auto{Nachricht - Start der Funktion}Function SortiereZutaten()NNWSortierMeldungBitteWarten.Show()zahl = Game.GetPlayer().GetItemCount(ZutatenListe[0])if(zahl >0)KisteGH.Additem(ZutatenListe[0], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[0], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[1])if(zahl >0)KisteKL.Additem(ZutatenListe[1], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[1], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[2])if(zahl >0)KisteAB.Additem(ZutatenListe[2], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[2], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[3])if(zahl >0)KisteAB.Additem(ZutatenListe[3], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[3], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[4])if(zahl >0)KisteGH.Additem(ZutatenListe[4], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[4], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[5])if(zahl >0)KisteST.Additem(ZutatenListe[5], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[5], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[6])if(zahl >0)KisteCD.Additem(ZutatenListe[6], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[6], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[7])if(zahl >0)KisteGH.Additem(ZutatenListe[7], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[7], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[8])if(zahl >0)KisteKL.Additem(ZutatenListe[8], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[8], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[9])if(zahl >0)KisteCD.Additem(ZutatenListe[9], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[9], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[10])if(zahl >0)KisteUV.Additem(ZutatenListe[10], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[10], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[11])if(zahl >0)KisteCD.Additem(ZutatenListe[11], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[11], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[12])if(zahl >0)KisteKL.Additem(ZutatenListe[12], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[12], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[13])if(zahl >0)KisteAB.Additem(ZutatenListe[13], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[13], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[14])if(zahl >0)KisteST.Additem(ZutatenListe[14], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[14], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[15])if(zahl >0)KisteAB.Additem(ZutatenListe[15], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[15], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[16])if(zahl >0)KisteEF.Additem(ZutatenListe[16], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[16], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[17])if(zahl >0)KisteCD.Additem(ZutatenListe[17], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[17], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[18])if(zahl >0)KisteGH.Additem(ZutatenListe[18], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[18], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[19])if(zahl >0)KisteCD.Additem(ZutatenListe[19], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[19], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[20])if(zahl >0)KisteST.Additem(ZutatenListe[20], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[20], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[21])if(zahl >0)KisteAB.Additem(ZutatenListe[21], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[21], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[22])if(zahl >0)KisteOP.Additem(ZutatenListe[22], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[22], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[23])if(zahl >0)KisteCD.Additem(ZutatenListe[23], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[23], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[24])if(zahl >0)KisteYZ.Additem(ZutatenListe[24], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[24], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[25])if(zahl >0)KisteEF.Additem(ZutatenListe[25], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[25], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[26])if(zahl >0)KisteEF.Additem(ZutatenListe[26], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[26], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[27])if(zahl >0)KisteEF.Additem(ZutatenListe[27], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[27], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[28])if(zahl >0)KisteAB.Additem(ZutatenListe[28], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[28], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[29])if(zahl >0)KisteEF.Additem(ZutatenListe[29], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[29], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[30])if(zahl >0)KisteEF.Additem(ZutatenListe[30], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[30], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[31])if(zahl >0)KisteEF.Additem(ZutatenListe[31], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[31], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[32])if(zahl >0)KisteEF.Additem(ZutatenListe[32], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[32], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[33])if(zahl >0)KisteKL.Additem(ZutatenListe[33], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[33], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[34])if(zahl >0)KisteQR.Additem(ZutatenListe[34], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[34], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[35])if(zahl >0)KisteQR.Additem(ZutatenListe[35], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[35], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[36])if(zahl >0)KisteGH.Additem(ZutatenListe[36], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[36], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[37])if(zahl >0)KisteST.Additem(ZutatenListe[37], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[37], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[38])if(zahl >0)KisteGH.Additem(ZutatenListe[38], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[38], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[39])if(zahl >0)KisteGH.Additem(ZutatenListe[39], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[39], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[40])if(zahl >0)KisteGH.Additem(ZutatenListe[40], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[40], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[41])if(zahl >0)KisteMN.Additem(ZutatenListe[41], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[41], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[42])if(zahl >0)KisteEF.Additem(ZutatenListe[42], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[42], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[43])if(zahl >0)KisteIJ.Additem(ZutatenListe[43], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[43], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[44])if(zahl >0)KisteWX.Additem(ZutatenListe[44], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[44], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[45])if(zahl >0)KisteKL.Additem(ZutatenListe[45], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[45], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[46])if(zahl >0)KisteIJ.Additem(ZutatenListe[46], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[46], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[47])if(zahl >0)KisteMN.Additem(ZutatenListe[47], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[47], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[48])if(zahl >0)KisteAB.Additem(ZutatenListe[48], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[48], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[49])if(zahl >0)KisteMN.Additem(ZutatenListe[49], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[49], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[50])if(zahl >0)KisteST.Additem(ZutatenListe[50], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[50], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[51])if(zahl >0)KisteAB.Additem(ZutatenListe[51], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[51], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[52])if(zahl >0)KisteUV.Additem(ZutatenListe[52], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[52], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[53])if(zahl >0)KisteQR.Additem(ZutatenListe[53], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[53], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[54])if(zahl >0)KisteST.Additem(ZutatenListe[54], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[54], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[55])if(zahl >0)KisteQR.Additem(ZutatenListe[55], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[55], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[56])if(zahl >0)KisteAB.Additem(ZutatenListe[56], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[56], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[57])if(zahl >0)KisteWX.Additem(ZutatenListe[57], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[57], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[58])if(zahl >0)KisteKL.Additem(ZutatenListe[58], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[58], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[59])if(zahl >0)KisteMN.Additem(ZutatenListe[59], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[59], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[60])if(zahl >0)KisteAB.Additem(ZutatenListe[60], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[60], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[61])if(zahl >0)KisteST.Additem(ZutatenListe[61], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[61], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[62])if(zahl >0)KisteMN.Additem(ZutatenListe[62], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[62], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[63])if(zahl >0)KisteMN.Additem(ZutatenListe[63], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[63], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[64])if(zahl >0)KisteMN.Additem(ZutatenListe[64], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[64], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[65])if(zahl >0)KisteMN.Additem(ZutatenListe[65], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[65], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[66])if(zahl >0)KisteOP.Additem(ZutatenListe[66], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[66], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[67])if(zahl >0)KisteKL.Additem(ZutatenListe[67], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[67], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[68])if(zahl >0)KisteST.Additem(ZutatenListe[68], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[68], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[69])if(zahl >0)KisteST.Additem(ZutatenListe[69], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[69], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[70])if(zahl >0)KisteST.Additem(ZutatenListe[70], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[70], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[71])if(zahl >0)KisteST.Additem(ZutatenListe[71], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[71], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[72])if(zahl >0)KisteST.Additem(ZutatenListe[72], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[72], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[73])if(zahl >0)KisteST.Additem(ZutatenListe[73], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[73], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[74])if(zahl >0)KisteST.Additem(ZutatenListe[74], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[74], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[75])if(zahl >0)KisteST.Additem(ZutatenListe[75], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[75], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[76])if(zahl >0)KisteST.Additem(ZutatenListe[76], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[76], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[77])if(zahl >0)KisteGH.Additem(ZutatenListe[77], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[77], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[78])if(zahl >0)KisteYZ.Additem(ZutatenListe[78], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[78], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[79])if(zahl >0)KisteYZ.Additem(ZutatenListe[79], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[79], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[80])if(zahl >0)KisteOP.Additem(ZutatenListe[80], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[80], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[81])if(zahl >0)KisteCD.Additem(ZutatenListe[81], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[81], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[82])if(zahl >0)KisteST.Additem(ZutatenListe[82], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[82], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[83])if(zahl >0)KisteST.Additem(ZutatenListe[83], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[83], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[84])if(zahl >0)KisteUV.Additem(ZutatenListe[84], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[84], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[85])if(zahl >0)KisteST.Additem(ZutatenListe[85], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[85], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[86])if(zahl >0)KisteWX.Additem(ZutatenListe[86], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[86], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[87])if(zahl >0)KisteMN.Additem(ZutatenListe[87], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[87], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[88])if(zahl >0)KisteEF.Additem(ZutatenListe[88], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[88], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[89])if(zahl >0)KisteGH.Additem(ZutatenListe[89], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[89], zahl, true)endifzahl = Game.GetPlayer().GetItemCount(ZutatenListe[90])if(zahl >0)KisteCD.Additem(ZutatenListe[90], zahl)Game.GetPlayer().RemoveItem(ZutatenListe[90], zahl, true)endifEndFunctionEvent OnActivate(ObjectReference akActionRef)SortiereZutaten()Utility.Wait(1)FertigText.Show()EndEvent


Its my Alchemysorter from my Personal Housemod. It sorts the Ingredients alphabetical for the German Version of Skyrim.
User avatar
Mr.Broom30
 
Posts: 3433
Joined: Thu Nov 08, 2007 2:05 pm

Post » Tue Jun 19, 2012 7:17 pm

Many thanks
User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm

Post » Tue Jun 19, 2012 9:42 pm

Many thanks to both. I'm back on track.
User avatar
Dewayne Quattlebaum
 
Posts: 3529
Joined: Thu Aug 30, 2007 12:29 pm

Post » Wed Jun 20, 2012 10:05 am

You could simplify this by adding the items you want sorted to a FormList and counting/moving members of it.

	Int iCount = Game.GetPlayer().GetItemCount(YourFormList)	Game.GetPlayer().RemoveItem(YourFormList, iCount, True, AntlersSmallCHESTREF)
...or...
Function SortIngredients()	Int iListIndex = YourFormList.GetSize()	While (iListIndex > 0)		Ingredient IngredientForm = YourFormList.GetAt(iListIndex) As Ingredient		Int iCount = Game.GetPlayer().GetItemCount(IngredientForm)		Game.GetPlayer().RemoveItem(IngredientForm, iCount, True, AntlersSmallCHESTREF)		iListIndex -= 1	EndWhileEndFunction
...then you won't need a block of code for each item. If moving loads of stuff, the former is gonna be faster, but the latter lets you be more specific.
User avatar
Charles Weber
 
Posts: 3447
Joined: Wed Aug 08, 2007 5:14 pm

Post » Wed Jun 20, 2012 5:35 am

You could simplify this by adding the items you want sorted to a FormList and counting/moving members of it.

	Int iCount = Game.GetPlayer().GetItemCount(YourFormList)	Game.GetPlayer().RemoveItem(YourFormList, iCount, True, AntlersSmallCHESTREF)
...or...
Function SortIngredients()	Int iListIndex = YourFormList.GetSize()	While (iListIndex > 0)		Ingredient IngredientForm = YourFormList.GetAt(iListIndex) As Ingredient		Int iCount = Game.GetPlayer().GetItemCount(IngredientForm)		Game.GetPlayer().RemoveItem(IngredientForm, iCount, True, AntlersSmallCHESTREF)		iListIndex -= 1	EndWhileEndFunction
...then you won't need a block of code for each item. If moving loads of stuff, the former is gonna be faster, but the latter lets you be more specific.

The only thing with this is it does seem to increment the container. So all the ingredients will end up in the same pot.
User avatar
CORY
 
Posts: 3335
Joined: Sat Oct 13, 2007 9:54 pm

Post » Wed Jun 20, 2012 7:46 am

What do you mean by explicit and Implicit?
That for AddItem you explicitly specify the second parameter, but omit specifying the same parameter for RemoveItem - the count parameter.
That's not something bad really, it's just I write a lot of code and this looks http://en.wikipedia.org/wiki/Code_smell to me.

Also what do mean by CTRL P, containers etc. Where should I use CTRL P, the CK, the Wiki, or this forum. I am a very confused bunny.
That was a little plug for a text editor, http://www.sublimetext.com/. Note that I am not affiliated with the developer, it's just that good.
You see, Crtl+P brings up the show files overlay, a window allowing you the preview and open files, that's all. You would see that Container.psc is essentially empty and inherits from Form which does not define container typical functions.
I'm mentioning this because, you've got all those .psc files and you only have to look at them.
Reading code is a great way to learn the new language, especially when you can read the code the Skyrim's developers wrote.

On a related note, Papyrus is quite different then the old scripting language. Therefore 1:1 translations might not be the best (read efficient) direction to take.
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Wed Jun 20, 2012 6:59 am

That for AddItem you explicitly specify the second parameter, but omit specifying the same parameter for RemoveItem - the count parameter.
That's not something bad really, it's just I write a lot of code and this looks http://en.wikipedia.org/wiki/Code_smell to me.


That was a little plug for a text editor, http://www.sublimetext.com/. Note that I am not affiliated with the developer, it's just that good.
You see, Crtl+P brings up the show files overlay, a window allowing you the preview and open files, that's all. You would see that Container.psc is essentially empty and inherits from Form which does not define container typical functions.
I'm mentioning this because, you've got all those .psc files and you only have to look at them.
Reading code is a great way to learn the new language, especially when you can read the code the Skyrim's developers wrote.

On a related note, Papyrus is quite different then the old scripting language. Therefore 1:1 translations might not be the best (read efficient) direction to take.

I'm sure your right, but I needed to start somewhere. I suspect a much more elegant solution exist around the ItemList method but I can't think of it.
I have compiled the script. Now I have a new problem. The activator I choose to copy was the IMP Button 01. However when I try to activate it in game, I get nothing.

Here is my code, (edited to show only the first 2 of the 94 ingredient blocks)

Scriptname DTOMSorterScript extends ObjectReference  {A script to sort Alchemicals into REF jars}Int TOTALIngredient Property AntlersLarge  AutoObjectReference Property AntlersLargeCHESTREF2  AutoIngredient Property AntlersSmall  AutoObjectReference Property AntlersSmallCHESTREF  AutoEvent OnActivate(ObjectReference akActionRef)if (akActionRef == Game.GetPlayer())	If (Game.GetPlayer().GetItemCount(AntlersLarge ))>= 1	Total=  Game.GetPlayer().GetItemCount(AntlersLarge)	(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,1))	AntlersLargeCHESTREF2.additem(AntlersLarge,TOTAL,1)	Endif	If (Game.GetPlayer().GetItemCount(AntlersSmall ))>= 1	Total=  Game.GetPlayer().GetItemCount(AntlersSmall)	(Game.GetPlayer().removeitem(AntlersSmall,TOTAL,1))	AntlersSmallCHESTREF.additem(AntlersSmall,TOTAL,1)	EndifEndifEndEvent

Not sure why the activator doesn't work.
User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

Post » Wed Jun 20, 2012 2:57 am

You could simplify this by adding the items you want sorted to a FormList and counting/moving members of it.

I know. But I have choosed this way, because i can always control exactly which Object goes in which Container and i must not reorder the Array in every ESP i want to add this Script.


TOTAL = Game.GetPlayer().GetItemCount(AntlersLarge)
If (Total >= 1)
(Game.GetPlayer().removeitem (AntlersLarge, TOTAL, true))
AntlersLargeCHESTREF2.additem(AntlersLarge, TOTAL)
Endif

TOTAL = Game.GetPlayer().GetItemCount(AntlersSmall)
If (Total >= 1)
(Game.GetPlayer().removeitem(AntlersSmall, TOTAL, true))
AntlersSmallCHESTREF.additem(AntlersSmall, TOTAL)
Endif

User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Wed Jun 20, 2012 8:00 am

Should I include the If/End if blocks in a function
ie
Function SortIngredient()

TOTAL = Game.GetPlayer().GetItemCount(AntlersLarge)
If (Total >= 1)
(Game.GetPlayer().removeitem (AntlersLarge, TOTAL, true))
AntlersLargeCHESTREF2.additem(AntlersLarge, TOTAL)
Endif

TOTAL = Game.GetPlayer().GetItemCount(AntlersSmall)
If (Total >= 1)
(Game.GetPlayer().removeitem(AntlersSmall, TOTAL, true))
AntlersSmallCHESTREF.additem(AntlersSmall, TOTAL)
Endif

End Function
Event OnActivate(ObjectReference akActionRef)

SortIngredient()

EndEvent
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Wed Jun 20, 2012 6:17 am

There's no point in using functions if you're going to do it that way... And you should treat functions exactly like the Event - EndEvent blocks, except that you call them from the script instead of waiting for something to happen in the game.

As for why your script wasn't working, I don't know. What you posted of your script looks fine to me. Are you sure it didn't work? You scripted it to not display item removed messages, so maybe you just didn't notice it working. Or perhaps your script is so long that you didn't give it time to finish... Perhaps you could try adding some debug messages.
User avatar
Ysabelle
 
Posts: 3413
Joined: Sat Jul 08, 2006 5:58 pm

Post » Wed Jun 20, 2012 4:39 am

The only thing with this is it does seem to increment the container. So all the ingredients will end up in the same pot.
If using the function, you can conditionalize before setting the recipient container.

Function SortIngredients()	ObjectReference Recipient        Int iListIndex = YourFormList.GetSize()        While (iListIndex > 0)		                Ingredient IngredientForm = YourFormList.GetAt(iListIndex) As Ingredient						If IngredientForm == AntlersLarge			Recipient = AntlersLargeCHESTREF2		ElseIf IngredientForm == AntlersSmall			Recipient = AntlersSmallCHESTREF		ElseIf 				                Int iCount = Game.GetPlayer().GetItemCount(IngredientForm)                Game.GetPlayer().RemoveItem(IngredientForm, iCount, True, Recipient)                iListIndex -= 1				        EndWhileEndFunction
User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Post » Wed Jun 20, 2012 8:12 am

There's no point in using functions if you're going to do it that way... And you should treat functions exactly like the Event - EndEvent blocks, except that you call them from the script instead of waiting for something to happen in the game.

As for why your script wasn't working, I don't know. What you posted of your script looks fine to me. Are you sure it didn't work? You scripted it to not display item removed messages, so maybe you just didn't notice it working. Or perhaps your script is so long that you didn't give it time to finish... Perhaps you could try adding some debug messages.

Went through the containers, no ingredients moved.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Wed Jun 20, 2012 5:11 am

If using the function, you can conditionalize before setting the recipient container.

Function SortIngredients()	ObjectReference Recipient		Int iListIndex = YourFormList.GetSize()		While (iListIndex > 0)						Ingredient IngredientForm = YourFormList.GetAt(iListIndex) As Ingredient						If IngredientForm == AntlersLarge			Recipient = AntlersLargeCHESTREF2		ElseIf IngredientForm == AntlersSmall			Recipient = AntlersSmallCHESTREF		ElseIf								Int iCount = Game.GetPlayer().GetItemCount(IngredientForm)				Game.GetPlayer().RemoveItem(IngredientForm, iCount, True, Recipient)				iListIndex -= 1						EndWhileEndFunction

I like the look of this. Once I can get the activator to actually activate and run script, i'll look at implementing this.

As a query, is their any mileage in naming the relevant container references AlchemyChestRef(0), AlchemyChestRef(1) etc
then use
Game.GetPlayer().RemoveItem(IngredientForm, iCount, True, AlchemyChestRef (iCount))
to do the transfer.
User avatar
Paula Ramos
 
Posts: 3384
Joined: Sun Jul 16, 2006 5:43 am

Post » Wed Jun 20, 2012 1:39 am

Okay things are getting weird.
I added some debug statements to see what was going on.
Again I've forshortened the actual script for space but I can include the whole thing, under a spoiler tab if you wish
Thats when things got weird.

Scriptname DTOMSorterScript extends ObjectReference{A script to sort Alchemicals into REF jars}Int TOTALObjectReference property objSelf auto hiddenSound property QSTAstrolabeButtonPressX autoIngredient Property AntlersLarge  AutoObjectReference Property AntlersLargeCHESTREF2  AutoIngredient Property AntlersSmall  AutoObjectReference Property AntlersSmallCHESTREF  AutoIngredient Property BearClaws  AutoObjectReference Property BearClawsCHESTREF  AutoIngredient Property BeeHiveHusk  AutoObjectReference Property BeeHiveHuskCHESTREF  AutoIngredient Property BeeHoneyComb  AutoObjectReference Property BeeHoneyCombCHESTREF  AutoIngredient Property WispWrappings  AutoObjectReference Property WispWrappingsCHESTREF  AutoEvent OnCellAttach()PlayAnimation("Open")EndEventEvent OnActivate(ObjectReference akActionRef)if (akActionRef == Game.GetPlayer())Debug.MessageBox("Gotto Start!")PlayAnimationAndWait("Trigger01", "done")if (QSTAstrolabeButtonPressX)  QSTAstrolabeButtonPressX.Play(Self)endifIf (Game.GetPlayer().GetItemCount(AntlersLarge ))>= 1Total=  Game.GetPlayer().GetItemCount(AntlersLarge)(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,1))AntlersLargeCHESTREF2.additem(AntlersLarge,TOTAL,1)EndifDebug.MessageBox("Got Antlers Large!")If (Game.GetPlayer().GetItemCount(AntlersSmall ))>= 1Total=  Game.GetPlayer().GetItemCount(AntlersSmall)(Game.GetPlayer().removeitem(AntlersSmall,TOTAL,1))AntlersSmallCHESTREF.additem(AntlersSmall,TOTAL,1)EndifDebug.MessageBox("Got AntlersSmall!")If (Game.GetPlayer().GetItemCount(BearClaws ))>= 1Total=  Game.GetPlayer().GetItemCount(BearClaws)(Game.getPlayer().removeitem(BearClaws,TOTAL,1))BearClawsCHESTREF.additem(BearClaws,TOTAL,1)EndifDebug.MessageBox("Got bears!")If (Game.GetPlayer().GetItemCount(BeeHiveHusk ))>= 1Total=  Game.GetPlayer().GetItemCount(BeeHiveHusk)(Game.GetPlayer().removeitem(BeeHiveHusk,TOTAL,1))BeeHiveHuskCHESTREF.additem(BeeHiveHusk,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BeeHoneyComb ))>= 1Total=  Game.GetPlayer().GetItemCount(BeeHoneyComb)(Game.GetPlayer().removeitem(BeeHoneyComb,TOTAL,1))BeeHoneyCombCHESTREF.additem(BeeHoneyComb,TOTAL,1)EndifDebug.MessageBox("Got honeycomb!")If (Game.GetPlayer().GetItemCount(WispWrappings ))>= 1Total=  Game.GetPlayer().GetItemCount(WispWrappings)(Game.GetPlayer().removeitem(WispWrappings,TOTAL,1))WispWrappingsCHESTREF.additem(WispWrappings,TOTAL,1)EndifDebug.MessageBox("Got End!")EndifEndEvent

1. I have all the ingredients in Inventory.
2. I activate the sorter.

The messages first appeared in this order
Start
Antlers Long
Bear Claws
Honeycomb
End
AntlersSmall !!!!!

Further Testing has shown that they appear in a fairly random way.

The only item that is removed is the long antlers
However, it does not appear in the container with AntlersLargeCHESTREF2 as its reference and set as the value in the properties window.
So the

AntlersLargeCHESTREF2.additem(AntlersLarge,TOTAL,1)

line does not work as expected. Using Debug Messages I can confirm that TOTAL is being set to the number of Large Antlers in the Players Inventory.
and that these are removed, so
Total=  Game.GetPlayer().GetItemCount(AntlersLarge)(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,1))
is working as expected.
Anyone got any thoughts why the additem line is not working as expected.

The other ingredients are not touched but this might be because the additem line fails in game?
This is so frustratiing.
I'm sure its a really small issue, but I've been all around the houses on this one.
User avatar
Claudia Cook
 
Posts: 3450
Joined: Mon Oct 30, 2006 10:22 am

Post » Wed Jun 20, 2012 12:42 am

Okay still no joy.
I tried changing the

(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,1))AntlersLargeCHESTREF2.additem(AntlersLarge,TOTAL,1)

to
a single line


(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,0,AntlersLargeCHESTREF2))

it compiles and removes the antlers but it still doesn't deposit them in the container.
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Wed Jun 20, 2012 5:35 am

Take a peek to see what's happening.
Debug.Notification("Moving " + TOTAL + " Large Antlers to " + AntlersLargeCHESTREF2)
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Wed Jun 20, 2012 5:56 am

Take a peek to see what's happening.
Debug.Notification("Moving " + TOTAL + " Large Antlers to " + AntlersLargeCHESTREF2)

Done it.
Moving 2 Large Antlers to NONE

So why isn't the container being recognised.

Here's what I have done in the CK.

1. I created 90+ containers based on an Urn. Each has a unique editor name. Ie AntlersLargeChest, AntlersSmallChest etc
2. I place the urn in my cell.
3. I gave each example of the new container a REFERENCE in their dialog box ie AntlersLargeCHESTREF2, AntlersSmallCHESTREF etc
4. I created the script shown above.
5. Using the Edit Properties Dialog Box I assigned to the Property a value ie. AntlersLarge (Ingredient) mapped to Antlers Large, AntlersLargeCHESTREF2 (Object) to AntlerLargeCHESTREF2 in Cell
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Tue Jun 19, 2012 8:53 pm

Since your script compiles, you bound the property, but the container is null when the script is actually executing.
I'd say human error is more likely than the compiler generating faulty code.

Specifically the 2 in AntlersLargeCHESTREF2 makes we wonder?

Other than that, just post the whole script inside [ spoiler][ code] ... [/code][/spoiler] tags and use the raw editing mode (the very first icon, looks like a switch), so whitespace doesn't get messed up.
User avatar
Kevin Jay
 
Posts: 3431
Joined: Sun Apr 29, 2007 4:29 am

Post » Tue Jun 19, 2012 9:15 pm

Since your script compiles, you bound the property, but the container is null when the script is actually executing.
I'd say human error is more likely than the compiler generating faulty code.

Specifically the 2 in AntlersLargeCHESTREF2 makes we wonder?

Other than that, just post the whole script inside [ spoiler][ code] ... [/code][/spoiler] tags and use the raw editing mode (the very first icon, looks like a switch), so whitespace doesn't get messed up.

The 2 was due to me creating a container with the Ref name by mistake.

Spoiler
Scriptname DTOMSorterScript extends ObjectReference {A script to sort Alchemicals into REF jars}Int TOTALObjectReference property objSelf auto hiddenSound property QSTAstrolabeButtonPressX autoIngredient Property AntlersLarge  AutoObjectReference Property AntlersLargeCHESTREF2  AutoIngredient Property AntlersSmall  AutoObjectReference Property AntlersSmallCHESTREF  AutoIngredient Property BearClaws  AutoObjectReference Property BearClawsCHESTREF  AutoIngredient Property BeeHiveHusk  AutoObjectReference Property BeeHiveHuskCHESTREF  AutoIngredient Property BeeHoneyComb  AutoObjectReference Property BeeHoneyCombCHESTREF  AutoIngredient Property BirdEgg01  AutoObjectReference Property BirdEgg01CHESTREF  AutoIngredient Property BirdEgg02  AutoObjectReference Property BirdEgg02CHESTREF  AutoIngredient Property BirdEgg03  AutoObjectReference Property BirdEgg03CHESTREF  AutoIngredient Property BoneMeal  AutoObjectReference Property BoneMealCHESTREF  AutoIngredient Property BriarHeart  AutoObjectReference Property BriarHeartCHESTREF  AutoIngredient Property CanisRoot01  AutoObjectReference Property CanisRoot01CHESTREF  AutoIngredient Property CharredSkeeverHide  AutoObjectReference Property CharredSkeeverHideCHESTREF  AutoIngredient Property ChaurusEggs  AutoObjectReference Property ChaurusEggsCHESTREF  AutoIngredient Property CreepClusterRoot  AutoObjectReference Property CreepClusterRootCHESTREF  AutoIngredient Property CritterBeelngredient  AutoObjectReference Property CritterBeelngredientCHESTREF  AutoIngredient Property CritterPondFish01Ingredient  AutoObjectReference Property CritterPondFish01IngredientCHESTREF  AutoIngredient Property CritterPondFish03Ingredient  AutoObjectReference Property CritterPondFish03IngredientCHESTREF  AutoIngredient Property CritterPondFish041ngredient  AutoObjectReference Property CritterPondFish041ngredientCHESTREF  AutoIngredient Property CritterPondFish05Ingredient  AutoObjectReference Property CritterPondFish05IngredientCHESTREF  AutoIngredient Property CritterPondFish02Ingredient  AutoObjectReference Property CritterPondFish02IngredientCHESTREF  AutoIngredient Property DaedraHeart  AutoObjectReference Property DaedraHeartCHESTREF  AutoIngredient Property DBJarrinRoot  AutoObjectReference Property DBJarrinRootCHESTREF  AutoIngredient Property deathbell  AutoObjectReference Property deathbellCHESTREF  AutoIngredient Property DragonflyBlue  AutoObjectReference Property DragonflyBlueCHESTREF  AutoIngredient Property DragonflyOrange AutoObjectReference Property DragonflyOrangeCHESTREF  AutoIngredient Property DragonsTongue  AutoObjectReference Property DragonsTongueCHESTREF  AutoIngredient Property DwarvenOil  AutoObjectReference Property DwarvenOilCHESTREF  AutoIngredient Property Ectoplasm  AutoObjectReference Property EctoplasmCHESTREF  AutoIngredient Property ElvesEar  AutoObjectReference Property ElvesEarCHESTREF  AutoIngredient Property FalmerEar  AutoObjectReference Property FalmerEarCHESTREF  AutoIngredient Property FavorThadgeirAshes  AutoObjectReference Property FavorThadgeirAshesCHESTREF  AutoIngredient Property FirefryThorax  AutoObjectReference Property FirefryThoraxCHESTREF  AutoIngredient Property FireSalts  AutoObjectReference Property FireSaltsCHESTREF  AutoIngredient Property FrostMirriam  AutoObjectReference Property FrostMirriamCHESTREF  AutoIngredient Property FrostSalts  AutoObjectReference Property FrostSaltsCHESTREF  AutoIngredient Property Garlic  AutoObjectReference Property GarlicCHESTREF  AutoIngredient Property GiantLichen  AutoObjectReference Property GiantLichenCHESTREF  AutoIngredient Property GiantToes  AutoObjectReference Property GiantToesCHESTREF  AutoIngredient Property glowDust  AutoObjectReference Property glowDustCHESTREF  AutoIngredient Property GlowingMushroom  AutoObjectReference Property GlowingMushroomCHESTREF  AutoIngredient Property HagravenClaw  AutoObjectReference Property HagravenClawCHESTREF  AutoIngredient Property HagravenFeathers  AutoObjectReference Property HagravenFeathersCHESTREF  AutoIngredient Property HangingMoss  AutoObjectReference Property HangingMossCHESTREF  AutoIngredient Property HawkBeak  AutoObjectReference Property HawkBeakCHESTREF  AutoIngredient Property HawkFeathers  AutoObjectReference Property HawkFeathersCHESTREF  AutoIngredient Property HumanFlesh  AutoObjectReference Property HumanFleshCHESTREF  AutoIngredient Property HumanHeart  AutoObjectReference Property HumanHeartCHESTREF  AutoIngredient Property IceWraithTeeth  AutoObjectReference Property IceWraithTeethCHESTREF  AutoIngredient Property JazBay  AutoObjectReference Property JazBayCHESTREF  AutoIngredient Property JuniperBerries  AutoObjectReference Property JuniperBerriesCHESTREF  AutoIngredient Property Lavender  AutoObjectReference Property LavenderCHESTREF  AutoIngredient Property MoonSugar  AutoObjectReference Property MoonSugarCHESTREF  AutoIngredient Property MoraTapinellaBits  AutoObjectReference Property MoraTapinellaBitsCHESTREF  AutoIngredient Property MothWingBlue  AutoObjectReference Property MothWingBlueCHESTREF  AutoIngredient Property MothWingLuna  AutoObjectReference Property MothWingLunaCHESTREF  AutoIngredient Property MothWingMonarch  AutoObjectReference Property MothWingMonarchCHESTREF  AutoIngredient Property MountainFlower01Purple  AutoObjectReference Property MountainFlower01PurpleCHESTREF  AutoIngredient Property MountainFlower01Red  AutoObjectReference Property MountainFlower01RedCHESTREF  AutoIngredient Property MountainFlower01Blue  AutoObjectReference Property MountainFlower01BlueCHESTREF  Auto;Ingredient Property MS03BlackBriarSecretIngredient  Auto;ObjectReference Property MS03BlackBriarSecretIngredientCHESTREF  AutoIngredient Property MudcrabChitin  AutoObjectReference Property MudcrabChitinCHESTREF  AutoIngredient Property Mushroom01  AutoObjectReference Property Mushroom01CHESTREF  AutoIngredient Property Mushroom02  AutoObjectReference Property Mushroom02CHESTREF  AutoIngredient Property Mushroom03  AutoObjectReference Property Mushroom03CHESTREF  AutoIngredient Property Mushroom04  AutoObjectReference Property Mushroom04CHESTREF  AutoIngredient Property Mushroom05  AutoObjectReference Property Mushroom05CHESTREF  AutoIngredient Property Mushroom06  AutoObjectReference Property Mushroom06CHESTREF  AutoIngredient Property Nightshade  AutoObjectReference Property NightshadeCHESTREF  AutoIngredient Property NimrootRed  AutoObjectReference Property NimrootRedCHESTREF  AutoIngredient Property Nirnroot  AutoObjectReference Property NirnrootCHESTREF  AutoIngredient Property NordicBarnacles  AutoObjectReference Property NordicBarnaclesCHESTREF  AutoIngredient Property Pearl AutoObjectReference Property PearlCHESTREF  AutoIngredient Property PearlSmall  AutoObjectReference Property PearlSmallCHESTREF  AutoIngredient Property PowderedMammothTusk  AutoObjectReference Property PowderedMammothTuskCHESTREF  AutoIngredient Property SabrecatEyeball  AutoObjectReference Property SabrecatEyeballCHESTREF  AutoIngredient Property SabrecatTooth  AutoObjectReference Property SabrecatToothCHESTREF  AutoIngredient Property SaltPile  AutoObjectReference Property SaltPileCHESTREF  AutoIngredient Property ScalyPholiotaBits  AutoObjectReference Property ScalyPholiotaBitsCHESTREF  AutoIngredient Property SkeeverTail  AutoObjectReference Property SkeeverTailCHESTREF  AutoIngredient Property SlaughterfishEgg01  AutoObjectReference Property SlaughterfishEgg01CHESTREF  AutoIngredient Property SlaughterfishScales  AutoObjectReference Property SlaughterfishScalesCHESTREF  AutoIngredient Property Snowberry  AutoObjectReference Property SnowberryCHESTREF  AutoIngredient Property SpiderEgg  AutoObjectReference Property SpiderEggCHESTREF  AutoIngredient Property SpikyGrass01  AutoObjectReference Property SpikyGrass01CHESTREF  AutoIngredient Property SprigganSap  AutoObjectReference Property SprigganSapCHESTREF  AutoIngredient Property SwampFungalPod01  AutoObjectReference Property SwampFungalPod01CHESTREF  AutoIngredient Property Taproot  AutoObjectReference Property TaprootCHESTREF  AutoIngredient Property Thistle01  AutoObjectReference Property Thistle01CHESTREF  AutoIngredient Property TrollFat  AutoObjectReference Property TrollFatCHESTREF  AutoIngredient Property TundraCotton  AutoObjectReference Property TundraCottonCHESTREF  AutoIngredient Property vampireDust  AutoObjectReference Property vampireDustCHESTREF  AutoIngredient Property VoidSalts  AutoObjectReference Property VoidSaltsCHESTREF  AutoIngredient Property Wheat  AutoObjectReference Property WheatCHESTREF  AutoIngredient Property WispWrappings  AutoObjectReference Property WispWrappingsCHESTREF  AutoEvent OnCellAttach()PlayAnimation("Open")EndEventEvent OnActivate(ObjectReference akActionRef)if (akActionRef == Game.GetPlayer())   PlayAnimationAndWait("Trigger01", "done")   if (QSTAstrolabeButtonPressX)       QSTAstrolabeButtonPressX.Play(Self)   endifIf (Game.GetPlayer().GetItemCount(AntlersLarge ))>= 1Total=  Game.GetPlayer().GetItemCount(AntlersLarge)(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,0));try using just removeitem;(Game.GetPlayer().removeitem (AntlersLarge,TOTAL,0,AntlersLargeCHESTREF2))Debug.Notification("Moving " + TOTAL + " Large Antlers to " + AntlersLargeCHESTREF2)AntlersLargeCHESTREF2.additem(AntlersLarge,TOTAL,0)EndifIf (Game.GetPlayer().GetItemCount(AntlersSmall ))>= 1Total=  Game.GetPlayer().GetItemCount(AntlersSmall)(Game.GetPlayer().removeitem(AntlersSmall,TOTAL,1))AntlersSmallCHESTREF.additem(AntlersSmall,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BearClaws ))>= 1Total=  Game.GetPlayer().GetItemCount(BearClaws)(Game.getPlayer().removeitem(BearClaws,TOTAL,1))BearClawsCHESTREF.additem(BearClaws,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BeeHiveHusk ))>= 1Total=  Game.GetPlayer().GetItemCount(BeeHiveHusk)(Game.GetPlayer().removeitem(BeeHiveHusk,TOTAL,1))BeeHiveHuskCHESTREF.additem(BeeHiveHusk,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BeeHoneyComb ))>= 1Total=  Game.GetPlayer().GetItemCount(BeeHoneyComb)(Game.GetPlayer().removeitem(BeeHoneyComb,TOTAL,1))BeeHoneyCombCHESTREF.additem(BeeHoneyComb,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BirdEgg01 ))>= 1Total=  Game.GetPlayer().GetItemCount(BirdEgg01)(Game.GetPlayer().removeitem(BirdEgg01,TOTAL,1))BirdEgg01CHESTREF.additem(BirdEgg01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BirdEgg02 ))>= 1Total=  Game.GetPlayer().GetItemCount(BirdEgg02)(Game.GetPlayer().removeitem(BirdEgg02,TOTAL,1))BirdEgg02CHESTREF.additem(BirdEgg02,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BirdEgg03 ))>= 1Total=  Game.GetPlayer().GetItemCount(BirdEgg03)(Game.GetPlayer().removeitem(BirdEgg03,TOTAL,1))BirdEgg03CHESTREF.additem(BirdEgg03,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BoneMeal ))>= 1Total=  Game.GetPlayer().GetItemCount(BoneMeal)(Game.GetPlayer().removeitem(BoneMeal,TOTAL,1))BoneMealCHESTREF.additem(BoneMeal,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(BriarHeart ))>= 1Total=  Game.GetPlayer().GetItemCount(BriarHeart)(Game.GetPlayer().removeitem(BriarHeart,TOTAL,1))BriarHeartCHESTREF.additem(BriarHeart,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CanisRoot01 ))>= 1Total=  Game.GetPlayer().GetItemCount(CanisRoot01)(Game.GetPlayer().removeitem(CanisRoot01,TOTAL,1))CanisRoot01CHESTREF.additem(CanisRoot01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CharredSkeeverHide ))>= 1Total=  Game.GetPlayer().GetItemCount(CharredSkeeverHide)(Game.GetPlayer().removeitem(CharredSkeeverHide,TOTAL,1))CharredSkeeverHideCHESTREF.additem(CharredSkeeverHide,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(ChaurusEggs ))>= 1Total=  Game.GetPlayer().GetItemCount(ChaurusEggs)(Game.GetPlayer().removeitem(ChaurusEggs,TOTAL,1))ChaurusEggsCHESTREF.additem(ChaurusEggs,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CreepClusterRoot ))>= 1Total=  Game.GetPlayer().GetItemCount(CreepClusterRoot)(Game.GetPlayer().removeitem(CreepClusterRoot,TOTAL,1))CreepClusterRootCHESTREF.additem(CreepClusterRoot,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterBeelngredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterBeelngredient)(Game.GetPlayer().removeitem(CritterBeelngredient,TOTAL,1))CritterBeelngredientCHESTREF.additem(CritterBeelngredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterPondFish01Ingredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterPondFish01Ingredient)(Game.GetPlayer().removeitem(CritterPondFish01Ingredient,TOTAL,1))CritterPondFish01IngredientCHESTREF.additem(CritterPondFish01Ingredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterPondFish03Ingredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterPondFish03Ingredient)(Game.GetPlayer().removeitem(CritterPondFish03Ingredient,TOTAL,1))CritterPondFish03IngredientCHESTREF.additem(CritterPondFish03Ingredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterPondFish041ngredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterPondFish041ngredient)(Game.GetPlayer().removeitem(CritterPondFish041ngredient,TOTAL,1))CritterPondFish041ngredientCHESTREF.additem(CritterPondFish041ngredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterPondFish05Ingredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterPondFish05Ingredient)(Game.GetPlayer().removeitem(CritterPondFish05Ingredient,TOTAL,1))CritterPondFish05IngredientCHESTREF.additem(CritterPondFish05Ingredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(CritterPondFish02Ingredient ))>= 1Total=  Game.GetPlayer().GetItemCount(CritterPondFish02Ingredient)(Game.GetPlayer().removeitem(CritterPondFish02Ingredient,TOTAL,1))CritterPondFish02IngredientCHESTREF.additem(CritterPondFish02Ingredient,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DaedraHeart ))>= 1Total=  Game.GetPlayer().GetItemCount(DaedraHeart)(Game.GetPlayer().removeitem(DaedraHeart,TOTAL,1))DaedraHeartCHESTREF.additem(DaedraHeart,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DBJarrinRoot ))>= 1Total=  Game.GetPlayer().GetItemCount(DBJarrinRoot)(Game.GetPlayer().removeitem(DBJarrinRoot,TOTAL,1))DBJarrinRootCHESTREF.additem(DBJarrinRoot,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(deathBell ))>= 1Total=  Game.GetPlayer().GetItemCount(deathBell)(Game.GetPlayer().removeitem(deathBell,TOTAL,1))deathBellCHESTREF.additem(deathBell,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DragonflyBlue ))>= 1Total=  Game.GetPlayer().GetItemCount(DragonflyBlue)(Game.GetPlayer().removeitem(DragonflyBlue,TOTAL,1))DragonflyBlueCHESTREF.additem(DragonflyBlue,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DragonflyOrange ))>= 1Total=  Game.GetPlayer().GetItemCount(DragonflyOrange)(Game.GetPlayer().removeitem(DragonflyOrange,TOTAL,1))DragonflyOrangeCHESTREF.additem(DragonflyOrange,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DragonsTongue ))>= 1Total=  Game.GetPlayer().GetItemCount(DragonsTongue)(Game.GetPlayer().removeitem(DragonsTongue,TOTAL,1))DragonsTongueCHESTREF.additem(DragonsTongue,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(DwarvenOil ))>= 1Total=  Game.GetPlayer().GetItemCount(DwarvenOil)(Game.GetPlayer().removeitem(DwarvenOil,TOTAL,1))DwarvenOilCHESTREF.additem(DwarvenOil,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Ectoplasm ))>= 1TOTAL =  Game.GetPlayer().GetItemCount(Ectoplasm)(Game.GetPlayer().removeitem(Ectoplasm ,TOTAL,1))EctoplasmCHESTREF.additem(Ectoplasm,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(ElvesEar ))>= 1Total=  Game.GetPlayer().GetItemCount(ElvesEar)(Game.GetPlayer().removeitem(ElvesEar,TOTAL,1))ElvesEarCHESTREF.additem(ElvesEar,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FalmerEar ))>= 1Total=  Game.GetPlayer().GetItemCount(FalmerEar)(Game.GetPlayer().removeitem(FalmerEar,TOTAL,1))FalmerEarCHESTREF.additem(FalmerEar,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FavorThadgeirAshes ))>= 1Total=  Game.GetPlayer().GetItemCount(FavorThadgeirAshes)(Game.GetPlayer().removeitem(FavorThadgeirAshes,TOTAL,1))FavorThadgeirAshesCHESTREF.additem(FavorThadgeirAshes,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FirefryThorax ))>= 1Total=  Game.GetPlayer().GetItemCount(FirefryThorax)(Game.GetPlayer().removeitem(FirefryThorax,TOTAL,1))FirefryThoraxCHESTREF.additem(FirefryThorax,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FireSalts ))>= 1Total=  Game.GetPlayer().GetItemCount(FireSalts)(Game.GetPlayer().removeitem(FireSalts,TOTAL,1))FireSaltsCHESTREF.additem(FireSalts,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FrostMirriam ))>= 1Total=  Game.GetPlayer().GetItemCount(FrostMirriam)(Game.GetPlayer().removeitem(FrostMirriam,TOTAL,1))FrostMirriamCHESTREF.additem(FrostMirriam,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(FrostSalts ))>= 1Total=  Game.GetPlayer().GetItemCount(FrostSalts)(Game.GetPlayer().removeitem(FrostSalts,TOTAL,1))FrostSaltsCHESTREF.additem(FrostSalts,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Garlic ))>= 1Total=  Game.GetPlayer().GetItemCount(Garlic)(Game.GetPlayer().removeitem(Garlic,TOTAL,1))GarlicCHESTREF.additem(Garlic,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(GiantLichen ))>= 1Total=  Game.GetPlayer().GetItemCount(GiantLichen)(Game.GetPlayer().removeitem(GiantLichen,TOTAL,1))GiantLichenCHESTREF.additem(GiantLichen,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(GiantToes ))>= 1Total=  Game.GetPlayer().GetItemCount(GiantToes)(Game.GetPlayer().removeitem(GiantToes,TOTAL,1))GiantToesCHESTREF.additem(GiantToes,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(glowDust ))>= 1Total=  Game.GetPlayer().GetItemCount(glowDust)(Game.GetPlayer().removeitem(glowDust,TOTAL,1))glowDustCHESTREF.additem(glowDust,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(GlowingMushroom ))>= 1Total=  Game.GetPlayer().GetItemCount(GlowingMushroom)(Game.GetPlayer().removeitem(GlowingMushroom,TOTAL,1))GlowingMushroomCHESTREF.additem(GlowingMushroom,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HagravenClaw ))>= 1Total=  Game.GetPlayer().GetItemCount(HagravenClaw)(Game.GetPlayer().removeitem(HagravenClaw,TOTAL,1))HagravenClawCHESTREF.additem(HagravenClaw,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HagravenFeathers ))>= 1Total=  Game.GetPlayer().GetItemCount(HagravenFeathers)(Game.GetPlayer().removeitem(HagravenFeathers,TOTAL,1))HagravenFeathersCHESTREF.additem(HagravenFeathers,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HangingMoss ))>= 1Total=  Game.GetPlayer().GetItemCount(HangingMoss)(Game.GetPlayer().removeitem(HangingMoss,TOTAL,1))HangingMossCHESTREF.additem(HangingMoss,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HawkBeak ))>= 1Total=  Game.GetPlayer().GetItemCount(HawkBeak)(Game.GetPlayer().removeitem(HawkBeak,TOTAL,1))HawkBeakCHESTREF.additem(HawkBeak,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HawkFeathers ))>= 1Total=  Game.GetPlayer().GetItemCount(HawkFeathers)(Game.GetPlayer().removeitem(HawkFeathers,TOTAL,1))HawkFeathersCHESTREF.additem(HawkFeathers,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HumanFlesh ))>= 1Total=  Game.GetPlayer().GetItemCount(HumanFlesh)(Game.GetPlayer().removeitem(HumanFlesh,TOTAL,1))HumanFleshCHESTREF.additem(HumanFlesh,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(HumanHeart ))>= 1Total=  Game.GetPlayer().GetItemCount(HumanHeart)(Game.GetPlayer().removeitem(HumanHeart,TOTAL,1))HumanHeartCHESTREF.additem(HumanHeart,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(IceWraithTeeth ))>= 1Total=  Game.GetPlayer().GetItemCount(IceWraithTeeth)(Game.GetPlayer().removeitem(IceWraithTeeth,TOTAL,1))IceWraithTeethCHESTREF.additem(IceWraithTeeth,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(JazBay ))>= 1Total=  Game.GetPlayer().GetItemCount(JazBay)(Game.GetPlayer().removeitem(JazBay,TOTAL,1))JazBayCHESTREF.additem(JazBay,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(JuniperBerries ))>= 1Total=  Game.GetPlayer().GetItemCount(JuniperBerries)(Game.GetPlayer().removeitem(JuniperBerries,TOTAL,1))JuniperBerriesCHESTREF.additem(JuniperBerries,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Lavender ))>= 1Total=  Game.GetPlayer().GetItemCount(Lavender)(Game.GetPlayer().removeitem(Lavender,TOTAL,1))LavenderCHESTREF.additem(Lavender,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MoonSugar ))>= 1Total=  Game.GetPlayer().GetItemCount(MoonSugar)(Game.GetPlayer().removeitem(MoonSugar,TOTAL,1))MoonSugarCHESTREF.additem(MoonSugar,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MoraTapinellaBits ))>= 1Total=  Game.GetPlayer().GetItemCount(MoraTapinellaBits)(Game.GetPlayer().removeitem(MoraTapinellaBits,TOTAL,1))MoraTapinellaBitsCHESTREF.additem(MoraTapinellaBits,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MothWingBlue ))>= 1Total=  Game.GetPlayer().GetItemCount(MothWingBlue)(Game.GetPlayer().removeitem(MothWingBlue,TOTAL,1))MothWingBlueCHESTREF.additem(MothWingBlue,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MothWingLuna ))>= 1Total=  Game.GetPlayer().GetItemCount(MothWingLuna)(Game.GetPlayer().removeitem(MothWingLuna,TOTAL,1))MothWingLunaCHESTREF.additem(MothWingLuna,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MothWingMonarch ))>= 1Total=  Game.GetPlayer().GetItemCount(MothWingMonarch)(Game.GetPlayer().removeitem(MothWingMonarch,TOTAL,1))MothWingMonarchCHESTREF.additem(MothWingMonarch,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MountainFlower01Purple ))>= 1Total=  Game.GetPlayer().GetItemCount(MountainFlower01Purple)(Game.GetPlayer().removeitem(MountainFlower01Purple,TOTAL,1))MountainFlower01PurpleCHESTREF.additem(MountainFlower01Purple,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MountainFlower01Red ))>= 1Total=  Game.GetPlayer().GetItemCount(MountainFlower01Red)(Game.GetPlayer().removeitem(MountainFlower01Red,TOTAL,1))MountainFlower01RedCHESTREF.additem(MountainFlower01Red,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(MountainFlower01Blue ))>= 1Total=  Game.GetPlayer().GetItemCount(MountainFlower01Blue)(Game.GetPlayer().removeitem(MountainFlower01Blue,TOTAL,1))MountainFlower01BlueCHESTREF.additem(MountainFlower01Blue,TOTAL,1)Endif;If (Game.GetPlayer().GetItemCount(MS03BlackBriarSecretIngredient ))>= 1; Total=  Game.GetPlayer().GetItemCount(MS03BlackBriarSecretIngredient); (Game.GetPlayer().removeitem(MS03BlackBriarSecretIngredient,TOTAL,1)); MS03BlackBriarSecretIngredientCHESTREF.additem(MS03BlackBriarSecretIngredient,TOTAL,1);EndifIf (Game.GetPlayer().GetItemCount(MudcrabChitin ))>= 1Total=  Game.GetPlayer().GetItemCount(MudcrabChitin)(Game.GetPlayer().removeitem(MudcrabChitin,TOTAL,1))MudcrabChitinCHESTREF.additem(MudcrabChitin,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom01 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom01)(Game.GetPlayer().removeitem(Mushroom01,TOTAL,1))Mushroom01CHESTREF.additem(Mushroom01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom02 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom02)(Game.GetPlayer().removeitem(Mushroom02,TOTAL,1))Mushroom02CHESTREF.additem(Mushroom02,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom03 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom03)(Game.GetPlayer().removeitem(Mushroom03,TOTAL,1))Mushroom03CHESTREF.additem(Mushroom03,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom04 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom04)(Game.GetPlayer().removeitem(Mushroom04,TOTAL,1))Mushroom04CHESTREF.additem(Mushroom04,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom05 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom05)(Game.GetPlayer().removeitem(Mushroom05,TOTAL,1))Mushroom05CHESTREF.additem(Mushroom05,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Mushroom06 ))>= 1Total=  Game.GetPlayer().GetItemCount(Mushroom06)(Game.GetPlayer().removeitem(Mushroom06,TOTAL,1))Mushroom06CHESTREF.additem(Mushroom06,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Nightshade ))>= 1Total=  Game.GetPlayer().GetItemCount(Nightshade)(Game.GetPlayer().removeitem(Nightshade,TOTAL,1))NightshadeCHESTREF.additem(Nightshade,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(NimrootRed ))>= 1Total=  Game.GetPlayer().GetItemCount(NimrootRed)(Game.GetPlayer().removeitem(NimrootRed,TOTAL,1))NimrootRedCHESTREF.additem(NimrootRed,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Nirnroot ))>= 1Total=  Game.GetPlayer().GetItemCount(Nirnroot)(Game.GetPlayer().removeitem(Nirnroot,TOTAL,1))NirnrootCHESTREF.additem(Nirnroot,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(NordicBarnacles ))>= 1Total=  Game.GetPlayer().GetItemCount(NordicBarnacles)(Game.GetPlayer().removeitem(NordicBarnacles,TOTAL,1))NordicBarnaclesCHESTREF.additem(NordicBarnacles,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Pearl ))>= 1Total=  Game.GetPlayer().GetItemCount(Pearl)(Game.GetPlayer().removeitem(Pearl,TOTAL,1))PearlCHESTREF.additem(Pearl,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(PearlSmall ))>= 1Total=  Game.GetPlayer().GetItemCount(PearlSmall)(Game.GetPlayer().removeitem(PearlSmall,TOTAL,1))PearlSmallCHESTREF.additem(PearlSmall,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(PowderedMammothTusk ))>= 1Total=  Game.GetPlayer().GetItemCount(PowderedMammothTusk)(Game.GetPlayer().removeitem(PowderedMammothTusk,TOTAL,1))PowderedMammothTuskCHESTREF.additem(PowderedMammothTusk,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SabrecatEyeball ))>= 1Total=  Game.GetPlayer().GetItemCount(SabrecatEyeball)(Game.GetPlayer().removeitem(SabrecatEyeball,TOTAL,1))SabrecatEyeballCHESTREF.additem(SabrecatEyeball,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SabrecatTooth ))>= 1Total=  Game.GetPlayer().GetItemCount(SabrecatTooth)(Game.GetPlayer().removeitem(SabrecatTooth,TOTAL,1))SabrecatToothCHESTREF.additem(SabrecatTooth,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SaltPile ))>= 1Total=  Game.GetPlayer().GetItemCount(SaltPile)(Game.GetPlayer().removeitem(SaltPile,TOTAL,1))SaltPileCHESTREF.additem(SaltPile,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(ScalyPholiotaBits ))>= 1Total=  Game.GetPlayer().GetItemCount(ScalyPholiotaBits)(Game.GetPlayer().removeitem(ScalyPholiotaBits,TOTAL,1))ScalyPholiotaBitsCHESTREF.additem(ScalyPholiotaBits,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SkeeverTail ))>= 1Total=  Game.GetPlayer().GetItemCount(SkeeverTail)(Game.GetPlayer().removeitem(SkeeverTail,TOTAL,1))SkeeverTailCHESTREF.additem(SkeeverTail,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SlaughterfishEgg01 ))>= 1Total=  Game.GetPlayer().GetItemCount(SlaughterfishEgg01)(Game.GetPlayer().removeitem(SlaughterfishEgg01,TOTAL,1))SlaughterfishEgg01CHESTREF.additem(SlaughterfishEgg01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SlaughterfishScales ))>= 1Total=  Game.GetPlayer().GetItemCount(SlaughterfishScales)(Game.GetPlayer().removeitem(SlaughterfishScales,TOTAL,1))SlaughterfishScalesCHESTREF.additem(SlaughterfishScales,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Snowberry ))>= 1Total=  Game.GetPlayer().GetItemCount(Snowberry)(Game.GetPlayer().removeitem(Snowberry,TOTAL,1))SnowberryCHESTREF.additem(Snowberry,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SpiderEgg ))>= 1Total=  Game.GetPlayer().GetItemCount(SpiderEgg)(Game.GetPlayer().removeitem(SpiderEgg,TOTAL,1))SpiderEggCHESTREF.additem(SpiderEgg,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SpikyGrass01 ))>= 1Total=  Game.GetPlayer().GetItemCount(SpikyGrass01)(Game.GetPlayer().removeitem(SpikyGrass01,TOTAL,1))SpikyGrass01CHESTREF.additem(SpikyGrass01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SprigganSap ))>= 1Total=  Game.GetPlayer().GetItemCount(SprigganSap)(Game.GetPlayer().removeitem(SprigganSap,TOTAL,1))SprigganSapCHESTREF.additem(SprigganSap,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(SwampFungalPod01 ))>= 1Total=  Game.GetPlayer().GetItemCount(SwampFungalPod01)(Game.GetPlayer().removeitem(SwampFungalPod01,TOTAL,1))SwampFungalPod01CHESTREF.additem(SwampFungalPod01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Taproot ))>= 1Total=  Game.GetPlayer().GetItemCount(Taproot)(Game.GetPlayer().removeitem(Taproot,TOTAL,1))TaprootCHESTREF.additem(Taproot,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Thistle01 ))>= 1Total=  Game.GetPlayer().GetItemCount(Thistle01)(Game.GetPlayer().removeitem(Thistle01,TOTAL,1))Thistle01CHESTREF.additem(Thistle01,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(TrollFat ))>= 1Total=  Game.GetPlayer().GetItemCount(TrollFat)(Game.GetPlayer().removeitem(TrollFat,TOTAL,1))TrollFatCHESTREF.additem(TrollFat,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(TundraCotton ))>= 1Total=  Game.GetPlayer().GetItemCount(TundraCotton)(Game.GetPlayer().removeitem(TundraCotton,TOTAL,1))TundraCottonCHESTREF.additem(TundraCotton,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(vampireDust ))>= 1Total=  Game.GetPlayer().GetItemCount(vampireDust)(Game.GetPlayer().removeitem(vampireDust,TOTAL,1))vampireDustCHESTREF.additem(vampireDust,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(VoidSalts ))>= 1Total=  Game.GetPlayer().GetItemCount(VoidSalts)(Game.GetPlayer().removeitem(VoidSalts,TOTAL,1))VoidSaltsCHESTREF.additem(VoidSalts,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(Wheat ))>= 1Total=  Game.GetPlayer().GetItemCount(Wheat)(Game.GetPlayer().removeitem(Wheat,TOTAL,1))WheatCHESTREF.additem(Wheat,TOTAL,1)EndifIf (Game.GetPlayer().GetItemCount(WispWrappings ))>= 1Total=  Game.GetPlayer().GetItemCount(WispWrappings)(Game.GetPlayer().removeitem(WispWrappings,TOTAL,1))WispWrappingsCHESTREF.additem(WispWrappings,TOTAL,1)EndifDebug.MessageBox("Got End!")EndifEndEvent


I've no doubt its human error thats to blame.
I just can't figure what I've missed or added.
User avatar
Oceavision
 
Posts: 3414
Joined: Thu May 03, 2007 10:52 am

Post » Tue Jun 19, 2012 11:02 pm

Are you absolutely certain that you have the properties pointing to the chests assigned properly? When I use debug.notification with an object reference assigned, it displays "[ObjectRe" or something like that. There's no getname function or anything and the game tries to just display "[ObjectReference]" but it gets cut off. I only get "None" when the property is not assigned to anything.

And I see absolutely nothing wrong with your script. I use true and false instead of 1 and 0 for parameters, but I tried it your way and it worked fine too.
User avatar
Richus Dude
 
Posts: 3381
Joined: Fri Jun 16, 2006 1:17 am

Post » Wed Jun 20, 2012 1:44 am

If you're sure that the current mod has the containerRef there, are you using a clean save?

The properties could hold their values from a prior savefile otherwise.
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Wed Jun 20, 2012 9:38 am

Are you absolutely certain that you have the properties pointing to the chests assigned properly? When I use debug.notification with an object reference assigned, it displays "[ObjectRe" or something like that. There's no getname function or anything and the game tries to just display "[ObjectReference]" but it gets cut off. I only get "None" when the property is not assigned to anything.

And I see absolutely nothing wrong with your script. I use true and false instead of 1 and 0 for parameters, but I tried it your way and it worked fine too.
I have to be clear. I have no idea if I have assigned the chests properly.
As I said I created a chest. Gave the chest a REF Name in the chests properties box. (Ie Double click chest and add the Reference name to the top of the pop up box.
I then created the script above, and created the poperties for the ingredients and the objectReferance for the container. (I did notice their was a container in the Properties drop down)
I then used the scripts tab of my activator, and selected properties.
In this I assigned values to my properties
PropertyName Type Value

AntlersLarge Ingredients AntlersLarge (0006BC0A)
AntlersLargeCHESTREF2 ObjectReference AntlersLargeCHESTREF2 (01008958)


etc for all the ingredients and containers
User avatar
Kat Stewart
 
Posts: 3355
Joined: Sun Feb 04, 2007 12:30 am

Next

Return to V - Skyrim