Jump to content

Photo

Deep Water


  • Please log in to reply
1 reply to this topic

#1 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

  • Members
  • Real Name:Matthew
  • Location:Static Void Kingdom

Posted 04 November 2007 - 11:04 AM

Caopy-paste from AGN:

Well, it's a semi-combo. It doesn't use any existing combos or flags to tell what combos are deep water. No, the FFC's arguments decide that. First 4 are normal water, second 4 are for Dive Warps.

CODE
// Deep Water- When Link steps on a certain combo without a certain item in his inventory, the combo turns into a Damage Combo. If he does, it becomes normal
// water. Simple. as. that. 4 combos for Water, 4 combos for Dive Warp. No Swim Warp, though. Unless you feel like making more variables. Set this script to
// each screen with the desired combo(s). Best not to use it anywhere else. Why? Well, it wouldn't really make sense. A waste of FFCs.
// Constants/Variables:
// water1-water4- D0 through D3. Control what combos turn into water.
// dive1-dive4- D4 through D7. Will be used for Dive Warp instead of Water.
// level2flippers- What item ID will be used for the Level 2 Flippers. And please, remember to set the item in the Flippers Itemclass. It makes it better.
// damage- Which damage combo the deep water combos will turn into if you do not have the Level 2 Flippers. In case 1/2 Heart isn't enough for you.
// warp1-warp4- Which Dive Warp combo the 4 "dive" variables will turn into. They don't even need to be Dive Warp combos. In case you want more than one Dive
// Warp per screen, or if you've used some other warps. Hey, better safe than sorry. I need to make sure of your ideas! :(
// solidity- Solidity for the combos if you don't have Level 2 Flippers. Uses binary system. 0 = Walkable, 15 = Unwalkable.

import "std.zh"

const int level2flippers = 248;
const int damage = 31;
const int warp1 = 19;
const int warp2 = 19;
const int warp3 = 19;
const int warp4 = 19;
const int solidity = 0;

ffc script deepwater
{
    void run(int water1, int water2, int water3, int water4, int dive1, int dive2, int dive3, int dive4)
    {
        while(true)
        {
            for (int cmbchk = 0; cmbchk < 176; cmbchk++)
            {
                if(Screen->ComboD[cmbchk] == water1 || Screen->ComboD[cmbchk] == water2 || Screen->ComboD[cmbchk] == water3 || Screen->ComboD[cmbchk] == water4)
                {
                    if(!Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = solidity;
                    }
                    else if(Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = 3;
                        Screen->ComboS[cmbchk] = 15;
                    }
                }
                if(Screen->ComboD[cmbchk] == dive1)
                {
                    if(!Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = 0;
                    }
                    else if(Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = warp1;
                        Screen->ComboS[cmbchk] = 15;
                    }
                }
                if(Screen->ComboD[cmbchk] == dive2)
                {
                    if(!Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = 0;
                    }
                    else if(Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = warp2;
                        Screen->ComboS[cmbchk] = 15;
                    }
                }
                if(Screen->ComboD[cmbchk] == dive3)
                {
                    if(!Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = 0;
                    }
                    else if(Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = warp3;
                        Screen->ComboS[cmbchk] = 15;
                    }
                }
                if(Screen->ComboD[cmbchk] == dive4)
                {
                    if(!Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = 0;
                    }
                    else if(Link->Item[level2flippers])
                    {
                        Screen->ComboT[cmbchk] = warp4;
                        Screen->ComboS[cmbchk] = 15;
                    }
                }
            }
            Waitframe();
        }
    }
}


This is made for 357, so no drowning here. But have no fear, I finally got it to work in 635. So later today, I'll try to modify this script to work with drowning. Only problem is if you have Level 1 Flippers. How am I gonna take them away only when you're on the combo and BEFORE you start swimming? That's the main problem. I can't take them away if you're next to the combo, since you might... Y'know, be either on or next to a normal water Combo... :/ In any case...

