Ete sistem e muito melhor! cada spell e poke tem sua damage e cd
function onSay(cid, words, param)
-- By Mkalo --
function getTime(s)
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end
-----------
-- By MaXwEllDeN *--* --
local arr_distance = {
{0, 0, 0},
{0, 0, 0},
{0, 0, 0}
}
local arr1 = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}
local arr2 = {
{1,1,1},
{1,1,1},
{0,1,0},
{0,1,0},
{0,2,0},
}
local pokemagics = {
["Bulbasaur"] = { lvl = 10, cd = 45, area = arr1, mindam = 250, maxdam = 500, effect = 49, storage = 77892, name = "Solar Beam", target = FALSE, typeeffect = 1024},
["Ivysaur"] = { lvl = 45, cd = 5, area = arr2, mindam = 500, maxdam = 700, effect = 29, storage = 77891, name = "Fuck Her", target = TRUE, typeeffect = 2048},
}
-- Checkar se o Cara tem Summons
if #getCreatureSummons(cid) <= 0 then
doCreatureSay(cid, "m1", 1)
return TRUE
end
for _,q in pairs(getCreatureSummons(cid)) do
for pn,_ in pairs(pokemagics) do
local poke = pokemagics[getCreatureName(q)]
-- Checkar se o Cara tem o level para usar a Move
if getPlayerLevel(cid) < poke.lvl then
doPlayerSendCancel(cid, "Only players level " .. poke.lvl .. " or higher can use this attack.")
return TRUE
end
--- Checkar se tem/ precisa de targeto!
if poke.target and getCreatureTarget(cid) == FALSE then
doPlayerSendCancel(cid, "You need a target to use this attack!")
return TRUE
end
-- Checkar se o player tem o coutdown
if os.time()-getPlayerStorageValue(cid, poke.storage) <= poke.cd then
minutes,seconds = getTime(poke.cd-(os.time()-getPlayerStorageValue(cid, poke.storage)))
return doPlayerSendCancel(cid, "You need to wait " .. minutes .." minutes and ".. seconds .. " seconds to use that attack again!")
end
------------- Com Aréa -------------------------
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, poke.typeeffect)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, poke.effect)
setCombatFormula(combat1, COMBAT_FORMULA_UNDEFINED, poke.maxdam, 0, poke.mindam, 0)
local area1 = createCombatArea(poke.area)
setCombatArea(combat, area1)
------------- Fim ----------------------
------------- Sem Aréa -------------------------
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, poke.typeeffect)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, poke.effect)
setCombatFormula(combat2, COMBAT_FORMULA_UNDEFINED, poke.mindam, 0, poke.maxdam, 0)
local area18 = createCombatArea(arr_distance)
------------- Fim ----------------------
if poke.target then
doCreatureSay(cid,"" .. pn ..", " .. poke.name .. "!", 1)
setPlayerStorageValue(cid, 64231, os.time())
doCombat(cid, combat, param)
end
if poke.target == FALSE then
doCreatureSay(cid,"" .. pn ..", " .. poke.name .. "!", 1)
setPlayerStorageValue(cid, 64231, os.time())
doCombat(cid, combat2, var)
end
end
end
end










info
Grupo: Campones
Registrado: 15/12/10
Posts: 50
Reputação: +77
@Lucaspt me adicione no msn para que eu possa lhe ajudar.
Caso alguem não estiver conseguindo fazer funcionar os comandos basta me adicionar msn, que está na minha assinatura.