Postado Maio 4, 2016 9 anos galera tenho um ot... ja desde 2012 e voltei a hostiar e tem 2 coisas q preciso arrumar house > alguma script q faça com que o player perca a house se ficar uns 30dias of ( pq ja abri esse ot e ele ficou mais de 1 ano on sem reset, e mt house parada ) stamina > quando player morre esta voltando stamina full.. achei alguns tópicos na net, porem nem um resolvido.. (nao tem e nem vou colocar sistema de algum item para ficar full stamina ) (New Slayer Yurots 8.6)
Postado Maio 4, 2016 9 anos Seguinte, para sistema de house, use esse script, testei ele aqui e funciona perfeitamente: http://www.tibiaking.com/forum/topic/14919-house-clean/ Para o sistema de stamina, como se trata de Otserv Baiak, porque não deixa do jeito que está? Mais se não me engano, você precisa configurar isso nas Sources da pasta do OT.
Postado Maio 4, 2016 9 anos Autor primeiramente obrigado mano era isso mesmo da house q precisava... e em questao da stamina.. o ot fica mt tempo on e tem mt area de hunt secreta e talz (n curto portal) entao os cara se enfia em buraco e deixa bot direto e bot eh livre dai fica foda kkkk quero fazer eles perde rank e talz ter q fica off
Postado Maio 5, 2016 9 anos Entendi, vá na pasta do ot (data) e procure o arquivo PlayerDeath, se não me engano fica em creaturescripts, e poste o que contém nele aqui, que irei analisar para você. Editado Maio 5, 2016 9 anos por denisgusto (veja o histórico de edições)
Postado Maio 5, 2016 9 anos Autor local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end data\creaturescripts\scripts\playerdeath.lua Editado Maio 5, 2016 9 anos por vinaraserver (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.