-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINVB_Baby_Container.psc
39 lines (35 loc) · 1.09 KB
/
INVB_Baby_Container.psc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Scriptname INVB_Baby_Container extends ObjectReference
MiscObject Property Misc_Baby Auto Const Mandatory
Armor Property Armor_Baby Auto Const Mandatory
Event OnEquipped(Actor akActor)
Utility.Wait(0.5)
if akActor.GetItemCount(Misc_Baby) == 0
Utility.Wait(0.5)
akActor.removeitem(Armor_Baby, 1, true)
Endif
EndEvent
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
Utility.Wait(0.5)
If akNewContainer as Actor
if ((akNewContainer as Actor).GetItemCount(Misc_Baby) == 0)
Utility.Wait(0.5)
(akNewContainer as Actor).unequipitem(Armor_Baby, 1, true)
Utility.Wait(0.5)
(akNewContainer as Actor).removeitem(Armor_Baby, 1, true)
Endif
elseif !akNewContainer
Utility.Wait(0.5)
Delete()
elseif akNewContainer.GetItemCount(Misc_Baby) == 0
Utility.Wait(0.5)
akNewContainer.removeitem(Armor_Baby, 1, true)
Delete()
Endif
EndEvent
Event OnUnEquipped(Actor akActor)
Utility.Wait(0.5)
if akActor.GetItemCount(Misc_Baby) == 0
Utility.Wait(0.5)
akActor.removeitem(Armor_Baby, 1, true)
Endif
EndEvent