Ir para conteúdo

Como Deixar a Ml e Outras Skills Para de Up Quando Chegar Em Determinado Numero

Featured Replies

Postado
local t = {
	[0] = 120, -- fist
	[1] = 120, -- club
	[2] = 120, -- sword
	[3] = 120, -- axe
	[4] = 120, -- distance
	[5] = 120, -- shielding
	[6] = 120, -- fishing
	[7] = 120, -- magic level
	[8] = 120 -- level
}

function onAdvance(cid, skill, oldlevel, newlevel)
	local s = t[skill]
	return s and newlevel > s and false or true
end

A tag deve ser referente ao creature event onAdvance (event type="advance") e também deve ser registrado em login.lua

The corrupt fear us.

The honest support us.

The heroic join us.

  • Respostas 8
  • Visualizações 415
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • No arquivo que seu ot já tem, login.lua, na pasta creaturescripts/scripts   nas últimas linhas, antes do   

Postado

maxadvance.lua (data\creaturescripts\scripts)

local t = {
    [0] = 120, -- fist
    [1] = 120, -- club
    [2] = 120, -- sword
    [3] = 120, -- axe
    [4] = 120, -- distance
    [5] = 120, -- shielding
    [6] = 120, -- fishing
    [7] = 120, -- magic level
    [8] = 120 -- level
}

function onAdvance(cid, skill, oldlevel, newlevel)
    local s = t[skill]
    return s and newlevel > s and false or true
end




creaturescripts.xml (data\creaturescripts)

<event type="advance" name="MaxAdvance" event="script" value="maxadvance.lua"/>




Registre o creature event em login.lua (data\creaturescripts\scripts)

registerCreatureEvent(cid, "MaxAdvance")

The corrupt fear us.

The honest support us.

The heroic join us.

Postado
  • Autor

aqui no maxadvance.lua (data\creaturescripts\scripts) e pra mim cria o arquivo maxadvance.lua nao e ?


Cara a ml esta passando de 120 cara por que fiz tudo certo pow vou postar aqui minha script do login.lua:

 

ocal config = {

 loginMessage = getConfigValue('loginMessage'),
 useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
 
function onLogin(cid)
 registerCreatureEvent(cid, "Infight")
 local loss = getConfigValue('deathLostPercent')
 if(loss ~= nil) then
  doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
 end
 
 local accountManager = getPlayerAccountManager(cid)
 if(accountManager == MANAGER_NONE) then
  local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
  if(lastLogin > 0) then
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
   str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
  end
 
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
 elseif(accountManager == MANAGER_NAMELOCK) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
 elseif(accountManager == MANAGER_ACCOUNT) then
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
 else
  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
 end
 
 if(not isPlayerGhost(cid)) then
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
 end
 
 registerCreatureEvent(cid, "Mail")
 registerCreatureEvent(cid, "GuildMotd")
 
 registerCreatureEvent(cid, "Idle")
 if(config.useFragHandler) then
  registerCreatureEvent(cid, "SkullCheck")
 end
        registerCreatureEvent(cid, "ProtDeath")
           registerCreatureEvent(cid, "Biohazard")
           registerCreatureEvent(cid, "ZombieAttack")
           registerCreatureEvent(cid, "WeaponMana")
     registerCreatureEvent(cid, "showVoc")       
        registerCreatureEvent(cid, "ReportBug")
        registerCreatureEvent(cid, "AdvanceSave")
 registerCreatureEvent(cid, "Outfit")
 registerCreatureEvent(cid, "MonsteDeath")
registerCreatureEvent(cid, "ExameJouninDead")
        registerCreatureEvent(cid, "ExameJouninBoss")
setPlayerStorageValue(cid, 8855, -1)
registerCreatureEvent(cid, "Senha")
registerCreatureEvent(cid, "eventotimes")
registerCreatureEvent(cid, "report")
registerCreatureEvent(cid, "MaxAdvance")
 return true
 end

Olha oque tem de errado com ela

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