Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado
20 horas atrás, arierref disse:

Tu tem o código fonte do servidor?
Se sim: https://otland.net/threads/tfs-1-2-creature-setnomove-bool-creature-canmove.241979/
(o tutorial é pra tfs 1.2 mas deve funcionar)

 

Na minha versão tem como colocar, 0.4. Porém desconheço a função. Mas valeu pela a ajuda.

@Vodkart !!!

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

  • Respostas 18
  • Visualizações 7.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • ótimo script, uma versão melhorada do fly

  • Creio que para servidores derivados não funcione devido á falta de função nas sources/lib.   Sobre a recompensa da quest, tem sim, dá para fazer por storages.

Postado
  • Autor
11 horas atrás, tetheuscunha disse:

Na minha versão tem como colocar, 0.4. Porém desconheço a função. Mas valeu pela a ajuda.

@Vodkart !!!

 

 

Spoiler

--[[
Teleport System
Desenvolvido por Vodkart
Exclusivo TibiaKing
Versão : 1.0
]]--



--[[ Configuração ]]--


local time = 5 -- tempo que demora para ser teleportado		
local premium_teleport_houses = true -- se para teleportar para as houses precisa ser premium

local block_area = {
	{{x=909,y=1019,z=7}, {x=1000,y=1019,z=7}}, -- pos começo e final da area
	{{x=156,y=1019,z=7}, {x=200,y=1019,z=7}},
	{{x=200,y=1019,z=7}, {x=300,y=1019,z=9}}
	}



local teleports = { -- ["nome do lugar"] que poderá ir
	["depot"] = {pos = {x=129, y=54, z=6}, premium = false}, -- posição que irá e se precisa de premium para ir!
	["templo"] = {pos = {x=160, y=54, z=7}, premium = false},
	["arena"] = {pos = {x=125, y=351, z=9}, premium = false},
	["baiak city"] = {pos = {x=1028, y=1034, z=7}, premium = false}
}




--[[ Functions ]]--
function doTeleportWithDelay(cid, pos, delay) -- by vodkart
	if not isCreature(cid) then return LUA_ERROR end
	if delay > 0 then
		if getCreatureCondition(cid, CONDITION_INFIGHT) then
			doCreatureSetNoMove(cid, false)
			setPlayerStorageValue(cid, 548745, 0) 
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} O teletransporte foi desativado pois você entrou em estado de combate.") return true
		end
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} "..delay.." segundos para se teletransportar.")
		addEvent(doTeleportWithDelay, 1000, cid, pos, delay-1)
	else
		doTeleportThing(cid, pos)
		doCreatureSetNoMove(cid, false)
		doSendMagicEffect(getPlayerPosition(cid), 10)
	end
end
function getHouseInvite(cid) -- by vodkart
	local t = {}
	local qry = db.getResult("SELECT `house_id`,`list` FROM `house_lists`;")
	if (qry:getID() ~= -1) then
		repeat
			local lista = qry:getDataString("list")
			if string.find(lista, getCreatureName(cid)) then
				local id = qry:getDataInt("house_id")
				if not isInArray(t, id) then
					t[#t+1] = id
				end
				
			end
		until not qry:next()
		qry:free() 
	end
	return t
end	
function onSay(cid, words, param)
	local z = string.explode(param:lower(), ",")
	if getCreatureCondition(cid, CONDITION_INFIGHT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Este comando só pode ser usado fora de combate.") return true
	elseif getPlayerStorageValue(cid, 548745) - os.time() > 0 then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} aguarde, você está em processo de teletransporte.") return true
	end
	for _, var in ipairs(block_area) do
		if isInRange(getCreaturePosition(cid), var[1], var[2]) then
			doPlayerSendCancel(cid, "você não pode teleportar nesta area..") return true
		end
	end
	if z[1] == "casa" or z[1] == "house" then
		local t,invite,str = {},getHouseInvite(cid),'{Teleport} As casas disponíveis para você se teletransportar são:\n'
		if premium_teleport_houses == true and not isPremium(cid) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} você precisa ser premium account para teleportar para houses.") return true
		end
		if getHouseByPlayerGUID(getPlayerGUID(cid)) ~= nil then
			t[#t+1] = getHouseByPlayerGUID(getPlayerGUID(cid))
		end
		if #invite ~= 0 then
			for i = 1,#invite do
				t[#t+1] = invite[i]	
			end
		end	
		if #t == 0 then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} você não tem nenhuma house para ir.") return true
		end	
		if not tonumber(z[2]) or tonumber(z[2]) > #t then 
			for i = 1, table.maxn(t) do
				local h = getHouseInfo(t[i])
				local hname, htown = getHouseName(t[i]),getTownName(h.town)
				
				str = str .. i .. ') '..hname..' [' .. htown..']'
				str = i ~= table.maxn(t) and str .. ', ' or str .. '.'
			end
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Você deve especificar uma das casas para se teletransportar usando !tp house,numeroDoIndice")
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) return true
		end
		setPlayerStorageValue(cid, 548745, os.time()+time)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Ativado.")
		doCreatureSetNoMove(cid, true) 
		doTeleportWithDelay(cid, getHouseEntry(t[tonumber(z[2])]), time) return true
	end 
	if not teleports[z[1]] then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Desculpe, este lugar não existe, lugares disponíveis: house, depot, templo, arena, baiak city.") return true
	elseif teleports[z[1]].premium == true and not isPremium(cid) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Desculpe, você precisa ser premium para ir para este lugar.") return true 	
	end	
	setPlayerStorageValue(cid, 548745, os.time()+time)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "{Teleport} Ativado.")
	doCreatureSetNoMove(cid, true)  
	doTeleportWithDelay(cid, teleports[z[1]].pos, time) return true
end

 

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

  • 2 weeks later...
  • 2 months later...

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo