Ir para conteúdo
  • Cadastre-se

Scripting TalkAction tempo cave exclusiva


Posts Recomendados

Galera, estou aqui mais um vez para um pedido,

tenho um servidor com Script de Cave Exclusiva, o que é Cave Exclusiva ?

Um certo item, que ao dar "USE" o player recebe, (no cado do meu servido) 4 horas dentro de uma hunt onde só ele pode caçar

eu gostaria de uma Talkaction para o player poder checar o tempo que ele tem dentro da Cave Exclusiva

 

abaixo vou postar o script da Cave Exclusiva 

 

Spoiler

Caveexclusiva.Lua

 


local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 700 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 700, porem nao pode usar a cave exclusiva.")
	return false
	end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

 

Link para o post
Compartilhar em outros sites

@Zzyzx, ai da uma olhadinha

 

data/actions/script/cave exclusiva.lua

Spoiler

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) > 700 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce e maior que level 700, porem nao pode usar a cave exclusiva.")
	return false
	end
    	if tonumber(filtrateString(getGlobalStorageValue(822081))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822081, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 1 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822082))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822082, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 2 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822083))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822083, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 3 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822084))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822084, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 4 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822085))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822085, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 5 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822086))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822086, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 6 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822087))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822087, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 7 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822088))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822088, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 8 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822089))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822089, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 9 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822090))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822090, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 10 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822091))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822091, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 11 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822092))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822092, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 12 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822093))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822093, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 13 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822094))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822094, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 14 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822095))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822095, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 15 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822096))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822096, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 16 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822097))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822097, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 17 e pode upar lá por 4 horas.")
	elseif tonumber(filtrateString(getGlobalStorageValue(822098))[2]) < os.time() then
		doRemoveItem(item.uid)
		setGlobalStorageValue(822098, "a "..getPlayerAccountId(cid).." b ".. os.time() + (3600 * 4))
		doPlayerSendTextMessage(cid, 25, "Agora você é o dono da cave 18 e pode upar lá por 4 horas.")
	
	else
		doPlayerSendCancel(cid, "Todas as caves já estão com dono no momento. Tente mais tarde.")
	end
	return true
end

 

 

 

 

 

data/globalevents/script/cave exclusiva.lua

 

Spoiler

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end

function onStartup()
	if not filtrateString(getGlobalStorageValue(822081)) then
		setGlobalStorageValue(822081, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822082)) then
		setGlobalStorageValue(822082, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822083)) then
		setGlobalStorageValue(822083, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822084)) then
		setGlobalStorageValue(822084, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822085)) then
		setGlobalStorageValue(822085, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822086)) then
		setGlobalStorageValue(822086, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822087)) then
		setGlobalStorageValue(822087, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822088)) then
		setGlobalStorageValue(822088, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822089)) then
		setGlobalStorageValue(822089, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822090)) then
		setGlobalStorageValue(822090, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822091)) then
		setGlobalStorageValue(822091, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822092)) then
		setGlobalStorageValue(822092, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822093)) then
		setGlobalStorageValue(822093, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822094)) then
		setGlobalStorageValue(822094, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822095)) then
		setGlobalStorageValue(822095, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822096)) then
		setGlobalStorageValue(822096, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822097)) then
		setGlobalStorageValue(822097, "a 123 b 456")
	end
	if not filtrateString(getGlobalStorageValue(822098)) then
		setGlobalStorageValue(822098, "a 123 b 456")
	end




	local query = db.getResult("SELECT `guild_id` FROM `castle_dono` WHERE `guild_id` > 0")
	if query:getID() ~= -1 then
		setGlobalStorageValue(1823999, query:getDataInt("guild_id"))
	end
	return true
end

 

 

 

 

 

data/globalevents/script/cave exclusiva 2.lua

 

Spoiler

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end

local f1, t1 = {x = 2435, y = 499, z = 7}, {x = 2578, y = 593, z = 7}
local f2, t2 = {x = 2445, y = 390, z = 7}, {x = 2588, y = 487, z = 7}
local f3, t3 = {x = 2461, y = 315, z = 7}, {x = 2518, y = 368, z = 7}
local f4, t4 = {x = 2423, y = 167, z = 7}, {x = 2561, y = 271, z = 7}
local f5, t5 = {x = 2457, y = 252, z = 6}, {x = 2520, y = 302, z = 6}
local f6, t6 = {x = 1932, y = 402, z = 7}, {x = 2081, y = 459, z = 7}
local f7, t7 = {x = 2194, y = 469, z = 6}, {x = 2282, y = 543, z = 6}
local f8, t8 = {x = 2058, y = 559, z = 7}, {x = 2135, y = 632, z = 7}
local f9, t9 = {x = 2049, y = 468, z = 9}, {x = 2143, y = 523, z = 9}
local f10, t10 = {x = 2068, y = 325, z = 8}, {x = 2160, y = 405, z = 8}
local f11, t11 = {x = 2592, y = 507, z = 7}, {x = 2730, y = 597, z = 7}
local f12, t12 = {x = 2609, y = 399, z = 7}, {x = 2723, y = 489, z = 7}
local f13, t13 = {x = 2526, y = 318, z = 7}, {x = 2580, y = 370, z = 7}
local f14, t14 = {x = 2267, y = 161, z = 7}, {x = 2398, y = 269, z = 7}
local f15, t15 = {x = 2769, y = 505, z = 7}, {x = 2919, y = 601, z = 7}
local f16, t16 = {x = 2245, y = 315, z = 7}, {x = 2393, y = 419, z = 7}
local f17, t17 = {x = 2598, y = 316, z = 7}, {x = 2655, y = 370, z = 7}
local f18, t18 = {x = 2411, y = 16, z = 7}, {x = 2557, y = 124, z = 7}

