Advertisement
Guest User

ringpar.lua

a guest
Jul 19th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. component = require('component')
  2. event = require('event')
  3. math = require('math')
  4. d = component.debug
  5. m = component.modem
  6.  
  7. m.open(405)
  8.  
  9. function pargen(tags,effect,x,y,z,dx,dy,dz,speed,id)
  10.   if effect == 'iconcrack' then
  11.     d.runCommand('/execute @e[type=armor_stand,'..tags..'] ~ ~2 ~ /particle iconcrack ~'..x..' ~'..y..' ~'..z..' '..dx..' '..dy..' '..dz..' '..speed..' 0 force @a '..id)
  12.   else
  13.     d.runCommand('/execute @e[type=armor_stand,'..tags..'] ~ ~2 ~ /particle '..effect..' ~'..x..' ~'..y..' ~'..z..' '..dx..' '..dy..' '..dz..' '..speed..' 0 force')
  14.   end
  15. end
  16.  
  17. function propos(r,a,p)
  18.   x = -r
  19.   y = 0
  20.   z = 0
  21.   dx= -p * math.cos(math.rad(a))
  22.   dy=  p * math.sin(math.rad(a))  
  23.   dz=  0 * math.sin(math.rad(a))
  24. end
  25.  
  26. f = 1
  27.  
  28. function info()
  29.   print('')
  30.   print('                                                Ring Fountain '..f..'      (Port: 405)')
  31.   print('        Receive: Tags, Effect, Ring Range, Angle, Particle Power, Particle Speed, [block Id (if use iconcrack)]')
  32.   print('                    Available Particle: Flame, Cloud, Totem, Dragonbreath, EndRod, Iconcrack.')
  33. end
  34.  
  35. info()
  36.  
  37. while true do
  38.   _,_,_,_,_,tags,effect,r,a,p,speed,id = event.pull('modem_message')
  39.   propos(r,a,p)
  40.   pargen(tags,effect,x,y,z,dx,dy,dz,speed,id)
  41.  
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement