throwplayer.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. %setVar safe marvinius;
  2. @checker
  3. %playersToList online;
  4. %if %getListSize online; == 0 goto wait;
  5. %setVar i 0;
  6. @checklabel
  7. %if %getListElementAt online $i; == marvinius goto jump;
  8. %if %distance %getPlayerLoc $safe; %getPlayerLoc %getListElementAt online $i;;; < 8 goto throw;
  9. @jump
  10. %setVar i %add $i 1;;
  11. %if $i < %getListSize online; goto checklabel;
  12. %goto wait;
  13. @throw
  14. %setVar throw %getListElementAt online $i;;
  15. %setVar safex %coords %getPlayerLoc $safe; x;;
  16. %setVar safey %coords %getPlayerLoc $safe; z;;
  17. %setVar throwx %coords %getPlayerLoc $safe; x;;
  18. %setVar throwy %coords %getPlayerLoc $safe; z;;
  19. %msg marvinius $safex;
  20. %msg marvinius $safey;
  21. %msg marvinius $throwx;
  22. %msg marvinius $throwy;
  23. %if $safex <= $throwx && $safey <= $throwy goto throw1;
  24. %if $safex >= $throwx && $safey >= $throwy goto throw2;
  25. %if $safex <= $throwx && $safey >= $throwy goto throw3;
  26. %if $safex >= $throwx && $safey <= $throwy goto throw4;
  27. %goto wait;
  28. @throw1
  29. %msg all throw1;
  30. %throwEntity %getPlayerID $throw; 2 0 2;
  31. %goto wait;
  32. @throw2
  33. %msg all throw2;
  34. %throwEntity %getPlayerID $throw; -2 0 -2;
  35. %goto wait;
  36. @throw3
  37. %msg all throw3;
  38. %throwEntity %getPlayerID $throw; 2 0 -2;
  39. %goto wait;
  40. @throw4
  41. %msg all throw4;
  42. %throwEntity %getPlayerID $throw; -2 0 2;
  43. %goto wait;
  44. @wait
  45. %msg all wait;
  46. %sgoto 15 checker;
  47. %wait;
  48. %if $event == player-leave && $player-name == $safe goto term;
  49. %goto wait;
  50. @term
  51. %msg marvinius term;
  52. %term;