Jump to content

Script Help


ciakko

Recommended Posts

Hi, I need help to complete my mod.

 

I have a dead NPC, I would resuscitate him interacting with his body, using for example a potion on him.

I wish that when I interact with the dead body appears a message like: Do you want to use the potion "resurrection"?

Can someone give me an example script?

Thanks

Link to comment
Share on other sites

I haven't tested and debugged this script, but it would run a bit like this:

 

SCN AACIDeadNPCScript

; Object script Applied to the Dead NPC

Short Button

Begin OnActivate Player
   If GetDead == 1 && Player.GetItemCount AACIPotionResurrection >= 1
       MessageBox "Do you want to use the potion 'resurrection?'" "Yes" "No"
    Else
        Activate
    EndIf
End


Begin Gamemode

Set button to getbuttonpressed
    If button > -1
  If button == 0
               Player.RemoveItem AACIPotionResurrection 1
	Resurrect
               Set button to 2	
  Endif
     Endif
End

 

 

Scripts like this are treacherous and you may need lots of testing and adjusting. The DoOnce functions often go awry.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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