Jump to content

Story manager - Player Add Item - multiple items


dizietemblesssma

Recommended Posts

When trying to use this event in the story manager, I cannot get an event for more than one (the first) item taken from a container, or pickpocketed from an actor. Taking items from a table etc. in quick succession works.

Is this normal behaviour?

My quest in the story manager has the fragment:

debug.trace("DMN: steal quest started")
utility.wait(0.1)
debug.trace("DMN: crime_type = "+kmyQuest.crime_type)
If kmyQuest.crime_type == 1 && kmyQuest.show_thefts == True
debug.notification("You stole "+kmyQuest.stolen_item.GetName()+" from "+kmyQuest.orig_owner.GetDisplayName())
stop()
ElseIf kmyQuest.crime_type == 3 && kmyQuest.show_picks == True
debug.notification("You pickpocketed "+kmyQuest.stolen_item.GetName()+" from "+kmyQuest.orig_owner.GetDisplayName())
stop()
EndIf
stop()

and the script attached that is referenced by 'kmyQuest':

 

 

ScriptName dz_crime_steal_notify_script Extends Quest
Actor Property orig_owner Auto
Location Property steal_location Auto
Form Property stolen_item Auto
Int Property crime_type Auto
Bool Property show_thefts Auto
Bool Property show_picks Auto
Event OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, int aiAcquireType)
dz_misc_mcm_menu_script scriptRef = Game.GetFormFromFile(0x00000800, "dz_misc_mcm_menus.esp") As dz_misc_mcm_menu_script
show_thefts = (Game.GetFormFromFile(0x00000800, "dz_misc_mcm_menus.esp") As dz_misc_mcm_menu_script).toggle_steal
show_picks = (Game.GetFormFromFile(0x00000800, "dz_misc_mcm_menus.esp") As dz_misc_mcm_menu_script).toggle_pick
crime_type = aiAcquireType
If aiAcquireType == 5
debug.messagebox("you took from a container")
EndIf
If aiAcquireType == 1
orig_owner = akOwner As Actor
steal_location = akLocation
stolen_item = akItemBase
String steal_msg = "You stole "+stolen_item.GetName()+" from "+orig_owner.GetDisplayName()+" at time: "+Utility.GameTimeToString(Utility.GetCurrentGameTime())
scriptRef.steal_list = PapyrusUtil.PushString(scriptRef.steal_list,steal_msg)
ElseIf aiAcquireType == 3
orig_owner = akOwner As Actor
steal_location = akLocation
stolen_item = akItemBase
String pick_msg = "You pickpocketed "+stolen_item.GetName()+" from "+orig_owner.GetDisplayName()+" at time: "+Utility.GameTimeToString(Utility.GetCurrentGameTime())
scriptRef.pick_list = PapyrusUtil.PushString(scriptRef.pick_list,pick_msg)
EndIf
self.stop()
EndEvent

;/ akOwner: The ObjectReference that owned the object.
akContainer: The ObjectReference that contained the object.
akLocation: The Location where it happened.
akItemBase: The base object of the item that was added to the player's inventory.
aiAcquireType: The type of acquire that was performed. Will be one of the following: 0: None
1: Steal
2: Buy
3: Pick-pocket
4: Pick up
5: Container
6: Dead body /;

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...