Jump to content

Vanaheim global open source


Bruno

Recommended Posts

Grande Bruno, cara, eu gostaria muito de saber em qual sistema operacional tu tá rodando o seu servidor, e em qual arquitetura, caso for a 64bits, me diga se ainda persiste aquele bug dos npcs que tinha até um tempo atrás e eu não ouvi falar mais ...

 

Link to comment
Share on other sites

Grande Bruno, cara, eu gostaria muito de saber em qual sistema operacional tu tá rodando o seu servidor, e em qual arquitetura, caso for a 64bits, me diga se ainda persiste aquele bug dos npcs que tinha até um tempo atrás e eu não ouvi falar mais ...

 

 

Rodo no OTPanel da serversoft, ubuntu 64 bits.

Sem nenhum tipo de bug.

 

Link to comment
Share on other sites

entendo, geral fala desse tal otpanel, mas eu não tenho grana pra contratar o serviço... mas então nada de erros com npcs? ai, tu ta usando os npcs do orts né?

outra dúvida, sobre o novo otb, tu tentou atualizar o otb oficial com o item editor ? se sim, notou que bugo muitas coisas, será que não é viável utilizar aquele otb que os caras fizeram pro RME 10.81 daqui do forum?

Link to comment
Share on other sites

[uRGENTE]

Como faço pro rashid vender item sem precisar de quest?

 

cara, acho que vc pode colocar essa linha dentro do seu login.lua

 

player:setStorageValue(Storage.TravellingTrader.Mission07, 1)

ai os players novos terão o storage da quest...

Link to comment
Share on other sites

 

Rodo no OTPanel da serversoft, ubuntu 64 bits.

Sem nenhum tipo de bug.

 

Bruno, boa noite ou bom dia.. sei lá.. haha

Estou usando o OTPanel da ServerSoft, porém meu ot está com muitos bugs, como faço para corrigir?

Link to comment
Share on other sites

Bruno Minervino Pode ajudar nesse erro apos criar character quando vou entrar no jogo da esse erro no servidor e o personagem não entra no jogo.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/offlinetraining.lua:onLogin
data/creaturescripts/scripts/others/offlinetraining.lua:4: attempt to call metho
d 'getOfflineTrainingSkill' (a nil value)
stack traceback:
        [C]: in function 'getOfflineTrainingSkill'
        data/creaturescripts/scripts/others/offlinetraining.lua:4: in function <
data/creaturescripts/scripts/others/offlinetraining.lua:1>
Haidyn has logged out.
Sasa has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/offlinetraining.lua:onLogin
data/creaturescripts/scripts/others/offlinetraining.lua:4: attempt to call metho
d 'getOfflineTrainingSkill' (a nil value)
stack traceback:
        [C]: in function 'getOfflineTrainingSkill'
        data/creaturescripts/scripts/others/offlinetraining.lua:4: in function <
data/creaturescripts/scripts/others/offlinetraining.lua:1>
Sasa has logged out.

Edited by tiodarsa
Link to comment
Share on other sites

 

Bruno Minervino Pode ajudar nesse erro apos criar character quando vou entrar no jogo da esse erro no servidor e o personagem não entra no jogo.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/offlinetraining.lua:onLogin
data/creaturescripts/scripts/others/offlinetraining.lua:4: attempt to call metho
d 'getOfflineTrainingSkill' (a nil value)
stack traceback:
        [C]: in function 'getOfflineTrainingSkill'
        data/creaturescripts/scripts/others/offlinetraining.lua:4: in function <
data/creaturescripts/scripts/others/offlinetraining.lua:1>
Haidyn has logged out.
Sasa has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/offlinetraining.lua:onLogin
data/creaturescripts/scripts/others/offlinetraining.lua:4: attempt to call metho
d 'getOfflineTrainingSkill' (a nil value)
stack traceback:
        [C]: in function 'getOfflineTrainingSkill'
        data/creaturescripts/scripts/others/offlinetraining.lua:4: in function <
data/creaturescripts/scripts/others/offlinetraining.lua:1>
Sasa has logged out.

 

Boa tarde, tive o mesmo problema, tente substituir o conteúdo do script por este:

 

function onLogin(player)

local lastLogout = player:getLastLogout()

local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0

local offlineTrainingSkill = player:getOfflineTrainingSkill()

if offlineTrainingSkill == -1 then

player:addOfflineTrainingTime(offlineTime * 1000)

return true

end

 

player:setOfflineTrainingSkill(-1)

 

if offlineTime < 600 then

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be logged out for more than 10 minutes to start offline training.")

return true

end

 

local trainingTime = math.max(0, math.min(offlineTime, math.min(43200, player:getOfflineTrainingTime() / 1000)))

player:removeOfflineTrainingTime(trainingTime * 1000)

 

local remainder = offlineTime - trainingTime

if remainder > 0 then

player:addOfflineTrainingTime(remainder * 1000)

end

 

if trainingTime < 60 then

return true

end

 

local text = "During your absence you trained for"

local hours = math.floor(trainingTime / 3600)

if hours > 1 then

text = string.format("%s %d hours", text, hours)

elseif hours == 1 then

text = string.format("%s 1 hour", text)

end

 

local minutes = math.floor((trainingTime % 3600) / 60)

if minutes ~= 0 then

if hours ~= 0 then

text = string.format("%s and", text)

end

 

if minutes > 1 then

text = string.format("%s %d minutes", text, minutes)

else

text = string.format("%s 1 minute", text)

end

end

 

text = string.format("%s.", text)

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, text)

 

local vocation = player:getVocation()

local promotion = vocation:getPromotion()

local topVocation = not promotion and vocation or promotion

 

local updateSkills = false

if isInArray({SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE}, offlineTrainingSkill) then

local modifier = topVocation:getAttackSpeed() / 1000

updateSkills = player:addOfflineTrainingTries(offlineTrainingSkill, (trainingTime / modifier) / (offlineTrainingSkill == SKILL_DISTANCE and 4 or 2))

elseif offlineTrainingSkill == SKILL_MAGLEVEL then

local gainTicks = topVocation:getManaGainTicks() * 2

if gainTicks == 0 then

gainTicks = 1

end

 

updateSkills = player:addOfflineTrainingTries(SKILL_MAGLEVEL, trainingTime * (vocation:getManaGainAmount() / gainTicks))

end

 

if updateSkills then

player:addOfflineTrainingTries(SKILL_SHIELD, trainingTime / 4)

end

 

return true

end

 

 

Te ajudei? REP+

Link to comment
Share on other sites

 

Boa tarde, tive o mesmo problema, tente substituir o conteúdo do script por este:

 

function onLogin(player)

local lastLogout = player:getLastLogout()

local offlineTime = lastLogout ~= 0 and math.min(os.time() - lastLogout, 86400 * 21) or 0

local offlineTrainingSkill = player:getOfflineTrainingSkill()

if offlineTrainingSkill == -1 then

player:addOfflineTrainingTime(offlineTime * 1000)

return true

end

 

player:setOfflineTrainingSkill(-1)

 

if offlineTime < 600 then

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must be logged out for more than 10 minutes to start offline training.")

return true

end

 

local trainingTime = math.max(0, math.min(offlineTime, math.min(43200, player:getOfflineTrainingTime() / 1000)))

player:removeOfflineTrainingTime(trainingTime * 1000)

 

local remainder = offlineTime - trainingTime

if remainder > 0 then

player:addOfflineTrainingTime(remainder * 1000)

end

 

if trainingTime < 60 then

return true

end

 

local text = "During your absence you trained for"

local hours = math.floor(trainingTime / 3600)

if hours > 1 then

text = string.format("%s %d hours", text, hours)

elseif hours == 1 then

text = string.format("%s 1 hour", text)

end

 

local minutes = math.floor((trainingTime % 3600) / 60)

if minutes ~= 0 then

if hours ~= 0 then

text = string.format("%s and", text)

end

 

if minutes > 1 then

text = string.format("%s %d minutes", text, minutes)

else

text = string.format("%s 1 minute", text)

end

end

 

text = string.format("%s.", text)

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, text)

 

local vocation = player:getVocation()

local promotion = vocation:getPromotion()

local topVocation = not promotion and vocation or promotion

 

local updateSkills = false

if isInArray({SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE}, offlineTrainingSkill) then

local modifier = topVocation:getAttackSpeed() / 1000

updateSkills = player:addOfflineTrainingTries(offlineTrainingSkill, (trainingTime / modifier) / (offlineTrainingSkill == SKILL_DISTANCE and 4 or 2))

elseif offlineTrainingSkill == SKILL_MAGLEVEL then

local gainTicks = topVocation:getManaGainTicks() * 2

if gainTicks == 0 then

gainTicks = 1

end

 

updateSkills = player:addOfflineTrainingTries(SKILL_MAGLEVEL, trainingTime * (vocation:getManaGainAmount() / gainTicks))

end

 

if updateSkills then

player:addOfflineTrainingTries(SKILL_SHIELD, trainingTime / 4)

end

 

return true

end

 

 

Te ajudei? REP+

 

É o mesmo script, padrão do tfs, nada mudou.

Link to comment
Share on other sites

Estava com o mesmo erro que ele, porém usando este script funcionou perfeitamente. :D

Mais não tem o porque.

Fazendo a comparação entre os dois scripts não tem diferença.

Link to comment
Share on other sites

não resolveu nada continuou o mesmo erro ;(

Haidyn has logged in.

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/offlinetraining.lua:onLogin
data/creaturescripts/scripts/others/offlinetraining.lua:4: attempt to call metho
d 'getOfflineTrainingSkill' (a nil value)
stack traceback:
        [C]: in function 'getOfflineTrainingSkill'
        data/creaturescripts/scripts/others/offlinetraining.lua:4: in function <
data/creaturescripts/scripts/others/offlinetraining.lua:1>
Haidyn has logged out.
Link to comment
Share on other sites

×
×
  • Create New...