Short answer:
If you've got those items in your item list and their item numbers match the constants in the script, all you need to do is calculate the new LTMs:
LTM = first frame of new animation - first frame of default animation
LTMs work by offsetting Link's graphic tile by the LTM value, showing a different tile instead. For example, if Link's current graphic is tile 100, and he has an item equipped with a LTM of 60, Link's graphic will appear as tile 160. For a simpler example, a LTM of 20 will use the row of tiles directly beneath Link's default tiles (since a row of tiles in ZC is 20 long). If your Link tiles are all over the place (this is bad tile table management and should be avoided) you can calculate the LTM by subtracting the tile number of Link's first default frame (walking, facing right) from the tile number of the first frame of Link's new animation. Another thing to bear in mind is that the animation frame order and placement for catching/pulling/holding need to match Link's default animation.
-----------------------------------
Long answer:
Look for these three lines at the top of the script:
const int LTM_CATCHING = 135; // LTM for Link catching a block with the Power Bracelet
const int LTM_PULLING = 136; // LTM for Link pulling a block with the Power Bracelet
const int LTM_HOLDING = 133; // LTM for Link holding a block with the Power Bracelet
The way this script works is by toggling dummy items in Link's inventory on and off, and those dummy items have Link Tile Modification (LTM) values. If you look at the Item list in the demo example you'll see the items "LTM: Catch" (#135), "LTM: Pull" (#136) and "LTM: Hold" (#133) (and a few other "LTM" items that aren't relevant here, for things like Roc's Cape).
LTMs work by offsetting Link's graphic tile by the LTM value, showing a different tile instead. For example, if Link's current graphic is tile 100, and he has an item equipped with a LTM of 60, Link's graphic will appear as tile 160. For a simpler example, a LTM of 20 will use the row of tiles directly beneath Link's default tiles (since a row of tiles in ZC is 20 long). If your Link tiles are all over the place (this is bad tile table management and should be avoided) you can calculate the LTM by subtracting the tile number of Link's first default frame (walking, facing right) from the tile number of the first frame of Link's new animation. Another thing to bear in mind is that the animation frame order and placement for catching/pulling/holding need to match Link's default animation.
If we look at the data for the item "LTM: Catch" we can see it has a LTM of 600. This means when the script toggles this item on (when Link grabs a rock) Link's graphic changes from his default tile number to his default tile number +600. If we look at the tile page for this quest we can see that the tile ID for the first frame of Link's default animation is 18200, and if we look at the tile +600 (tile 18800) we find the first frame of Link's "catch" animation. Again, notice that the number of frames and Link's direction in his "catch" animation (and his "hold" and "pull" too) line up exactly with his default animation.
SO!
With all that explained, can you figure out what you need to do in order to recreate this functionality in your own quest? If not, here's a step-by-step guide of how to set it up:
- Arrange your new "catch", "pull" and "hold" tiles so that they match Link's default walking animation (hopefully you have some free space near Link's default tiles, but that's not necessary).
- Calculate the LTM values for each of those actions (LTM = first frame of new animation - first frame of default animation). Write these down somewhere.
- Create three new blank items, one for each new animation (give them meaningful names like "LTM: Catch"). The demo has them as shield class items and "Catch" has block flags set to 128 but I'm not sure if this is necessary.
- Give each item the corresponding Link Tile Modification value you calculated and wrote down earlier.
- Write down the item number for each of these new items (highlight them in the Item list and look just below their graphic).
- Edit the global script and change the values for LTM_CATCHING, LTM_PULLING and LTM_HOLDING to their corresponding item number.