Advertisement
Guest User

Untitled

a guest
May 5th, 2015
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. script: Illusions
  2.  
  3. code:
  4.  
  5. illusions = illusions or {}
  6.  
  7. illusions.index = illusions.index or 1
  8. illusions.enabled = illusions.enabled or false
  9.  
  10. illusions.illTable= {
  11. [1] = "A nearly invisible magical shield forms around Ethoas.",
  12. [2] = "You suddenly perceive the vague outline of an aura of rebounding around Ethoas.",
  13. [3] = "You glance over Ethoas and see that his health is at 5412/4412.",
  14. [4] = "You let fly at Ethoas with a snap kick.\\nYou connect to the right leg!",
  15. [5] = "You viciously jab an ornate steel rapier into Ethoas's right leg.",
  16. [6] = "Ethoas points an imperious finger at you.",
  17. [7] = "Ethoas stands a tarot on his open palm, and blows it lightly at you. Suddenly your movement through the time stream is slowed."
  18. }
  19.  
  20. function illusions.getnext()
  21. local current = illusions.illTable[illusions.index]
  22. illusions.index = illusions.index+1
  23. if illusions.index >= table.size(illusions.illTable) then
  24. illusions.index=1
  25. end
  26. return current
  27. end
  28.  
  29.  
  30. trigger:
  31.  
  32. line 0: ^You prick (.+) twice in rapid succession with your dirk.$
  33.  
  34. code:
  35.  
  36. if illusions.enabled then
  37. send("conjure " ..target.. " illusion "..illusions.getnext())
  38. end
  39.  
  40. alias Illusion Table On
  41.  
  42. pattern: ^it(y|n)?$
  43.  
  44. code:
  45.  
  46. if matches[2] == "y" then
  47. illusions.enabled = true
  48. elseif matches[2] == "n" then
  49. illusions.enabled = false
  50. else
  51. illusions.enabled = not illusions.enabled
  52. end
  53. if illusions.enabled then
  54. cecho("<white> ---- <green> [ Illusioning Table ON ]<white> ----")
  55. else
  56. cecho("<white> ---- <firebrick> [ Illusioning Table OFF ] <white> ----")
  57. end
  58.  
  59. -----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement