o seu não esta dando erro.
mais não funciona o ml continua a subir ![]()
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: Pedro

o seu não esta dando erro.
mais não funciona o ml continua a subir ![]()
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

achu q return false n funciona no onAdvance '--' e acredito q n tenha como limitar o ml.. talvez soh nas sourcers...
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: Pedro

Slicer fala isso não ![]()
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: 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
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: 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
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: Pedro

Demon não funcionou.
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Eu testei aqui e funcionou...
Você adicionou em login.lua e no creaturescripts.xml?
ps: responde o outro tópico da spell.
Editado Março 13 por Demonbholder
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: 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
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: 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
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino

Demonholder
Nao adianta,vc pode tentar quantas vezes quiser,man o poblema é na sources
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: 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
Grupo: Herói
Registrado: 12/06/12
Posts: 1k
Reputação: +362
Gênero: Masculino
Char no Tibia: Aarow

Opa testei aqui e funcionou vlws ![]()
info
Grupo: Campones
Registrado: 27/05/10
Posts: 69
Reputação: +5
Char no Tibia: 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
Grupo: Marquês
Registrado: 02/08/12
Posts: 1k
Reputação: +234
Char no Tibia: Maurolkit
usa o meu