Jump to content

Photo

OoT Sword and Shield check


  • Please log in to reply
20 replies to this topic

#1 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 12 November 2008 - 09:13 PM

Remember back in ocarina of time in kokiri forest when mido didnt let you pass to see the deku tree? Well is there a script that does this? That someone doesnt let you pass without having a certain item with you. Ill be forever grateful. icon_smile.gif

#2 lucas92

lucas92

    Defender

  • Members

Posted 12 November 2008 - 09:39 PM

Do you want it to be moving or not?

#3 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 12 November 2008 - 09:55 PM

yea like once you get the kokiri sword and shield mido will play a different string from before when you didn't have the sword and shield ,and then he will move left and then down each only one step. then you can pass.

#4 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 14 November 2008 - 08:42 PM

Does anybody have a script that does this or tell me how to do this customly ? I really do need this script or learn how to do this to get over and done with that forest.

#5 Silver

Silver

    If only scripting were that easy...

  • Members
  • Real Name:Silva
  • Location:Somewhere on this plane.

Posted 14 November 2008 - 10:27 PM

I'm not sure if this is what you need or not, but check out the guards that NoeL had in his Prophesies quest. They do the something similar to Mido.

#6 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 16 November 2008 - 10:18 AM

Ok but t.platinum how am i suppose to know how he did it or what script he used icon_confused2.gif is the quest file unpassworded?

#7 Silver

Silver

    If only scripting were that easy...

  • Members
  • Real Name:Silva
  • Location:Somewhere on this plane.

Posted 16 November 2008 - 11:11 AM

It should be-just open it and look for guards.

#8 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 16 November 2008 - 11:37 PM

I dont know. If no-one can make a script that does this which i have a feeling its simple then im going to have to use Saffith's awesome "guards" script(advertising) hehe icon_wink.gif

#9 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 17 November 2008 - 04:27 AM

Here you go.

CODE

ffc script mido{
    void run(int Item, int Xdistance){

        int o = this->X;
        int l = o-Xdistance;
        int r = o+Xdistance;
        
        while(true){

            Waitframe();

            if(Abs(Link->Y-this->Y)<64){

                if(Link->X < this->X && l < this->X)this->X--;
                else if(Link->X > this->X && r > this->X)this->X++;
            }
            else{
                if(this->X > o)this->X--;
                else if(this->X < o)this->X++;
            }
        }
    }
}




D0-does nada yet.
D1-distance to guard -16 / 2. So guarding an entrance of 48 pixels (3 tiles) wide would be 16.


See if that's what you had in mind. If so I'll add in the item/message bit and make him solid.

Edited by Gleeok, 17 November 2008 - 08:24 AM.


#10 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 17 November 2008 - 05:36 PM

Awesome gleeok icon_wink.gif yea is it possible that you make it solid or something and make it move once you have the required item?

#11 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 17 November 2008 - 08:39 PM

Sure thing. Have it done in a jiffy.

PS: How long is a jiffy anyway?

#12 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 17 November 2008 - 09:26 PM

uhhhhh, pfft , I hope is not that long sheesh =p

#13 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 23 November 2008 - 07:41 AM

Apparently a jiffy is not the shortest amount of time that cannot be accurately measured, but more like a lambs shake of a Lunar Fortnight. :\ .....icon_smile.gif


Anyways, here you go. Untested as usual, but should work fine.

Same D[] variables as before exept for message1 and 2, before and after Link has the item.

PS. Set D1 to at least 8 but no more than 48 for best results.

..will fix bugs for food.

CODE

ffc script mido{
    void run(int Item, int Xdistance, int m1, int m2){

        int o = this->X;
        int l = o-Xdistance;
        int r = o+Xdistance;
        
        while(true){

            Waitframe();
            Solid(this->X,this->Y,1,1);

            if(Link->Item[Item]){

                if(Abs(Link->X-this->X)<=8 && Link->Y > this->Y
                    && Link->Y < this->Y+18 && Link->InputA){

                    Screen->Message(m2);

                    for(int i=0;i<16;i++){
                        this->X++;Waitframe();Solid(this->X,this->Y,1,1);
                    }
                    for(int i=0;i<16;i++){
                        this->Y++;Waitframe();Solid(this->X,this->Y,1,1);
                    }
                }
            }
            else{

                if(Abs(Link->Y-this->Y)<64){

                    if(Link->X < this->X && l < this->X)this->X--;
                    else if(Link->X > this->X && r > this->X)this->X++;
                }
                else{
                    if(this->X > o)this->X--;
                    else if(this->X < o)this->X++;
                }

                if(Abs(Link->X-this->X)<=8 && Link->Y > this->Y
                    && Link->Y < this->Y+18 && Link->InputA){

                    Screen->Message(m1);
                }
            }
        }
    }
}
void Solid(int x, int y, int width, int height){

    int w = width*16;    int center_x = x+(w/2);
    int h = height*16;    int center_y = y+(h/2);
    int lx = Link->X;    int ly = Link->Y;

    if(ly<y && Abs(lx-center_x)<w/2 && ly>y-16){
        Link->InputDown=false;
    }
    else if(ly>y+h-4 && Abs(lx-center_x)<w/2 && Abs(ly-center_y)<h/2){
        Link->InputUp=false;
    }
    if(lx>x+w-4 && Abs(lx-center_x)<w/2 && Abs(ly-center_y)<h/2){
        Link->InputLeft=false;
    }
    else if(lx<x && Abs(ly-center_y)<h/2 && lx>x-16){
        Link->InputRight=false;
    }
    if(lx<x+w-4 && lx>x+4 && ly<y+h-4 && ly>y-4){ // Player is inside the tile!
        Link->Y++;
    }
}


#14 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 23 November 2008 - 03:31 PM

thanks gleeok !m sure there won't be any bugs once I use this on my food icon_smile.gif

EDIT: joke was whack..sorry lol

but anyways what's D1 again? oh, ok never mind is the tile distance for guarding. thanks for your help gleeok icon_thumbsup.gif

#15 lucas92

lucas92

    Defender

  • Members

Posted 23 November 2008 - 04:32 PM

Oh... That Solid void seems useful... Can I use it if I give you credits?


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users