Advertisement
Venrob

HookTakesShields 2.55

Dec 30th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. item script HookshotGrabShield
  2. {
  3. void run()
  4. {
  5. lweapon hook;
  6. do
  7. {
  8. Waitframe();
  9. for(int q = 1; q <= Screen->NumLWeapons(); ++q)
  10. {
  11. lweapon l = Screen->LoadLWeapon(q);
  12. if(l->ID == LW_HOOKSHOT)
  13. {
  14. hook = l;
  15. break;
  16. }
  17. }
  18. }
  19. until(hook);
  20. while(hook->isValid())
  21. {
  22. for(int w = 1; w <= Screen->NumNPCs(); ++w)
  23. {
  24. npc n = Screen->LoadNPC(w);
  25. if(Collision(n, hook))
  26. n->BreakShield();
  27. }
  28. Waitframe();
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement