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
Por matmat46, 02 de fev. de 2013 em Tópicos Sem Resposta
info
Grupo: Campones
Registrado: 01/02/13
Posts: 65
Reputação: +1
Char no Tibia: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: 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
Grupo: Campones
Registrado: 01/02/13
Posts: 65
Reputação: +1
Char no Tibia: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Ok, agora você posta seu arquivo login.lua da pasta data/creaturescripts/scripts
para eu arrumar para você ^^
info
Grupo: Campones
Registrado: 01/02/13
Posts: 65
Reputação: +1
Char no Tibia: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Cara arquivo login.lua, não é só isso, posta ele completo.
ele fica na pasta data/creaturescripts/scripts
info
Grupo: Campones
Registrado: 01/02/13
Posts: 65
Reputação: +1
Char no Tibia: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: 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
Editado Fevereiro 2 por Roksas
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: 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
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: 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
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Editei antes de você postar, vê se ta certinho, arrumei o config.mlremove hehe
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

esqueceu aki..
if oldlevel == MlMax then
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: 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
Editado Fevereiro 2 por Roksas