Ir para conteúdo
  • Cadastre-se

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


Posts Recomendados

-- >  creaturescripts/scripts/arquivo.lua

function onAdvance(cid, skill, oldlevel, newlevel) 

    if newlevel >= 151 and skill == "magic level" then
        return false
    end 
    return true
end
<!-- tag em creaturescripts.xml -->
<event type="advance" name="magic_lock" event="script" value="arquivo.lua"/>
-- > antes do último
--     return true 
--  end 
--         do login.lua em creaturescripts/scripts, coloque:

registerCreatureEvent(cid, "magic_lock")

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

Link para o post
Compartilhar em outros sites

Olha la n tem arquivo.lua tem esse aqui acho que e ele chamdo advancsave

 

 local config = {

savePlayersOnAdvance = true
}
 
function onAdvance(cid, skill, oldLevel, newLevel)
if(config.savePlayersOnAdvance) then
doPlayerSave(cid, true)
end
 
return true
end
 
Editado por PedroUchiha (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

No arquivo que seu ot já tem, login.lua, na pasta creaturescripts/scripts

 

nas últimas linhas, antes do 

 

QwXMxVy.png

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

Link para o post
Compartilhar em outros sites
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.

Link para o post
Compartilhar em outros sites

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.

Link para o post
Compartilhar em outros sites

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

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo