Ir para conteúdo

Featured Replies

Postado

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)

  • Respostas 6
  • Visualizações 612
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • denisgusto
    denisgusto

    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

Postado

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
  • 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
  • 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 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo