TH

gente upando muita ml

Por thiagotop, 02 de mar. de 2013 em Scripts

resolvido
53
5.9k
thiagotopT
02 de março de 2013 às 00:17

no meu ot os cara upa muita a ml eu queria por um limite na ml .

alguem pode me ajuda ?

ADMMarioA
02 de março de 2013 às 01:05

Amigo limite não recomendo porque da uma sensação de "Terminar de ser mage". abaixa um pouco a ml é minha opinião.

RoksasR
02 de março de 2013 às 08:40

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")

02 de março de 2013 às 10:01

Poksas,o mapa que o cara deve ta usando provavelmente é igual o meu

SlicerS
02 de março de 2013 às 10:08

ngm reparo q ele ta em ATENDIMENTO neh? o.O

@rok ve se começa a ver aonde esta o topico antes de responder mano... ;x

RoksasR
02 de março de 2013 às 10:19

Perdão, área incorreta, reported.

LordfireL
02 de março de 2013 às 11:51

Porra tu ainda não aprendeu a olhar a seção hein

SkyLighS
02 de março de 2013 às 16:16

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

07 de março de 2013 às 20:38

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?

RoksasR
07 de março de 2013 às 20:42

 

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

 

SkyLighS
07 de março de 2013 às 22:00
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

SlicerS
07 de março de 2013 às 22:57

/\ isso n vai funcionar, e tem q registrar no login e n no proprio arquivo o.O

StackMinuteS
07 de março de 2013 às 23:07

wtf??? porque vocês tão registrando o creature event no proprio script? o.O

 

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

SkymagnumS
12 de março de 2013 às 23:10
local max = ?

function onAdvance(cid, skill, oldLevel, newLevel)

if skill == 7 then
if newLevel >= max then
return false
end
end
return true
end 

phardoleP
12 de março de 2013 às 23:20

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>

:(