Okay, I've found a few scripts that let you warp after seeing a message from an NPC but nothing like what I want to accomplish. The scripts in question can be found here.
http://www.purezc.ne...arp#entry843008
http://www.purezc.ne...arp#entry855249
With the current setup for NPCs, you can use string control codes to decide what message to play whether you have an item or not and give or take items from Link. The problem is that I would like for the item to be held up and the message string played whenever you get it and the string control codes won't let you do that. The message then warp scripts are set up where you will warp after any message that the NPC plays rather than a specific message. I have some ideas about how to implement this, but I don't know enough scripting yet to do it myself.
For example, besides adding the argument for warpcombo you could also add an argument or variable for a specific message to be detected. But the thing is, since the code tells you to play the message and the string tells you what message to play; can the game detect what message is played and only then warp you as set up in those scripts? I'm working with the latest build of 2.5.
The point of all this is to set up a trading quest series of events where you can find an NPC and if you don't have something he'll say one thing while he'll say another if you do and take that item away, then you'll be warped to a screen where you get the item which is the reward to avoid having to creating fake items. I've seen requests for ways to make an item warp you, but they would require me to set up dummy items to trigger the warp; then once you warped you could get the real item. That method might work, but if you are switching out a lot of items then you'd have to create a whole lot of fake items and would need a means to take one item away once you get another.
In the current setup, the items in question are all the same item class so that one replaces the other when you acquire it and I'm not sure if I would have to set up the dummy items as a specific item class or not for it to work properly. In any case, I'm sure that there is a way to combine the warp after message script with existing NPC script but not so certain about how to detect a specific message. If this is impossible, I'll just go with the item warp method but I'd still need to know how to take away an item and get another. Here's an untested code I wrote just now while thinking about this that might do that but I don't know if it would work or if there's a better way to do it than this.
ffc script SwitchItems(int item_1, int item_2){ if(Link->item[item_1]){ Link->Item[item_1] = false; Link->Item[item_2] = true; } }
If setting up a bunch of dummy items is easier than getting the warp script to detect a specific message (or if detecting an item is the only way possible to do this) then I'd be willing to do that. I'd just rather post the request and see if there is any response than go through the lengthy process of setting up a lot of new items that only exist to trigger warps. Thanks to anyone who replies!