Nubbs Posted February 25, 2009 Author Share Posted February 25, 2009 okay so I'm using IrunoHatake's Quest Script found here(http://www.touchofdeathforums.com/smf/index.php?topic=29991.msg268225#msg268225) as a base for these quests…so what happens is Case "0" works 100%, but when i use Case "1" it resets my Exp to "0" after completing the quest and i can't figure out what im doing wrong```' Executes whenever a scripted NPC does an action.Sub ScriptedNPC(Index, Script) Select Case Script Case 0Dim ExpDim xDim yDim zDim aExp = GetplayerExp(index)x = 5y = 20z = 30a = 5 If GetPlayerClass(index) = 1 Then If GetPlayerLevel(index) > 10 Then Call PlayerMsg(index, "player message ", 1) If CanTake(Index, 12, 1) = false Then Call PlayerMsg(index, "player message...", 9)Else Call TakeItem(index, 12, 1) Call PlayerMsg(index, "player message", 2) Call SetplayerExp(index, Exp + a) Call PlayerMsg(index, "You gained 5 experience!", 10)Call SendStats(index) End If Else Call PlayerMsg(index, "player message", 12) End If Else Call PlayerMsg(index, "player message'", 12) End IfEnd Sub Case 1 If GetPlayerClass(index) = 0 Then If GetPlayerLevel(index) < 10 Then Call PlayerMsg(index, "Iplayer message", 1) If CanTake(Index, 12, 1) = false Then Call PlayerMsg(index, "playermessage...", 9)Else Call TakeItem(index, 12, 1) Call PlayerMsg(index, "player message", 2) Call SetplayerExp(index, Exp + 5)) Call PlayerMsg(index, "You gained 5 experience!", 10)Call SendStats(index) End If Else Call PlayerMsg(index, "player message", 12) End If Else Call PlayerMsg(index, "player message'", 12) End If End Sub``` Link to comment Share on other sites More sharing options...
Akselj Posted February 25, 2009 Share Posted February 25, 2009 "End Sub" twice was the first I noticed, and missing "End Select", messy so hard to see… Link to comment Share on other sites More sharing options...
Soljah Posted February 25, 2009 Share Posted February 25, 2009 Hmm that is one messy bit of script, I'd recommend using Baron's quest super script… Much easier to use.http://www.touchofdeathforums.com/smf/index.php/topic,5309.0.html Link to comment Share on other sites More sharing options...
Nubbs Posted February 25, 2009 Author Share Posted February 25, 2009 @[SB:> AkselJ link=topic=39471.msg383774#msg383774 date=1235596750]> "End Sub" twice was the first I noticed, and missing "End Select", messy so hard to see…thanks, i know its not pretty haha Link to comment Share on other sites More sharing options...
balliztik1 Posted February 26, 2009 Share Posted February 26, 2009 ```Call SetplayerExp(index, Exp + 5))```Should only have 1 right parenthesis```Call SetplayerExp(index, Exp + 5)```That and the other two Aksel pointed out are the only errors. It works after that. 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