Untitled
Guest 304 30th Nov, 2022
--[[
Script Name: Haste If No Monsters
Description: Cast haste spell when no monsters on screen.
Author: Ascer - example
]]
local SPELL = "utani hur" -- spell to cast
-- DON'T EDIT BELOW THIS LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------
--> Function: getMonsters()
--> Description: Read creatures for monsters on screen.
--> Class: None
--> Params: None
--> Return: boolean true or false
----------------------------------------------------------------------------------------------------------------------------------------------------------
function getMonsters()
for i, mob in pairs(Creature.iMonsters(7, false)) do
return true
end
return false
end
-- loop module.
Module.New("Haste If No Monsters", function (mod)
-- when no hasted.
if not Self.isHasted() then
-- when no monsters.
if not getMonsters() then
-- cast spell, mana, delay.
Self.CastSpell(SPELL, 40, 500)
end
end
-- module delay in miliseconds
mod:Delay(200, 400)
end)
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Untitled
Markup | 23 | 1 day ago
- Untitled
Markup | 27 | 1 day ago
- Wanted to see what your conviction is on this theme
Markdown | 21 | 1 day ago
- Untitled
Markup | 68 | 2 days ago
- mega555kf7lsmb54yd6etzginolhxxi4ytdoma2rf77ngq55fhfcnyid.onion
Template Toolkit 2 | 30 | 2 days ago
- Untitled
Markup | 73 | 3 days ago
- Untitled
Markup | 81 | 3 days ago