Squiddle Posted April 13, 2009 Author Share Posted April 13, 2009 Does anyone see an error with this code?```sub quest11(index)If GetPlayerNecklaceSlot(index) = 0 Then Call CustomMenuShow(Index, "Forest Quests", "\GUI\CUSTOM\Forest\ForestQuests\Stray Cat Quest\StrayCat1.gif", 1)Else If GetPlayerInvItemNum(index, GetPlayerNecklaceSlot(index)) = 401 Then Call CustomMenuShow(Index, "Forest Quests", "\GUI\CUSTOM\Forest\ForestQuests\Stray Cat Quest\StrayCat2.gif", 1) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & "AncientForest.ini", "QUESTS", "Flag1", 1) Else Call CustomMenuShow(Index, "Forest Quests", "\GUI\CUSTOM\Forest\ForestQuests\Stray Cat Quest\StrayCat1.gif", 1) End IfElse Call CustomMenuShow(Index, "Forest Quests", "\GUI\CUSTOM\Forest\ForestQuests\Stray Cat Quest\StrayCat1.gif", 1)End IfEnd Sub```I can't figure out why it's not working :( Link to comment Share on other sites More sharing options...
dg1423 Posted April 13, 2009 Share Posted April 13, 2009 what about it isn't working? Link to comment Share on other sites More sharing options...
Squiddle Posted April 13, 2009 Author Share Posted April 13, 2009 The whole thing, when I try to talk to the NPC which activates the sub, nothing happens. Link to comment Share on other sites More sharing options...
dg1423 Posted April 13, 2009 Share Posted April 13, 2009 throw your ScriptedNPC sub up, or PM me your main. Link to comment Share on other sites More sharing options...
Squiddle Posted April 14, 2009 Author Share Posted April 14, 2009 Ok, I sent it to you. Link to comment Share on other sites More sharing options...
dg1423 Posted April 14, 2009 Share Posted April 14, 2009 use this:```Sub ScriptedNPC(Index, Script) Select Case Script Case 0 Call CustomMenuClose(Index) If GetVar("Scripts\charextras\" & GetPlayerName(Index) & "AncientForest.ini", "QUESTS", "Flag1") = "0" Then Call quest11(index) ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & "AncientForest.ini", "QUESTS", "Flag1") = "1" Then Call quest12(index) ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & "AncientForest.ini", "QUESTS", "Flag1") = "2" Then Call quest13(index) Else Call quest11(index) End If 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```lemme know what happens Link to comment Share on other sites More sharing options...
Squiddle Posted April 14, 2009 Author Share Posted April 14, 2009 Okay, I tried it, but nothing happened again. The NPC just sits there, ignoring me. Link to comment Share on other sites More sharing options...
YuraguKoto Posted April 15, 2009 Share Posted April 15, 2009 Might sound stupid but did you give the NPC stats? If you didn't then it might not work. Link to comment Share on other sites More sharing options...
Squiddle Posted April 15, 2009 Author Share Posted April 15, 2009 Yeah, I did thanks =/. It's very strange, it's like the subs aren't being called… 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