no meu ot os cara upa muita a ml eu queria por um limite na ml .
alguem pode me ajuda ?
no meu ot os cara upa muita a ml eu queria por um limite na ml .
alguem pode me ajuda ?
Amigo limite não recomendo porque da uma sensação de "Terminar de ser mage". abaixa um pouco a ml é minha opinião.
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")
Poksas,o mapa que o cara deve ta usando provavelmente é igual o meu
ngm reparo q ele ta em ATENDIMENTO neh?
@rok ve se começa a ver aonde esta o topico antes de responder mano... ;x
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
Perdão, área incorreta, reported.
Porra tu ainda não aprendeu a olhar a seção hein
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
Att,
Kissy
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?
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
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
Att,
Kissy
/\ isso n vai funcionar, e tem q registrar no login e n no proprio arquivo
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
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
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>