Jump to content

Photo

Item-4: Warp Machine


  • Please log in to reply
8 replies to this topic

#1 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

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

Posted 04 March 2007 - 09:47 AM

Well, this is my "secret script". Yes... Warp randomly across the screen now! Problems? It generally places you around the middle of the screen on the first few uses, but after that, it works PERFECTLY. Ignore the combo stuff for now- I haven't made code for them yet. But I have plans for them.... icon_wink.gif Because I don't want to reveal their usage yet, I shall erase any mention of what they do so you can't expect them. icon_superevil.gif And now, the script. So far, only variable you should change is Magic, which, as you should know, is what holds the value for the amount of Magic the script should take away. DO THIS IN FULL CONTAINERS, AS THERE IS A BUG IN ALL BUILDS SO FAR THAT MAKES YOUR MAGIC METER ENDLESSLY LOOP IF YOU TRY TO USE ANYTHING LESS THAN A VALUE OF 32. icon_frown.gif
CODE
// Warp Machine- When used, this Item will warp Link to a random location on the current screen. If used on certain combos, however, this
// item will warp you to a specific location on the current screen, or to a new screen altogether, depending on the combo you're on.
// Variables:
// Magic- Magic required to use, in 32nds of a Container.

// LinkXOld- Link's X-coordinate before warping. Leave this alone.
// LinkYOld- Link's Y-coordinate before warping. Leave this alone, too.
// LinkXY- Self explanatory.
// RandomX- Randomized X-position. Changing this has no effect on anything. :P
// RandomY- Randomized Y-position. Leave this alone.
// RandomXY- Stay away from this.

import "std.zh"
item script Warper
{
    int Magic = 128;
    int ComboO1 = 0;
    int ComboO2 = 0;
    int ComboO3 = 0;
    int ComboOE = 0;
    int ComboOT1 = 0;
    int ComboOT2 = 0;
    int ComboOT3 = 0;
    int ComboONS1 = 0;
    int ComboONS2 = 0;
    int ComboONS3 = 0;
    int ComboD1 = 0;
    int ComboD2 = 0;
    int ComboD3 = 0;
    int ComboDE = 0;
    int ComboDT1 = 0;
    int ComboDT2 = 0;
    int ComboDT3 = 0;
    int ComboDNS1 = 0;
    int ComboDNS2 = 0;
    int ComboDNS3 = 0;
    int LinkXOld = 0;
    int LinkYOld = 0;
    int LinkXY = 0;
    int RandomX = 0;
    int RandomY = 0;
    int RandomXY = 0;

    void run()
    {
        if (Link->MP >= Magic)
        {
            LinkXOld = Link->X;
            LinkYOld = Link->Y;
            RandomX = Floor(Rand(1) * 241);
            RandomY = Floor(Rand(1) * 161);
            float remainder = RandomX % 16;
            if (remainder <= 8)
            {
                RandomX = RandomX - remainder;
            }
            else
            {
                RandomX = RandomX + 16 - remainder;
            }
            float remainderY = RandomY % 16;
            if (remainderY <= 8)
            {
                RandomY = RandomY - remainderY;
            }
            else
            {
                RandomY = RandomY + 16 - remainderY;
            }
            RandomXY = (RandomY & 240)+(RandomX>>4);
            LinkXY = (LinkYOld)+(LinkXOld);
            if (Screen->ComboD [LinkXY] != ComboO1 || Screen->ComboD [LinkXY] != ComboO2 || Screen->ComboD [LinkXY] != ComboO3 || Screen->ComboD [LinkXY] != ComboOE || Screen->ComboD [LinkXY] != ComboOT1 || Screen->ComboD [LinkXY] != ComboOT2 || Screen->ComboD [LinkXY] != ComboOT3 || Screen->ComboD [LinkXY] != ComboD1 || Screen->ComboD [LinkXY] != ComboD2 || Screen->ComboD [LinkXY] != ComboD3 || Screen->ComboD [LinkXY] != ComboDE || Screen->ComboD [LinkXY] != ComboDT1 || Screen->ComboD [LinkXY] != ComboDT2 || Screen->ComboD [LinkXY] != ComboDT3 || Screen->ComboD [LinkXY] != ComboONS1 || Screen->ComboD [LinkXY] != ComboONS2 || Screen->ComboD [LinkXY] != ComboONS3 || Screen->ComboD [LinkXY] != ComboDNS1 || Screen->ComboD [LinkXY] != ComboDNS2 || Screen->ComboD [LinkXY] != ComboDNS3)
            {
                if (Screen->ComboS [RandomXY] != 0)
                {
                    Link->X = LinkXOld;
                    Link->Y = LinkYOld;
                }
                else if (Screen->ComboS [RandomXY] == 0)
                {
                    Link->X = RandomX;
                    Link->Y = RandomY;
                    Link->MP -= Magic;
                    Quit();
                }
            }
        }
    }
}