function onThink(interval, lastExecution)
	local first = getPlayersInArea(f1, t1)
	local second = getPlayersInArea(f2, t2)
	local third = getPlayersInArea(f3, t3)
	local fourth = getPlayersInArea(f4, t4)
	local fifth = getPlayersInArea(f5, t5)
	local sixth = getPlayersInArea(f6, t6)
	local seventh = getPlayersInArea(f7, t7)
	local eighth = getPlayersInArea(f8, t8)
	local ninth = getPlayersInArea(f9, t9)
	local tenth = getPlayersInArea(f10, t10)
	local eleventh = getPlayersInArea(f11, t11)
	local twelfth = getPlayersInArea(f12, t12)
	local thirteenth = getPlayersInArea(f13, t13)
	local fourteenth = getPlayersInArea(f14, t14)
	local fifteenth = getPlayersInArea(f15, t15)
	local sixteenth = getPlayersInArea(f16, t16)
	local seventeenth = getPlayersInArea(f17, t17)
	local eighteenth = getPlayersInArea(f18, t18)
	
	if first then
		for _, pid in pairs(first) do
			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822081))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822081))[1]) and tonumber(filtrateString(getGlobalStorageValue(822081))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 1 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if second then
		for _, pid in pairs(second) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822082))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822082))[1]) and tonumber(filtrateString(getGlobalStorageValue(822082))[2]) <= os.time()	then
        	doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 2 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if third then
		for _, pid in pairs(third) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822083))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822083))[1]) and tonumber(filtrateString(getGlobalStorageValue(822083))[2]) <= os.time() then
        				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 3 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if fourth then
		for _, pid in pairs(fourth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822084))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822084))[1]) and tonumber(filtrateString(getGlobalStorageValue(822084))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 4 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if fifth then
		for _, pid in pairs(fifth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822085))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822085))[1]) and tonumber(filtrateString(getGlobalStorageValue(822085))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 5 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if sixth then
		for _, pid in pairs(sixth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822086))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822086))[1]) and tonumber(filtrateString(getGlobalStorageValue(822086))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 6 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if seventh then
		for _, pid in pairs(seventh) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822087))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822087))[1]) and tonumber(filtrateString(getGlobalStorageValue(822087))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 7 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if eighth then
		for _, pid in pairs(eighth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822088))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822088))[1]) and tonumber(filtrateString(getGlobalStorageValue(822088))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 8 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if ninth then
		for _, pid in pairs(ninth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822089))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822089))[1]) and tonumber(filtrateString(getGlobalStorageValue(822089))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 9 expirou. Você foi levado até seu templo.")
			end
		end
	end
	if tenth then
		for _, pid in pairs(tenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822090))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822090))[1]) and tonumber(filtrateString(getGlobalStorageValue(822090))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 10 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if eleventh then
		for _, pid in pairs(eleventh) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822091))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822091))[1]) and tonumber(filtrateString(getGlobalStorageValue(822091))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 11 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if twelfth then
		for _, pid in pairs(twelfth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822092))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822092))[1]) and tonumber(filtrateString(getGlobalStorageValue(822092))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 12 expirou. Você foi levado até seu templo.")
			end
		end
	end
			if thirteenth then
		for _, pid in pairs(thirteenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822093))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822093))[1]) and tonumber(filtrateString(getGlobalStorageValue(822093))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 13 expirou. Você foi levado até seu templo.")
			end
		end
	end
			if fourteenth then
		for _, pid in pairs(fourteenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822094))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822094))[1]) and tonumber(filtrateString(getGlobalStorageValue(822094))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 14 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if fifteenth then
		for _, pid in pairs(fifteenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822095))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822095))[1]) and tonumber(filtrateString(getGlobalStorageValue(822095))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 15 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if sixteenth then
		for _, pid in pairs(sixteenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822096))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822096))[1]) and tonumber(filtrateString(getGlobalStorageValue(822096))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 16 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if seventeenth then
		for _, pid in pairs(seventeenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822097))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822097))[1]) and tonumber(filtrateString(getGlobalStorageValue(822097))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 17 expirou. Você foi levado até seu templo.")
			end
		end
	end
		if eighteenth then
		for _, pid in pairs(eighteenth) do
    			if getPlayerAccountId(pid) ~= tonumber(filtrateString(getGlobalStorageValue(822098))[1]) or getPlayerAccountId(pid) == tonumber(filtrateString(getGlobalStorageValue(822098))[1]) and tonumber(filtrateString(getGlobalStorageValue(822098))[2]) <= os.time() then
				doTeleportThing(pid, getTownTemplePosition(getPlayerTown(pid)))
				doPlayerPopupFYI(pid, "Seu tempo como dono da Cave 18 expirou. Você foi levado até seu templo.")
			end
		end
	end




	return true
end
	

 

 

 

 

 

 

data/moviments/script/cave exclusiva.lua

 

Spoiler

local function filtrateString(str)
	if type(str) ~= "string" then
		return false
	end
	local first, last = 0, 0
	local second, final = 0, #str
	for i = 1, #str do
		if string.byte(str:sub(i,i)) == string.byte('a') then
			first = i + 2
			for t = first, #str do
				if string.byte(str:sub(t,t)) == string.byte(' ') then
					last = t - 1
					break
				end
			end
		end
		if string.byte(str:sub(i,i)) == string.byte('b') then
			second = i + 2
		end
	end
	return {str:sub(first, last), str:sub(second, final)}
end


function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if item.actionid == 3600 then
		if tonumber(filtrateString(getGlobalStorageValue(822081))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822081))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822081))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
	elseif item.actionid == 3601 then
		if tonumber(filtrateString(getGlobalStorageValue(822082))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822082))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822082))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
	elseif item.actionid == 3602 then
		if tonumber(filtrateString(getGlobalStorageValue(822083))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822083))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822083))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
	elseif item.actionid == 3603 then
		if tonumber(filtrateString(getGlobalStorageValue(822084))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822084))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822084))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
	elseif item.actionid == 3604 then
		if tonumber(filtrateString(getGlobalStorageValue(822085))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822085))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822085))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
	elseif item.actionid == 3605 then
		if tonumber(filtrateString(getGlobalStorageValue(822086))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822086))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822086))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3606 then
		if tonumber(filtrateString(getGlobalStorageValue(822087))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822087))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822087))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3607 then
		if tonumber(filtrateString(getGlobalStorageValue(822088))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822088))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822088))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3608 then
		if tonumber(filtrateString(getGlobalStorageValue(822089))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822089))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822089))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3609 then
		if tonumber(filtrateString(getGlobalStorageValue(822090))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822090))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822090))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3610 then
		if tonumber(filtrateString(getGlobalStorageValue(822091))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822091))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822091))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3611 then
		if tonumber(filtrateString(getGlobalStorageValue(822092))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822092))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822092))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3612 then
		if tonumber(filtrateString(getGlobalStorageValue(822093))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822093))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822093))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.m")
		end
		elseif item.actionid == 3613 then
		if tonumber(filtrateString(getGlobalStorageValue(822094))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822094))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822094))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3614 then
		if tonumber(filtrateString(getGlobalStorageValue(822095))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822095))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822095))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3615 then
		if tonumber(filtrateString(getGlobalStorageValue(822096))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822096))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822096))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3616 then
		if tonumber(filtrateString(getGlobalStorageValue(822097))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822097))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822097))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		elseif item.actionid == 3617 then
		if tonumber(filtrateString(getGlobalStorageValue(822098))[1]) == getPlayerAccountId(cid) and tonumber(filtrateString(getGlobalStorageValue(822098))[2]) >= os.time() then
			doPlayerSendTextMessage(cid, 25, "Bem vindo à sua hunt! Aproveite ela, você tem mais "..math.floor((tonumber(filtrateString(getGlobalStorageValue(822098))[2]) - os.time()) / 60).." minutos de hunt.")
		else
			doTeleportThing(cid, fromPosition)
			doPlayerSendCancel(cid, "Você não é dono dessa hunt! Para ser dono de uma hunt, compre em nosso website.")
		end
		
	end
	return true
