Force Greeting & Attack

Post » Sat Sep 06, 2014 2:56 am

Hello all,

I'm working on a quest but I encounter a little problem. I need something (surely a script) in order to finish my quest and that is why I need your help (because I'm novice on scripting).

I have created a NPC and I want him to force greeting with the player, but only when the player is holding an unique object (in this case it is an emerald). And after this greeting, I would like to add a "SetFight" function to the NPC with an entry on the Journal.

I saw few things about this, like adding a GetDistance function, but I have no idea how I can create this. If you have any idea to resolve it...

I've got a little idea of this script...

Spoiler
Begin AarnoldScript
short greetonce
short nolore
short castonce
short OnPCHitMe
if ( OnPCHitMe == 1 )
if ( GetJournalIndex "VANG-EmeraldOfTheDamned" == 35 )
if ( greetonce == 0 )
if ( GetJournalIndex "ingred_emerald_damned" >= 1 )
Journal VANG-EmeraldOfTheDamned 40
ForceGreeting
set greetonce to 1
Goodbye
SetFight100
endif
endif
endif
endif
End

User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Return to III - Morrowind