Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Shooter by Mihelox --
- -- Exori --
- Weak_Spell = "Exori"
- Weak_Spell_Mana = 115
- Weak_Creature_Count = 2
- -- Exori Gran --
- Strong_Spell = "Exori Gran"
- Strong_Spell_Mana = 340
- Strong_Creature_Count = 3
- -- Exori Gran Ico --
- Misc_Spell_One = "Exori Gran Ico"
- Misc_Spell_One_Mana = 300
- Misc_Spell_One_Count = 1
- -- Exori Ico --
- Misc_Spell_Two = "Exori Ico"
- Misc_Spell_Two_Mana = 30
- Misc_Spell_Two_Count = 1
- -- Exori Hur --
- Misc_Spell_Three = "Exori Hur"
- Misc_Spell_Three_Mana = 40
- Misc_Spell_Three_Count = 1
- -- Utori Kor --
- Misc_Spell_Four = "Utori Kor"
- Misc_Spell_Four_Mana = 30
- Misc_Spell_Four_Count = 1
- SELF_EXORI_LIST = {"Spidris", "Kollos"}
- -- Functions --
- print('Shooter By Midas Version: 1.1')
- function GetSelfSpectators()
- player = 0
- local c = Self.GetSpectators()
- for i = 1, #c do
- if c[i]:isPlayer() and not c[i]:isPartyMember() then
- player = player + 1
- end
- end
- return player
- end
- function getexoricount()
- self = Self.Position()
- monster = 0
- for _, c in Creature.iMonsters() do
- if Self.DistanceFromPosition(c:Position().x, c:Position().y, c:Position().z) == 1 and table.find(SELF_EXORI_LIST, c:Name()) then
- monster = monster + 1
- end
- end
- return monster
- end
- function GetSelfMonsterCount()
- self = Self.Position()
- monster = 0
- for _, c in Creature.iMonsters() do
- if Self.DistanceFromPosition(c:Position().x, c:Position().y, c:Position().z) == 1 then
- monster = monster + 1
- end
- end
- return monster
- end
- function CheckPlayersInDistance(distance)
- count = 0
- for _, c in Creature.iPlayers(distance) do
- if not c:isPartyMember() and not c:isWhiteSkull() then
- count = count + 1
- end
- end
- return count
- end
- Spell_Timer = 0
- function MagicShooter()
- if Self.TargetID() ~= 0 then
- if (GetSelfMonsterCount() >= Strong_Creature_Count or getexoricount() >= 1) then
- if Self.Mana() >= Strong_Spell_Mana then
- if os.clock() - Spell_Timer >= 1.9 and Self.CanCastSpell(Strong_Spell) then
- Self.Say(Strong_Spell)
- Spell_Timer = os.clock()
- end
- end
- end
- if (GetSelfMonsterCount() >= Weak_Creature_Count or getexoricount() >= 1) then
- if Self.Mana() >= Weak_Spell_Mana then
- if os.clock() - Spell_Timer >= 1.9 and Self.CanCastSpell(Weak_Spell) then
- Self.Say(Weak_Spell)
- Spell_Timer = os.clock()
- end
- end
- end
- end
- if Self.TargetID() ~= 0 then
- if GetSelfMonsterCount() == Misc_Spell_One_Count then
- if Self.Mana() >= Misc_Spell_One_Mana then
- if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_One) then
- Self.Say(Misc_Spell_One)
- Spell_Timer = os.clock()
- end
- end
- end
- end
- if Self.TargetID() ~= 0 then
- if GetSelfMonsterCount() == Misc_Spell_Two_Count then
- if Self.Mana() >= Misc_Spell_Two_Mana then
- if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Two) then
- Self.Say(Misc_Spell_Two)
- Spell_Timer = os.clock()
- end
- end
- end
- end
- if Self.TargetID() ~= 0 then
- if GetSelfMonsterCount() == Misc_Spell_Three_Count then
- if Self.Mana() >= Misc_Spell_Three_Mana then
- if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Three) then
- Self.Say(Misc_Spell_Three)
- Spell_Timer = os.clock()
- end
- end
- end
- end
- if Self.TargetID() ~= 0 then
- if GetSelfMonsterCount() == Misc_Spell_Three_Four then
- if Self.Mana() >= Misc_Spell_Four_Mana then
- if os.clock() - Spell_Timer >= 1.5 and Self.CanCastSpell(Misc_Spell_Four) then
- Self.Say(Misc_Spell_Four)
- Spell_Timer = os.clock()
- end
- end
- end
- end
- end
- Module.New('Run', function(module)
- MagicShooter()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement