Ir para conteúdo

Featured Replies

Postado

 

eu testei aqui e nao funcionou :(

 

deu um error tipo assim

"end" to close function at line 28 <eof>

local config = {
    hits = 2, -- quantos hits vai dar
    effect = 0, -- efeito
    distance_effect = 39, -- efeito de distance
    delay = 300, -- tempo entre os hits
    damage = COMBAT_POISONDAMAGE -- tipo de combat
}


local combat = createCombatObject()
local function doHitCreature(target, cid, times)
    if isCreature(cid) and isCreature(target) and times ~= 0 then
local min = math.ceil(getPlayerLevel(cid) * 1.4)
doTargetCombatHealth(cid, target, config.damage, -min, -min, config.effect)
        doSendDistanceShoot(getThingPos(cid), getThingPos(target), config.distance_effect)
        addEvent(doHitCreature, config.delay, target, cid, times-1)
    end
    return true
end


function onTargetCreature(cid, target)
    return addEvent(doHitCreature, 1, target, cid, config.hits)
end


setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature")


local resetmin = 1 


function onCastSpell(cid, var)


if getResets(cid) >= resetmin then
return doCombat(cid, combat, var)
else
    return doPlayerSendCancel(cid, "Sorry, you need ".. resetmin .." reset to use this spell.") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end

 

 

foi uma merdinha que eu fiz, 

o do lobo deve funcionar..., pega o mesmo modelo, para fazer as outras spells

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

  • Respostas 28
  • Visualizações 2.8k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Se a função de ver os resets do player for igual à: getResets(cid) Sim,    mas se for tipo, ou qualquer outra coisa... getPlayerResets(cid) é só você substituir... qualquer coisa, posta aqui.

  • local resetmin = 1  function onCastSpell(cid, var) if getResets(cid) >= resetmin then return doCombat(cid, combat, var) else     return doPlayerSendCancel(cid, "Sorry, you need ".. resetmin .."

  • Continua assim: local resetmin = 1  function onCastSpell(cid, var) if getResets(cid) >= resetmin then doCombat(cid, combat, var) else     return doPlayerSendCancel(cid, "Sorry, you need ".. re

Postado

deu error =s   in fuction

 

Mostra o erro...

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado

Abre lib/050-functions.lua, e adiciona isso, na primeira linha:

function getResets(uid)
resets = getPlayerStorageValue(uid, 378378) 
  if resets < 0 then
            resets = 0
          end
return resets
end

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

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