void run(int item){
while(true){
if(Link->Item[item]){
Link->HP=Link->HP;
}
else if(!Link->Item[item]){
Waitframes(120);
Link->HP-=1;
Waitframe();
}
}
}
ffc script Press_A{
void run(int frames){
while(true){
if(Link->InputA){
Waitframes(frames);
this->Data=Cmb_autowarp;
Waitframe();
}
}
}
ffc script PlaySfx{
void run(int sfx_slot, int frames){
int sound = 0;
if(sound == 0){
Game->PlaySound(sfx_slot);
sound = frames;
}else{
sound--;
}
Waitframe();
}while(frames !=0);
}
}
ffc script Evil_Sound_message{
void run(int s, int sfx, int frames)
if(Screen->NumNPCs() > 0){
Waitframes(frames);
Game->PlaySound(sfx);
Screen->Message(s);
}
}
}
ffc script WavyScreen{
void run(int sfx , int frames){
Screen->Wavy=frames;
Game->PlaySound(sfx);
}
}
item script FlippersSound{
void run(){
Game->PlaySound(SFX_SWIMMING);
}
}
ffc script Play_ScreenSfx{
void run(int sfx){
Game->PlaySound(sfx)
}
}
const int SFX_OPENCHEST = 0;
const int SFX_ITEMFANFARE = 0;
const int T_ITEMTILE = 0;
const int S_GETITEM = 0;
ffc script Chest{
void run(int chestlock, int chestunlock, int item){
int chest = ComboAt(this->X,this->Y);
int unloc = Screen->ComboD[chest];
int x = 0;
int y = 0;
While(Screen->ComboD[chest] == chestlock){
if(Link->X == this->X && Link->Y == this-Y && Dir == 0 && Link->InputA){ Waitframe();
int freeze = Screen->ComboT[0];
Screen->ComboT[0] = CT_SCREENFREEZE;
Game->PlaySound(SFX_OPENCHEST);
Waitframes(2);
Screen->ComboD[chest] == chestunlock;
Screen->Drawtile(1,x,y,T_ITEMTILE,1,0,0,0,0,true,128);
Game->Playsound(SFX_ITEMFANFARE);
Screen->ComboT[0] = freeze;
Screen->Message(S_GETITEM);
Screen->Drawtile(1,x,y,T_ITEMTILE,1,0,0,0,0,false,128);
Link->Item[item] = true;
}
}
}
const int CMB_AUTOWARP = 0;//set here combo i.d of the stairs combo with
const int SFX_STAIRS = 0;//set here the sfx of the entrance
const int StairsCSet = 0;//set here the cset of the stairs you will use
ffc script StairsSound{
void run(int combo, int sound){
int stairs = ComboAt(this-X,this->Y);
int steps = Screen->ComboD[stairs];
while(Screen->ComboD[stairs] == combo){ Waitframe();
if(Link->X == this->X && Link->Y == this->Y);
this->Data=CMB_AUTOWARP:
this->CSet= StairsCSet;
Game->PlaySound(SFX_STAIRS);
}//end of while
}//end of if
}//end of void run
}//end of script
//this script makes the npc gives link an item,if he has the correct item with him
//from MatthewPZC NPC script, modified by me
ffc script Npc_Item{
void run(int item, int message1, int item2, int message2, int perm){
int d_x;
int d_y;
int a_x;
int a_y;
while(true){
d_x = this->X - Link->X;
d_y = this->Y - Link->Y;
a_x = Abs(d_x);
a_y = Abs(d_y);
if(Link->InputL && a_x < 24 && a_y < 24 && Link->Z == 0){
Link->InputL = false;
if(!Link->Item[item]){
Screen->Message(message1); Waitframe();
}
else if(Link->Item[item]){
Waitframes(2);
Screen->Message(message2);
Link->Item[item2] =true;
Screen->CreateItem[item2];
Waitframes(2);
if(!GetArray(NpcItem,perm)){
Screen->Message(message2);
SetArray(NpcItem,perm,true);
}
}
}
}
hav'nt tested some of them , as i dont have patience
can someone spot any errors or correction it'll be awesome to release these to other people
who's in need
Edited by drzchulo973, 08 December 2008 - 03:29 PM.