Ir para conteúdo

Featured Replies

Postado

Eae galera beleza? bom vou lhes trazer 1 creaturescript diferente, chamado "Reflect Spells".

 

Creditos !

Raell5

Menoxcide

Radium

 

1º = "DATA>CREATURESCRIPTS>SCRIPTS>LOGIN.LUA" adicione as tags.

 

Mostrar conteúdo oculto
--Reflect Spells
registerCreatureEvent(cid, "ReflectSpellKnight")
registerCreatureEvent(cid, "ReflectSpellPally")
registerCreatureEvent(cid, "ReflectSpellMage")

 

2º = "DATA>CREATURESCRIPTS>SCRIPTS.XML" Adicione há tag. 

 

Mostrar conteúdo oculto
<!--Reflect Spells-->
<event type="statschange" name="ReflectSpellKnight" event="script" value="spells/reflectknight.lua"/>
<event type="statschange" name="ReflectSpellPally" event="script" value="spells/reflectpally.lua"/>
<event type="statschange" name="ReflectSpellMage" event="script" value="spells/reflectmage.lua"/>
<!--Reflect Spells-->

 
3º = "DATA>CREATURESCRIPTS>SCRIPTS>SPELLS" crie uma nova pasta chamada "Spells", e adicione 3 arquivos "Lua", e adicione os codes há baixo.
 
  Citar

reflectknight.lua
local multiplier = {}
local counter = 0
function onStatsChange(cid, attacker, type, combat, value)
if getPlayerStorageValue(cid, 10094) >= 1 and attacker ~= 0 and combat ~= COMBAT_HEALING then
 
if isPlayer(attacker) == TRUE then
multiplier = 4
else
multiplier = 10
end
 
function doAttack(attacker)
if isCreature(attacker) == TRUE and getTilePzInfo(getCreaturePosition(cid)) == false and getTilePzInfo(getCreaturePosition(attacker)) == false then
if counter < 5 then 
local damage = math.floor((value * multiplier) / 5)
doTargetCombatHealth(cid, attacker, COMBAT_DROWNDAMAGE, -damage, -damage, 129)
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(attacker), 24)
counter = counter + 1
addEvent(doAttack,1000,attacker)
else
stopEvent(attacker,doAttack)
counter = 0
end
else
stopEvent(attacker,doAttack)
counter = 0
end
end
 
addEvent(doAttack, 0, attacker)
if isCreature(attacker) == TRUE then
doSendMagicEffect(getCreaturePos(attacker), 66)
end
doSendAnimatedText(getCreaturePos(cid), 'REFLECT', TEXTCOLOR_DARKYELLOW)
 
if isCreature(attacker) == true and isPlayer(attacker) == false then
local addSoul = 40
if (getPlayerSoul(cid) + 40) > 250 then
addSoul = 250 - getPlayerSoul(cid)
end
doPlayerAddSoul(cid, addSoul)
end
 
--if getPlayerStorageValue(cid, 10094) == 1 then
--setPlayerStorageValue(cid, 10094, 2)
--elseif getPlayerStorageValue(cid, 10094) == 2 then
doRemoveCondition(cid, CONDITION_FOOD)
setPlayerStorageValue(cid, 10094, 0)
--end
return false
else
return true
end
end
 
reflectpally.lua
local multiplier = {}
local counter = 0
function onStatsChange(cid, attacker, type, combat, value)
if getPlayerStorageValue(cid, 10095) >= 1 and attacker ~= 0 and combat ~= COMBAT_HEALING then
 
if isPlayer(attacker) == TRUE then
multiplier = 4
else
multiplier = 10
end
 
function doAttack(attacker)
if isCreature(attacker) == TRUE and getTilePzInfo(getCreaturePosition(cid)) == false and getTilePzInfo(getCreaturePosition(attacker)) == false then
if counter < 5 then 
local damage = math.floor((value * multiplier) / 5)
local damage2 = damage / 2
doTargetCombatHealth(cid, attacker, COMBAT_DROWNDAMAGE, -damage2, -damage2, 129)
doCreatureAddHealth(cid, damage2)
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(attacker), 17)
counter = counter + 1
addEvent(doAttack,1000,attacker)
else
stopEvent(attacker,doAttack)
counter = 0
end
else
stopEvent(attacker,doAttack)
counter = 0
end
end
 
addEvent(doAttack, 0, attacker)
if isCreature(attacker) == TRUE then
doSendMagicEffect(getCreaturePos(attacker), 66)
end
doSendAnimatedText(getCreaturePos(cid), 'REFLECT', TEXTCOLOR_DARKYELLOW)
 
if isCreature(attacker) == true and isPlayer(attacker) == false then
local addSoul = 40
if (getPlayerSoul(cid) + 40) > 250 then
addSoul = 250 - getPlayerSoul(cid)
end
doPlayerAddSoul(cid, addSoul)
end
 
--if getPlayerStorageValue(cid, 10095) == 1 then
--setPlayerStorageValue(cid, 10095, 2)
--elseif getPlayerStorageValue(cid, 10095) == 2 then
doRemoveCondition(cid, CONDITION_FOOD)
setPlayerStorageValue(cid, 10095, 0)
--end
 
return false
else
return true
end
end
 
reflectmage.lua
local multiplier = {}
local counter = 0
function onStatsChange(cid, attacker, type, combat, value)
if getPlayerStorageValue(cid, 10096) >= 1 and attacker ~= 0 and combat ~= COMBAT_HEALING then
if isPlayer(attacker) == TRUE then
multiplier = 4
else
multiplier = 10
end
 
function doAttack(attacker)
if isCreature(attacker) == TRUE and getTilePzInfo(getCreaturePosition(cid)) == false and getTilePzInfo(getCreaturePosition(attacker)) == false then
if counter < 5 then 
local damage = math.floor((value * multiplier) / 5)
doCreatureAddMana(cid, damage)
doSendDistanceShoot(getCreaturePosition(attacker), getCreaturePosition(cid), 35)
doSendMagicEffect(getCreaturePos(cid), CONST_ME_LOSEENERGY)
counter = counter + 1
addEvent(doAttack,1000,attacker)
else
stopEvent(attacker,doAttack)
counter = 0
end
else
stopEvent(attacker,doAttack)
counter = 0
end
end
 
addEvent(doAttack, 0, attacker)
if isCreature(attacker) == TRUE then
doSendMagicEffect(getCreaturePos(attacker), 66)
end
doSendAnimatedText(getCreaturePos(cid), 'REFLECT', TEXTCOLOR_DARKYELLOW)
 
if isCreature(attacker) == true and isPlayer(attacker) == false then
local addSoul = 40
if (getPlayerSoul(cid) + 40) > 250 then
addSoul = 250 - getPlayerSoul(cid)
end
doPlayerAddSoul(cid, addSoul)
end
 
--if getPlayerStorageValue(cid, 10096) == 1 then
--setPlayerStorageValue(cid, 10096, 2)
--elseif getPlayerStorageValue(cid, 10096) == 2 then
doRemoveCondition(cid, CONDITION_FOOD)
setPlayerStorageValue(cid, 10096, 0)
--end
 
return false
else
return true
end
end
 

Editado por Raell Deads (veja o histórico de edições)

16s5uc.gif2moe247.gif  swvimf.gif 

 

 

 
  Em 12/12/2014 em 02:17, Vittu disse:

raell, me come

 

 

  • Respostas 13
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Hum legal mano,mais o que ela faz? nao tem como se coloka uma print pra ter ideia de como ela é

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo