theblackshibe

Untitled

Sep 11th, 2021 (edited)
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. (function sent sender channel msg
  2. ; Only works in testing channel atm
  3. ; (when (starts-with? msg "(")
  4. ; (dl.util.fmessage (eval msg)))
  5.  
  6. (let parts (split msg))
  7. (let cmd (0 parts))
  8. (let body (join (sect parts)))
  9. (let body (if (= body "") null body))
  10.  
  11. (when (= cmd "team")
  12. ((str "$dl.players." sender ".team")
  13. body)
  14. (dl.util.fmessage (str sender " team changed to " body)))
  15.  
  16. (when (= cmd "kill")
  17. ((str "dl.players." body ".kill"))
  18. (dl.util.fmessage (str body " killed")))
  19.  
  20. (when (= cmd "brrr")
  21. (let pos (position (str "dl.players." body)))
  22. (let i 0)
  23. (while (< i 100)
  24. (let i (inc i))
  25. (wait 0.01)
  26. (print pos)
  27. (let coord (- (* i 2) 100))
  28. (dl.util.explosion (map + [coord 0 0] pos))))
  29.  
  30. (when (= cmd "flare")
  31. (let pos (position (str "dl.players." (or body sender))))
  32. (dl.util.explosion (map + [0 100 0] pos) "TestGrenade"))
  33.  
  34. (when (= cmd "explode")
  35. (let is-near (= (1 parts) "near"))
  36. (let player ((if is-near 2 1) parts))
  37. (let pos (position (str "dl.players." player)))
  38. (let rands (map rand-num [-16 0 -16] [16 16 16]))
  39. (let pos (if is-near (map + pos rands) pos))
  40. (dl.util.explosion pos "TestGrenade")
  41. (dl.util.fmessage (str "exploded " body))))
  42.  
  43. (dl.events.on_chat_message.kill)
  44. (dl.events.on_chat_message.connect sent)
Add Comment
Please, Sign In to add comment