Credits to: Felipedaniel (brasilian comunity)
Hello guys, certainly many were downloaded Open Source version of Pokemon Online, but unfortunately you can not attack from the classical form m1, m2, etc. as well as in Pokemon Online.
Surely the next spell will serve as a base for the same add all relevant spells.
Ok, let's go:
First, create the file M1.lua in data / spells / scripts / and placed into the following:
Now get data / spells / open XML and put this:
Ready, now have a way of attacking by m1, m2, etc obviously missing that others will have to add your taking this as a base.
Greetings
Hello guys, certainly many were downloaded Open Source version of Pokemon Online, but unfortunately you can not attack from the classical form m1, m2, etc. as well as in Pokemon Online.
Surely the next spell will serve as a base for the same add all relevant spells.
Ok, let's go:
First, create the file M1.lua in data / spells / scripts / and placed into the following:
PHP:
unction isSummon(uid)
return uid ~= getCreatureMaster(uid) or false
end
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 3, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
local area2 = createCombatArea(arr2)
setCombatArea(combat2, area2)
local function onCastSpell1(parameters)
return doCombat(parameters.cid, parameters.combat, parameters.var) and doCreatureSay(parameters.cid2, "" .. parameters.name .. ", " .. parameters.spell .. ".")
end
local c = {
["Bulbasaur"] = {x = {
m1 = combat1,
spell = "Razor leaf",
minLv = 10
}
},
["Rattata"] = {x = {
m1 = combat2,
spell = "Hyper fang",
minLv = 50
}
}
}
function onCastSpell(cid, var)
if #getCreatureSummons(cid) ~= 0 then
for i = 1, #getCreatureSummons(cid) do
if c[getCreatureName(getCreatureSummons(cid)[i])] then
if getPlayerLevel(cid) >= c[getCreatureName(getCreatureSummons(cid)[i])].x.minLv then
parameters = {cid = getCreatureSummons(cid)[i], cid2 = cid, combat = c[getCreatureName(getCreatureSummons(cid)[i])].x.m1, var = var, name = getCreatureName(getCreatureSummons(cid)[i]), spell = c[getCreatureName(getCreatureSummons(cid)[i])].x.spell}
return onCastSpell1(parameters)
else
return doPlayerSendCancel(cid, "Sorry. You must be level " .. c[getCreatureName(getCreatureSummons(cid)[i])].x.minLv .. " or higher to cast.")
end
end
end
else
return doPlayerSendCancel(cid, "Sosrry. You must have an pokemon to cast.")
end
return true
end
Now get data / spells / open XML and put this:
PHP:
<instant name="" words="m1" lvl="0" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="m1.lua"></instant>
Ready, now have a way of attacking by m1, m2, etc obviously missing that others will have to add your taking this as a base.
Greetings