Bom, modifiquei um pouco, agora, pelo menos, só vai funcionar se, o player não estiver em um protection zone. Aos poucos vou mechendo e tentando resolver para não cair os efeitos em pz. Já tenho a idéia, só me falta tempo. Ah, também agora só chove no andar 7.
@EDIT
local Cyko = {
interval = 1000, --1000Recommended. But here you decide until it starts raining as hell!
waterid = {4608, 4609, 4610, 4611, 4612}
}
function Rain(cid)
if getStorage(3000) == 1 then
for _, cid in ipairs(getPlayersOnline()) do
if isCreature(cid) then
if getThingPos(cid).z == 7 then
local pos = getThingPos(cid)
local frompos = getThingPos(cid)
pos.x = pos.x + math.random(-9,9)
pos.y = pos.y + math.random(-9,9)
frompos.x = pos.x - 9
frompos.y = pos.y - 9
for i = 1,#Cyko.waterid do
if getTileItemById(pos, Cyko.waterid[i]).uid > 0 then
doSendMagicEffect(pos,CONST_ME_WATERSPLASH)
else
if getTileInfo(frompos).protection == false or
getTileInfo(pos).protection == false then
doSendDistanceShoot(frompos, pos, CONST_ANI_ICE)
else
end
if
(getTileInfo(pos).protection == false and getTileInfo(pos).protection == false)then
doSendMagicEffect(pos,CONST_ME_LOSEENERGY)
else
end
end
end
end
end
end
end
end
function isUnderRoof(cid)
--We need to figure this out!
end
function onThink(interval, lastExecution)
if getStorage(3000) == 1 then
for _, cid in ipairs(getPlayersOnline()) do
if getThingPos(cid).z == 7 then
for i = 1, 5 do
addEvent(Rain, i*Cyko.interval, cid)
end
end
end
end
return true
end
Agora sim, está certinho. Veja, o efeito que parece que está caindo dentro de templo, ou de houses, é só uma má interpretação do nosso cérebro. Pois, ela está caindo na diagonal, e o lugar que ela cai e sempre onde tem o efeito de rings. veja o exemplo:

Outro exemplo:

Portanto, não chove mais dentro de PZ. Agora só preciso aprimorar para não chover onde tiver telhado ou outro andar em cima. Já tenho a idéia também, porém, sem tempo hoje. gastei td meu tempo pra te ajudar rsrsrs.. fica pra próxima.
Se possível +REP
-GstavoLiber