Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Jun3d1

Allies
  • Posts

    1
  • Joined

  • Last visited

Jun3d1's Achievements

Layman

Layman (1/11)

0

Reputation

  1. Hello All, I am currently writing a script in which, if an item is added to a chest, it will return with gold after an amount of time. I keep running into the problem that the gold value being returned is equal to the base item's gold value and not the value of the item itself (enchanted items). Below is an example of my script and if anyone could help it would be greatly appreciated. ScriptName TradersChest02 Extends ObjectReference Int Property TradersGold Auto MiscObject Property Gold Auto Event OnItemAdded(Form GetFormID, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Int value = (GetGoldValue() * aiItemCount) TradersGold += Value registerforupdategametime(24.0) EndEvent Event OnItemRemoved(Form GetFormID, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) Int value = (GetGoldValue() * aiItemCount) TradersGold -= Value If TradersGold < 0 TradersGold = 0 endif EndEvent Event OnUpdateGameTime() if TradersGold > 0 TradersGold = TradersGold*90/100 self.removeallitems() self.additem(Gold,TradersGold) TradersGold = 0 endif EndEvent
×
×
  • Create New...