Este Script,E Um Tipo De Rain,Mais Quando Cai Ele Faz Tipo Uma Chuva De Dinheiro.Segue O Script
Va Em Spells/scripts E Crie Um Arquivo Chamado RainMoney.lua
local combat = createCombatObject()
local combat2 = createCombatObject()
local combat3 = createCombatObject()
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat1, COMBAT_PARAM_CREATEITEM, 2160)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat2, COMBAT_PARAM_CREATEITEM, 2160)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0)
local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, 1)
setCombatParam(combat3, COMBAT_PARAM_CREATEITEM, 2160)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 0)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(combat1, stun)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 0)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(combat2, stun)
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 0)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(combat3, stun)
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, 1)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, 1)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0)
arr = {
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0},
{0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1},
{1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0},
{0, 1, 0, 1, 1, 0, 3, 0, 1, 1, 0, 1, 0, 1, 1},
{1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0},
{0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0},
{1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0},
{1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0},
{1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1}
}
local combat_area = createCombatArea(arr)
setCombatArea(combat, combat_area)
local function meteorCast(p)
doCombat(p.cid, p.combat, positionToVariant(p.pos))
end
local function stunEffect(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_STUN)
end
function onTargetTile(cid, pos)
if (math.random(0, 0) == 0) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat2})
end
end
end
function onTargetTile2(cid, pos)
if (math.random(0, 1) == 1) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, 28)
addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x + 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, 28)
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat1})
end
end
end
function onTargetTile3(cid, pos)
if (math.random(0, 1) == 1) then
local ground = getThingfromPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 1})
if (isInArray(water, ground.itemid) == TRUE) then
local newpos = {x = pos.x - 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, 28)
addEvent(meteorCast, 100, {cid = cid, pos = pos, combat = meteor_water})
else
local newpos = {x = pos.x + 9, y = pos.y - 8, z = pos.z}
doSendDistanceShoot(newpos, pos, 28)
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = combat1})
end
end
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(combat2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
setCombatCallback(combat3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
function onCastSpell(cid, var)
doCombat(cid, combat, var)
end
Em Spells.xml coloque
<instant name="Crystal Coins" words="/rainmoney" lvl="" mana="0" prem="1" selftarget="1" exhaustion="0" needlearn="0" script="rainmoney.lua">
<vocation name="None"/>
</instant>
Em Vocation Name,Não Mude,Pois Vocatio Nome Quase Em Todos Os Servidor,Players Nao Podem Fazer Esta Vocation,Intao Só GOD Podera Usar