Advertisement
Guest User

Offending script

a guest
Jan 18th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | Software | 0 0
  1. elements.allocate("MAM","WARS")
  2.  
  3. elements.element(elements.MAM_PT_WARS,elements.element(elements.DEFAULT_PT_DUST))
  4. elements.property(elements.MAM_PT_WARS,"Name","WARS")
  5. elements.property(elements.MAM_PT_WARS,"Description","MAM warring spins")
  6. elements.property(elements.MAM_PT_WARS,"Colour",0x6bba99)
  7. elem.property(elem.MAM_PT_WARS, "MenuVisible", 1)
  8. elem.property(elem.MAM_PT_WARS, "MenuSection", elem.SC_SPECIAL)
  9. elem.property(elem.MAM_PT_WARS, "Advection", 0.9)
  10. elem.property(elem.MAM_PT_WARS, "AirDrag", 0.42)
  11. elem.property(elem.MAM_PT_WARS, "AirLoss", 0.01)
  12. elem.property(elem.MAM_PT_WARS, "Loss", 0.364)
  13. elem.property(elem.MAM_PT_WARS, "Collision", -0.2)
  14. elem.property(elem.MAM_PT_WARS, "Gravity", 0)
  15. elem.property(elem.MAM_PT_WARS, "Diffusion", 0)
  16. elem.property(elem.MAM_PT_WARS, "HotAir", 0.008)
  17.  
  18. elem.property(elem.MAM_PT_WARS, "Explosive", 0)
  19. elem.property(elem.MAM_PT_WARS, "Flammable", 0)
  20. elem.property(elem.MAM_PT_WARS, "Hardness", 1)
  21. elem.property(elem.MAM_PT_WARS, "Meltable", 0)
  22. elem.property(elem.MAM_PT_WARS, "Weight", 24)
  23.  
  24. elem.property(elem.MAM_PT_WARS, "HeatConduct", 60)
  25. elem.property(elem.MAM_PT_WARS, "Temperature", 273)
  26.  
  27. elem.property(elem.MAM_PT_WARS, "Falldown", 0.05)
  28. elem.property(elem.MAM_PT_WARS, "State", elem.ST_PART)
  29. elem.property(elem.MAM_PT_WARS, "Properties", elem.TYPE_PART + elem.PROP_LIFE_DEC + elem.PROP_LIFE_KILL_DEC)
  30.  
  31. elem.property(elem.MAM_PT_WARS, "LowPressure", IPL)
  32. elem.property(elem.MAM_PT_WARS, "LowPressureTransition", NT)
  33. elem.property(elem.MAM_PT_WARS, "HighPressure", IPH)
  34. elem.property(elem.MAM_PT_WARS, "HighPressureTransition", NT)
  35. elem.property(elem.MAM_PT_WARS, "LowTemperature", ITL)
  36. elem.property(elem.MAM_PT_WARS, "LowTemperatureTransition", NT)
  37. elem.property(elem.MAM_PT_WARS, "HighTemperature", ITH)
  38. elem.property(elem.MAM_PT_WARS, "HighTemperatureTransition", NT)
  39. local Yref
  40. local Lposbrushx
  41. local Rposbrushx
  42. local leftAnchorPosX
  43. local leftAnchorPosY
  44. local rightAnchorPosX
  45. local rightAnchorPosY
  46.  
  47. local function WARS_update(i,x,y,ss,nt)
  48. --print("ss: ", ss, " nt: ", nt)
  49. leftAnchorPosX, leftAnchorPosY = sim.partPosition(leftAnchorID)
  50. rightAnchorPosX, rightAnchorPosY = sim.partPosition(rightAnchorID)
  51. rndcrit = math.random(0, 380)
  52.  
  53. if rndcrit == 380 then
  54. --print(Yref)
  55. --print("rndcrit: ", rndcrit)
  56. sim.partCreate(-3, Lposbrushx, Yref, elem.DEFAULT_PT_GRAV)
  57. sim.partCreate(-3, Rposbrushx, Yref, elem.DEFAULT_PT_GRAV)
  58. end
  59.  
  60. end
  61.  
  62. local function drawcall()
  63. --print("drawcall!", leftAnchorPosX, rightAnchorPosY)
  64. if leftAnchorPosX and leftAnchorPosY and rightAnchorPosX and rightAnchorPosY and elements[tpt.selectedl]==elements.MAM_PT_WARS then
  65. tpt.drawline(leftAnchorPosX, leftAnchorPosY, rightAnchorPosX, rightAnchorPosY)
  66. end
  67. end
  68.  
  69. elements.property(elem.MAM_PT_WARS, "Update", WARS_update)
  70.  
  71. local function mousedownWARS (mouseX, mouseY, button)
  72. if button==1 and elements[tpt.selectedl]==elements.MAM_PT_WARS and mouseX<612 and mouseX>0 and mouseY<383 and mouseY>0 then
  73. Yref=mouseY
  74. print(mouseX, mouseY, button, tpt.brushx, tpt.brushy)
  75. Lposbrushx = mouseX - tpt.brushx
  76. Rposbrushx = mouseX + tpt.brushx
  77. leftAnchorID = sim.partCreate(-1, Lposbrushx, mouseY, elem.DEFAULT_PT_GRAV)
  78. rightAnchorID = sim.partCreate(-1, Rposbrushx, mouseY, elem.DEFAULT_PT_GRAV)
  79.  
  80. --event.register(event.tick, drawcall)
  81.  
  82.  
  83. end
  84. end
  85.  
  86. event.register(event.mousedown, mousedownWARS)
  87.  
  88. -- You must return cache, pixel_mode, cola, colr, colg, colb, firea, firer, fireg, and fireb in that order
  89.  
  90.  
  91. function graphics(i, colr, colg, colb)
  92. --graphics.drawline(25, 120, 300, 85)
  93. colr= math.random(30, 240)
  94. colg= math.random(30, 240)
  95. colb= math.random(30, 240)
  96. return 0,0x000000020, 255,colr,colg,colb, 255, 255, 0, 0
  97. end
  98.  
  99. tpt.graphics_func(graphics, elements.MAM_PT_WARS)
  100.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement