DropAllItems

From the Oblivion ConstructionSet Wiki
Revision as of 16:11, 3 December 2006 by imported>BiteHandNIN
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
scn DropAllItemsQuestScript

short DropAllItems
ref ActorRef
ref CurObj
short CurObjNum
float fquestdelaytime


begin GameMode
set fquestdelaytime to 0.001

if ActorRef && DropAllItems == 1
if ActorRef.GetNumItems > 0 
set CurObj to ActorRef.GetInventoryObject (ActorRef.GetNumItems - 1)
set CurObjNum to ActorRef.GetItemCount CurObj
ActorRef.Drop CurObj CurObjNum
ActorRef.RemoveItem CurObj CurObjNum
endif
if ActorRef.GetNumItems == 0
	set DropAllItems to 0
endif
endif
end

make this a quest script, attach it to a quest named DropAllItems. In your script

scn MyScript

ref actor

begin onActivate
set Actor to GetActionRef
messageBox "Good job dropping everything."
set DropAllItems.ActorRef to Actor
set DropAllItems.DropAllItems to 1
end