Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffc script sentry{
- void run(){
- this->X = Link->X;
- this->Y = Link->Y;
- this->Data = sentile;
- this->CSet = sencset;
- Game->PlaySound(sensound);
- while(!Link->PressB){
- //Set the direction of the sentry
- if(Link->Dir == DIR_UP) this->Data = sentile;
- else if(Link->Dir == DIR_DOWN) this->Data = sentile+1;
- else if(Link->Dir == DIR_LEFT) this->Data = sentile+2;
- else if(Link->Dir == DIR_RIGHT)this->Data = sentile+3;
- //If the player hits 'A', fire magic!
- if(Link->PressA == true && Link->MP>= senmag){
- //Create the magic weapon and fire it
- lweapon magic = Screen->CreateLWeapon(13);
- magic->X = this->X;
- magic->Y = this->Y;
- magic->UseSprite(senweapon);
- magic->Tile += Link->Dir;
- magic->Damage = sendam;
- magic->Step = senspd;
- magic->Dir = Link->Dir;
- Game->PlaySound(magsound);
- Link->MP -= senmag;
- }
- Waitframe();
- }
- //Set up the explosion
- lweapon explode = Screen->CreateLWeapon(6);
- explode->X = this->X;
- explode->Y = this->Y + 2;
- explode->UseSprite(senbweapon);
- explode->Damage = sendam;
- this->X = -16;
- this->Y = -16;
- while(explode->isValid()) Waitframe();
- this->Data = 0;
- Quit();
- }
- }
- item script sentryitem{
- void run(int NAME, int scriptNum, int magic){
- if(CountFFCsRunning(scriptNum) == 0 && Link->MP >= magic){
- RunFFCScript(scriptNum,NULL);
- Link->MP -= magic;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement