Advertisement
Guest User

Bomb arrow script V4

a guest
Dec 22nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. import "std.zh"
  2. import "ffcscript.zh"
  3.  
  4. int ArrowTile;
  5. int BombTile;
  6. int LinkDir;
  7. lweapon wpn;
  8. lweapon Bwpn;
  9.  
  10. //Put constants here.
  11. //Put Global Variables here (Variables that ALL scripts in the quest use can use,
  12. //and editing it will effect all scripts using these variables Be careful).
  13.  
  14. ffc script BombArrows //'ffc' can be 'item' or 'global', too.
  15.  
  16. {
  17. void run(int d1, int d2, int d3)
  18. while(true) //Most often used loop.
  19. {
  20. // Put Local Variables here.
  21.  
  22. ArrowTile = d1; // Arrow Tile
  23. BombTile = d2; // Bomb Tile
  24.  
  25.  
  26.  
  27. LinkDir = Link->Dir;
  28. lweapon Arrow = Screen->CreateLWeapon(LW_ARROW, Link->X, Link->Y);
  29. lweapon Bomb = Screen->CreateLWeapon(LW_BOMB, Link->X, Link->Y);
  30. Arrow->Dir = LinkDir;
  31. Arrow->Damage = 4;
  32. Arrow->UseSprite(ArrowTile);
  33. Arrow->CSet = d3;
  34. Arrow->Step = 300;
  35.  
  36.  
  37. for (int i = 1; i <= Screen->NumLWeapons(); i++)
  38. wpn = Screen->LoadLWeapon(i);
  39. if (wpn->ID == LW_ARROW)
  40.  
  41. {
  42. for (int j = 1; j <= Screen->NumLWeapons(); j++)
  43. Bwpn = Screen->LoadLWeapon(j);
  44. if (Bwpn->ID == LW_BOMB)
  45. {Bwpn->X = Arrow->X;
  46. Bwpn->Y = Arrow->Y; }
  47. }
  48.  
  49.  
  50. // only the script with a local variable can use it,
  51. // and editing it will only effect the variable in the script it is in, not any other script.
  52.  
  53. // code goes here // Don't put code after a double slash ( // ),
  54. // as it will not work. only use double slashes for non code in the script.
  55.  
  56. Waitframe();
  57.  
  58.  
  59.  
  60.  
  61. }
  62.  
  63. }
  64.  
  65.  
  66. item script BombArrowsItem
  67. {
  68. void run()
  69. {
  70. if (NumLWeaponsOf(LW_ARROW) > 0)
  71. {Quit();}
  72. RunFFCScript(1, NULL);
  73.  
  74.  
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement