Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

A Little Trouble (SOLVED)


Kimimaru
 Share

Recommended Posts

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

@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

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

```
                  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

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...