Nessiesson

Firewerks!

Aug 24th, 2013
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. bind(player_interact, array(priority: normal), null, @event,
  2. assign(@p, @event['player'])
  3. assign(@h, pinv(@p, null))
  4. if(@event['action'] != 'right_click_air' && @event['action'] != 'right_click_block') { die() }
  5. if(@h == null) { die() }
  6. assign(@m, get_itemmeta(@p, null))
  7. if(@m == null) { die() }
  8. assign(@lm, @m['lore'])
  9. if(@lm == null) { die() }
  10. foreach(@lm, @l,
  11. if(reg_count(color(k) . color(6) . color(a), @lm) > 0) {
  12. assign(@typeR, array('BALL', 'BALL_LARGE', 'STAR', 'BURST', 'CREEPER'))
  13. assign(@strength, rand(0,5))
  14. assign(@flicker, rand(0,2))
  15. assign(@trail, rand(0,2))
  16. assign(@type, @typeR[array_rand(@typeR)[0]])
  17. assign(@colorsC, array('WHITE', 'BLUE', 'FUCHSIA', 'MAROON', 'GREEN', 'GREY', 'AQUA', 'OLIVE', 'NAVY', 'SILVER', 'YELLOW', 'BLACK', 'LIME', 'ORANGE', 'PURPLE', 'RED', 'GRAY', 'TEAL'))
  18. assign(@colors, array())
  19. assign(@fade, array())
  20.  
  21. assign(@colorsR, array_rand(@colorsC, rand(1,18)))
  22. foreach(@colorsR, @c, array_push(@colors, @colorsC[@c]))
  23. assign(@fadeR, array_rand(@colorsC, rand(1,18)))
  24. foreach(@fadeR, @f, array_push(@fade, @colorsC[@c]))
  25.  
  26. assign(@final, array(strength: @strength, flicker: @flicker, trail: @trail, colors: @colors, fade: @fade, type: @type))
  27. launch_firework(ploc(@p), @final)
  28. # tmsg(@p, @strength)
  29. }
  30. )
  31. )
  32.  
  33. bind(player_interact, array(priority: normal), null, @event,
  34. assign(@p, @event['player'])
  35. assign(@h, pinv(@p, null))
  36. if(@event['action'] != 'right_click_air' && @event['action'] != 'right_click_block') { die() }
  37. if(@h == null) { die() }
  38. assign(@m, get_itemmeta(@p, null))
  39. if(@m == null) { die() }
  40. assign(@lm, @m['lore'])
  41. if(@lm == null) { die() }
  42. foreach(@lm, @l,
  43. if(reg_count(color(k) . color(6) . color(b), @lm) > 0) {
  44. assign(@typeR, array( 'BALL_LARGE', 'STAR', 'BURST', 'CREEPER'))
  45. assign(@strength, 4)
  46. assign(@flicker, rand(0,2))
  47. assign(@trail, 1)
  48. assign(@type, @typeR[array_rand(@typeR)[0]])
  49. assign(@colorsC, array('WHITE', 'BLUE', 'FUCHSIA', 'MAROON', 'GREEN', 'GREY', 'AQUA', 'OLIVE', 'NAVY', 'SILVER', 'YELLOW', 'BLACK', 'LIME', 'ORANGE', 'PURPLE', 'RED', 'GRAY', 'TEAL'))
  50. assign(@colors, array())
  51. assign(@fade, array())
  52.  
  53. assign(@colorsR, array_rand(@colorsC, rand(1,18)))
  54. foreach(@colorsR, @c, array_push(@colors, @colorsC[@c]))
  55. assign(@fadeR, array_rand(@colorsC, rand(1,18)))
  56. foreach(@fadeR, @f, array_push(@fade, @colorsC[@c]))
  57.  
  58. assign(@final, array(strength: @strength, flicker: @flicker, trail: @trail, colors: @colors, fade: @fade, type: @type))
  59. launch_firework(ploc(@p), @final)
  60. # tmsg(@p, @flicker)
  61. }
  62. )
  63. )
Advertisement
Add Comment
Please, Sign In to add comment