Murdoc Posted August 12, 2009 Author Share Posted August 12, 2009 ``` If CanTake(Index, 1, 1) = true And CanTake(Index, 2, 1) = true And CanTake(Index, 3, 1) = true ThenCall PlayerMsg(index, "Here is the item4 I promised!", 12)Call TakeItem(index, 1, 1)Call TakeItem(index, 2, 1)Call TakeItem(index, 3, 1)Call GiveItem(index, 4, 1) ElseCall PlayerMsg(index, "Bring me an item1, item2 and item3 and I'll make you an item4!", 12) End If```It's supposed to be a scripted npc that checks for 3 different items, and if you have them you get another item. I'm pretty new at scripting, so I'll be surprised if it's totally right… Link to comment Share on other sites More sharing options...
Godlord Posted August 12, 2009 Share Posted August 12, 2009 Try:> If CanTake(Index, 1, 0) = True And CanTake(Index, 2, 0) = True And CanTake(Index, 3, 0) = True Then> Call PlayerMsg(Index, "Here is the item4 I promised!", 12)> Call TakeItem(Index, 1, 1)> Call TakeItem(Index, 2, 1)> Call TakeItem(Index, 3, 1)> Call GiveItem(Index, 4, 1)> Else> Call PlayerMsg(Index, "Bring me an item1, item2 and item3 and I'll make you an item4!", 12)> End IfRegards, Godlord. 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