Ir para conteúdo

Featured Replies

Postado
8 minutos atrás, Vodkart disse:

 

tenta usar

 

addEvent(doAreaCombatHealth, 0, cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef)

 

Tipo da uma mini melhorada, ao inves de cancelar uns 5 ataques, cancela uns 3

  • Respostas 19
  • Visualizações 6.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • felipeaffonso96
    felipeaffonso96

    Obrigado, estava precisando dessa action e não achava mesmo em nenhum lugar. rep+

  • e se não usar addEvent? já tentou? @Toulouse   tenta assim:   w = { [12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE}, [12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},

  • A 3 opção resolveu

Postado

e se não usar addEvent? já tentou?

@Toulouse

 

tenta assim:

 

w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
} 
function onUseWeapon(cid, var)
local min, max = 300, 300 -- dano minimo e maximo
local 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)
          doAreaCombatHealth(cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef) return true
       end
    end
end
return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
20 minutos atrás, Vodkart disse:

e se não usar addEvent? já tentou?

@Toulouse

 

tenta assim:

 


w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
} 
function onUseWeapon(cid, var)
local min, max = 300, 300 -- dano minimo e maximo
local 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) return true
       end
    end
end
return true
end

 

ou

 

 


w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
} 
function onUseWeapon(cid, var)
local min, max = 300, 300 -- dano minimo e maximo
local 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, 0, cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef) return true
       end
    end
end
return true
end

 

 

ou então

 

 


w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
} 
function onUseWeapon(cid, var)
local min, max = 300, 300 -- dano minimo e maximo
local 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)
          doAreaCombatHealth(cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef) return true
       end
    end
end
return true
end

 

 

A 3 opção resolveu

Postado

Resolveu o problema e como fica o script? pode me passar?

Em 21/05/2018 em 23:33, Vodkart disse:

e se não usar addEvent? já tentou?

@Toulouse

 

tenta assim:

 


w = {
[12031] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
[12032] = {ef = 42, sh = 28, dmg = COMBAT_ICEDAMAGE},
[12033] = {ef = 45, sh = 38, dmg = COMBAT_POISONDAMAGE},
[12034] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
[12035] = {ef = 11, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
[12036] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
} 
function onUseWeapon(cid, var)
local min, max = 300, 300 -- dano minimo e maximo
local 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)
          doAreaCombatHealth(cid, info.dmg, getThingPos(target), 0, -min, -max, info.ef) return true
       end
    end
end
return true
end

 

Eu coloquei o attack nem saiu.. 

  • 1 year later...
Postado
Em 01/02/2015 em 20:49, Sekk disse:

Olá galera, nunca postei aqui no fórum pra tentar ajudar a turma.... Bom, esses dias eu estava procurando uma talkaction aqui no fórum, que mude o elemento da wand... Eu não achei nenhum tópico, porém, achei uma resposta em um tópico e eu decidi postar aqui no fórum. Se estiver na seção errada, por favor, mova para a correta, ou se ja tiver um tutorial assim aqui, pode deletar se possível.

 

Bom vamos lá:

 

1 - Vá em data/creaturescripts/scripts/login.lua e adicione a seguinte tag antes do último "Return True":

 

 

Conteúdo Oculto

 

2 - Vá em data/items/items.xml e adicione isso, ou edite o item desejado:

 

 

Conteúdo Oculto

 

 

3 - Vá em data/talkactions/talkactions.xml e adicione a seguinte tag:

 

 

Conteúdo Oculto

 

 

Ainda em talkactions, abra a pasta scripts e crie um arquivo chamado wand.lua e coloque o seguinte código dentro deste arquivo:

 

 

Conteúdo Oculto

 

4 - Vá em data/weapons/weapons.xml e adicione a seguinte tag:

 

 

Conteúdo Oculto

 

Ainda em weapons, abra a pasta scripts e crie um arquivo chamado wand1.lua e coloque o seguinte código dentro do mesmo:

 

 

Conteúdo Oculto

 

Pronto, basta você retirar o item do loot dos monstros, editar ao seu gosto a wand, e ser feliz com ela  :D

 

Créditos:

Zaruss por postar esse script na resposta de um tópico aqui no TK

jvcasarin(EU) por postar um tópico aqui no TK

 

Se te ajudei, dê um REP+ ai  :D 

 

a script é boa, só que tem um bug não sei se é na script ou no server, o bug é quando você ataca alguem que está em movimento, alguns hits não saem, tipo, sai o efeito da staff, mas não da dano.

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