Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1.  
  2. -- Shooter by Mihelox --
  3.  
  4. -- Exori --
  5. Weak_Spell = "Exori"
  6. Weak_Spell_Mana = 115
  7. Weak_Creature_Count = 2
  8.  
  9. -- Exori Gran --
  10. Strong_Spell = "Exori Gran"
  11. Strong_Spell_Mana = 340
  12. Strong_Creature_Count = 3
  13.  
  14. -- Exori Gran Ico --
  15. Misc_Spell_One = "Exori Gran Ico"
  16. Misc_Spell_One_Mana = 300
  17. Misc_Spell_One_Count = 1
  18.  
  19. -- Exori Ico --
  20. Misc_Spell_Two = "Exori Ico"
  21. Misc_Spell_Two_Mana = 30
  22. Misc_Spell_Two_Count = 1
  23.  
  24. -- Exori Hur --
  25. Misc_Spell_Three = "Exori Hur"
  26. Misc_Spell_Three_Mana = 40
  27. Misc_Spell_Three_Count = 1
  28.  
  29. -- Utori Kor --
  30. Misc_Spell_Four = "Utori Kor"
  31. Misc_Spell_Four_Mana = 30
  32. Misc_Spell_Four_Count = 1
  33.  
  34.  
  35. SELF_EXORI_LIST = {"Spidris", "Kollos"}
  36.  
  37. -- Functions --
  38. print('Shooter By Midas Version: 1.1')
  39.  
  40. function GetSelfSpectators()
  41. player = 0
  42. local c = Self.GetSpectators()
  43. for i = 1, #c do
  44. if c[i]:isPlayer() and not c[i]:isPartyMember() then
  45. player = player + 1
  46. end
  47. end
  48. return player
  49. end
  50.  
  51. function getexoricount()
  52. self = Self.Position()
  53. monster = 0
  54. for _, c in Creature.iMonsters() do
  55. if Self.DistanceFromPosition(c:Position().x, c:Position().y, c:Position().z) == 1 and table.find(SELF_EXORI_LIST, c:Name()) then
  56. monster = monster + 1
  57. end
  58. end
  59. return monster
  60. end
  61.  
  62. function GetSelfMonsterCount()
  63. self = Self.Position()
  64. monster = 0
  65. for _, c in Creature.iMonsters() do
  66. if Self.DistanceFromPosition(c:Position().x, c:Position().y, c:Position().z) == 1 then
  67. monster = monster + 1
  68. end
  69. end
  70. return monster
  71. end
  72.  
  73. function CheckPlayersInDistance(distance)
  74. count = 0
  75. for _, c in Creature.iPlayers(distance) do
  76. if not c:isPartyMember() and not c:isWhiteSkull() then
  77. count = count + 1
  78. end
  79. end
  80. return count
  81. end
  82.  
  83.  
  84. Spell_Timer = 0
  85. function MagicShooter()
  86. if Self.TargetID() ~= 0 then
  87. if (GetSelfMonsterCount() >= Strong_Creature_Count or getexoricount() >= 1) then
  88. if Self.Mana() >= Strong_Spell_Mana then
  89. if os.clock() - Spell_Timer >= 1.9 and Self.CanCastSpell(Strong_Spell) then
  90. Self.Say(Strong_Spell)
  91. Spell_Timer = os.clock()
  92. end
  93. end
  94. end
  95. if (GetSelfMonsterCount() >= Weak_Creature_Count or getexoricount() >= 1) then
  96. if Self.Mana() >= Weak_Spell_Mana then
  97. if os.clock() - Spell_Timer >= 1.9 and Self.CanCastSpell(Weak_Spell) then
  98. Self.Say(Weak_Spell)
  99. Spell_Timer = os.clock()
  100. end
  101. end
  102. end
  103. end
  104. if Self.TargetID() ~= 0 then
  105. if GetSelfMonsterCount() == Misc_Spell_One_Count then
  106. if Self.Mana() >= Misc_Spell_One_Mana then
  107. if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_One) then
  108. Self.Say(Misc_Spell_One)
  109. Spell_Timer = os.clock()
  110. end
  111. end
  112. end
  113. end
  114. if Self.TargetID() ~= 0 then
  115. if GetSelfMonsterCount() == Misc_Spell_Two_Count then
  116. if Self.Mana() >= Misc_Spell_Two_Mana then
  117. if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Two) then
  118. Self.Say(Misc_Spell_Two)
  119. Spell_Timer = os.clock()
  120. end
  121. end
  122. end
  123. end
  124. if Self.TargetID() ~= 0 then
  125. if GetSelfMonsterCount() == Misc_Spell_Three_Count then
  126. if Self.Mana() >= Misc_Spell_Three_Mana then
  127. if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Three) then
  128. Self.Say(Misc_Spell_Three)
  129. Spell_Timer = os.clock()
  130. end
  131. end
  132. end
  133. end
  134. if Self.TargetID() ~= 0 then
  135. if GetSelfMonsterCount() == Misc_Spell_Three_Four then
  136. if Self.Mana() >= Misc_Spell_Four_Mana then
  137. if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Four) then
  138. Self.Say(Misc_Spell_Four)
  139. Spell_Timer = os.clock()
  140. end
  141. end
  142. end
  143. end
  144. end
  145.  
  146. Module.New('Run', function(module)
  147. MagicShooter()
  148. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement