Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

NPC chat


Samon
 Share

Recommended Posts

Find ScriptedNPC.ess in the Server-Scripts-Events folder.
In there you will see

Sub ScriptedNPC(Index, Script)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)

Exit Sub

Case Else
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)

Exit Sub
End Select
End Sub

To add a new Scripted NPC to use in game (other than the default one with case 0 which actually means the first one in the list when you try to place one in game), add this:

Sub ScriptedNPC(Index, Script)
Select Case Script
Case 0
Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)

Exit Sub

**Case 1
Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)

Exit Sub**

Case Else
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)

Exit Sub
End Select
End Sub

If you want more, you just need to add more cases and increment the value of course. e.g Case 2
Link to comment
Share on other sites

The problem with random phrases are that they give NPC's no personalities whatsoever. If you are going to place an NPC in a game you should spend the time to make them worthwhile talking to. A NPC is a Non Playable CHARACTER - not just filler, at least that is how I see them. Guess it depends on how long you wish to spend developing a good game.
Link to comment
Share on other sites

I have created Case 2 in  npc scripts. Those scripts worked just fine until now. When I remove case 2 they work fine again. It seems like I can have only case 0 and case 1 if I want it to work. How do I fix this?
Link to comment
Share on other sites

Case 0
Call PlayerMsg(Index, "You come to Alatik and ask: (Imagine this in your characters way) Hello, my friend, for what do you need me to summon me at this horrible times? // Alatik answers: I am in need of your help, my friend. You see, I need you to travel through the Wellforn forest, which is really dangerous, and you will get to city of Henabrod. There you must find my friend Jareco. Tell him this, by exact words: Greed can destroy worlds, cosmos, universes, and it is only the shadow of The Death's wrath. Once you said that he will recognize you as a friend of The Union of Aratakia. // You answer: Aratakia? That ancient city? It can't be. You must be lying! I know who you are, I know people love you, but why would i do this task? It is too difficult. // Alatik answers: Because it is ment to be. Go now, and please, do not fail me. I know you can do it! Bye. // He said no more, and you somehow realized this must be done. You must leave now.", GREEN)
Exit Sub
Case 1
        Call PlayerMsg(Index, "You approach the old man and ask him: (Itiycw) Excuse me, where is the city of Henabrod? // He answers: Just go south young man, but watch out on this mangy dogs that were released here by the bandits. My name is Tygo by the way. // You answer: Thanks Tygo, bye! // Tygo says: Bye…", GREEN)
Exit Sub
Case 2
Call PlayerMsg(Index, "The Thief tells you: Are you here to steal or you are here for a "friendly visit" to Jake? // You say: Erm...I am new here..just passing by..and who are you? // He answers to you: I? I am just a fellow.. well, I am nobody.. // You say: No, no, you wanted to say: I am just a fellow THIEF. I know your kind from my village. You are in the thieves guild, right? // He answers: Yes, but I am not only a newbie member. I have my well-earned rank of Recruiter. You have recognized me as a thief, so I must recruit you if you want. Go inside Jake's tavern at night, steal some goods, and then return to me. Here, behind me, so I can show you my Items.. // He finished speaking and you left. You must do what you want.", GREEN)
Exit sub

Case Else
Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub

This is it, please help me.
Link to comment
Share on other sites

  Call PlayerMsg(Index, "The Thief tells you: Are you here to steal or you are here for a "friendly visit" to Jake? // You say: Erm…I am new here..just passing by..and who are you? // He answers to you: I? I am just a fellow.. well, I am nobody.. // You say: No, no, you wanted to say: I am just a fellow THIEF. I know your kind from my village. You are in the thieves guild, right? // He answers: Yes, but I am not only a newbie member. I have my well-earned rank of Recruiter. You have recognized me as a thief, so I must recruit you if you want. Go inside Jake's tavern at night, steal some goods, and then return to me. Here, behind me, so I can show you my Items.. // He finished speaking and you left. You must do what you want.", GREEN)

The ""'s quotes in the middle of your playermsg command is causing it to fail. Use ' ' marks instead I believe they are fine to use within the playermsg command. :)

e.g
"friendly visit"
becomes
'friendly visit'
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...