If you feel taunted by the fact that I left the varaibles themselves in, then good. Let's see you ponder about what my plan could be for them.... icon_superevil.gif

And remember.....

IT'S A SECRET TO EVERYBODY.

#2 Twilight Knight

Twilight Knight

    Tell all with glee, Argon's on PureZC

  • Members
  • Real Name:Sven
  • Location:Rotterdam, NL

Posted 04 March 2007 - 02:08 PM

Wow, looks great so far!
Sad that the betas are such annoying.
But, does the script really have to be that big?
In Macromedia Flash actionscript, this is done way shorter and it looks almost the same. icon_shrug.gif
Well, good job, you're probably the best scripter(ZC scripter) I know.

#3 Animus01

Animus01

    Spirit Warrior

  • Members
  • Real Name:Keith
  • Location:My own imagination

Posted 04 March 2007 - 02:32 PM

Matthew, do you realize how AWESOME THIS SCRIPT IS?!!! CAN YOU EVEN COMPREHEND THE POWER OF USING THIS SCRIPT IN AN EFFECTIVE MANNER?!!! CAN YOU FEEL IT?!!! *shot*

What I meant to say was this is probably one of the best scripts I've ever seen. Chances are I may be using them in most, if not all, of my 2.5 quests (when I get started on them).

#4 Limzo

Limzo

    _

  • Members

Posted 04 March 2007 - 03:16 PM

What if you land on a solid block...

#5 Fire Wizzrobe

Fire Wizzrobe

    Master

  • Members
  • Real Name:T

Posted 04 March 2007 - 04:53 PM

CODE
  if (Screen->ComboS [RandomXY] != 0)
                {
                    Link->X = LinkXOld;
                    Link->Y = LinkYOld;
                }
                else if (Screen->ComboS [RandomXY] == 0)
                {
                    Link->X = RandomX;
                    Link->Y = RandomY;
                    Link->MP -= Magic;
                    Quit();
                }
            }
        }
    }
}


This Block of code protects against that.

Also, what are all those "ComboOt..." variables for?

Edited by Fire Wizzrobe, 04 March 2007 - 04:55 PM.


#6 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

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

Posted 04 March 2007 - 08:22 PM

I'll reveal what the variables do next release. icon_razz.gif

Twilight_knight: Yes, it HAS to be this big. icon_frown.gif

Animus: icon_razz.gif You have it backwards. YOU do not comprehend how awesome this script is. Oh, if only you knew my plans.... icon_superevil.gif

#7 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

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

Posted 06 March 2007 - 02:40 PM

Olay, Update! Guess what? You get to find out what most of the variables do now!! Yay!!! But the rest will remain a secret until they're done. icon_wink.gif And again, I'm erasing what those variables do, but not the variables themselves. OH, HOW FUN IT IS TAUNTING YOU GUYS WITH THIS SCRIPT! XD
CODE
// Warp Machine- When used, this Item will warp Link to a random location on the current screen. If used on certain combos, however, this
// item will warp you to a specific location on the current screen, or to a new screen altogether, depending on the combo you're on.
// Variables:
// Magic- Magic required to use, in 32nds of a Container.
// ComboO1- Special Warp Combo 1- Overworld Use. Warps to another combo on same screen.
// ComboO2- Special Warp Combo 2- Overworld Use. See above.
// ComboO3- Special Warp Combo 3- Overworld Use. Again, see above.
// ComboO4- Special Warp Combo 4- Overworld Use.
// ComboO5- Special Warp Combo 5- Overworld Use.
// ComboO6- Special Warp Combo 6- Overworld Use.
// ComboD1- Special Warp Combo 1- Dungeon Use. Same as Overworld Use.
// ComboD2- Special Warp Combo 2- Dungeon Use. See above.
// ComboD3- Special Warp Combo 3- Dungeon Use. Again, see above.
// ComboD4- Special Warp Combo 4- Dungeon Use.
// ComboD5- Special Warp Combo 5- Dungeon Use.
// ComboD6- Special Warp Combo 6- Dungeon Use.
// LinkXOld- Link's X-coordinate before warping. Leave this alone.
// LinkYOld- Link's Y-coordinate before warping. Leave this alone, too.
// LinkXY- Self explanatory.
// RandomX- Randomized X-position. Changing this has no effect on anything. :P
// RandomY- Randomized Y-position. Leave this alone.
// RandomXY- Stay away from this.