end

 

 

Editado por Micheel15 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@Micheel15

tipo em ACTIONS.XML vai ter uma linha com "caveexclusiva.lua"
GLOBALEVENTS.XML  vai ter uma linha com "caveexclusiva.lua"
GLOBALEVENTS.XML vai ter uma linha com "caveexclusiva2.lua"
MOVEMENTS.XML vai ter uma linha com "caveexclusiva.lua"


EXEMPLO.

<action itemid="2222" event="script" value="caveexclusiva.lua.lua"/>

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites

ah entendi, quer as Tags tbm, beleza

deixa eu fazer uma pergunta, Você gostaria de colocar isso no seu servidor ?

seria legal criar um topico para quem precisa desse sistema né, é que pra mim está meio corrido, mais se você estiver afim.

 

    <action itemid="8981" script="Cave Exclusiva.lua"/>

 

    <globalevent name="startCave" type="startup" event="script" value="Cave Exclusiva.lua"/>
    <globalevent name="Check Caves" interval="60000" event="script" value="Cave Exclusiva 2.lua"/>

 

    <movevent type="StepIn" actionid="3600-3617" event="script" value="Cave Exclusiva.lua"/>

 

 

Editado por Micheel15 (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
1 hora atrás, Micheel15 disse:

ah entendi, quer as Tags tbm, beleza

deixa eu fazer uma pergunta, Você gostaria de colocar isso no seu servidor ?

seria legal criar um topico para quem precisa desse sistema né, é que pra mim está meio corrido, mais se você estiver afim.

 

    <action itemid="8981" script="Cave Exclusiva.lua"/>

 

    <globalevent name="startCave" type="startup" event="script" value="Cave Exclusiva.lua"/>
    <globalevent name="Check Caves" interval="60000" event="script" value="Cave Exclusiva 2.lua"/>

 

    <movevent type="StepIn" actionid="3600-3617" event="script" value="Cave Exclusiva.lua"/>

 

 

 

 

 

sim, vou por, faz um topico certinho :)))

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites
4 minutos atrás, Micheel15 disse:

@Zzyzx cara se possivel deixa o REP+ ai se o sistema te ajudou

pois a maioria depois que recebe ajuda simplismente some do forum !!

 

 

