o seu não esta dando erro.
mais não funciona o ml continua a subir ![]()
info
Group: Campones
Joined: 27/05/10
Posts: 69
Reputation: +5
Tibia Character: Pedro

o seu não esta dando erro.
mais não funciona o ml continua a subir ![]()
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

achu q return false n funciona no onAdvance '--' e acredito q n tenha como limitar o ml.. talvez soh nas sourcers...
info
Group: Campones
Joined: 27/05/10
Posts: 69
Reputation: +5
Tibia Character: Pedro

Slicer fala isso não ![]()
info
Group: Infante
Joined: 13/10/08
Posts: 1.6k
Reputation: +420
Tibia Character: Demonbholder

tenta ai:
function onAdvance(cid, skill, oldlevel, newlevel) local maxMl = 100 if skill == 7 then if newlevel >= maxMl then doPlayerSetMagicRate(cid, 0) end end return true end
info
Group: Infante
Joined: 27/01/13
Posts: 1.7k
Reputation: +104
Gender: Masculino

Galera nao adianta quantas vezes vcs tentarem o poblema é na sources,o mapa que ele ta usando é o Nto Shinobi,so da pra arruma mechendo na sources
info
Group: Campones
Joined: 27/05/10
Posts: 69
Reputation: +5
Tibia Character: Pedro

Demon não funcionou.
info
Group: Infante
Joined: 13/10/08
Posts: 1.6k
Reputation: +420
Tibia Character: Demonbholder

Eu testei aqui e funcionou...
Você adicionou em login.lua e no creaturescripts.xml?
ps: responde o outro tópico da spell.
Edited Março 13 by Demonbholder
info
Group: Campones
Joined: 27/05/10
Posts: 69
Reputation: +5
Tibia Character: Pedro

adicionei assim
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")
e nada ![]()
info
Group: Infante
Joined: 13/10/08
Posts: 1.6k
Reputation: +420
Tibia Character: Demonbholder

hmm, você configurou a variável certinha no código? eu coloquei 100, mas você tem que mudar né.
posta o seu login.lua.
info
Group: Infante
Joined: 27/01/13
Posts: 1.7k
Reputation: +104
Gender: Masculino

Demonholder
Nao adianta,vc pode tentar quantas vezes quiser,man o poblema é na sources
info
Group: Infante
Joined: 13/10/08
Posts: 1.6k
Reputation: +420
Tibia Character: Demonbholder

Demonholder
Nao adianta,vc pode tentar quantas vezes quiser,man o poblema é na sources
O problema não é nas sources. É possível fazer com lua, to falando que aqui funcionou.
Acho engraçado que quando não conseguem fazer algo em lua as pessoas falam direto "Ah, o problema é na source." rsrsrs.
info
Group: Herói
Joined: 12/06/12
Posts: 1k
Reputation: +362
Gender: Masculino
Tibia Character: Aarow

Opa testei aqui e funcionou vlws ![]()
info
Group: Campones
Joined: 27/05/10
Posts: 69
Reputation: +5
Tibia Character: Pedro

demon obrigado por ajudar ![]()
ta aqui o login.lua
local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}
function onLogin(cid)
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,"mlmax") registerCreatureEvent(cid, "WeaponMana")
registerCreatureEvent(cid, "showVoc") registerCreatureEvent(cid, "Death") registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "ChangeCorpse") registerCreatureEvent(cid, "AdvanceSave")
return true
end
o meu editei assim
function onAdvance(cid, skill, oldlevel, newlevel) local maxMl = 10 if skill == 7 then if newlevel >= maxMl then doPlayerSetMagicRate(cid, 0) end end return true end
mas passa do 10 facil
info
Group: Marquês
Joined: 02/08/12
Posts: 1k
Reputation: +234
Tibia Character: Maurolkit
usa o meu