Jump to content

Photo

Item Bundle Pickup Script

Item

  • Please log in to reply
1 reply to this topic

#1 Kite

Kite

  • Members
  • Gender:Male

Posted 18 March 2013 - 05:12 PM

Item Bundle Pickup Script


Description

This is an item pickup script that lets you bundle up to 8 inventory item pickups into a single pickup. It also has an optional item message functionality (at the cost of the first inventory slot if you choose to use it) so that you don't have to give up having an item pickup message to use the script.

It was mostly made to bundle the bow and arrows into a single item, but I'm sure it could have other uses.

Screenshots and Demo

You can see this script at work with the Bow 1 (Short) & Arrows 1 (Wooden) item in Pure Tileset Basic v2.5.

Code

// This script is a pickup script that will give some items.
// This was mostly made to bundle the Bow and Arrows into one item,
// but it could have other uses.
// Bundle this with an item that increases a counter to also increase counters.
// 		D0-D7: Items to give.
//		D0: If D0 is negative, it will display an item pickup message containing the positive version of the number entered...
item script itemBundle{
	void run(int item1, int item2, int item3, int item4, int item5, int item6, int item7, int item8)
	{
		if(item1 > 0)
			Link->Item[item1] = true;
		if(item2 > 0)
			Link->Item[item2] = true;
		if(item3 > 0)
			Link->Item[item3] = true;
		if(item4 > 0)
			Link->Item[item4] = true;
		if(item5 > 0)
			Link->Item[item5] = true;
		if(item6 > 0)
			Link->Item[item6] = true;
		if(item7 > 0)
			Link->Item[item7] = true;
		if(item8 > 0)
			Link->Item[item8] = true;
			
		// Display Item pickup message?
		if(item1 < 0)
		{
			Screen->Message(item1 * -1);
		}
	}//!End void run()
}//!End item script itemBundle

Setup

This is an item pickup script. Attach it to an item (preferably not an actual inventory item).

D0-D7: Items to give (the item ID is shown in the item editor)
D0: If D0 is negative, it will display an item pickup message containing the positive version of the number entered. -1 would display string 1, -42 would display string 42.

For the item message, you should probably have the quest rule for strings freezing action turned on.

If you bundle this with an item that increases counters, you could create grouped items such as a fully functional bow that gives you the bow item, the arrows item, and arrows for your quiver.

Resources

N/A.

#2 symbiote01

symbiote01

    Doyen(ne)

  • Members
  • Real Name:Doug
  • Gender:Male
  • Location:WA

Posted 08 February 2014 - 05:17 PM

So now when Link gets captured by Moblins and is stripped of his items, then breaks out of the rickety prison they construct to contain him- you can wander around their encampment trying to find the bag of stuff they stole.  Awesome! 





Also tagged with one or more of these keywords: Item

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users