isso eu te garanto que não errei pois eu copiei um bloco de notas, renomeei ele para
mlmaximo.lua colokei o arquivo la dentro eu so mudei uma coisa e foi o lv nm deixei 130 deixei 140
By matmat46, 02 de fev. de 2013 in Tópicos Sem Resposta
info
Group: Campones
Joined: 01/02/13
Posts: 65
Reputation: +1
Tibia Character: LokoDaDorgas

isso eu te garanto que não errei pois eu copiei um bloco de notas, renomeei ele para
mlmaximo.lua colokei o arquivo la dentro eu so mudei uma coisa e foi o lv nm deixei 130 deixei 140
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Acho que sei oque foi, renomeie e deixe apenas mlmaximo, tire o .lua
Porque se voce copiou, então já veio com .lua
Ou seja, está mlmaximo.lua.lua ![]()
Deixe só mlmaximo e poste resultados ;D
info
Group: Campones
Joined: 01/02/13
Posts: 65
Reputation: +1
Tibia Character: LokoDaDorgas

Mano Fiz desse jeito ai e tal tirei a o 1 .lua e testei e os kra passou do 140 de ml =/
quando eu abro meu server agora só tem apenas 1 error e é esse aki
[02/02/2013 22:09:19] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:51: '<eof>' expected near 'end'
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Ok, agora você posta seu arquivo login.lua da pasta data/creaturescripts/scripts
para eu arrumar para você ^^
info
Group: Campones
Joined: 01/02/13
Posts: 65
Reputation: +1
Tibia Character: LokoDaDorgas

function onLogin(cid)
local tmp = {playerName = getPlayerName(cid), ip = getPlayerIp(cid)}
db.executeQuery("UPDATE `players` SET `ip` = '" .. doConvertIntegerToIp(tmp.ip) .. "' WHERE name = '"..tmp.playerName.."';")
return true
end
--ALTER TABLE players ADD ip VARCHAR( 255 ) NOT NULL
Aqui
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Cara arquivo login.lua, não é só isso, posta ele completo.
ele fica na pasta data/creaturescripts/scripts
info
Group: Campones
Joined: 01/02/13
Posts: 65
Reputation: +1
Tibia Character: LokoDaDorgas

Mal Passei o errado, ta aki
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, "WeaponMana")
registerCreatureEvent(cid, "showVoc")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
registerCreatureEvent(cid, "MlMax")
end
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Substitua por esse:
~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, "MlMax")
registerCreatureEvent(cid, "Biohazard")
registerCreatureEvent(cid, "ZombieAttack")
registerCreatureEvent(cid, "WeaponMana")
registerCreatureEvent(cid, "showVoc")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end
E o arquivo mlmaximo.lua, apague oque tem dentro e substitua por esse:
local config = {
mlremove = 1,
MlMax = 130,
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL_MAGLEVEL then
if oldlevel == config.MlMax then
doPlayerSetSkill(cid, SKILL_MAGLEVEL, getPlayerSkill(cid, SKILL_MAGLEVEL) - config.mlremove)
end
end
return true
end
function doPlayerSetSkill(cid, skill, amount)
local pid = getPlayerGUID(cid)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";")
return TRUE
end
Edited Fevereiro 2 by Roksas
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

isso da errado...
config.mlremove
e ficar removendo o player toda hora nao eh uma boa ideia... aposto q os players nao vao gostar... ;/
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Tem certeza? porque a condição antes dessa função é if oldlevel == MlMax then
ou seja
só vai remover se tiver o ml 130
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

sim mano mas sempre q o player upar pro 131 denovo vai remover o player e setar para 130...
alias isso tb ta errado..
local mlremove = 1,
n eh pra ter a ',' ali...
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

Editei antes de você postar, vê se ta certinho, arrumei o config.mlremove hehe
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: Masculino

esqueceu aki..
if oldlevel == MlMax then
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino
Cara na pasta data/creaturescripts/scripts o Script que eu pedi para você colocar lá você pos com outro nome.. renomeie para
mlmaximo.lua
@Slicer
Não sei q resultado daria, eu não manjo a logica do return aehuh
Edited Fevereiro 2 by Roksas