Ir para conteúdo
  • Cadastre-se

(Resolvido)Addon Bonus


Ir para solução Resolvido por Wise,

Posts Recomendados

Então galera, queria uma script se possivel é claro..

Seria assim:

Só poderia soltar tal magia se tivesse o addon da vocação (supremacia)

Sorcerer = Mage
Paladin = Assassin
Druid = Druid
Knight = Warrior


Caso alguém consiga fazer, me da ideia que eu posto as spells aqui..

Gratoo

 
Link para o post
Compartilhar em outros sites

Só poderia soltar tal magia se tivesse o addon da vocação

Apenas ter o addon ou teria que estar usando ele? First ou second addon?
Especifique.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

Apenas ter o addon ou teria que estar usando ele? First ou second addon?

Especifique.

Desculpe rsrs..

Pra soltar a magia teria que ter feito o addon full,sendo assim ele poderia soltar a magia com ou sem addon!

As magias irei deixar aqui, caso possa me ajudar:

Sorcerer:

 

 

local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}

 
local combat = createCombatObject()
 
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.30, -300, -9.10, -300)
 
 
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 1000)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(meteor, stun)
 
 
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -7.70, -200, -7.80, -200)
 
combat_arr = {
{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, 1, 3, 1, 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 combat_area = createCombatArea(combat_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}
doSendDistanceShoot(newpos, pos, CONST_ANI_FIRE)
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, CONST_ANI_FIRE)
addEvent(meteorCast, 100, {cid = cid,pos = pos, combat = meteor})
end
end
end
 
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
 
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
 

Druid:

 

 

 

local water = {490, 491, 492, 493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}

 
local combat = createCombatObject()
 
local meteor = createCombatObject()
setCombatParam(meteor, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(meteor, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatFormula(meteor, COMBAT_FORMULA_LEVELMAGIC, -9.30, -300, -9.10, -300)
setCombatParam(meteor, COMBAT_PARAM_CREATEITEM, 0000)
 
local stun = createConditionObject(CONDITION_PARALYZE)
setConditionParam(stun, CONDITION_PARAM_TICKS, 1000)
setConditionFormula(stun, -0.9, 1, -0.9, 1)
setCombatCondition(meteor, stun)
 
local meteor_water = createCombatObject()
setCombatParam(meteor_water, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(meteor_water, COMBAT_PARAM_EFFECT, CONST_ME_LOSEENERGY)
setCombatFormula(meteor_water, COMBAT_FORMULA_LEVELMAGIC, -7.70, -200, -7.80, -200)
 
combat_arr = {
{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, 1, 3, 1, 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 combat_area = createCombatArea(combat_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}
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 = meteor})
end
end
end
 
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
 
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end

Paladin

 

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 30, 34, 37, 40)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
 
local arr = {
    {0, 1, 0},
    {1, 3, 1},
    {0, 1, 0},
}
 
 
local area = createCombatArea(arr)
setCombatArea(combat, area)
 
function onCastSpell(cid, var)
    return doCombat(cid, combat, var)
end

Knight

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)
 
arr = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
 
local area = createCombatArea(arr)
setCombatArea(combat, area)
 
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + attack * 1, level / 5
return -(skillTotal * 1.1 + levelTotal), -(skillTotal * 5 + levelTotal)
 
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
 
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Editado por brendoonh (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • Solução

No script da spell, procure por:

return doCombat(cid, combat, var)


E substitua por (de acordo com a vocação da spell):

--Druid:
local lookType = {148, 144} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Druid full addons to cast this spell.') and false

--Sorcerer:
local lookType = {138, 130} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Mage full addons to cast this spell.') and false

--Knight:
local lookType = {142, 134} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Warrior full addons to cast this spell.') and false

--Paladin:
local lookType = {156, 152} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Assassin full addons to cast this spell.') and false

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

 

No script da spell, procure por:

return doCombat(cid, combat, var)

E substitua por (de acordo com a vocação da spell):

--Druid:
local lookType = {148, 144} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Druid full addons to cast this spell.') and false

--Sorcerer:
local lookType = {138, 130} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Mage full addons to cast this spell.') and false

--Knight:
local lookType = {142, 134} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Warrior full addons to cast this spell.') and false

--Paladin:
local lookType = {156, 152} -- {female, male}
return canPlayerWearOutfit(cid, getPlayerSex(cid) == 0 and lookType[1] or lookType[2], 3) and doCombat(cid, combat, var) or doPlayerSendCancel(cid, 'You need Assassin full addons to cast this spell.') and false

Funcionou!!! 

Será que teria como arrumar uma coisinha? Quando o cara não tem o Addon full, ele não consegue soltar a magia, certo!

Só que ele tenta soltar a magia até que executa porem não sai o efeito e tals... Queria tirar isso, pq aparece que ele solto a magia, so que eu não queria que aparecesse isto, só a mensagem que ele não pode soltar normal! 

Ex: 

bezd49.png

Queria que quando o player n tivesse a o addon, nem aparecesse o nome da magia, somente q ele precisa do addon e bla bla...

Link para o post
Compartilhar em outros sites

Só que ele tenta soltar a magia até que executa porem não sai o efeito e tals... Queria tirar isso, pq aparece que ele solto a magia

Pronto, já corrigi.

The corrupt fear us.

The honest support us.

The heroic join us.

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo