Guest User

Untitled

a guest
Sep 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. ffc script eSwordEnemy{
  2. void run(int enemyID){
  3. int offset = 12;
  4. int tile = 414;
  5. int cset = 8;
  6. npc ghost = Ghost_InitAutoGhost(this,enemyID);
  7. Ghost_Data = GH_INVISIBLE_COMBO;
  8. eweapon e;
  9. Ghost_Waitframes2(this,ghost,true,true,10);
  10. while(true){
  11. if(!e->isValid()){
  12. e = CreateEWeaponAt(EW_SCRIPT1,Ghost_X,Ghost_Y);
  13. e->Tile = GH_BLANK_TILE;
  14. }
  15.  
  16. e->X = ghost->X;
  17. e->Y = ghost->Y;
  18.  
  19. if(Ghost_Dir == DIR_RIGHT)e->X += offset+1;
  20. else if(Ghost_Dir == DIR_LEFT)e->X -= offset;
  21. else if(Ghost_Dir == DIR_DOWN)e->Y += offset+1;
  22. else if(Ghost_Dir == DIR_UP)e->Y -= offset;
  23.  
  24. e->Damage = ghost->Damage;
  25. e->Tile = GH_BLANK_TILE;
  26. e->Dir = Link->Dir;
  27. if(Ghost_Dir == DIR_DOWN) Screen->FastTile(3,e->X,e->Y,tile + Ghost_Dir,cset,OP_OPAQUE);
  28. else Screen->FastTile(0,e->X,e->Y,tile + Ghost_Dir,cset,OP_OPAQUE);
  29.  
  30. Ghost_Waitframe2(this,ghost,true,true);
  31. }
  32. }
  33. }
Add Comment
Please, Sign In to add comment