User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Can anyone make a script for me...

  1. #1
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Verified Bug Can anyone make a script for me...

    I want a ffc fairy that will follow you like in majora's mask and ocarina of time, any help is appreciated. I would make a script myself, but the scripting is a bit confusing, but I will hopefully learn someday.

  2. #2
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.96%

    Re: Can anyone make a script for me...

    I actually have a script that does this. However, me and another person are using it for a joint quest, and since he was the one who made it, I'll have to get his permision before I can give it to you.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  3. #3
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Re: Can anyone make a script for me...

    Hi russadwan, thanks, but if you can't get it it's not a problem. :) I believe you have helped me before on some kind of script too. You do visit purezc also don't you? Oh well, see ya.:)


    I just accidentally found this script on my computer I found awhile back, but it says something about an itemclass is not found, could you check this for me?

    import "std.zh"
    ffc script followfairy{
    void run(){
    if(link->item[I-LEAF]){
    if(epona) xspd = 1.4{
    else xspd = 1;
    if(fairyinit){
    leaf->flags[0]=true;
    leaf->flags[3]=true;
    leaf->data=fairycombo+1;
    leaf->cset=;
    ran=rand(28)+link->x-16;
    leaf->x=ran;
    ran=rand(28)+link->y-16
    leaf->y=ran;
    }
    if(screennumber1=game->getcurscreen()){
    ran=rand(28)+link->x-16;
    leaf->x=ran;
    ran=rand(28)+link->y-16
    leaf->y=ran;}
    x1=leaf->x;x2=link->x2;
    y1=leaf->y;y2=link->y2;
    if(t==tcap){
    ran=rand(5)/10+0.4;
    if(rand(2)==1)ran*=-1;
    leaf->vx=ran
    ran=rand(5)/10+0.4;
    if(rand(2)==1)ran*=-1;
    leaf->vy=ran
    t=0:
    dircheck=true;}
    if(distance(x1,y1,x2,y2)>32){
    if(x1<x2){
    ran=rand(5)/10+xspd;
    leaf->Vx=ran;}
    if(y1<y2){
    ran=rand(5)/10+xspd;
    leaf->Vy=ran;}
    if(x1>x2){
    ran=rand(5)/10+xspd;
    leaf->Vx=-ran;}
    if(y1>y2){
    ran=rand(5)/10+xspd;
    leaf->Vy=-ran;}
    dircheck=true;}
    if(dircheck){
    if(leaf->vy<o&&(abs(leaf->vx)<0.6)){leaf->data=fairycombo;dircheck=false;}
    if(leaf->vy<o&&(abs(leaf->vx)<0.6)){leaf->data=fairycombo+1;dircheck=false;}
    if(leaf->vx<0&&dircheck){leaf->data=fairycombo+2;dircheck=false;}
    if(leaf->vx>0&&dircheck){leaf->data=fairycombo+3;dircheck=false;}}
    if(link->imputr){
    if(cantalk&&!falling&&link->action!=LA_FROZEN&&link->z==0&&srpt==0){
    game->playsound(leafsfx);
    screen->message(leafstring0;}}
    if(srpt>0)srpt--;
    screennumber=game->getcurscreen();
    t++;}

  4. #4
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: Can anyone make a script for me...

    Heh, don't worry about that Russ.
    I don't like to keep scripts hidden away; feel free to share any of them.
    And what you have won't work at the moment...

    Code:
    const int CMB_FAIRY			= 0;	// Set here the first of the 4 Fairy combos, in the order Up, Down, Left, Right
    bool HasFairy = true;
    bool FairyInit = true;
    int FairyMovementCounter;
    
    global script Slot_2{
    	void run(){
    	int ScreenNumber;
    		while(true){
    			//Call the Fairy functions
    			if(HasFairy) Fairy(ScreenNumber);
    			//Put any other global functions here...
    			
    			
    			ScreenNumber = Game->GetCurScreen();
    		Waitframe();
    		}
    		
    	//Fairy functions
    	void Fairy(int ScreenNumber){
    		ffc Fairy = Screen->LoadFFC(32);
    		bool ChangeDir;
    
    		if(FairyInit){
    			Fairy->Flags[0] = true;
    			Fairy->Flags[3] = true;
    			Fairy->Data = CMB_FAIRY+1;
    			FairyInit = false;
    			Fairy->X = Rand(28) + Link->X-16;
    			Fairy->Y = Rand(28) + Link->Y-16;
    		}
    		if(ScreenNumber != Game->GetCurScreen()){
    			Fairy->X = Rand(28) + Link->X-16;
    			Fairy->Y = Rand(28) + Link->Y-16;
    		}
    		if(FairyMovementCounter == FairyMovementMax){
    			Fairy->Vx = (Rand(5)/10+0.4)*(Rand(2)*2-1);
    			Fairy->Vy = (Rand(5)/10+0.4)*(Rand(2)*2-1);
    			ChangeDir = true;
    			FairyMovementCounter = 0;
    		}
    		if(Distance(Fairy->X,Fairy->Y,Link->X,Link->Y) > 32){
    			if(Fairy->X < Link->X) Fairy->Vx = (Rand(5)/10+1);
    			else Fairy->Vx = -(Rand(5)/10+1);
    			if(Fairy->Y < Link->Y) Fairy->Vy = (Rand(5)/10+1);
    			else Fairy->Vy = -(Rand(5)/10+1);
    			ChangeDir = true;
    		}
    		if(ChangeDir){
    			if(Fairy->Vy < 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY;
    			else if(Fairy->Vy > 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY+1;
    			else if(Fairy->Vx < 0) Fairy->Data = CMB_FAIRY+2;
    			else if(Fairy->Vx > 0) Fairy->Data = CMB_FAIRY+3;
    			ChangeDir = false;
    		}
    		FairyMovementCounter++;
    	}
    }
    
    global script Slot_3{
    	void run(){
    		if(HasFairy) FairyInit = true;
    	}
    }
    
    ffc script RemoveFairy{
    	void run(){
    		HasFairy = false;
    		ffc Fairy = Screen->LoadFFC(30);
    		Fairy->Data = 0;
    	}
    }
    
    ffc script ReturnFairy{
    	void run(){
    		HasFairy = true;
    		FairyInit = true;
    	}
    }
    Have a go with that one.
    Put the two global scripts on the slots it says in their names, and if you place the other two scripts on an ffc on a screen, they do what the name suggests.
    Make sure to set up the integer at the top to what combos you want to use for the fairy.

  5. #5
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Re: Can anyone make a script for me...

    Thanks for the script, but I have a few questions about it.
    So do I need to set the ffc on a screen in a certain way or does it just follow me when you start?
    Also, it will follow me when I go to another screen or a dmap?
    And how and where exactly do I put the combo's numbers at, it says put the first one in but then it tells me to put them in a certain order?

    I have put the script in and I get this error:

    Line 20: syntax error, unexpected Lparen, expecting assign, on token (
    Fatal error P00: can't open or parse input file!

    any idea what is wrong?

  6. #6
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: Can anyone make a script for me...

    Code:
    const int CMB_FAIRY			= 0;	// Set here the first of the 4 Fairy combos, in the order Up, Down, Left, Right
    bool HasFairy = true;
    bool FairyInit = true;
    int FairyMovementCounter;
    
    global script Slot_2{
    	void run(){
    	int ScreenNumber;
    		while(true){
    			//Call the Fairy functions
    			if(HasFairy) Fairy(ScreenNumber);
    			//Put any other global functions here...
    			
    			
    			ScreenNumber = Game->GetCurScreen();
    		Waitframe();
    		}
    	}
    	//Fairy functions
    	void Fairy(int ScreenNumber){
    		ffc Fairy = Screen->LoadFFC(32);
    		bool ChangeDir;
    		if(FairyInit){
    			Fairy->Flags[0] = true;
    			Fairy->Flags[3] = true;
    			Fairy->Data = CMB_FAIRY+1;
    			FairyInit = false;
    			Fairy->X = Rand(28) + Link->X-16;
    			Fairy->Y = Rand(28) + Link->Y-16;
    		}
    		if(ScreenNumber != Game->GetCurScreen()){
    			Fairy->X = Rand(28) + Link->X-16;
    			Fairy->Y = Rand(28) + Link->Y-16;
    		}
    		if(FairyMovementCounter == FairyMovementMax){
    			Fairy->Vx = (Rand(5)/10+0.4)*(Rand(2)*2-1);
    			Fairy->Vy = (Rand(5)/10+0.4)*(Rand(2)*2-1);
    			ChangeDir = true;
    			FairyMovementCounter = 0;
    		}
    		if(Distance(Fairy->X,Fairy->Y,Link->X,Link->Y) > 32){
    			if(Fairy->X < Link->X) Fairy->Vx = (Rand(5)/10+1);
    			else Fairy->Vx = -(Rand(5)/10+1);
    			if(Fairy->Y < Link->Y) Fairy->Vy = (Rand(5)/10+1);
    			else Fairy->Vy = -(Rand(5)/10+1);
    			ChangeDir = true;
    		}
    		if(ChangeDir){
    			if(Fairy->Vy < 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY;
    			else if(Fairy->Vy > 0 && (Abs(Fairy->Vx) < 0.6)) Fairy->Data = CMB_FAIRY+1;
    			else if(Fairy->Vx < 0) Fairy->Data = CMB_FAIRY+2;
    			else if(Fairy->Vx > 0) Fairy->Data = CMB_FAIRY+3;
    			ChangeDir = false;
    		}
    		FairyMovementCounter++;
    	}
    }
    
    global script Slot_3{
    	void run(){
    		if(HasFairy) FairyInit = true;
    	}
    }
    
    ffc script RemoveFairy{
    	void run(){
    		HasFairy = false;
    		ffc Fairy = Screen->LoadFFC(30);
    		Fairy->Data = 0;
    	}
    }
    
    ffc script ReturnFairy{
    	void run(){
    		HasFairy = true;
    		FairyInit = true;
    	}
    }
    Oh, oops.
    Missed an R brace.

    Anyway, you put that as your global script, and then the fairy will follow you everywhere.
    If you want it to go away for a bit, put the 'RemoveFairy' FFC script on a screen, then the fairy will stop following you.
    If you want it to come back, put the 'ReturnFairy' FFC script on a screen.

    On your combosheet you should have 4 fairy combos in a row.
    The first facing up, then next down, the next left and then right.
    Put the Combo ID of the first one as the integer at the top of the script.

  7. #7
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Re: Can anyone make a script for me...

    The script didn't work at first so I tweaked it a little bit, I added
    import"std.zh"(of course)
    int FairyMovementMax; after int FairyMovementCounter
    and now it works, Thanks a ton.:)

  8. #8
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Re: Can anyone make a script for me...

    This doesn't require scripts but I was wondering if you could help me make a cutscene. All I want is when you enter a dungeon it says something like, It sure is creepy down here, and then you start playing again. I have the actual screen you see on layer 3 with teleports to warp you to the screen you start with. It will take me to that screen, but it won't display the text, and I have the room set to special item with the string and Abei as the "guy".Also I would like to know how you could make it a one time only thing.

  9. #9
    Octorok
    Join Date
    Jan 2008
    Age
    32
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    939
    Level
    10
    vBActivity - Bars
    Lv. Percent
    63.67%

    Re: Can anyone make a script for me...

    Code:
    bool showmessage=true;
    ffc script messagecutscene
    {
        void run(int s,int t)
        {
            while(true)
            {
                  if (showmessage==true)
                  {
                         Screen->Message(s);
                         Waitframes(t*60);
                         showmessage=false;
                         Quit();
                  }
                  else
                  {
                        Quit();
                  }
             }
       }
    }
    D0:the string you want to show
    D1:the time in seconds you want it to be shown

    I think it might work... I'm not even sure if you need a script for that anyway...

  10. #10
    Gel
    Join Date
    Jun 2008
    Age
    31
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    614
    Level
    8
    vBActivity - Bars
    Lv. Percent
    81.21%

    Re: Can anyone make a script for me...

    Cool, I will try it out, thanks.:)

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