scholastic Posted August 11, 2009 Author Share Posted August 11, 2009 I know what scripting isI don not know how to do itHow do i script a specific npc to do something such as a shopkeeper-I called him a blacksmith but he wont sell,buy,repair or do any of that…Do i need a script?Please help-even if i did have the script where does it go....THE POINT-How can i find a script for my npc's That tell them how to act in my game?Once i do,Where do i use the script..how do i use it and activate it?i basically need a script for my blacksmith as a shopkeeper whom sells/buys/and reapirs things specifically...SORRY POST SO LONG FORGIVE ME.The tutorials aren't getting to the point it does good at first then it tuns into a book this is why i ask im tryin Link to comment Share on other sites More sharing options...
Owen F Posted August 11, 2009 Share Posted August 11, 2009 I have not enough time to explain in specifics but the script your looking for iscall goshopping(index,1) Link to comment Share on other sites More sharing options...
Diskmaster Posted August 12, 2009 Share Posted August 12, 2009 Open up the file in your scripts folder called Main.txtOk, now press CTL Fand type in Sub ScriptedNPC(Index, Script)and u should get this:```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 SelectEnd Sub```ok, now, this part is a little tricky, but highlight the whole thing, and replace it with this:```Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call Goshopping(index, 10)Call PlayerMsg(index, "welcome to my shop!", BRIGHTBLUE)Exit sub Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```Once that is done, go back to the server's main folder and open up a file called DATA.ini. Open this, and find where it says Scripting=0 and change it to Scripting=1Once ALL of that is done, go onto your server and press reload scripts (might just be reload) and then go onto your game. open up the shop editor and make shop 10 into the shop u want the NPC to open when u talk to him. Now open up the NPC editor, and make an NPC and change it's behavior to scripted. Finally, open up your mapeditor and go onto properties and go onto NPC and "spawn" it on the map. (to talk to him, press ctrl while facing it)I sure hope this is what u were looking for 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