não ajudou ainda, ta faltando o tutorial de como configura, tem muita coisa pra configurar que só é possivel se tiver um mini tutorialzinho.

       112674.gif

 

 

 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por cloudrun2023
      CloudRun - Sua Melhor Escolha para Hospedagem de OTServer!
      Você está procurando a solução definitiva para hospedar seu OTServer com desempenho imbatível e segurança inigualável? Não procure mais! Apresentamos a CloudRun, sua parceira confiável em serviços de hospedagem na nuvem.
       
      Recursos Exclusivos - Proteção DDoS Avançada:
      Mantenha seu OTServer online e seguro com nossa robusta proteção DDoS, garantindo uma experiência de jogo ininterrupta para seus jogadores.
       
      Servidores Ryzen 7 Poderosos: Desfrute do poder de processamento superior dos servidores Ryzen 7 para garantir um desempenho excepcional do seu OTServer. Velocidade e estabilidade garantidas!
       
      Armazenamento NVMe de Alta Velocidade:
      Reduza o tempo de carregamento do jogo com nosso armazenamento NVMe ultrarrápido. Seus jogadores vão adorar a rapidez com que podem explorar o mundo do seu OTServer.
       
      Uplink de até 1GB:
      Oferecemos uma conexão de alta velocidade com até 1GB de largura de banda, garantindo uma experiência de jogo suave e livre de lag para todos os seus jogadores, mesmo nos momentos de pico.
       
      Suporte 24 Horas:
      Estamos sempre aqui para você! Nossa equipe de suporte está disponível 24 horas por dia, 7 dias por semana, para resolver qualquer problema ou responder a qualquer pergunta que você possa ter. Sua satisfação é a nossa prioridade.
       
      Fácil e Rápido de Começar:
      Configurar seu OTServer na CloudRun é simples e rápido. Concentre-se no desenvolvimento do seu jogo enquanto cuidamos da hospedagem.
       
      Entre em Contato Agora!
      Website: https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
      Email: [email protected]
      Telefone: (47) 99902-5147

      Não comprometa a qualidade da hospedagem do seu OTServer. Escolha a CloudRun e ofereça aos seus jogadores a melhor experiência de jogo possível. Visite nosso site hoje mesmo para conhecer nossos planos e começar!
       
      https://central.cloudrun.com.br/index.php?rp=/store/cloud-ryzen-brasil
       
      CloudRun - Onde a Velocidade Encontra a Confiabilidade!
       

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por Muvuka
      Abri canal a força creaturescript acho que funcione no creaturescript cria script creaturescript
       
      <channel id="9" name="HELP" logged="yes"/>
      <channel id="12" name="Report Bugs" logged="yes"/>
      <channel id="13" name="Loot" logged="yes"/>
      <channel id="14" name="Report Character Rules Tibia Rules" logged="yes"/>
      <channel id="15" name="Death Channel"/>
      <channel id="6548" name="DexSoft" level="1"/>
      <channel id="7" name="Reports" logged="yes"/>
       
      antes de 
              if(lastLogin > 0) then adicione isso:
                      doPlayerOpenChannel(cid, CHANNEL_HELP) doPlayerOpenChannel(cid, 1,  2, 3) = 1,2 ,3 Channels, entendeu? NÃO FUNCIONA EU QUERO UM MEIO DE ABRI SEM USA A SOURCE
       
      EU NÃO CONSEGUI ABRI EU NÃO TENHO SOURCE
       
       
    • Por bolachapancao
      Rapaziada seguinte preciso de um script que ao utilizar uma alavanca para até 4 jogadores.
      Os jogadores serão teleportados para hunt durante uma hora e depois de uma hora os jogadores serão teleportados de volta para o templo.
       
      Observação: caso o jogador morra ou saia da hunt o evento hunt é cancelado.

      Estou a base canary
      GitHub - opentibiabr/canary: Canary Server 13.x for OpenTibia community.
       
    • Por RAJADAO
      .Qual servidor ou website você utiliza como base? 
      Sabrehaven 8.0
      Qual o motivo deste tópico? 
      Ajuda com novos efeitos
       
      Olá amigos, gostaria de ajuda para introduzir os seguintes efeitos no meu servidor (usando o Sabrehaven 8.0 como base), adicionei algumas runas novas (avalanche, icicle, míssil sagrado, stoneshower & Thunderstorm) e alguns novos feitiços (exevo mas san, exori san, exori tera, exori frigo, exevo gran mas frigo, exevo gran mas tera, exevo tera hur, exevo frigo hur) mas nenhum dos efeitos dessas magias parece existir no servidor, alguém tem um link para um tutorial ou algo assim para que eu possa fazer isso funcionar?
      Desculpe pelo mau inglês, sou brasileiro.

      Obrigado!


      AVALANCHE RUNE id:3161 \/
      (COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_ICEAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)

      STONESHOWER RUNE id:3175 \/
      (COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_STONES)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)

      THUNDERSTORM RUNE id:3202 \/
      (COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_E NERGYHIT)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGYBALL)

      ICICLE RUNE id:3158 \/
      COMBAT_ICEDAMAGE
      CONST_ME_ICEAREA
      CONST_ANI_ICE

      SANTO MÍSSIL RUNA id:3182 \/
      (COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
      (COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)

      CONST_ME_PLANTATTACK (exevo gran mas tera)
      CONST_ME_ICETORNADO (exevo gran mas frigo)
      CONST_ME_SMALLPLANTS (exevo tera hur)
      CONST_ME_ICEAREA (exevo frigo hur)
      CONST_ME_ICEATTACK (exori frigo)
      CONST_ME_CARNIPHILA (exori tera)

      EXORI SAN \/
      (COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
      CONST_ME_HOLYDAM IDADE

      EXEVO MAS SAN \/
      CONST_ME_HOLYAREA
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo