Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 I really have not figured out how to talk to npcs. Also, how can i make a npc open a shop when talked to? Get back to me soon pls. ty Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 27, 2009 Share Posted February 27, 2009 Under Sub ScriptedNPCFind 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 0Call 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 More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 Sorry but where do i find that? Link to comment Share on other sites More sharing options...
Soljah Posted February 27, 2009 Share Posted February 27, 2009 Within your Main.txt, under the sub "ScriptedNPC".It is suggested you actually learn some scripting before you start trying to change things like this, otherwise you could mess something up.To talk to an NPC just walk up and press Ctrl. Link to comment Share on other sites More sharing options...
Chakkra Posted February 27, 2009 Share Posted February 27, 2009 Ok, I don't think that she's worried about scripts at the moment.. Madeline, to talk to NPCs you must attack them by pressing CTRL. First, you must set their speech in the npc editor. Link to comment Share on other sites More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 Dosen't work.. Link to comment Share on other sites More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 if NOTHING works, then you may find your main.txt is bugged, or youve lost connection to your server. where did you stick the code? Link to comment Share on other sites More sharing options...
Drag0n Posted February 27, 2009 Share Posted February 27, 2009 Put the code in here:Sub ScriptedNPC(index, Script)Case XCall PlayerMsg(Index, "Shopkeeper: Welcome to my store! ", BRIGHTRED)Call GoShopping(Index, 1)…Etc.Change "X" variable to the last case +1. Link to comment Share on other sites More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 This is my main.txt for that section. Also, does the CASE mean NPC ID?Sub ScriptedNPC(Index, Script)Select Case ScriptCase 6Call PlayerMsg(Index, "Shopkeeper: Welcome to my store! :D", YELLOW)Call GoShopping(Index, 1) Link to comment Share on other sites More sharing options...
Drag0n Posted February 27, 2009 Share Posted February 27, 2009 In answer to question in shoutbox - NPC's have to be SCRIPTED attribute. Link to comment Share on other sites More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 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 More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 Tis what i got now' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script)Select Case ScriptCall PlayerMsg(Index, "The Script is : " & Script, 15)Case 6Call PlayerMsg(Index, "Shopkeeper: Welcome to the Alchemy Store!", BRIGHTRED)Call GoShopping(Index, 1) Link to comment Share on other sites More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 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 selectEnd Sub```> "Everything that has a beginning has an end, Madelinesz ." Link to comment Share on other sites More sharing options...
Drag0n Posted February 27, 2009 Share Posted February 27, 2009 Lol, might need a End If, End Select, or End Sub in there. Forgot. xD Link to comment Share on other sites More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 What the hells with this NPC! I attack it and nothing happens. Jeesuss! Link to comment Share on other sites More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 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 GlueAn empty washing up liquid bottleSafety scissorson 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 More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 > Lol, might need a End If, End Select, or End Sub in there. Forgot. xDLol. I know that feeling. Link to comment Share on other sites More sharing options...
Madelinesz Posted February 27, 2009 Author Share Posted February 27, 2009 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 ScriptCase 0Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)Exit SubCase ElseCall PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)Exit SubEnd SelectEnd Sub Link to comment Share on other sites More sharing options...
Drag0n Posted February 28, 2009 Share Posted February 28, 2009 @Madelinesz:> T_T im crying now. This wont WORK!!!!!!> > I will shoot someone soon.AAAAHH!! I'll try to help though. xD Link to comment Share on other sites More sharing options...
Madelinesz Posted February 28, 2009 Author Share Posted February 28, 2009 Ty<3 Link to comment Share on other sites More sharing options...
Madelinesz Posted February 28, 2009 Author Share Posted February 28, 2009 Dragon you finishing it? D: Link to comment Share on other sites More sharing options...
Luner Posted March 2, 2009 Share Posted March 2, 2009 umm im kinda having the same problum, what does "Case" mean, like case 0, does that mean if i put a ncp scriped, i should put script 0? :huh: Link to comment Share on other sites More sharing options...
Hippoman789 Posted March 2, 2009 Share Posted March 2, 2009 yes. case=number of script Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now