Ir para conteúdo

[Encerrado] Colocar ml maximo no ot em 130


matmat46

Posts Recomendados

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 por Roksas
Link para o comentário
Compartilhar em outros sites

  • Respostas 30
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

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

Link para o comentário
Compartilhar em outros sites

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'

Link para o comentário
Compartilhar em outros sites

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

Link para o comentário
Compartilhar em outros sites

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

Link para o comentário
Compartilhar em outros sites

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 por Roksas
Link para o comentário
Compartilhar em outros sites

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...

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
Visitante
Este tópico está impedido de receber novos posts.

×
×
  • Criar Novo...