Jump to content

Photo

IoR arrow script


  • Please log in to reply
5 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 16 May 2017 - 11:30 AM

Hi i do wants to make a request (again).
I notice on IoR on the factory level there's a arrows tiles and when Link steps on thoses one Link turns around himself and moves on only one direction at the same time and change the direction when Link steps on the other arrow tiles with the differant direction and when he steps on the normal tiles he stops.
So i do want a simple ffc like that

''Arrows'' ffc

D0 could be the setup of the movement Link will take. (0 nothing he'll move normally, 1 down, 2, up, 3 right, and 4 left.) only that and if possible with a demo quest on any cases :) )

#2 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 16 May 2017 - 11:34 AM

http://www.purezc.ne...=68971&p=984014



#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 16 May 2017 - 01:19 PM

There's a exemple quest for this one ?


Edited by Cedric, 16 May 2017 - 01:33 PM.


#4 TheRock

TheRock

    Go glitches

  • Members

Posted 17 May 2017 - 08:43 AM

I made a script for this. It's fairly is to use. You just have the flag on the combo you want to spin in that direction. And the only way to make link stop is with flag 102. 

const int CT_CLIFF = 142; //
const int UP = 98; //This is the flag for link spinning up.
const int LEFT = 99; //This is the flag for link spinning left.
const int RIGHT = 100; //This is the flag for link spinning right.
const int DOWN = 101; //This is the flag for link spinning down.
const int STOP = 102; //This is the flag for link spinning stop. Note: This is  the     //way link will stop.
const int CLIFF_PAUSE = 15; //

ffc script PokemonSpinner{
	bool CheckCliffDirection(int Combo){
		int Dir;
		if(Screen->ComboS[Combo]==0101b)
			Dir = DIR_UP;
		else if(Screen->ComboS[Combo]==1010b)
			Dir = DIR_DOWN;
		else if(Screen->ComboS[Combo]==0011b)
			Dir = DIR_LEFT;
		else if(Screen->ComboS[Combo]==1100b)
			Dir = DIR_RIGHT;
		else
			return false;
		if(Dir==Link->Dir)
			return true;
		return false;
	}
	void run(){
		int PushCounter = 0;
		int stop = 0;
                int center=1;
                int spin = 0;

while(true){
			if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)){
				center = 0;
				stop =0; 
Link->X = GridX(Link->X+8);
		Link->Y = GridY(Link->Y+8);
Link->Dir=0;
{
while(stop<1){

					int Y = Link->Y;
					for(int i=0; i<1; i++){

				
Y -= 4;
						Link->Y = Y;
					
	WaitNoAction();


if(spin>=0&&spin<=3){Link->Dir=0;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}


else if(spin>=4&&spin<=7){Link->Dir=3;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin>=8&&spin<=11){Link->Dir=1;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}
else if(spin>=12&&spin<=14){Link->Dir=2;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin==15){Link->Dir=2;spin=0;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}



}











					
					
				
			}}}
			else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)){
		stop = 0;	center =0;
Link->X = GridX(Link->X+8);
		Link->Y = GridY(Link->Y+8);	
PushCounter++;{while(stop<1){
				int X = Link->X;
					for(int i=0; i<1; i++){
	X -= 4;
Link->X = X;WaitNoAction();
if(spin>=0&&spin<=3){Link->Dir=0;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}


else if(spin>=4&&spin<=7){Link->Dir=3;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin>=8&&spin<=11){Link->Dir=1;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}
else if(spin>=12&&spin<=14){Link->Dir=2;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin==15){Link->Dir=2;spin=0;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}




}
					
				}}
			}
			else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)){
		stop=0;	center=0;
Link->X = GridX(Link->X+8);
		Link->Y = GridY(Link->Y+8);	
PushCounter++;{while(stop<1){
				
					int X = Link->X;
					for(int i=0; i<1; i++){
						X += 4;
						Link->X = X;
						WaitNoAction();



if(spin>=0&&spin<=3){Link->Dir=0;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}


else if(spin>=4&&spin<=7){Link->Dir=3;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;WaitNoAction();}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin>=8&&spin<=11){Link->Dir=1;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;WaitNoAction();}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}
else if(spin>=12&&spin<=14){Link->Dir=2;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin==15){Link->Dir=2;spin=0;WaitNoAction();
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}






										}
				
				}}
			}
			else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), DOWN)){
				stop=0; center=0;

Link->X = GridX(Link->X+8);
		Link->Y = GridY(Link->Y+8);
PushCounter++;{while(stop<1){
					
					
					int Y = Link->Y;
					for(int i=0; i<1; i++){
						Y += 4;
												Link->Y = Y;
					
						WaitNoAction();



if(spin>=0&&spin<=3){Link->Dir=0;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}


else if(spin>=4&&spin<=7){Link->Dir=3;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin>=8&&spin<=11){Link->Dir=1;spin++; 
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}
}
else if(spin>=12&&spin<=14){Link->Dir=2;spin++;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}

}
else if(spin==15){Link->Dir=2;spin=0;
if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), UP)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), LEFT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), RIGHT)) {stop++;}
else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP)) {stop++;}}





					}
				}
			}}
			else if(ComboFI(ComboAt(CenterLinkX(), CenterLinkY()), STOP))
{
while(center<1){Link->X = GridX(Link->X+8);Link->Y = GridY(Link->Y+8); center++;}
stop++; 
}
		
else{
				
			}
			Waitframe();
		}
	}
}



#5 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 17 May 2017 - 10:05 AM

Problem i cannot use it because i do already use the Cliff script and there's the same name of CLIFF things on this script and on the Cliff script.



#6 TheRock

TheRock

    Go glitches

  • Members

Posted 17 May 2017 - 11:15 AM

Then get rid of const int CT_CLIFF = 142; and the const int CLIFF_PAUSE = 15; It should work fine if you get rid of those 2.

Or you could rename those two in the code and the const int.


Edited by TheRock, 17 May 2017 - 11:16 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users