Vai na sua lib crie um arquivo e renomei para qualquer nome e cole isto dentro:
function repeatFunction(func, stopfunc, sin, result, quant, ...) if tostring(sin) == "maior" then k = 0 while stopfunc < result do func(...) k = k+1 if k >= quant then return false end end end if tostring(sin) == "menor" then k = 0 while stopfunc > result do func(...) k = k+1 if k >= quant then return false end end end if tostring(sin) == "igual" then k = 0 while stopfunc ~= result do func(...) k = k+1 if k >= quant then return false end end end end
Logo após vá em login.lua e antes do "return true" cole essa linha do mesmo jeito:
local vocs = {
[2] = {effect = 208},
[3] = {effect = 208},
[4] = {effect = 13},
[5] = {effect = 12},
[6] = {effect = 12},
[7] = {effect = 12},
[8] = {effect = 12},
[9] = {effect = 12},
[10] = {effect = 12},
[11] = {effect = 13}
}
repeatFunction(doSendMagicEffect, getPlayerLevel(cid), "igual", 1000 * 4000 * 9999, 10, getCreaturePosition(cid), vocs[getPlayerVocation(cid)].effect)
Pronto, agora é só testar.
OBSs: Fiz com essa função para que ganhe um maior valor nos otservers..
Créditos:
Função - Caotic
Script - SmiX









info
Grupo: Cavaleiro
Registrado: 28/08/12
Posts: 171
Reputação: +4
Olá tenho esse script que adiciona efeito nas vocações, porém tem efeitos que não saem nos devidos lugares, então gostaria que alguém coloca-se uma pos para que o efeito saia em cima dele e se possivel coloca-se também tempo entre 1 efeito e outro!!
Script:
local vocs = {
[2] = {effect = 208},
[3] = {effect = 208},
[4] = {effect = 13},
[5] = {effect = 12},
[6] = {effect = 12},
[7] = {effect = 12},
[8] = {effect = 12},
[9] = {effect = 12},
[10] = {effect = 12},
[11] = {effect = 13}
}
function onThink(cid, interval)
local voc = getPlayerVocation(cid)
if vocs[voc] then
local efeito = vocs[voc].effect
doSendMagicEffect(getCreaturePosition(cid), efeito)
return true
end
return true
end
OBRIGADO POR TENTAR AJUDAR !!!