Ir para conteúdo

Featured Replies

Postado
  • Autor

@llucas75,  Irmãozinho, fiz a script assim e nem sequer ela ataca, mas também não dá nenhum erro, sinal de que está correto, só que não atk nada.

 

minha script está assim.

 

data/weapons/weapons.xml

<wand id="10309" level="100" mana="10" min="850" max="1150" type="holy" event="script" value="death.lua"> <!-- Power Destruction -->
<vocation id="2"/>
<vocation id="1"/>
</wand>

data/weapons/scripts/death.lua

function onUseWeapon(cid, var)


return doCombat(cid, combat, var)
end




w = {
[12031] = {ef = 36, sh = 40, dmg = COMBAT_FIREDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12036] = {ef = 49, sh = 36, dmg = COMBAT_HOLYDAMAGE}
}


function onUseWeapon(cid, var)
min, max = 850, 1150 -- dano minimo e maximo
target = getCreatureTarget(cid)
for stor, info in pairs(w) do
if getPlayerStorageValue(cid, stor) == 1 then
if target ~= 0 then
doSendDistanceShoot(getThingPos(cid), getThingPos(target), info.sh)
addEvent(doAreaCombatHealth, 100, cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef)
end
end
end
return true
end

ajuda?

Ajudei? REP+

 

 

 
 
Spriter: |||||||||| 10%

 

  • Respostas 23
  • Visualizações 6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    Em data/weapons/weapons.xml É como este exemplo: <!-- Rods --> <wand id="2182" level="7" mana="2" min="8" max="18" type="earth" event="function" value="default"> <vocation id="2"/&g

  • @Faeelzinho Pra isso, vc deve saber o id da sua wand. Agora vá em weapons.xml e procure pelo id. Na tag da wand localize a palavra "type", e dentro desse type, coloque "cake".

Postado
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 17)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 31)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0, -1100, 0, -1150)


function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end
Postado

Tente este

 

Mostrar conteúdo oculto

w = {


[1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(cid, var)
min, max = 850,1500
target = getCreatureTarget(cid)
if target ~= 0 then
wx = w[math.random(1, #w)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
end
return true
end

Scripter: |||||||||| 10%

 

 

Te ajudei?? REP + e ficamos quites...  ;D

 

Atenciosamente,

                   Lucas.

Abraços!

Postado
  • Autor

@llucas75, digamos que funcionou 75%, porque ela hita e só depois aparece o ataque, exemplo:

 

Ela ataca o fire e só depois de 1 segundo o dano aparece, é meio que um tempo entre o efeito e o hit, teria como arrumar?

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

Ajudei? REP+

 

 

 
 
Spriter: |||||||||| 10%

 

Postado
  • Solução

Hummm.. Tenta este 

 

Mostrar conteúdo oculto

w = {


[1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[2] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[3] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(cid, var)
min, max = 2700,5300
target = getCreatureTarget(cid)
if target ~= 0 then
wx = w[math.random(1, #w)]
doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
end
return true
end

Scripter: |||||||||| 10%

 

 

Te ajudei?? REP + e ficamos quites...  ;D

 

Atenciosamente,

                   Lucas.

Abraços!

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