Olá galerinha, venho trazer mais uma spell para voces, essa é um tipo de spell que avança de level conforme a quantidade de uso Ex. a cada 100 conjuraçoes a spell avança para um novo nivel, lembrando que eu testei essa magia somente na versao 8.6, bem intao vamos a magia.
Script da magia: vá em \data\spells\scripts\support e crie um novo arquivo lua com o nome kindling e adicione o seguinte script.
Script da magia: vá em \data\spells\scripts\support
Código PHP:
local combat_lv1 = createCombatObject()
setCombatParam(combat_lv1, COMBAT_PARAM_EFFECT, 50)
setCombatParam(combat_lv1, COMBAT_PARAM_CREATEITEM, 1499)
local combat_lv2 = createCombatObject()
setCombatParam(combat_lv2, COMBAT_PARAM_EFFECT, 50)
setCombatParam(combat_lv2, COMBAT_PARAM_CREATEITEM, 1499)
local combat_lv3 = createCombatObject()
setCombatParam(combat_lv3, COMBAT_PARAM_EFFECT, 50)
setCombatParam(combat_lv3, COMBAT_PARAM_CREATEITEM, 1499)
local area_lv1 = createCombatArea({
{0, 1, 0},
{0, 0, 0},
{0, 2, 0}
})
local area_lv2 = createCombatArea({
{1, 1, 0},
{0, 0, 0},
{0, 2, 0}
})
local area_lv3 = createCombatArea({
{1, 1, 1},
{0, 0, 0},
{0, 2, 0}
})
setCombatArea(combat_lv1, area_lv1)setCombatArea(combat_lv2, area_lv2)setCombatArea(combat_lv3, area_lv3)
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat_lv1, parameters.var)end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat_lv2, parameters.var)end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat_lv3, parameters.var)end
function onCastSpell(cid, var)local position = getCreaturePosition(cid)local t = {
[0] = {x = position.x, y = position.y - 3, z = position.z},
[1] = {x = position.x + 3, y = position.y, z = position.z},
[2] = {x = position.x, y = position.y + 3, z = position.z},
[3] = {x = position.x - 3, y = position.y, z = position.z}
}doSendDistanceShoot(position, t[getCreatureLookDirection(cid)], 38)
local parameters = { cid = cid, var = var}local spell_storage = 48502
if getPlayerStorageValue(cid, spell_storage) < 150 then
addEvent(onCastSpell1, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
elseif getPlayerStorageValue(cid, spell_storage) == 150 then
addEvent(onCastSpell2, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
doPlayerSendTextMessage(cid, 22, "Its barrier kindling progressed to level 2")
doSendMagicEffect(getCreaturePosition(cid),28)
doSendAnimatedText(getCreaturePosition(cid), 'Spell UP', 210)
elseif getPlayerStorageValue(cid, spell_storage) > 150 and getPlayerStorageValue(cid, spell_storage) < 350 then
addEvent(onCastSpell2, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
elseif getPlayerStorageValue(cid, spell_storage) == 350 then
addEvent(onCastSpell3, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
doPlayerSendTextMessage(cid, 22, "Its barrier kindling progressed to level 3")
doSendMagicEffect(getCreaturePosition(cid),28)
doSendAnimatedText(getCreaturePosition(cid), 'Spell UP', 210)
elseif getPlayerStorageValue(cid, spell_storage) > 350 then
addEvent(onCastSpell3, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)endreturn TRUE
end
adicionado, agora vamos a TAG da Spell, abra o spells.xml e adicione a seguinte TAG.
Código PHP:
<instant name="Barrier of Sticks" words="utori con sio" lvl="65" mana="120" direction="1" prem="1" exhaustion="3000" blockwalls="1" needlearn="0" script="support/kindling.lua">
<vocation name="Paladin"/>
<vocation name="Royal Paladin"/>
</instant>
Screenshot's
Nenhum comentário:
Postar um comentário