D0-D3 are the normal "Deep Water" combos. You take damage if you try to walk on 'em without the Level 2 Flippers. Otherwise, they're normal water. D4-D7 are for if you want Dive Warps. I kept them seperate, though, in case you wanted all 4 combos to go to different locations. level2flippers tells what item ID is used for the Level 2 Flippers. damage tells the ID of the damage combo. For ease of use, don't check std.zh for this. Instead, place said combo on the screen, and press the "q" key twice. The numbers you see are the Combo IDs. 1/2 is 31. 1 is 32. 2 is 33. 4 is 34. Don't think that the higher ones are 35 and up, though. THOSE are in the 100's. So, anyways... The warp variables are for the Dive Warp Deep Water combos. They're all Dive Warp (A) by default... Change them as you see fit. And that's it. Have fun with it.

Edit: Changed the script so you can decide the solidity of the combo if you don't have Level 2 Flippers.

Edited by Matthew, 04 November 2007 - 12:09 PM.


#2 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

  • Members
  • Real Name:Matthew
  • Location:Static Void Kingdom

Posted 04 November 2007 - 06:57 PM

I HAVES A SPECIAL TREAT FOR YOU ALL! Deep Water 2 (635-only script, since it requires drowning), Lava Combo, and Lava Combo 2 (Again, requires 635 for drowning)! LET'S-A TAKE A LOOK!

CODE
// Deep Water 2- When Link steps on a certain combo without a certain item in his inventory, he drowns. If he has the Level 1 Flippers, they are temporarily
// taken away from him so he will drown. If you want Lava, change the item to one you can never get.
// Constants/Variables:
// water1-water4- D0 through D3. Control what combos to make "Deep Water" combos.
// dive1-dive4- D4 through D7. Control what combos to make "Deep Water (Dive)" combos.
// level2flippers- What item ID will be used for the Level 2 Flippers. And please, remember to set the item in the Flippers Itemclass. It makes it better.
// hold- Item ID for the item to replace Link's Flippers with so he can drown. He can't drown if he has the Flippers! He gets his Flippers back eventually.

import "std.zh"

const int level2flippers = 255;
const int hold = 254;

ffc script deepwater2
{
    void run(int water1, int water2, int water3, int water4, int dive1, int dive2, int dive3, int dive4)
    {
        while(true)
        {
            while(!Link->Item[level2flippers])
            {
                int loc = ComboAt(Link->X, Link->Y);
                if(Link->Item[51])
                {
                    Link->Item[hold] = true;
                }
                if(Screen->ComboD[loc] == water1 || Screen->ComboD[loc] == water2 || Screen->ComboD[loc] == water3 || Screen->ComboD[loc] == water4 ||  Screen->ComboD[loc] == dive1 || Screen->ComboD[loc] == dive2 || Screen->ComboD[loc] == dive3 || Screen->ComboD[loc] == dive4)
                {
                    Link->Item[51] = false;
                    Waitframes(21);
                }
                if(Link->Item[hold])
                {
                    Link->Item[51] = true;
                }
                Link->Item[hold] = false;
                Waitframe();
            }
            Waitframe();
        }
    }
}


It works with Link Drowns in Walkable Water, so be sure that you're using 635 when using this... It gives you a "dummy" item when you walk in deep water without the Level 2 Flippers, so... Be sure to set this item as Equipment Item, Level >0, and set it to look like the Level 1 Flippers. Why? Well, do you REALLY want it to show that the Flippers were actually taken away? Someone might pause when they start drowning. That'd reveal NO FLIPPERS. Therefore... Eh, you get the idea. Also, #2... I made 2 Lava Combo scripts. One for Drowning, one for normal Damage. Just 'cause. Again, for Lava Combo 2, set hold2's item to look like Level 2 Flippers. And give it Level 2. Maybe set it to be of the same Item Class as hold1.

CODE
// Lava Combo- Damages Link unless he has the Lava Suit.
// Constants/Variables:
// water1-water4- D0 through D3. Control what combos turn into water.
// dive1-dive4- D4 through D7. Will be used for Dive Warp instead of Water.
// 2flippers- What item ID will be used for the Level 2 Flippers. And please, remember to set the item in the Flippers Itemclass. It makes it better.
// Is renamed to avoid conflict with Deep Water 1 and 2, and Lava Combo 2...
// lvasut- Item ID for the Lava Suit.
// damage- Which damage combo the lava combos will turn into if you do not have the Lava Suit. In case 1/2 Heart isn't enough for you.
// chngcmb- What combo the Lava Combos will turn into if you DO have the Lava Suit.
// chngsld- Solidity of the Lava Combos when you have the Lava Suit

