Advertisement
hhaos

Untitled

May 3rd, 2023
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. local t = string.trim(matches[2])
  2.  
  3. local exits = table.keys(gmcp.Room.Info.exits)
  4. local lightwalldir = exits[math.random(#exits)]
  5.  
  6. --LIGHTWALL
  7. local function isLightWall()
  8. for id, item in pairs(api.room.items) do
  9. if item.name == "a lightwall" then return true end
  10. end
  11. end
  12.  
  13. --DISABLE AUTOASSIST
  14. local function autoassistDisable()
  15. if auto_assist == true then
  16. auto_assist = false
  17. tempTimer(2, [[auto_assist = true]])
  18. end
  19. end
  20.  
  21. --BETTER RANDOM
  22. local function betterRand()
  23. randomtable = {}
  24. for i = 1, 97 do
  25. randomtable[i] = math.random()
  26. end
  27. local x = math.random()
  28. local i = 1 + math.floor(97*x)
  29. x, randomtable[i] = randomtable[i], x
  30. return x
  31. end
  32.  
  33. --SNAP FAKEOUT
  34. local function falseSnap()
  35. if mesmer.status ~= "sealed" and fake_snap == true then
  36. randonumber = betterRand()
  37. if (randonumber <= 0.2 and fsnap_cd ~= true) then
  38. send("snap "..target)
  39. end
  40. end
  41. end
  42.  
  43. --MESMER HYPNOSIS
  44. function mesmer_push()
  45. if (no_hyp == true or hyp_delay == true or svo.inslowcuringmode()) then
  46. elseif mesmer.status == "none" then
  47. mesmer.reset()
  48. expandAlias(hypnoout)
  49. mesmer.suggest()
  50. falseSnap()
  51. elseif mesmer.status == "in progress" then
  52. falseSnap()
  53. elseif mesmer.status == "hypnotised" then
  54. mesmer.suggest()
  55. elseif mesmer.status == "snapped" then
  56. mesmer.reset()
  57. expandAlias(hypnoout)
  58. mesmer.suggest()
  59. falseSnap()
  60. elseif mesmer.status == "sealed" then
  61. end
  62. end
  63.  
  64. --ILLUSION HEALS
  65. local function illusionHeals()
  66. randonumber = betterRand()
  67. if randonumber <= 0.25 then
  68. return("conjure illusion "..mySelf.." eats a piece of kelp.")
  69. elseif randonumber <= 0.5 then
  70. return("conjure illusion "..mySelf.." hunches "..myPronoun.." shoulders and lets out a soft hiss.")
  71. elseif randonumber <= 0.75 then
  72. return("conjure illusion "..mySelf.." takes a long drag off "..myPronoun.." pipe.")
  73. elseif randonumber > 0.75 then
  74. return("conjure illusion "..mySelf.." touches a tree of life tattoo.")
  75. else
  76. return("conjure illusion "..mySelf.." eats a bloodroot leaf.")
  77. end
  78. end
  79.  
  80.  
  81. --ILLUSION SHIELDS
  82. local function illusionShield()
  83. randonumber = betterRand()
  84. if randonumber <= 0.5 then
  85. return("A nearly invisible magical shield forms around "..mySelf..".")
  86. elseif randonumber > 0.5 then
  87. return("A nearly invisible magical shield forms around "..mySelf..".")
  88. else
  89. return("A nearly invisible magical shield forms around "..mySelf..".")
  90. end
  91. end
  92.  
  93. --PREFIX
  94. local function prefix()
  95. local pref = {"concentrate","stand","purge","wear "..myArmor,"drop "..mySnake,"order "..mySnake.." attack "..target,"dispel "..target}
  96. if viperFollow then
  97. table.insert(pref , 5 ,"order "..mySnake.." follow "..target)
  98. else
  99. table.insert(pref , 5 ,"order "..mySnake.." follow "..mySelf)
  100. end
  101. if tar_class == "airelemental" or isFlying then
  102. table.insert(pref , 1 ,"land")
  103. end
  104. pf = table.concat(pref, "/")
  105. return pf
  106. end
  107.  
  108. if t ~= nil then
  109. if isLightWall() and auto_illusion then
  110. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..t.."/"..illusionHeals().."\\n"..illusionShield(),"queue add eqbal qpshot")
  111. elseif isLightWall() then
  112. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..t,"queue add eqbal qpshot")
  113. else
  114. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..t.."/conjure lightwall "..lightwalldir,"queue add eqbal qpshot")
  115. end
  116. elseif PinshotTimer then
  117. ak.serpent.Lockstack.main()
  118. send("queue addclear eqbal oattack")
  119. cecho("<orange>\n[PINSHOT]: <yellow>pinshot still active on <red>"..target.." <yellow>for <white>"..remainingTime(PinshotTimer).." seconds...\n")
  120. return
  121. elseif svo.inslowcuringmode() then
  122. sendAll("cq all","setalias qpshot pinshot "..target,"queue add eqbal qpshot")
  123. elseif isLightWall() then
  124. mesmer_push()
  125. autoassistDisable()
  126. if auto_illusion then
  127. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..target.."/"..illusionHeals().."\\n"..illusionShield(),"queue add eqbal qpshot")
  128. else
  129. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..target,"queue add eqbal qpshot")
  130. end
  131. else
  132. mesmer_push()
  133. autoassistDisable()
  134. sendAll("cq all","setalias qpshot "..prefix().."/block "..lightwalldir.."/remove "..myBow.."/wield "..myBow.."/pinshot "..target.."/conjure lightwall "..lightwalldir,"queue add eqbal qpshot")
  135. end
  136.  
  137.  
  138. --DEV NOTES
  139. --### removed because pinshot bypasses rebounding
  140. --elseif (ak.defs.shield or ak.defs.rebounding) and auto_flay then
  141. --ak.serpent.Lockstack.main()
  142. --send("queue addclear eqbal oattack")
  143. --return
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement