Amigo limite não recomendo porque da uma sensação de "Terminar de ser mage". abaixa um pouco a ml é minha opinião.
info
Grupo: Campones
Registrado: 16/02/13
Posts: 41
Reputação: +2
Char no Tibia: Magic Dos Magic

info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Tenta assim: Em data/creaturescripts/scripts, crie um arquivo chamado maxml.lua e adicione dentro:
local config = {
mlevel = 200, -- ML MAX
msg = "Parabéns, você chegou ao ML Máximo!", -- Mensagem enviada quando atingir o level necessário.
msgtype = MESSAGE_EVENT_ADVANCE -- Tipo da mensagem enviada.
}
function onAdvance(cid, oldLevel, newLevel)
registerCreatureEvent(cid, "mlmax")
if getPlayerMagLevel(cid) >= config.mlevel then
doPlayerAddMagicLevel(cid,-1)
doPlayerSendTextMessage(cid, config.msgtype, config.msg)
end
return TRUE
end
Agora em creaturescripts.xml adicione essa tag:
<event type="advance" name="mlmax" event="script" value="maxml.lua"/>
E no arquivo login.lua da pasta scripts, mais ou menos no final adicione:
registerCreatureEvent(cid, "mlmax")
info
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino

Poksas,o mapa que o cara deve ta usando provavelmente é igual o meu
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

ngm reparo q ele ta em ATENDIMENTO neh? ![]()
@rok ve se começa a ver aonde esta o topico antes de responder mano... ;x
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Perdão, área incorreta, reported.
info
Grupo: Lenda
Registrado: 03/10/06
Posts: 2.6k
Reputação: +309
Gênero: Masculino
Char no Tibia: Knight Orion

Porra tu ainda não aprendeu a olhar a seção hein
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

Utilize o script do roksas assim .
local config = {
mlevel = 200, -- ML MAX
msg = "Parabéns, você chegou ao ML Máximo!", -- Mensagem enviada quando atingir o level necessário.
msgtype = MESSAGE_EVENT_ADVANCE -- Tipo da mensagem enviada.
}
function onAdvance(cid, oldLevel, newLevel)
registerCreatureEvent(cid, "mlmax")
if getPlayerMagLevel(cid) >= config.mlevel then
doPlayerAddMagicLevel(cid,-1)
doPlayerSendTextMessage(cid, config.msgtype, config.msg)
end
return TRUE
end
e ponha isso no login.lua
registerCreatureEvent(cid,"mlmax")
havia mais de 1 espaço no script . e na linha
info
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino

local config = {
mlevel = 200, -- ML MAX
msg = "Parabéns, você chegou ao ML Máximo!", -- Mensagem enviada quando atingir o level necessário.
msgtype = MESSAGE_EVENT_ADVANCE -- Tipo da mensagem enviada.
}
function onAdvance(cid, oldLevel, newLevel)
registerCreatureEvent(cid, "mlmax")
if getPlayerMagLevel(cid) >= config.mlevel then
doPlayerAddMagicLevel(cid,-1)
doPlayerSendTextMessage(cid, config.msgtype, config.msg)
end
return TRUE
end
Tem como tirar essa mensagem?
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

local config = {
mlevel = 200, -- ML MAX
}
function onAdvance(cid, oldLevel, newLevel)
registerCreatureEvent(cid, "mlmax")
if getPlayerMagLevel(cid) >= config.mlevel then
doPlayerAddMagicLevel(cid,-1)
end
return TRUE
end
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

local config = {
mlevel = 200, -- ML MAX
}
function onAdvance(cid, oldLevel, newLevel)
registerCreatureEvent(cid, "mlmax")
if getPlayerMagLevel(cid) >= config.mlevel then
doPlayerAddMagicLevel(cid,-1)
end
return TRUE
end
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

/\ isso n vai funcionar, e tem q registrar no login e n no proprio arquivo ![]()
info
Grupo: Artesão
Registrado: 18/12/12
Posts: 112
Reputação: +13

wtf??? porque vocês tão registrando o creature event no proprio script? ![]()
assim acho que dá... ;x
local mn = 120 function onAdvance(cid, oldLevel, newLevel) if getPlayerMagLevel(cid) >= mn then doPlayerSetMagicRate(cid, -getPlayerMagRate(cid)) end return true end
As tags são as mesmas do Roksas lá em cima
Editado Março 7 por StackMinute
info
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit

local max = ? function onAdvance(cid, skill, oldLevel, newLevel) if skill == 7 then if newLevel >= max then return false end end return true end
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: Pedro

Galera não ta funcionando aqui.. testei todos ai encima e ta dando isso aqui...
[Error - CreatureScript Interface]
data/creaturescripts/scripts/maxml.lua:onAdvance
Description:
data/creaturescripts/scripts/maxml.lua:5: attempt to call global 'getPlayerMagRate' (a nil value)
stack traceback:
data/creaturescripts/scripts/maxml.lua:5: in function <data/creaturescripts/scripts/maxml.lua:3>
![]()








info
Grupo: Campones
Registrado: 02/03/13
Posts: 1
Reputação: 0
no meu ot os cara upa muita a ml eu queria por um limite na ml .
alguem pode me ajuda ?