Clean Nas Houses

pemi
Por pemi
em Scripts

pemi

Lord Artrox
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/07/08Posts: 62Char no Tibia: Secret

Opa,

 

OBS:NAO SEI SE POSTEI NA ÁREA CORRETA

 

Bom estou tendo um probleminha,pois quando meu Servidor da um Global Save Server o Servidor volta mas quando volta as casas estao limpas.Já olhei no RME as casas estao OK,nao sei onde esta o erro.

 

Algumas informações que talvez possa ajudar

 

Quando eu falo /clean (NAO SOME OS ITENS) APENAS NO GLOBAL SERVER SAVE ou QUANDO O OTServ CAI E VOLTA

 

CONFIG.LUA(NÃO ESTA COMPLETA)

-- Map
mapName = "RealMap.otbm"
mapAuthor = "azevedo"
randomizeTiles = true
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = ""

-- Global save
globalSaveEnabled = true
globalSaveHour = 06
globalSaveMinute = 00
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = true

 -- Houses
buyableAndSellableHouses = true
houseNeedPremium = false
bedsRequirePremium = false
levelToBuyHouse = 50
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 1000
houseRentPeriod = "never"
houseCleanOld = 0
guildHalls = false

 

Se precisarem de + arquivo ou da config.lua inteiro por favor me avisem!

Preciso de ajudar URGENTE!

 

Grato

nerdhitech

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/04/12Posts: 2Char no Tibia: Elder of Druy

Nossa, isso geralmente é problemas com distros mais antigas, que não dão esse suporte.

Poderia me passar o servidor que você baixou, e, de preferência, o link para o post dele?

Vou dar uma pesquisada se é possível fazer um script que faça isso, talvez, só mudando a source.

Ajudei? Tirei sua dúvida? Agradeça me dando Reputação.
Continua com dúvidas? Quer me perguntar alguma coisa, seja ela qual for? Me envie uma MP.

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Um script de clean que peguei aqui no sv..

 

 

local cleanEvent = 0

 

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Collected " .. doCleanMap() .. " items.")

return true

end

 

if(param == 'tile') then

local removeLoaded, t = false, string.explode(param, ",")

if(t[2]) then

removeLoaded = getBooleanFromString(t[2])

end

 

doCleanTile(getCreaturePosition(cid), removeLoaded)

return true

end

 

if(not tonumber(param)) then

doPlayerSendCancel(cid, "Command requires numeric param.")

return true

end

 

stopEvent(cleanEvent)

prepareClean(tonumber(param), cid)

return true

end

 

function prepareClean(minutes, cid)

if(minutes == 0) then

if(isPlayer(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cleaned " .. doCleanMap() .. " items.")

end

 

doBroadcastMessage("Game map cleaned.")

elseif(minutes > 0) then

if(minutes == 1) then

doBroadcastMessage("Game map cleaning in " .. minutes .. " minute, please pick up all your items.")

else

doBroadcastMessage("Game map cleaning in " .. minutes .. " minutes.")

end

 

cleanEvent = addEvent(prepareClean, 60000, minutes - 1, cid)

end

end

 

 

 

Atenciosamente, Vilden.

jhon992

Dono JhonBot
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 30/06/11Posts: 631Char no Tibia: Warrior of Mort

Se não conseguir arrumar, põe o global server salve como false.

 

E usa o save do globalevents para salvar o server a cada 2hras ou mais.

data/globalevents/scripts/save.lua

local config = {
   broadcast = {120, 30},
   shallow = "no",
   delay = 120,
   events = 30
}

config.shallow = getBooleanFromString(config.shallow)

local function executeSave(seconds)
   if(isInArray(config.broadcast, seconds)) then
       local text = ""
       if(not config.shallow) then
           text = "Full s"
       else
           text = "S"
       end

       text = text .. "erver save within " .. seconds .. " seconds, please mind it may freeze!"
       doBroadcastMessage(text)
   end

   if(seconds > 0) then
       addEvent(executeSave, config.events * 1000, seconds - config.events)
   else
       doSaveServer(config.shallow)
   end
end

function onThink(interval, lastExecution, thinkInterval)
   if(table.maxn(config.broadcast) == 0) then
       doSaveServer(config.shallow)
   else
       executeSave(config.delay)
   end

   return true
end

 

data/globalevents/globalevents.xml

<globalevent name="save" interval="3600" event="script" value="save.lua"/>

pemi

Lord Artrox
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/07/08Posts: 62Char no Tibia: Secret

Valeu aé pela ajuda,era um negocio da config.lua um negocio de Houses Titles meu amigo arrumou aqui,obrigado

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Dúvida sanada, movido!

Atenciosamente, Vilden.