Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. void BraceletThrow(){
  2. int loc = ComboInFront(Link->Dir);
  3. if(Link->Item[I_BRACELET2]
  4. && (Screen->ComboT[loc]== CT_PUSHHEAVY || Screen->ComboT[loc]==CT_BUSHNEXT)
  5. && DestinyVars[CURRENT_OVERWORLD]==MIRROR_OVERWORLD){
  6. Screen->FastCombo(4,Link->X,Link->Y-16,THINK_COMBO,5,128);
  7. if(CountFFCsRunning(THROW_FFC_SCRIPT)==0
  8. && Link->PressEx1){
  9. Link->PressEx1 = false;
  10. Link->InputEx1 = false;
  11. int tile;
  12. if(Screen->ComboT[loc]==CT_PUSHHEAVY)
  13. tile= ROCK_TILE;
  14. else if(Screen->ComboT[loc]==CT_BUSHNEXT)
  15. tile= BUSH_TILE;
  16. int Args[8]= {tile};
  17. NewFFCScript(THROW_FFC_SCRIPT,Args);
  18. SetScriptAction(SA_ATTACKING);
  19. if(Screen->ComboT[loc]== CT_PUSHHEAVY )
  20. Screen->ComboD[loc]= Screen->UnderCombo;
  21. else
  22. Screen->ComboD[loc]++;
  23. if(ComboFI(loc,CF_ARMOSITEM) && !Screen->State[ST_SPECIALITEM]
  24. && Screen->RoomType==RT_SPECIALITEM){
  25. item theitem = Screen->CreateItem(Screen->RoomData);
  26. theitem->X= ComboX(loc);
  27. theitem->Y= ComboY(loc);
  28. theitem->Pickup |= IP_HOLDUP;
  29. int Args[8]= {theitem->ID};
  30. NewFFCScript(ITEM_MONITOR_SCRIPT,Args);
  31. }
  32. }
  33. }
  34. }
  35.  
  36. const int ITEM_MONITOR_SCRIPT = 87;
  37.  
  38. ffc script ItemMonitor{
  39. void run(int item_to_watch){
  40. int i;
  41. item the_item;
  42. for(i = Screen->NumItems();i>0;i--){
  43. the_item = Screen->LoadItem(i);
  44. if(the_item->ID==item_to_watch)
  45. break;
  46. }
  47. while(the_item->isValid())
  48. Waitframe();
  49. Screen->State[ST_SPECIALITEM]= true;
  50. }
  51. }
  52.  
  53. const int THROW_FFC_SCRIPT = 78;
  54. const int ROCK_TILE = 13270;
  55. const int BUSH_TILE = 13092;
  56.  
  57. ffc script Thrown_Object{
  58. void run(int tile){
  59. lweapon throw;
  60. throw= FireLWeapon(LW_SCRIPT7, Link->X+8, Link->Y, __DirtoRad(Link->Dir),
  61. 100, 8, SPR_NULL, SFX_THROW, 0);
  62. SetLWeaponMovement(throw,LWM_THROW,3,LWMF_DIE);
  63. if(tile==ROCK_TILE)
  64. SetLWeaponDeathEffect(throw,LWD_4_FIREBALLS_RANDOM,18);
  65. else if(tile==BUSH_TILE)
  66. SetLWeaponDeathEffect(throw,LWD_4_FIREBALLS_RANDOM,106);
  67. SetLWeaponFlag2(throw,LWF_SHADOW);
  68. while(throw->isValid()){
  69. Screen->FastTile(3,throw->X,throw->Y-throw->Z,tile,0,128);
  70. Waitframe();
  71. }
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement