Ir para conteúdo
  • 0

Toda vez que um player morre, Ele upa do 1 ao 300, Assim que reloga- PORQUE?


Pokerangers

Pergunta

10 respostass a esta questão

Posts Recomendados

  • 0

poste seu login.lua, para eu analisar, e ver se consigo arrumar pra voce.

 

Ta ai:

 

 

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 * 1)
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
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) .. "."
else
str = str .. " Please choose your outfit."
doPlayerSendOutfitWindow(cid)
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, "kill")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "PlayerLogout")
registerCreatureEvent(cid, "onPrepareDeath")
registerCreatureEvent(cid, "deathBroadcast")
registerCreatureEvent(cid, "DeathBroadcast")
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end
registerCreatureEvent(cid, "Rankfrags")
setFrags(cid)
registerCreatureEvent(cid, "ReportBug")
return true
end

Pronto, pediram e eu postei, agora poderia tentar me ajudar?

Só isso ta me inpedindo de por online,

Editado por Pokerangers
Link para o comentário
Compartilhar em outros sites

  • 0

Seria isso?

 

function onLogin(cid)
if getPlayerLevel(cid) < 300 then
doPlayerAddExperience(cid, (getExperienceForLevel(300) - getPlayerExperience(cid)))
end
return TRUE
end
Se for, não está dando certo X
Editado por Pokerangers
Link para o comentário
Compartilhar em outros sites

  • 0

 

doPlayerAddExperience(cid, (getExperienceForLevel(300) - getPlayerExperience(cid)))

experimento trocar esse por esse.

doPlayerSetExperience(cid, (getExperienceForLevel(300) - getPlayerExperience(cid)))
Link para o comentário
Compartilhar em outros sites

  • 0
doPlayerAddExperience(cid, (getExperienceForLevel(300) - getPlayerExperience(cid)))

experimento trocar esse por esse.

doPlayerSetExperience(cid, (getExperienceForLevel(300) - getPlayerExperience(cid)))

 

 

Pus essa linha e aconteceu isso quando um player morreu:

 

[25/07/2013 10:30:37] [Error - CreatureScript Interface]
[25/07/2013 10:30:37] data/creaturescripts/scripts/lowlevellock.lua:onLogin
[25/07/2013 10:30:37] Description:
[25/07/2013 10:30:37] data/creaturescripts/scripts/lowlevellock.lua:4: attempt to call global 'doPlayerSetExperience' (a nil value)
[25/07/2013 10:30:37] stack traceback:
[25/07/2013 10:30:37] data/creaturescripts/scripts/lowlevellock.lua:4: in function <data/creaturescripts/scripts/lowlevellock.lua:1>
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...