Ir para conteúdo

Comprar Magia Por Comando.


Subwat

Posts Recomendados

Esse comando você poderá comprar uma Magia por VIP Coins ou dinheiro tanto faz.

 

talkaction:

 

function onSay(cid, words, param)
if param == "" then
doPlayerSendTextMessage(cid,18, "!spell aurora. preco 5 vip coins. magia para magos.")
end
if param == "death damage" then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 and (getPlayerStorageValue(cid,202050) == -1) then
if doPlayerRemoveItem(cid,11192,5) then
setPlayerStorageValue(cid,202050,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell death damage spell words Aurora.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 5 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
end

 

tag:

<talkaction words="!spell" script="spell.lua"/>

 

Spells:

exemplo de spell:

 

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -120.5, -30, -120.1, 0)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 22000)
setConditionFormula(condition, -1.1, -1, -1.2, -1)
setCombatCondition(combat, condition)

local arr = {
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 3, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 0, 0}
}


local area = createCombatArea(arr)

setCombatArea(combat, area)

function onCastSpell(cid, var)
if (getPlayerStorageValue(cid,202050) == 1) then
doCreatureSay(cid, "vis Damage", TALKTYPE_ORANGE_1)
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid,"voce nao comprou esta magia.")
end 
return TRUE
end

 

TAG:

 

<instant name="physical damage" words="aurora" lvl="5000" mana="3000" prem="1" needweapon="0" exhaustion="1000" needlearn="0" event="script" value="attack/aurora.lua">
<vocation id="1"/>
<vocation id="2"/>
</instant>

 

você poderá adicionar varias magias ao comando vou dar um exemplo aqui em baixo de como ficaria com varias magias.

 


function onSay(cid, words, param)
if param == "" then
doPlayerSendTextMessage(cid,18, "!spell death damage. preco 5 vip coins. magia para magos.")
doPlayerSendTextMessage(cid,18, "!spell song damage. preco 5 vip coins. magia para paladinos.")
doPlayerSendTextMessage(cid,18, "!spell ultra damage. preco 5 vip coins. magia para knights.")
doPlayerSendTextMessage(cid,18, "!spell holy damage. preco 10 vip coins. magia para knights e paladinos.")
doPlayerSendTextMessage(cid,18, "!spell vis damage. preco 10 vip coins. magia para magos.")
end
if param == "death damage" then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 and (getPlayerStorageValue(cid,202020) == -1) then
if doPlayerRemoveItem(cid,11192,5) then
setPlayerStorageValue(cid,202020,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell death damage spell words EXEVO MAS DEAD.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 5 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
if param == "vis damage" then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 and (getPlayerStorageValue(cid,202050) == -1) then
if doPlayerRemoveItem(cid,11192,10) then
setPlayerStorageValue(cid,202050,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell vis damage spell words AURORA.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 10 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
if param == "song damage" then
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 and (getPlayerStorageValue(cid,202030) == -1) then
if doPlayerRemoveItem(cid,11192,5) then
setPlayerStorageValue(cid,202030,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell song damage spell words EXEVO SONG PALLY.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 5 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
if param == "holy damage" then
if getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 8 and (getPlayerStorageValue(cid,202060) == -1) then
if doPlayerRemoveItem(cid,11192,10) then
setPlayerStorageValue(cid,202060,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell song damage spell words CALDERA.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 10 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
if param == "ultra damage" then
if getPlayerVocation(cid) == 8 or getPlayerVocation(cid) == 4 and (getPlayerStorageValue(cid,202040) == -1) then
if doPlayerRemoveItem(cid,11192,5) then
setPlayerStorageValue(cid,202040,1)
doPlayerSendTextMessage(cid,25, 'you earned the spell ultra damage spell words EXORI MAS GRAN.')
else
doPlayerSendTextMessage(cid,25, 'voce nao tem 5 vip coins.')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
else
doPlayerSendTextMessage(cid,25, 'voce ja tem esta magia!')
                doSendAnimatedText(getPlayerPosition(cid),"failure", math.random(01,255))
end
end
end




Créditos:

Subwat

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...