não sei como fazer,porque acho que funções como:
absorbPercentPhysical absorbPercentDeath ... absorbPercentAll
só funcional com attribute key em items.xml
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

não sei como fazer,porque acho que funções como:
absorbPercentPhysical absorbPercentDeath ... absorbPercentAll
só funcional com attribute key em items.xml
nao tme como colokar alguma funsao pra aura fica com um pouco de vantagem renegeraçao de mana e life coisa basica pra aura nao ficar sem graça
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

pra por pra ela diminui o dano e so usa um creaturescript usando onstatchange pra regeneração é de boa
va em creaturescript/script crie um arquivo auraprotec.lua e cole ist dentro
p = 10 --porcentagem de proteção,todos os tipos de dano function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then value = value - (value/100)*p reuturn TRUE end end
depois abra o seu script de aura e substitua por esse
function sendEffect(cid)
if isCreature(cid) then
local pos = getCreaturePosition(cid)
local x = math.random(pos.x,pos.x)
local y = math.random(pos.y,pos.y)
doSendMagicEffect({x=x,y=y,z=pos.z}, 66)
addEvent(sendEffect,1700,cid)
end
end
function onLogin(cid)
if getPlayerLevel(cid) >= 350 then
registerCreatureEvent(cid, "auraprotec")
sendEffect(cid)
end
registerCreatureEvent(cid, "AdvEffect")
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 350 then
registerCreatureEvent(cid, "auraprotec")
sendEffect(cid)
end
return TRUE
end
va em creaturescript.xml e adicione essa tag
<event type="statschange" name="auraprotec" event="script" value="auraprotec.lua"/>
se n funcionar ou quiser mudar alguma coisa, so falar
Editado Março 14 por lordbug99
[error - luaInterface::loadfile] data/creaturescripts/scripts/auraprotec.lua:5: '=' expected near 'true'
[warning - Event ::LoadScripts] cannot load script 9data/creaturescripts/scripts/auraprotec.lua)
data/creaturescripts/scripts/auraprotec.lua:5: '=' expected near 'true' << deu esse erro
bom oque eu estou tentando adicionar ao meu server e o seguinte tenho 2 aura uma para lvl 350 e uma para lvl 500
function sendEffect(cid)
if isCreature(cid) then
local pos = getCreaturePosition(cid)
local x = math.random(pos.x,pos.x)
local y = math.random(pos.y,pos.y)
doSendMagicEffect({x=x,y=y,z=pos.z}, 66)
addEvent(sendEffect,1700,cid)
end
end
function onLogin(cid)
if getPlayerLevel(cid) >= 350 then
registerCreatureEvent(cid, "auraprotec")
sendEffect(cid)
end
registerCreatureEvent(cid, "AdvEffect")
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 350 then
registerCreatureEvent(cid, "auraprotec")
sendEffect(cid)
end
return TRUE
end
^ esse script eu queria que fose 10 % de proteçao All contra tudo!
function onThink(cid, interval)
if getPlayerLevel(cid) >= 500 then
local position = getPlayerPosition(cid)
position.x = position.x
position.y = position.y
for i = 1, 1 do
position.x = position.x
end
doSendMagicEffect(position, 53)
position.x = position.x
end
return true
end < issa outra aura e pra lvl 500 queria que ela ficase full lighth e healase 100 hp 100 de mana
se der pra me ajuda vo agradecer muito abraço!
info
Grupo: Barão
Registrado: 05/08/10
Posts: 218
Reputação: +86
Gênero: Masculino

vai no auraprotect e coloque!
p = 10 --porcentagem de proteção,todos os tipos de dano function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then value = value - (value/100)*p return TRUE end end
bom seu script nao deu mais erro mais tbm noa funciono testei com player com bixu com poder com sd com dano corpo a corpo e nada
esse code que vc fez era pra proteger contra os atk 10% ou tu coloko mais alguma funçao ali
bom se vc quiser conversa melhor add msn Derso07@hotmail.com pra evita manda um moonte de recados aki melhor pra nois 2 to esperando abraço!
info
Grupo: Conde
Registrado: 30/10/11
Posts: 625
Reputação: +101
Gênero: Masculino

tenta assim
p = 10 --porcentagem de proteção,todos os tipos de dano function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then value = value - (value/100)*p end end
bom eu nao tinha percebido mais esse 2 ultimos scripts zuaroa minhas spells de healing ex > exura vita nao heala o0''
p = 10 --porcentagem de proteção,todos os tipos de dano
function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS then
value = value - (value/100)*p
end
end
funciono mais e o seguinte nenhum atk paga mais ne min nao sofro nenhum tipo de dano o0''
info
Grupo: Cavaleiro
Registrado: 02/07/08
Posts: 156
Reputação: +4
bom e asim tenhu um script aura fica umas ave envolta da cabesa quando tem lvl 350
mais e so issu queria que desse bonus tipow 10 % contra todos os atk fisico,magico tbm mostros
function sendEffect(cid)
if isCreature(cid) then
local pos = getCreaturePosition(cid)
local x = math.random(pos.x,pos.x)
local y = math.random(pos.y,pos.y)
doSendMagicEffect({x=x,y=y,z=pos.z}, 66)
addEvent(sendEffect,1700,cid)
end
end
function onLogin(cid)
if getPlayerLevel(cid) >= 350 then
sendEffect(cid)
end
registerCreatureEvent(cid, "AdvEffect")
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 350 then
sendEffect(cid)
end
return TRUE
end
^ esse e o script se puder ajudar agradeço =D