Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- distances: 4, 5, 29, 31, 32
- -- death on X
- -- explosion on +
- function onSay(player, words, param)
- local pos = player:getPosition()
- local table =
- {
- [1] = {x = pos.x - 1, y = pos.y - 1, z = pos.z},
- [2] = {x = pos.x, y = pos.y - 1, z = pos.z},
- [3] = {x = pos.x + 1, y = pos.y - 1, z = pos.z},
- [4] = {x = pos.x + 1, y = pos.y, z = pos.z},
- [5] = {x = pos.x + 1, y = pos.y + 1, z = pos.z},
- [6] = {x = pos.x, y = pos.y + 1, z = pos.z},
- [7] = {x = pos.x - 1, y = pos.y + 1, z = pos.z},
- [8] = {x = pos.x - 1, y = pos.y, z = pos.z}
- }
- local delay = 0
- player:say('[MAGIC UP!]', TALKTYPE_MONSTER_SAY)
- for i = 1, 2 do
- addEvent(function() Position(pos):sendMagicEffect(CONST_ME_EXPLOSIONAREA) end, delay)
- for _, position in ipairs(table) do
- for i = 1, 3 do
- addEvent(function() Position(pos):sendDistanceEffect(position, CONST_ANI_EXPLOSION) end, delay + (i - 1) * 120)
- end
- if (_ % 2) == 0 then
- addEvent(function() Position(position):sendMagicEffect(CONST_ME_BLOCKHIT) Position(position):sendMagicEffect(CONST_ME_EXPLOSIONHIT) end, delay + 200)
- end
- end
- delay = delay + 220
- for _, position in ipairs(table) do
- if (_ % 2) == 1 then
- for i = 1, 3 do
- addEvent(function() Position(position):sendDistanceEffect(pos, CONST_ANI_EXPLOSION) end, delay + (i - 1) * 120)
- end
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement