Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local config =
- {
- areas =
- {
- [1] =
- {
- shootType = CONST_ANI_FIRE, -- shoot effect
- areaType = CONST_ME_FIREAREA, -- area effect
- qty = 3, -- how many per interval
- from = {x=1048, y=1000, z=7}, -- top left area
- to = {x=1062, y=1010, z=7}, -- bot right area
- combat = "fire" -- fire, water, stone, poison
- }
- --[[[2] =
- {
- shootType = CONST_ANI_LARGEROCK,
- areaType = CONST_ME_BLOCKHIT,
- qty = 3,
- from = {x=1048, y=1000, z=7},
- to = {x=1062, y=1010, z=7},
- combat = "stone"
- }]]--
- }
- }
- function onThink(interval)
- for i = 1, #config.areas do
- for t = 1, config.areas[i].qty do
- local xX, yY, zZ = math.random(config.areas[i].from.x, config.areas[i].to.x), math.random(config.areas[i].from.y, config.areas[i].to.y), math.random(config.areas[i].from.z, config.areas[i].to.z)
- local delay = math.random(600)
- addEvent(doSendDistanceShoot, delay, {x=xX-7, y=yY-5, z=zZ}, {x=xX, y=yY, z=zZ}, config.areas[i].shootType)
- addEvent(doSendMagicEffect, delay+250, {x=xX, y=yY, z=zZ}, config.areas[i].areaType)
- -- hacer condición dependiendo del efecto
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment