parent
1144a5f3e3
commit
fa4d6e3f6f
19 changed files with 56 additions and 50 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,43 @@ |
||||
Scriptname _00E_SafeItemRemove extends Quest Hidden |
||||
|
||||
Function RemoveAllItemsSafeVersion(ObjectReference TransferToLoc = NONE) |
||||
If Gold001 == NONE || _00E_AllAmmos == NONE |
||||
Return |
||||
EndIf |
||||
|
||||
RemoveItemsIncrementally(Gold001, TransferToLoc) |
||||
Form[] arrows = _00E_AllAmmos.ToArray() |
||||
Int i = 0 |
||||
While i < arrows.Length |
||||
RemoveItemsIncrementally(arrows[i], TransferToLoc) |
||||
i += 1 |
||||
EndWhile |
||||
|
||||
If TransferToLoc == NONE |
||||
PlayerREF.removeAllItems(_00E_RemoveAllItems_TrashContainer, abRemoveQuestItems = false) |
||||
_00E_RemoveAllItems_TrashContainer.removeAllItems() |
||||
Else |
||||
PlayerREF.RemoveAllItems(akTransferTo = TransferToLoc, abRemoveQuestItems = true) |
||||
EndIf |
||||
EndFunction |
||||
|
||||
Function RemoveItemsIncrementally(Form akItem, ObjectReference TransferToLoc) |
||||
Int nCount = PlayerREF.GetItemCount(akItem) |
||||
If nCount > 3000000 && akItem == Gold001 |
||||
_00E_PleaseRemoveMoney.Show() |
||||
EndIf |
||||
While nCount > 0 |
||||
PlayerREF.RemoveItem(akItem, 10000, true, TransferToLoc) |
||||
nCount -= 10000 |
||||
EndWhile |
||||
EndFunction |
||||
|
||||
MiscObject Property Gold001 Auto |
||||
|
||||
FormList Property _00E_AllAmmos Auto |
||||
|
||||
actor Property PlayerRef Auto |
||||
|
||||
ObjectReference Property _00E_RemoveAllItems_TrashContainer Auto |
||||
|
||||
Message Property _00E_PleaseRemoveMoney Auto |
Loading…
Reference in new issue