hadamais 2 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 Bom, no me OTserv está acontecendo uma coisa chata. Nos treiners ou em qualquer lugar que fique parado, o player não dura nem 2 min logado...Mesmo que o certo fosse 15 min somente, Eu gostaria de retirar esse kick...gostaria que, quando as pessoas dessem exit, em qualquer lugar, seja em treiner ou não, elas não fossem kikados, ou seja, que seus char's ficassem logados... Como faço? Att. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/ Compartilhar em outros sites More sharing options...
0 Yan Oliveira 215 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 Poste seu login.lua. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386470 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 Ai está: local config = { loginMessage = getConfigValue('loginMessage') } 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) .. "." 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, "Mail") registerCreatureEvent(cid, "MasterRedAmulet") registerCreatureEvent(cid, "LevelRecompense") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "msg") registerCreatureEvent(cid, "reflect") registerCreatureEvent(cid, "KillingInTheNameOf") registerCreatureEvent(cid, "ferumbrasoftower") registerCreatureEvent(cid, "ushuriel") registerCreatureEvent(cid, "castle") registerCreatureEvent(cid, "zugurosh") registerCreatureEvent(cid, "madareth") registerCreatureEvent(cid, "annihilon") registerCreatureEvent(cid, "golgordan") registerCreatureEvent(cid, "hellgorak") registerCreatureEvent(cid, "thed") registerCreatureEvent(cid, "TopFrags") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "azerus") registerCreatureEvent(cid, "points") registerCreatureEvent(cid, "dias") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "inquisitionPortals") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "castlelogin") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "war") registerCreatureEvent(cid, "war_login") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "amulet") registerCreatureEvent(cid, "skullamulet") registerCreatureEvent(cid, "chargeamulet") registerCreatureEvent(cid, "foreveramulet") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "zombieevent2") registerCreatureEvent(cid, "dota_login") registerCreatureEvent(cid, "ga1") registerCreatureEvent(cid, "ga2") registerCreatureEvent(cid, "ga3") registerCreatureEvent(cid, "gv1") registerCreatureEvent(cid, "gv2") registerCreatureEvent(cid, "gv3") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena return true end Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386471 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 (editado) no config.lua você pode alterar o tempo do kick do player a seu gosto procure por no config.lua -- Limits idleWarningTime = 9 * 60 * 1000 idleKickTime = 10 * 60 * 1000 @edit explicação idleWarningTime = 9 * 60 * 1000 é quando vai aparecer a mensagem pro player avisando que ele vai ser kickado idleKickTime = 10 * 60 * 1000 é com quantos minutos afk o player é kickado no caso no meu servidor é com 9 minutos manda a mensagem pro player e com 10 minutos ele é kickado. sei que voce quer que não kick más não sei como fazer isso no meu servidor o sistema de kick fica no arquivo idle.lua em creaturescripts o seu tambem pode ser lá se for poste ai Editado Novembro 13, 2012 por KennyxD Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386482 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 MEU IDLE.LUA local config = { idleWarning = getConfigValue('idleWarningTime'), idleKick = getConfigValue('idleKickTime') } function onThink(cid, interval) if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or getPlayerCustomFlagValue(cid, PlayerCustomFlag_AllowIdle)) then return true end local idleTime = getPlayerIdleTime(cid) + interval doPlayerSetIdleTime(cid, idleTime) if(config.idleKick > 0 and idleTime > config.idleKick) then doRemoveCreature(cid) elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes" if(config.idleKick > 0) then message = message .. ", you will be disconnected in " local diff = math.ceil((config.idleWarning - config.idleKick) / 60000) if(diff > 1) then message = message .. diff .. " minutes" else message = message .. "one minute" end message = message .. " if you are still idle" end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".") end return true end Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386491 Compartilhar em outros sites More sharing options...
0 Yan Oliveira 215 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 Tenta ae: local config = { loginMessage = getConfigValue('loginMessage') } 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) .. "." 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, "Mail") registerCreatureEvent(cid, "MasterRedAmulet") registerCreatureEvent(cid, "LevelRecompense") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "msg") registerCreatureEvent(cid, "reflect") registerCreatureEvent(cid, "KillingInTheNameOf") registerCreatureEvent(cid, "ferumbrasoftower") registerCreatureEvent(cid, "ushuriel") registerCreatureEvent(cid, "castle") registerCreatureEvent(cid, "zugurosh") registerCreatureEvent(cid, "madareth") registerCreatureEvent(cid, "annihilon") registerCreatureEvent(cid, "golgordan") registerCreatureEvent(cid, "hellgorak") registerCreatureEvent(cid, "thed") registerCreatureEvent(cid, "TopFrags") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "azerus") registerCreatureEvent(cid, "points") registerCreatureEvent(cid, "dias") registerCreatureEvent(cid, "attackguild") registerCreatureEvent(cid, "advance") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "inquisitionPortals") registerCreatureEvent(cid, "SkullCheck") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "castlelogin") registerCreatureEvent(cid, VipReceive) registerCreatureEvent(cid, "PlayerKill") registerCreatureEvent(cid, "war") registerCreatureEvent(cid, "war_login") registerCreatureEvent(cid, "killer") registerCreatureEvent(cid, "amulet") registerCreatureEvent(cid, "skullamulet") registerCreatureEvent(cid, "chargeamulet") registerCreatureEvent(cid, "foreveramulet") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "zombieevent2") registerCreatureEvent(cid, "dota_login") registerCreatureEvent(cid, "ga1") registerCreatureEvent(cid, "ga2") registerCreatureEvent(cid, "ga3") registerCreatureEvent(cid, "gv1") registerCreatureEvent(cid, "gv2") registerCreatureEvent(cid, "gv3") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena return false end Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386497 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 Man, o que mudou nesse script? :S Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386500 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 faça assim procure por isso no seu login.lua e apague. registerCreatureEvent(cid, "Idle") e em creaturescripts procure por <event type="think" name="Idle" event="script" value="idle.lua"/> e apague pronto os players não seram mais kickados te ajudei ? REP + Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386504 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 KennyxD Essa linha no creature ja não tinha, mas esse arquivo que postei acima, como vc pode ver "idle.lua" tinha... Somente retirei o Idle do login.lua...vamos ver! Ainda ta Kikando...sem IDLE no login, e sem a linha no creature. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386507 Compartilhar em outros sites More sharing options...
0 Yan Oliveira 215 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 Man, o que mudou nesse script? :S Só testa cara. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386513 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 você reiniciou o servidor ? Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386514 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 KennyxD Reload somente! Yan18 Testarei. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386531 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 creaturescritps geralmente é melhor reiniciar o servidor o reload não faz muito efeito nele. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386533 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Novembro 13, 2012 Autor Share Postado Novembro 13, 2012 @KennyxD Ainda desloga com menos de 2 min parados. @yan18 Com esse login nem loga os chars PRa ser exato gente, o char fica logado exatos 39 segundos. Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386538 Compartilhar em outros sites More sharing options...
0 KennyConrad 5 Postado Novembro 13, 2012 Share Postado Novembro 13, 2012 procure por no config.lua replaceKickOnLogin = true e coloque false se não funcionar tente essa pequena solução abaixo procure no config.lua -- Limits idleWarningTime = 9 * 60 * 1000 idleKickTime = 10 * 60 * 1000 explicação idleWarningTime = 9 * 60 * 1000 é quando vai aparecer a mensagem pro player avisando que ele vai ser kickado idleKickTime = 10 * 60 * 1000 é com quantos minutos afk o player é kickado Link para o comentário https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/#findComment-1386547 Compartilhar em outros sites More sharing options...
Pergunta
hadamais 2
Bom, no me OTserv está acontecendo uma coisa chata.
Nos treiners ou em qualquer lugar que fique parado,
o player não dura nem 2 min logado...Mesmo que o certo fosse 15 min somente,
Eu gostaria de retirar esse kick...gostaria que, quando as pessoas dessem exit, em qualquer lugar,
seja em treiner ou não,
elas não fossem kikados, ou seja, que seus char's ficassem logados...
Como faço?
Att.
Link para o comentário
https://xtibia.com/forum/topic/198815-player-n%C3%A3o-dura-nem-2-min-logado-quando-fexa-o-tibia/Compartilhar em outros sites
14 respostass a esta questão
Posts Recomendados