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

How do i talk to NPCs? Is it a script?


Madelinesz
 Share

Recommended Posts

Under Sub ScriptedNPC

Find the case you set your  NPC to, make sure its set for scripted, then type out something.

If its case is 0 then it would look like this

```
Case 0
Call PlayerMsg(Index, "Shopkeeper: Welcome to my store! :D", YELLOW)
Call GoShopping(Index, 1)

```
Feel free to put in your own message and the shop number (1 is the first shop ;o)
Link to comment
Share on other sites

Where Case = 6, when creating the npc and you select scripted npc, make sure you move the scrollbar to 6!

if that doesnt work, try this :

Ctrl + F, search for **Sub ScriptedNPC(Index, Script)**

Paste this into the line below  :
```
Call PlayerMsg(Index, "The Script is : " & Script, 15)
```
Let us know how you go.
Link to comment
Share on other sites

Tis what i got now

' Executes whenever a scripted NPC does an action.
Sub ScriptedNPC(Index, Script)
Select Case Script
Call PlayerMsg(Index, "The Script is : " & Script, 15)

Case 6
Call PlayerMsg(Index, "Shopkeeper: Welcome to the Alchemy Store!", BRIGHTRED)
Call GoShopping(Index, 1)
Link to comment
Share on other sites

Replace.

```
'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.
Sub ScriptedNPC(Index, Script)
'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.
Call PlayerMsg(Index, "The Script is : " & Script, 15)

Select Case Script
Case 6
      Call PlayerMsg(Index, "Shopkeeper: Welcome to the Alchemy Store!", BRIGHTRED)
        Call GoShopping(Index, 1)
Case Else
Call PlayerMsg(Index, "Oi, Mandelinesz, you haven't made your npc with the right script number", 4)
End select

End Sub
```

> "Everything that has a beginning has an end, Madelinesz ."
Link to comment
Share on other sites

Mad…

Rename your main.txt, put in a fresh one and replace the sub with the one i just posted, what happens?

for this to work, you will need:

PVC Glue
An empty washing up liquid bottle
Safety scissors

on a more serious note:
when editing the npc, it has to be scripted! with a script of 6!
Link to comment
Share on other sites

T_T im crying now.  This wont WORK!!!!!!

Here edit my whole Main.txt please.  I will shoot someone soon.

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
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...