• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to make NPC do something BEFORE greeting the player?

Xapafe

Member
Joined
Jul 22, 2013
Messages
83
Reaction score
6
Let's say if my player storage value is 999, how can I make an NPC check for this and do the reaction before saying hello?

For example, if you go upstairs in the monastery on the isle of the kings then Costello will immediately yell at you when you say hi. But the way I have it setup now is that he will yell at you after you first say hi, then say anything else.


This is OTHire


Any thoughts?
 
Last edited:
Let's say if my player storage value is 999, how can I make an NPC check for this and do the reaction before saying hello?

For example, if you go upstairs in the monastery on the isle of the kings then Costello will immediately yell at you when you say hi. But the way I have it setup now is that he will yell at you after you first say hi, then say anything else.

Any thoughts?
You do that in the greetings function, just return hes yelling message and release the focus.
I cannot provide you an example right now, but should be easy to figure out how to do.
 
You do that in the greetings function, just return hes yelling message and release the focus.
I cannot provide you an example right now, but should be easy to figure out how to do.

Opps I forgot to mention this is OTHire.. if that matters. The greetings are handled in the NPC xml files

Code:
<parameter key="message_greet" value="Hello."/>

Silly me thought I could just delete that and force it through the lua file, but nope. It has a default greet if the parameter is missing.
 
Back
Top Bottom