import "std.zh"
item script Warper
{
    int Magic = 128;
    int ComboO1 = 0;
    int ComboO2 = 0;
    int ComboO3 = 0;
    int ComboO4 = 0;
    int ComboO5 = 0;
    int ComboO6 = 0;
    int ComboONS1 = 0;
    int ComboONS2 = 0;
    int ComboONS3 = 0;
    int ComboD1 = 0;
    int ComboD2 = 0;
    int ComboD3 = 0;
    int ComboD4 = 0;
    int ComboD5 = 0;
    int ComboD6 = 0;
    int ComboDNS1 = 0;
    int ComboDNS2 = 0;
    int ComboDNS3 = 0;
    int LinkXOld = 0;
    int LinkYOld = 0;
    int LinkXY = 0;
    int RandomX = 0;
    int RandomY = 0;
    int RandomXY = 0;

    void run()
    {
        
        ffc FFC1 = Screen->LoadFFC(32);
        ffc FFC2 = Screen->LoadFFC(31);
        ffc FFC3 = Screen->LoadFFC(30);
        ffc FFC4 = Screen->LoadFFC(29);
        ffc FFC5 = Screen->LoadFFC(28);
        ffc FFC6 = Screen->LoadFFC(27);
        if (Screen->ComboD [LinkXY] != ComboO1 || Screen->ComboD [LinkXY] != ComboO2 || Screen->ComboD [LinkXY] != ComboO3 || Screen->ComboD [LinkXY] != ComboO4 || Screen->ComboD [LinkXY] != ComboO5 || Screen->ComboD [LinkXY] != ComboO6 || Screen->ComboD [LinkXY] != ComboD1 || Screen->ComboD [LinkXY] != ComboD2 || Screen->ComboD [LinkXY] != ComboD3 || Screen->ComboD [LinkXY] != ComboD4 || Screen->ComboD [LinkXY] != ComboD5 || Screen->ComboD [LinkXY] != ComboD6 || Screen->ComboD [LinkXY] != ComboONS1 || Screen->ComboD [LinkXY] != ComboONS2 || Screen->ComboD [LinkXY] != ComboONS3 || Screen->ComboD [LinkXY] != ComboDNS1 || Screen->ComboD [LinkXY] != ComboDNS2 || Screen->ComboD [LinkXY] != ComboDNS3)
        {
            if (Link->MP >= Magic)
            {
                LinkXOld = Link->X;
                LinkYOld = Link->Y;
                RandomX = Floor(Rand(1) * 241);
                RandomY = Floor(Rand(1) * 161);
                float remainder = RandomX % 16;
                if (remainder <= 8)
                {
                    RandomX = RandomX - remainder;
                }
                else
                {
                    RandomX = RandomX + 16 - remainder;
                }
                float remainderY = RandomY % 16;
                if (remainderY <= 8)
                {
                    RandomY = RandomY - remainderY;
                }
                else
                {
                    RandomY = RandomY + 16 - remainderY;
                }
                RandomXY = (RandomY & 240)+(RandomX>>4);
                LinkXY = (LinkYOld & 240)+(LinkXOld>>4);
                if (Screen->ComboD [LinkXY] != ComboO1 || Screen->ComboD [LinkXY] != ComboO2 || Screen->ComboD [LinkXY] != ComboO3 || Screen->ComboD [LinkXY] != ComboO4 || Screen->ComboD [LinkXY] != ComboO5 || Screen->ComboD [LinkXY] != ComboO6 || Screen->ComboD [LinkXY] != ComboD1 || Screen->ComboD [LinkXY] != ComboD2 || Screen->ComboD [LinkXY] != ComboD3 || Screen->ComboD [LinkXY] != ComboD4 || Screen->ComboD [LinkXY] != ComboD5 || Screen->ComboD [LinkXY] != ComboD6 || Screen->ComboD [LinkXY] != ComboONS1 || Screen->ComboD [LinkXY] != ComboONS2 || Screen->ComboD [LinkXY] != ComboONS3 || Screen->ComboD [LinkXY] != ComboDNS1 || Screen->ComboD [LinkXY] != ComboDNS2 || Screen->ComboD [LinkXY] != ComboDNS3)
                {
                    if (Screen->ComboS [RandomXY] != 0)
                    {
                        Link->X = LinkXOld;
                        Link->Y = LinkYOld;
                    }
                    else if (Screen->ComboS [RandomXY] == 0)
                    {
                        Link->X = RandomX;
                        Link->Y = RandomY;
                        Link->MP -= Magic;
                        Quit();
                    }
                }
            }
        }
        if (Screen->ComboD [LinkXY] == ComboO1 || Screen->ComboD [LinkXY] == ComboD1)
        {
            Link->X = FFC1->X;
            Link->Y = FFC1->Y;
        }
        else if (Screen->ComboD [LinkXY] == ComboO2 || Screen->ComboD [LinkXY] == ComboD2)
        {
            Link->X = FFC2->X;
            Link->Y = FFC2->Y;
        }
            else if (Screen->ComboD [LinkXY] == ComboO3 || Screen->ComboD [LinkXY] == ComboD3)
        {
            Link->X = FFC3->X;
            Link->Y = FFC3->Y;
        }
        else if (Screen->ComboD [LinkXY] == ComboO4 || Screen->ComboD [LinkXY] == ComboD4)
        {
            Link->X = FFC4->X;
            Link->Y = FFC4->Y;
        }
        else if (Screen->ComboD [LinkXY] == ComboO5 || Screen->ComboD [LinkXY] == ComboD5)
        {
            Link->X = FFC5->X;
            Link->Y = FFC5->Y;
        }
        else if (Screen->ComboD [LinkXY] == ComboO6 || Screen->ComboD [LinkXY] == ComboD6)
        {
            Link->X = FFC6->X;
            Link->Y = FFC6->Y;
        }
    }
}