import "std.zh"

const int 2flippers = 248;
const int lvasut = 252;
const int damage = 31;
const int chngcmb = 3;
const int chngsld = 15;

ffc script deepwater
{
    void run(int lava1, int lava2, int lava3, int lava4)
    {
        while(true)
        {
            for (int cmbchk = 0; cmbchk < 176; cmbchk++)
            {
                if(Screen->ComboD[cmbchk] == water1 || Screen->ComboD[cmbchk] == water2 || Screen->ComboD[cmbchk] == water3 || Screen->ComboD[cmbchk] == water4)
                {
                    if(!Link->Item[lvasut])
                    {
                        Screen->ComboT[cmbchk] = damage;
                        Screen->ComboS[cmbchk] = 0;
                    }
                    else if(Link->Item[lvasut])
                    {
                        Screen->ComboT[cmbchk] = chngcmb;
                        Screen->ComboS[cmbchk] = chngsld;
                    }
                }
            }
            Waitframe();
        }
    }
}


CODE
// Lava Combo 2- It's just a modification of Deep Water 2 so you drown no matter WHAT level of Flippers you have. Of course, I'm sure there are people who may
// like to have swimmable lava if you have a certain item. Well... I have your solution. Lava Suit. If you have that item, you can swim in this lava. This
// lava doesn't kill you, though.
// Constants/Variables:
// lava1-lava2- D0 through D3. Controls what combos are Lava Combos.
// flippers2- The Level-2 Flippers item ID, just in case you want to use this script along with Deep Water 1 or 2. Needs a different name than before...
// It conflicts with the Deep Water scripts, so it gets renamed here.
// lavasuit- The item ID for the item that allows you to swim or walk in lava. If you have this, this script does nothing, thus the combo acts like it does
// normally.
// hold1- Item ID for the item to replace Link's Flippers with so he can drown. He can't drown if he has the Flippers! He gets his Flippers back eventually.
// Like with flippers2, this name conflicts with the Deep Water scripts...
// hold2- Item ID for the item to replace Level 2 Flippers with. Same as above, but for the Level 2 Flippers. You get 'em back eventually.

import "std.zh"

const int flippers2 = 255;
const int lavasuit = 252;
const int hold1 = 254;
const int hold2 = 253;

ffc script lavacombo
{
    void run(int lava1, int lava2, int lava3, int lava4)
    {
        while(true)
        {
            while(!Link->Item[lavasuit])
            {
                for (int cmbchk = 0; cmbchk < 176; cmbchk++)
                {
                    if(Screen->ComboD[cmbchk] == lava1 || Screen->ComboD[cmbchk] == lava2 || Screen->ComboD[cmbchk] == lava3 || Screen->ComboD[cmbchk] == lava4)
                    {
                        Screen->ComboT[cmbchk] = 3;
                    }
                }
                int loc = ComboAt(Link->X, Link->Y);
                if(Link->Item[51])
                {
                    Link->Item[hold1] = true;
                }
                if(Link->Item[flippers2])
                {
                    Link->Item[hold2] = true;
                }
                if(Screen->ComboD[loc] == lava1 || Screen->ComboD[loc] == lava2 || Screen->ComboD[loc] == lava3 || Screen->ComboD[loc] == lava4)
                {
                    Link->Item[51] = false;
                    Link->Item[flippers2] = false;
                    Waitframes(21);
                }
                if(Link->Item[hold1])
                {
                    Link->Item[51] = true;
                }
                if(Link->Item[hold2])
                {
                    Link->Item[level2flippers] = true;
                }
                Link->Item[hold] = false;
                Link->Item[hold2] = false;
                Waitframe();
            }
            Waitframe();
        }
    }
}


Have fun! Also, if you require a test quest... PM me or something. icon_wink.gif Oh yes, I also set the Lava Combos to not damage you if you have a certain item in your inventory, the Lava Suit. icon_wink.gif


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users