dragonlord52 Posted February 13, 2009 Author Share Posted February 13, 2009 Alright so I am working on a quest script but it wasn't working so I did my typical thing to test what is and isn't working and I have come across an issue. Under the Case 0 in scripted NPC I have a Call TakeItem command (yes it is in my main). I have two NPCs with this command but only one of them works. I have 2 other NPCs and two other cases with the same command and neither work. Any ideas?Here's the main ScriptedNPC' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script)Select Case ScriptCase 0Call TakeItem(Index, 1, 1)Exit SubCase 1Call TakeItem(Index, 1, 1)Exit SubCase 2Call TakeItem(Index, 1, 1)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...
Dark_Marine_123 Posted February 13, 2009 Share Posted February 13, 2009 Have you confirmed Sub TakeItem works correctly? :o Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 13, 2009 Author Share Posted February 13, 2009 Yes, like I said, it works with one of them but none of the others.I also use that sub in pretty much all of the scripts I make. Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 13, 2009 Share Posted February 13, 2009 Well it looks right, you're sure the npcs are selected for script 0 and 1? Link to comment Share on other sites More sharing options...
DarkMazer Posted February 14, 2009 Share Posted February 14, 2009 Try making sure the NPCs you're using have HP. Messages and scripts only trigger on an NPC when it has HP. (That's not really a scripting error, though…) Link to comment Share on other sites More sharing options...
Alster Posted February 14, 2009 Share Posted February 14, 2009 This error is client side config, no doubt about it. My suggestions;1) Reload your server scripts2) Restart the server3) Make sure your case is set to 1 or 24) As said, make sure your NPC has HP5) Try using a random case (say 47)Maybe another script be conflicting this one… although I really doubt it. This script is so simple that no error should occur. And you say you've used it before so I find no reason for error. Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 15, 2009 Author Share Posted February 15, 2009 Okay, I'll try that tomorrow, been kinda busy lately.I forgot to do the HP at first but quickly added in 1 after I noticed.I have tried before this post:1) Double checking EVERYTHING2) Reloading the scripts Link to comment Share on other sites More sharing options...
dragonlord52 Posted February 18, 2009 Author Share Posted February 18, 2009 The server restart worked like a charm, thank you 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