Jump to content

NPC's & Scripts


Spudscorner

Recommended Posts

I have spent some time on the wiki and I have a script that I have stolen from there and amended for my own use, but I hav a problem and I can't find an answer for it there.

 

I have a guard that when activated gives the player a key, but I can't talk to the npc now. None of the options show up. I do receive the key and the script works but I want to be able to talk to the guard aswell.

 

I am using the following script.

scriptname 00TCPDGuardKey

begin onactivate
Ref MyItem
Short count

set MyItem to SecretDoorKey
	if player.GetItemCount MyItem == 0
 		player.additem MyItem 1
endif

End

 

Could somebody tell me what I am doing wrong or point me in the right direction.

 

Cheers

Spudscorner

Link to comment
Share on other sites

I answered this in the PM I just sent you, but for everyone else's benefit, adding "Activate" after the if loop should cause the normal behavior to start.

 

Mez

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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