Jump to content

Script - counting companion items?


Recommended Posts

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
Scriptname Fragments:Quests:QF_LtC_MaryJ_Quest_01000F99 Extends Quest Hidden Const

;BEGIN FRAGMENT Fragment_Stage_0001_Item_00
Function Fragment_Stage_0001_Item_00()
;BEGIN AUTOCAST TYPE affinityscenehandlerscript
Quest __temp = self as Quest
affinityscenehandlerscript kmyQuest = __temp as affinityscenehandlerscript
;END AUTOCAST
;BEGIN CODE
If (Alias_MaryJ.GetActorRef().GetItemCount(LtC_Wine) == 1 && Alias_MaryJ.GetActorRef().GetItemCount(LtC_Rose) == 1)

(Alias_MaryJ.GetActorRef() as CompanionActorScript).RomanceSuccess()
kmyquest.UnlockedInfatuation()
Debug.MessageBox("You have romanced Mary Jane")

Else

Debug.MessageBox("Give Mary some wine and a flower for a Romantic evening.")

EndIf
;END CODE

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

 

ReferenceAlias Property Alias_MaryJ Auto Const Mandatory

Potion Property LtC_Wine Auto Const

Potion Property LtC_Rose Auto Const

Link to comment
Share on other sites

I think the problem is not the script itself, I would add a debug message at the top of the fragment to make sure it is running when its supposed to run. Its more likely that the quest is not running because of aliases.

If the message actually shows up, then check the fragment properties, you might not be filling them correctly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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