teh jimpie Posted December 15, 2009 Author Share Posted December 15, 2009 can any1 understand why my script is not working 100%?It doesnt give errors or something, but its a bit bugged.``` Case 5 'Tutor Island / fish & wc / QUEST 6 If Getvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6") = 0 Then Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QUEST6", 1) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) Call PlayerMsg(Index, "Fish & Wc tutor: Goodluck.", WHITE) ElseIf Cstr(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6")) = 1 Then If CanTake(Index, 156, 1) Then If CanTake(Index, 159, 1) Then Call TakeItem(Index, 156, 1) Call TakeItem(Index, 159, 1) Call PlayerMsg(Index, "Fish & Wc tutor: Thanks for helping!", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6", 2) Else Call PlayerMsg(Index, "Fish & wc tutor: You don't have the items I asked for yet, I'll show you again what I want.", RED) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) End If ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6") = 2 Then Call PlayerMsg(Index, "Fish & Wc tutor: You already have helped me, go to your next tutor.", RED) End If End If Exit Sub```Its a quest, if you brought a shrimp and a log to he man, you have done the quest.If you dont have the items, it **should** say:``` Else Call PlayerMsg(Index, "Fish & wc tutor: You don't have the items I asked for yet, I'll show you again what I want.", RED) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) End If```but it doesnt say that, it says nothing, until i bring the items, then it will say``` ElseIf Cstr(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6")) = 1 Then If CanTake(Index, 156, 1) Then If CanTake(Index, 159, 1) Then Call TakeItem(Index, 156, 1) Call TakeItem(Index, 159, 1) Call PlayerMsg(Index, "Fish & Wc tutor: Thanks for helping!", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6", 2)```so how i make this work?``` Else Call PlayerMsg(Index, "Fish & wc tutor: You don't have the items I asked for yet, I'll show you again what I want.", RED) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) End If```and it doesnt say (if you done the quest)``` ElseIf GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6") = 2 Then Call PlayerMsg(Index, "Fish & Wc tutor: You already have helped me, go to your next tutor.", RED)```any1 know how to fix? XD Link to comment Share on other sites More sharing options...
Sowether Posted December 15, 2009 Share Posted December 15, 2009 Try doing this:```If CanTake(Index, 156, 1) and CanTake(Index, 159, 1) Then Call TakeItem(Index, 156, 1) Call TakeItem(Index, 159, 1) Call PlayerMsg(Index, "Fish & Wc tutor: Thanks for helping!", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6", 2)Else Call PlayerMsg(Index, "Fish & wc tutor: You don't have the items I asked for yet, I'll show you again what I want.", RED) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) End If``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 15, 2009 Share Posted December 15, 2009 ``` Case 5 'Tutor Island / fish & wc / QUEST 6 Map = GetPlayerMap(index) + 1000 If CInt(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6")) = 0 Then Call PutVar("Scripts\Charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "QUEST6", 1) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) Call PlayerMsg(Index, "Fish & Wc tutor: Goodluck.", WHITE) ElseIf CInt(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6")) = 1 Then If Can_Take(Index, 156, 1) Then If Can_Take(Index, 159, 1) Then Call Take_Item(Index, 156, 1) Call Take_Item(Index, 159, 1) Call PlayerMsg(Index, "Fish & Wc tutor: Thanks for helping!", WHITE) Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6", 2) Else Call PlayerMsg(Index, "Fish & wc tutor: You don't have the items I asked for yet, I'll show you again what I want.", RED) Call CustomMenuShow(Index, Map, "\GUI\Custom\quest6.bmp", 1) End If ElseIf CInt(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest6")) = 2 Then Call PlayerMsg(Index, "Fish & Wc tutor: You already have helped me, go to your next tutor.", RED) End If End If Exit Sub``` Link to comment Share on other sites More sharing options...
teh jimpie Posted December 16, 2009 Author Share Posted December 16, 2009 for both a 'no', doesnt work.note: the items it take/give are stackable.note: when i talk to the NPC it put my 'PutVar… Quest 1, 1)' so when i look in my charextras folder & getplayname. (for me jimpie.ini) it says quest6=1 Link to comment Share on other sites More sharing options...
Admiral Refuge Posted December 16, 2009 Share Posted December 16, 2009 @teh:> for both a 'no', doesnt work.> > note: the items it take/give are stackable.> note: when i talk to the NPC it put my 'PutVar… Quest 1, 1)' so when i look in my charextras folder & getplayname. (for me jimpie.ini) it says quest6=1Could someone else try Soul's script? Because jimple has been having many errors with item-giving scripts, it may be another error somewhere in his scripts, preventing it from working.Soul, the only thing I could think of that would prevent yours from working, could be not Diming the Map variable, or that jimpie has Godlord's CanTake and TakeItem subs, instead of Baron's Take_Item and Take_Item; I can't test any scripts, due to the fact that I'm not using Windows, but could you or someone else make sure it actually works?If it does, then the problem lies on jimpie's end. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 16, 2009 Share Posted December 16, 2009 @Ã…ÃÂüiÑÂôζ:> @teh:> > > for both a 'no', doesnt work.> > > > note: the items it take/give are stackable.> > note: when i talk to the NPC it put my 'PutVar… Quest 1, 1)' so when i look in my charextras folder & getplayname. (for me jimpie.ini) it says quest6=1> > Could someone else try Soul's script? Because jimple has been having many errors with item-giving scripts, it may be another error somewhere in his scripts, preventing it from working.> > Soul, the only thing I could think of that would prevent yours from working, could be not Diming the Map variable, or that jimpie has Godlord's CanTake and TakeItem subs, instead of Baron's Take_Item and Take_Item; I can't test any scripts, due to the fact that I'm not using Windows, but could you or someone else make sure it actually works?> > If it does, then the problem lies on jimpie's end.I'll test it, but it should work properly, considering that Kirby Questmaker doesn't work anyway because GetVar returns a string, not a number >.>. Link to comment Share on other sites More sharing options...
teh jimpie Posted December 17, 2009 Author Share Posted December 17, 2009 i didnt make it with kirby's quest maker. but with sadscript guides.and does it work? or didnt you test it? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 17, 2009 Share Posted December 17, 2009 * considering GetVar. My bad. Link to comment Share on other sites More sharing options...
teh jimpie Posted December 20, 2009 Author Share Posted December 20, 2009 so what's the correct script XD Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 20, 2009 Share Posted December 20, 2009 CInt(GetVar(…))Would return a number, or you could just put quotes around your numbers. 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