User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24

Thread: Item-2: Item-2 is here! Get your Shovels ready!

  1. #1
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Item-2: Item-2 is here! Get your Shovels ready!

    Okay, I couldn't resist. I basically did the same thing back at PureZC. SUE ME.

    Okay, here you go. This is the Oracles Shovel!

    Code:
    // Shovel- Well, what do you THINK it does? :P It digs up the ground directly in front of you,
    // provided it's not solid or a certain combo. The combos it can't dig up are yours to decide!
    // However, I give you three solid combos it CAN dig up, so use them wisely.
    // Variables:
    // ComboDug- Combo that appears when you dig in a diggable spot.
    // Combo1- First Combo you can't dig in.
    // Combo2- 2nd Combo you can't dig in.
    // Combo3- 3rd No-Dig Combo.
    // Combo4- 4th No-Dig Combo.
    // Combo5- 5th No-Dig Combo.
    // ComboS1- First Solid Combo you can dig in.
    // ComboS2- 2nd Solid Dig Combo.
    // ComboS3- 3rd Solid Dig Combo.
    
    import "std.zh"
    item script Shovel
    {
    	int ComboDug = 0;
    	int Combo1 = 0;
    	int Combo2 = 0;
    	int Combo3 = 0;
    	int Combo4 = 0;
    	int Combo5 = 0;
    	int ComboS1 = 0;
    	int ComboS2 = 0;
    	int ComboS3 = 0;
    	int ComboX = 0;
    	int ComboY = 0;
    	int ComboSDug = 0;
    
    	void run()
    	{
    		if (Link->Dir == 0)
    		{
    			int BlockCheckY = Link->Y - 16;
    			int BlockCheckX = Link->X;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			
    			if ( (Screen->ComboD [BlockPosition] == Combo1 || Screen->ComboD [BlockPosition] == Combo2 || Screen->ComboD [BlockPosition] == Combo3 || Screen->ComboD [BlockPosition] == Combo4 || Screen->ComboD [BlockPosition] == Combo5 || Screen->ComboD [BlockPosition] ==ComboDug) || (Screen->ComboS [BlockPosition] == 15 && (Screen->ComboD [BlockPosition] != ComboS1 && Screen->ComboD [BlockPosition] != ComboS2 && Screen->ComboD [BlockPosition] != ComboS3)) )
    			{
    				Game->PlaySound(6);
    				Quit();
    			}
    				ComboY = Link->Y - 16;
    				ComboX = Link->X;
    				float remainder = ComboX % 16;
    				if (remainder <= 8)
    				{
    					ComboX = ComboX - remainder;
    				}
    				else
    				{ 
    					ComboX = ComboX + 16 - remainder;
    				}
    				float remainderY = ComboY % 16;
    				if (remainderY <= 8)
    				{
    				ComboY = ComboY - remainderY;
    				}
    				else
    				{
    					ComboY = ComboY + 16 - remainderY;
    				}
    				int ComboPosition = (ComboY & 240)+(ComboX>>4);
    			if (Screen->ComboD [BlockPosition] == ComboS1 || Screen->ComboD [BlockPosition] == ComboS2 || Screen->ComboD [BlockPosition] == ComboS3)
    			{
    				Screen->ComboD [ComboPosition] = ComboSDug;
    			}
    			else
    			{
    				Screen->ComboD [ComboPosition] = ComboDug;
    			}
    		}
    		else if (Link->Dir == 1)
    		{
    			int BlockCheckY = Link->Y + 16;
    			int BlockCheckX = Link->X;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if ( (Screen->ComboD [BlockPosition] == Combo1 || Screen->ComboD [BlockPosition] == Combo2 || Screen->ComboD [BlockPosition] == Combo3 || Screen->ComboD [BlockPosition] == Combo4 || Screen->ComboD [BlockPosition] == Combo5 || Screen->ComboD [BlockPosition] == ComboDug) || (Screen->ComboS [BlockPosition] == 15 && (Screen->ComboD [BlockPosition] != ComboS1 && Screen->ComboD [BlockPosition] != ComboS2 && Screen->ComboD [BlockPosition] != ComboS3)) )
    			{
    				Game->PlaySound(6);
    				Quit();
    			}
    				ComboY = Link->Y + 16;
    				ComboX = Link->X;
    				float remainder = ComboX % 16;
    				if (remainder <= 8)
    				{
    					ComboX = ComboX - remainder;
    				}
    				else
    				{ 
    					ComboX = ComboX + 16 - remainder;
    				}
    				float remainderY = ComboY % 16;
    				if (remainderY <= 8)
    				{
    				ComboY = ComboY - remainderY;
    				}
    				else
    				{
    					ComboY = ComboY + 16 - remainderY;
    				}
    				int ComboPosition = (ComboY & 240)+(ComboX>>4);
    			if (Screen->ComboD [BlockPosition] == ComboS1 || Screen->ComboD [BlockPosition] == ComboS2 || Screen->ComboD [BlockPosition] == ComboS3)
    			{
    				Screen->ComboD [ComboPosition] = ComboSDug;
    			}
    			else
    			{
    				Screen->ComboD [ComboPosition] = ComboDug;
    			}
    		}
    		else if (Link->Dir == 2)
    		{
    			int BlockCheckY = Link->Y;
    			int BlockCheckX = Link->X - 16;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if ( (Screen->ComboD [BlockPosition] == Combo1 || Screen->ComboD [BlockPosition] == Combo2 || Screen->ComboD [BlockPosition] == Combo3 || Screen->ComboD [BlockPosition] == Combo4 || Screen->ComboD [BlockPosition] == Combo5 || Screen->ComboD [BlockPosition] == ComboDug) || (Screen->ComboS [BlockPosition] == 15 && (Screen->ComboD [BlockPosition] != ComboS1 && Screen->ComboD [BlockPosition] != ComboS2 && Screen->ComboD [BlockPosition] != ComboS3)) )
    			{
    				Game->PlaySound(6);
    				Quit();
    			}
    				ComboY = Link->Y;
    				ComboX = Link->X - 16;
    				float remainder = ComboX % 16;
    				if (remainder <= 8)
    				{
    					ComboX = ComboX - remainder;
    				}
    				else
    				{ 
    					ComboX = ComboX + 16 - remainder;
    				}
    				float remainderY = ComboY % 16;
    				if (remainderY <= 8)
    				{
    				ComboY = ComboY - remainderY;
    				}
    				else
    				{
    					ComboY = ComboY + 16 - remainderY;
    				}
    				int ComboPosition = (ComboY & 240)+(ComboX>>4);
    			if (Screen->ComboD [BlockPosition] == ComboS1 || Screen->ComboD [BlockPosition] == ComboS2 || Screen->ComboD [BlockPosition] == ComboS3)
    			{
    				Screen->ComboD [ComboPosition] = ComboSDug;
    			}
    			else
    			{
    				Screen->ComboD [ComboPosition] = ComboDug;
    			}	
    		}
    		else if (Link->Dir == 3)
    		{
    			int BlockCheckY = Link->Y;
    			int BlockCheckX = Link->X + 16;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if ( BlockRmndrY <= 8 )
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if ( (Screen->ComboD [BlockPosition] == Combo1 || Screen->ComboD [BlockPosition] == Combo2 || Screen->ComboD [BlockPosition] == Combo3 || Screen->ComboD [BlockPosition] == Combo4 || Screen->ComboD [BlockPosition] == Combo5 || Screen->ComboD [BlockPosition] == ComboDug) || (Screen->ComboS [BlockPosition] == 15 && (Screen->ComboD [BlockPosition] != ComboS1 && Screen->ComboD [BlockPosition] != ComboS2 && Screen->ComboD [BlockPosition] != ComboS3)) )
    			{
    				Game->PlaySound(6);
    				Quit();
    			}
    				ComboY = Link->Y;
    				ComboX = Link->X + 16;
    				float remainder = ComboX % 16;
    				if (remainder <= 8)
    				{
    					ComboX = ComboX - remainder;
    				}
    				else
    				{ 
    					ComboX = ComboX + 16 - remainder;
    				}
    				float remainderY = ComboY % 16;
    				if (remainderY <= 8)
    				{
    				ComboY = ComboY - remainderY;
    				}
    				else
    				{
    					ComboY = ComboY + 16 - remainderY;
    				}
    				int ComboPosition = (ComboY & 240)+(ComboX>>4);
    			if (Screen->ComboD [BlockPosition] == ComboS1 || Screen->ComboD [BlockPosition] == ComboS2 || Screen->ComboD [BlockPosition] == ComboS3)
    			{
    				Screen->ComboD [ComboPosition] = ComboSDug;
    			}
    			else
    			{
    				Screen->ComboD [ComboPosition] = ComboDug;
    			}
    		}
    		Game->PlaySound(61);
    	}
    }
    Yes, it's THAT big. Anyways, change these variables to the right values for the combos you want to use:

    -ComboDug is the combo that appears when you dig in normal ground.
    -Combo1-Combo5 are the 5 walkable combos you CAN'T dig in.
    -ComboS1-S3 are 3 combos you CAN dig in. To save space, all other Solid combos are automatically given the "no-dig" flag. (An imaginary flag, by the way. )
    -ComboSDug is the ground that appears when you dig up a solid diggable combo. In Oracles, digging up dirt or snow made normal ground appear. This combo can be anything, though.

    And there you have it. Thanks to Koopa for helping me through all this. Without Koopa... This script would've ended a few days ago. :O Also, thanks to Beta Link for requesting this script. If you hadn't asked.... I wouldn't have made. XD Enjoy, guys.

  2. #2
    Octorok Beta Link's Avatar
    Join Date
    Jan 2007
    Age
    31
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,125
    Level
    11
    vBActivity - Bars
    Lv. Percent
    52.14%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    *Applause*
    THANK YOU!!! Yet another awesome item script made by Matthew. Err... pikaguy! This shovel script is being used in my quest. No ifs ands or buts. :)

  3. #3
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    Please, I don't mind you calling me Matthew here. :p I've actually been waiting for you to say something about this, but... Nice to see that people will actually use this.

  4. #4
    Octorok
    Join Date
    Nov 2006
    Age
    29
    Posts
    463
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,770
    Level
    14
    vBActivity - Bars
    Lv. Percent
    8.15%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    Nice! What's next for you pikaguy?

    Click here to level up my card, or be sacrificed... ^_^

    Want to see Shattered Earth, AGN's RPG, back? Got a computer that is capable of running a server? PM me!

  5. #5
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    You'll see. That's all I will say. By the way, I recently thought of something: For some tilesets, 5 combos WILL NOT be enough for no-dig. So, I'm off to suggest something....

  6. #6
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    How can I set this up onto an item?

  7. #7
    Wizrobe The_Amaster's Avatar
    Join Date
    Dec 2005
    Location
    St. Mystere
    Age
    32
    Posts
    3,803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,810
    Level
    28
    vBActivity - Bars
    Lv. Percent
    26.09%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    Yeah, I have it saved as a notepad file, but "Compile ZScript" doesn't have it on the load screen. Do I need to use one of the ASM import functions?
    EDIT: Oh, wait. I read your Somaria thread. So, save it as .z, huh? Okay.

  8. #8
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    If using 16a/b/c:
    Go to Quest>Graphics>Sprites>Items, choose an item, and tell it what script to use. You should've already compiled the script, by the way. Save the code as a .z file in Notepad, import it into the ZScript compiler, compile it, choose the Items tab, and save it there.

    If using the newest Builds....
    Same as above, but the path is Quest>Items.

    Also, before importing into ZScript's compiler, be sure to edit the script's stated values under "Variables" so you can dig up only what you want to dig up.

  9. #9
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    It may be a double post, but it's important. A basic copy-and-paste from PureZC:

    The newest version of the Shovel script is here. It can create items and a few enemies, and you can get it here. It can create the following items and enemies:

    -Heart
    -Rupee (1)
    -Rupee (5)
    -Rupee (200) -Rare
    -Rope
    -Rope 2 -Rare

    ....And you are welcome to change these values. You may see that I have pre-defined variables. Those were for my test quest, so please, change them for your OWN uses. Also, I set up a special combo that you can dig in to get something other than what the normal ground would give you. No items or enemies from that.... I set up 4 combos, actually. Combo 1 is for making something like Stairs, while 2-4 are for digging up super-special items. I have yet to make code for that because I need to find a way to make that kind of secret one-time only. Get it once, you can't get it again. If you have an idea that doesn't involve the Secret Flags, LET ME KNOW IMMEDIATELY! Thank you. :) Enjoy. Big thanks to Koopa for solving my problems with Rand() and fixing up little bits of my script. :)

  10. #10
    I shall exalt myself over all Armagedddon Games bigjoe's Avatar
    Join Date
    Apr 2000
    Age
    39
    Posts
    5,621
    Mentioned
    87 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,573
    Level
    24
    vBActivity - Bars
    Lv. Percent
    93.52%

    Re: Item-2: Item-2 is here! Get your Shovels ready!

    I have a question. What item family is good to put the shovel in? I try putting it in a new family but I cant access new families on the subscreen editor. I tried "Letter" but that didnt seem to work. I'd really like to see a scripted item in action.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social