Okay, the ComboO(x) variables are overworld combos for warping to select locations. Take note that ComboOE, ComboDE, ComboOT1-T3, and ComboDT1-T3 are all missing. They have been replaced with ComboO4-6 and ComboD4-6. Yes, I know there would be seven of those combos of each type if I replaced them ALL. I simply dropped the "E" variables because they wouldn't really have an impact on anything. They were supposed to be Exit combos, but... Well, how would I be able to tell where they were? FFCs. The FFCs made the variables useless. The "T" ones were dropped because I had the HARDEST time trying to find a solution to making them work. I mean, they were supposed to be two-way warps, but the only way I could think of to make them work would be to place the FFC at Link's old position after warping, but...What if it was at your present location already? That would make for a nasty problem. Plus, you could achieve the same effect with the ComboO1-6 and ComboD1-6 variables anyways, so I just replaced them with more of the warp combos. icon_smile.gif

Now, the only bugs left are that sometimes, when you're on a Warp combo (That is, one of the "Combo" variables), you'll warp to the wrong FFC. And the other bug is that sometimes, when you're on a Warp combo, instead of warping to an FFC, you'll sometimes warp to a random location, which isn't supposed to happen. Perhaps changing the order of things would counteract that? I'll try, and if that works, then I'll edit this post to update that. icon_wink.gif Anyways, have fun. Oh, and as for a test quest...

I uploaded one here for some help at AGN (And speaking of that, I forgot to post it there. XD), but you can open it up and take a look at what I did with it. If you need more Magic, Level-1 cheat is 4. icon_biggrin.gif Have a nice day.

#8 Snarwin

Snarwin

    Still Lazy After All These Years

  • Members
  • Real Name:Paul
  • Location:New York

Posted 06 March 2007 - 09:06 PM

Dear God. This script is more or less sequence breaking incarnate.

It's still pretty cool, though. icon_thumbsup.gif

Edit: I does grammar good.

Edited by Snarwin, 06 March 2007 - 09:07 PM.


#9 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

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

Posted 06 March 2007 - 09:58 PM

QUOTE(Snarwin @ Mar 6 2007, 09:06 PM) View Post

Dear God. This script is more or less sequence breaking incarnate.

It's still pretty cool, though. icon_thumbsup.gif

Edit: I does grammar good.

XD I never realized that. But then, everyone loves to Sequence Break, right? I mean, you can do that in TLoZ. But... Few problems, though- It can warp you onto ANYTHING that isn't solid. O.o But then again, why not let that be a little side effect to the item? You must use it carefully in damage-combo-filled areas, lest you go boom. icon_superevil.gif

But for the record, this script is to be used to get to otherwise unaccessible secrets. Next update, I promise to add combos that you can use to make places you can't warp to. icon_biggrin.gif If special combos made just for scripts are added, I'd use THOSE instead. icon_wink.gif


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users