Kimimaru Posted September 7, 2009 Author Share Posted September 7, 2009 Hey! I'm making a quest, and I've got it all down, but I can't seem to figure out how to make it so that the scripted NPC will check to see if you have 3 unstackable items. If you don't, it will tell you that you don't, and if you do, it will also say that you do. I know how to do that part, but I don't know how to make it check to see if you have 3 unstackable items. The **CanTake** function in GodLord's inventory script only works for stackable items.Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Godlord Posted September 7, 2009 Share Posted September 7, 2009 @Kimimaru:> Hey! I'm making a quest, and I've got it all down, but I can't seem to figure out how to make it so that the scripted NPC will check to see if you have 3 unstackable items. If you don't, it will tell you that you don't, and if you do, it will also say that you do. I know how to do that part, but I don't know how to make it check to see if you have 3 unstackable items. The **CanTake** function in GodLord's inventory script only works for stackable items.> > Any help would be greatly appreciated.It works for non-stackable items too, just use 0 as the amount.Regards, Godlord. Link to comment Share on other sites More sharing options...
Kimimaru Posted September 7, 2009 Author Share Posted September 7, 2009 Okay, thanks, but how would I have to write that up to make the scripted NPC look for 3 of that item? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted September 7, 2009 Share Posted September 7, 2009 If CanTake (**,**,**) AND CanTake (**,**,**) AND CanTake (**,**,**) Link to comment Share on other sites More sharing options...
Kimimaru Posted September 7, 2009 Author Share Posted September 7, 2009 EDIT: It's not working, unfortunately. I have this:``` If CanTake(Index, 1, 0) = False And CanTake(Index, 1, 0) = False And CanTake(Index, 1, 0) = False Then Call PlayerMsg(Index, "Did you get the stuff yet?", WHITE) ElseIf CanTake(Index, 1, 0) = True And CanTake(Index, 1, 0) = True And CanTake(Index, 1, 0) = True Then Call TakeItem(index, 1, 0) Call TakeItem(index, 1, 0) Call TakeItem(index, 1, 0) Call PlayerMsg(Index, "Thanks!", YELLOW) End If``` Link to comment Share on other sites More sharing options...
Godlord Posted September 8, 2009 Share Posted September 8, 2009 Try [this](http://www.touchofdeathforums.com/smf/index.php/topic,51481.0.html) and then just use CountPlayerInvItem.Regards, Godlord. Link to comment Share on other sites More sharing options...
xelander Posted September 8, 2009 Share Posted September 8, 2009 ``` If CanTake(Index, 1, 0) And CanTake(Index, 1, 0) And CanTake(Index, 1, 0) Then Call TakeItem(index, 1, 0) Call TakeItem(index, 1, 0) Call TakeItem(index, 1, 0) Call PlayerMsg(Index, "Thanks!", YELLOW) Else Call PlayerMsg(Index, "Did you get the stuff yet?", WHITE) End If``` Link to comment Share on other sites More sharing options...
Godlord Posted September 8, 2009 Share Posted September 8, 2009 CanTake returns when it finds the item, it will not keep track of which items already have been found.Regards, Godlord. Link to comment Share on other sites More sharing options...
Kimimaru Posted September 10, 2009 Author Share Posted September 10, 2009 @Godlord:> Try [this](http://www.touchofdeathforums.com/smf/index.php/topic,51481.0.html) and then just use CountPlayerInvItem.> > Regards,> Godlord.Thanks; that helped me out! Sorry for the late reply; I just go the opportunity to try it out. I've been pretty busy lately and am going to be a lot busier than I was before for a while, so I won't be on here as often. 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