Advertisement
Venrob

HookshotTakesShields 2.53

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