Ir para conteúdo
  • Cadastre-se

Sistema [8.6][MODS] AutoLoot By Account! [+Item]


Posts Recomendados

  • Respostas 79
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Sistema removido.     Nova versão sem Bugs somente no Discord: vodkart#6090

coleta sim, coleta teu pênis de 20cm tbm.   isso mesmo, o autoloot coleta os 3 tipos de moeda automaticamente..   primeiro vou passar o task  4.0 para tfs 1.2 com ajuda do @KotZl

@tetheuscunha   eu fiz uma versão por account + item e outra versão por talk, era só procurar nesta mesmo seção!   obrigado ao @Sekk pela ajuda

Posted Images

Parabéns, seu tópico de conteúdo foi aprovado!
Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.

Spoiler

Congratulations, your content has been approved!
Thank you for your contribution, we of Tibia King we are grateful.
Your content will help many other users, you received +1 REP.

 

 

Trás conteúdo 1.x+ fdm

<33

 

@This life is filled with hurt

When happiness doesn't work

Trust me and take my hand

When the lights go out you will understand

Link para o post
Compartilhar em outros sites

Testado e aprovado ueheuehh

 

100% funcional, todas as funções... Trocou a storage do onUse por uma function da lib, pqp ta otimo uahuha

 

Funcionando pra account toda e também é acumulativo o time WTF

 

Só n dou rep pq acabou os de hj, amanha só e.e

 

Parabens !!!

Link para o post
Compartilhar em outros sites

Muito bom vodkart, assim como dito acima, seria bom ver essas novidades para o 1.x,

Tendo em vista que a engine é muito melhor que as anteriores.

Aguardando esse, e novos scripts para 1.x

Abraço.

asdukeeh.jpg

Link para o post
Compartilhar em outros sites

Coleta paçoca tbm ?

 

!autoloot money >>> vai coletar só gold coin ou os três tipos de moedas ?

https://www.youtube.com/SaymonKopolsky

 

589f09a9e1af9_SemTtulo-1.png.ddf1b437984d72bd5d4124b7e90762fa.png

https://www.youtube.com/SaymonKopolsky

 

 

 

Easy Mapper Map Editor 8.60: Clique aqui

[8.60] BeastXHunter: Clique aqui

 

5494899_orig.gif

Link para o post
Compartilhar em outros sites
1 hora atrás, Saymon Kopolsky disse:

Coleta paçoca tbm ?

 

!autoloot money >>> vai coletar só gold coin ou os três tipos de moedas ?

Todos, constam todos os ids no script.

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
1 hora atrás, Saymon Kopolsky disse:

Coleta paçoca tbm ?

 

!autoloot money >>> vai coletar só gold coin ou os três tipos de moedas ?

 

coleta sim, coleta teu pênis de 20cm tbm.

 

isso mesmo, o autoloot coleta os 3 tipos de moeda automaticamente..

1 hora atrás, DukeeH disse:

Muito bom vodkart, assim como dito acima, seria bom ver essas novidades para o 1.x,

Tendo em vista que a engine é muito melhor que as anteriores.

Aguardando esse, e novos scripts para 1.x

Abraço.

 

primeiro vou passar o task  4.0 para tfs 1.2 com ajuda do @KotZletY

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites

#Editado

 

mudei a configuração inicial do sistema, antigamente ele vinha desativado e me pediram para vir já ativado.

 

abraços.

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
5 minutos atrás, Sekk disse:

 

Sem item ou pode ser com item?

Sem item. 

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

Link para o post
Compartilhar em outros sites
13 minutos atrás, tetheuscunha disse:

Sem item. 

 

Tenta assim:

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="none.com" enabled="yes">
<config name="Loot_func"><![CDATA[
info = {
	AutomaticDeposit = true,
	BlockMonsters = {},
	BlockItemsList = {2123,2515},
	Max_Slots = {free = 2, premium = 5},
	Storages = {27000,28001,28002}
}
function setPlayerStorageTable(cid, storage, tab)
	local tabstr = "&"
	for i,x in pairs(tab) do
		tabstr = tabstr .. i .. "," .. x .. ";"
	end
	setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1))
end
function getPlayerStorageTable(cid, storage)
	local tabstr = getPlayerStorageValue(cid, storage)
	local tab = {}
	if type(tabstr) ~= "string" then
		return {}
	end
	if tabstr:sub(1,1) ~= "&" then
		return {}
	end
	local tabstr = tabstr:sub(2, #tabstr)
	local a = string.explode(tabstr, ";")
	for i,x in pairs(a) do
		local b = string.explode(x, ",")
		tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2]
	end
	return tab
end
function isInTable(cid, item)
	for _,i in pairs(getPlayerStorageTable(cid, info.Storages[1]))do
		if tonumber(i) == tonumber(item) then
			return true
		end
	end
	return false
end
function addItemTable(cid, item)
	local x = {}
	for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do
		table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i])
	end
	if x ~= 0 then
		table.insert(x,tonumber(item))
		setPlayerStorageTable(cid, info.Storages[1], x)
	else
		setPlayerStorageTable(cid, info.Storages[1], {item})
	end
end
function removeItemTable(cid, item)
	local x = {}
	for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do
		table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i])
	end
	for i,v in ipairs(x) do
		if tonumber(v) == tonumber(item) then
			table.remove(x,i)
		end
	end
	return setPlayerStorageTable(cid, info.Storages[1], x)
end
function ShowItemsTabble(cid)
	local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n!autoloot on/off --> To enable or disable the collecting of items in the system.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nBalance Total: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.Storages[1]).."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n"
	for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do
		n = n + 1
		str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.Storages[1])[i]).."\n"
	end
	return doPlayerPopupFYI(cid, str)
end
function getContainerItems(containeruid)
	local items = {}
	local containers = {}
	if type(getContainerSize(containeruid)) ~= "number" then
		return false
	end
	for slot = 0, getContainerSize(containeruid)-1 do
		local item = getContainerItem(containeruid, slot)
		if item.itemid == 0 then
			break
		end
		if isContainer(item.uid) then
			table.insert(containers, item.uid)
		end
		table.insert(items, item)
	end
	if #containers > 0 then
		for i,x in ipairs(getContainerItems(containers[1])) do
			table.insert(items, x)
		end
		table.remove(containers, 1)
	end
	return items
end
function getItemsInContainerById(container, itemid) -- Function By Kydrai
	local items = {}
	if isContainer(container) and getContainerSize(container) > 0 then
		for slot=0, (getContainerSize(container)-1) do
			local item = getContainerItem(container, slot)
			if isContainer(item.uid) then
				local itemsbag = getItemsInContainerById(item.uid, itemid)
				for i=0, #itemsbag do
					table.insert(items, itemsbag[i])
				end
			else
				if itemid == item.itemid then
					table.insert(items, item.uid)
				end
			end
		end
	end
	return items
end
function doPlayerAddItemStacking(cid, itemid, amount) -- revisado
	local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0
	if #item > 0 then
		for _ ,x in pairs(item) do
			local ret = getThing(x)
			if ret.type < 100 then
				doTransformItem(ret.uid, itemid, ret.type+amount) 
				if ret.type+amount > 100 then
					doPlayerAddItem(cid, itemid, ret.type+amount-100)
				end
				break
			else
				_G = _G+1
			end
		end
		if _G == #item then
			doPlayerAddItem(cid, itemid, amount)
		end
	else
		return doPlayerAddItem(cid, itemid, amount)
	end
end
function AutomaticDeposit(cid,item,n)
	local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1)
	return doPlayerDepositMoney(cid, deposit)
end
function corpseRetireItems(cid, pos)
	local check = false
	for i = 0, 255 do
		pos.stackpos = i
		tile = getTileThingByPos(pos)
		if tile.uid > 0 and isCorpse(tile.uid) then
			check = true break
		end
	end
	if check == true then
		local items = getContainerItems(tile.uid)
		for i,x in pairs(items) do
			if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then
				if isItemStackable(x.itemid) then
					doPlayerAddItemStacking(cid, x.itemid, x.type)
					if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then
						AutomaticDeposit(cid,x.itemid,x.type)
					end
				else
					doPlayerAddItem(cid, x.itemid)
				end
				doRemoveItem(x.uid)
			end
		end
	end
end
]]></config>
<event type="login" name="LootLogin" event="script"><![CDATA[
function onLogin(cid)
	registerCreatureEvent(cid, "LootEventKIll")
	if isPremium(cid) and getPlayerStorageValue(cid, 27001) <= 0 then
		setPlayerStorageValue(cid, 27001, 1)
	elseif getPlayerStorageValue(cid, 27001) > 0 and not isPremium(cid) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!")
		setPlayerStorageValue(cid, 27001, -1)
		setPlayerStorageValue(cid, info.Storages[1], -1)
	end
	return true
end]]></event>
<event type="kill" name="LootEventKIll" event="script"><![CDATA[
domodlib('Loot_func')
function onKill(cid, target, lastHit) 
	if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[3]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then
		addEvent(corpseRetireItems, 0, cid ,getThingPos(target))
	end
	return true
end]]></event>
<talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[
domodlib('Loot_func')
local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free
if not param or param == "" then
	ShowItemsTabble(cid) return true
elseif tonumber(param) then
	doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true
elseif isInArray({"clean","limpar", "clear"}, param) then
	setPlayerStorageValue(cid, info.Storages[1], -1)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true
elseif isInArray({"start","stop","on","off"}, param) then
	setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true
elseif isInArray({"money","gold","gps","dinheiro"}, param) then
	setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
end
local item = getItemIdByName(param, false)
if not item then
	doPlayerSendTextMessage(cid, MESSAGE_FIRST, "This item does not exist.") return true
end
local var = isInTable(cid, item)
if isInArray({2148,2152,2160},item) then 
	doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true	
elseif isInArray(info.BlockItemsList, item) then
	doPlayerSendTextMessage(cid, MESSAGE_FIRST, "You can not add this item in the list!") return true
elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then
	doPlayerSendTextMessage(cid, MESSAGE_FIRST, "max "..slots.." from auto loot") return true
end
if not var then
	addItemTable(cid, item)
else
	removeItemTable(cid, item)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list")
return true]]></talkaction>
</mod>

 

Lebrando, n testei haha

Link para o post
Compartilhar em outros sites
9 minutos atrás, Sekk disse:

 

Tenta assim:



<?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="none.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515}, Max_Slots = {free = 2, premium = 5}, Storages = {27000,28001,28002} } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, info.Storages[1]))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, info.Storages[1], x) else setPlayerStorageTable(cid, info.Storages[1], {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, info.Storages[1], x) end function ShowItemsTabble(cid) local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n!autoloot on/off --> To enable or disable the collecting of items in the system.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nBalance Total: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.Storages[1]).."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n" for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.Storages[1])).."\n" end return doPlayerPopupFYI(cid, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, amount) -- revisado local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0 if #item > 0 then for _ ,x in pairs(item) do local ret = getThing(x) if ret.type < 100 then doTransformItem(ret.uid, itemid, ret.type+amount) if ret.type+amount > 100 then doPlayerAddItem(cid, itemid, ret.type+amount-100) end break else _G = _G+1 end end if _G == #item then doPlayerAddItem(cid, itemid, amount) end else return doPlayerAddItem(cid, itemid, amount) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) return doPlayerDepositMoney(cid, deposit) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end end end ]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "LootEventKIll") if isPremium(cid) and getPlayerStorageValue(cid, 27001) <= 0 then setPlayerStorageValue(cid, 27001, 1) elseif getPlayerStorageValue(cid, 27001) > 0 and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!") setPlayerStorageValue(cid, 27001, -1) setPlayerStorageValue(cid, info.Storages[1], -1) end return true end]]></event> <event type="kill" name="LootEventKIll" event="script"><![CDATA[ domodlib('Loot_func') function onKill(cid, target, lastHit) if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[3]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then addEvent(corpseRetireItems, 0, cid ,getThingPos(target)) end return true end]]></event> <talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free if not param or param == "" then ShowItemsTabble(cid) return true elseif tonumber(param) then doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true elseif isInArray({"clean","limpar", "clear"}, param) then setPlayerStorageValue(cid, info.Storages[1], -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true elseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true elseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true end local item = getItemIdByName(param, false) if not item then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "This item does not exist.") return true end local var = isInTable(cid, item) if isInArray({2148,2152,2160},item) then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "You can not add this item in the list!") return true elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "max "..slots.." from auto loot") return true end if not var then addItemTable(cid, item) else removeItemTable(cid, item) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list") return true]]></talkaction> </mod>

Lebrando, n testei haha

Deu Certo. Valeu :)

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

Link para o post
Compartilhar em outros sites

@tetheuscunha

 

eu fiz uma versão por account + item e outra versão por talk, era só procurar nesta mesmo seção!

 

obrigado ao @Sekk pela ajuda

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

Link para o post
Compartilhar em outros sites
1 hora atrás, tetheuscunha disse:

@Vodkart Eu usava um seu, só que não tinha limites de itens.

 

sim eu fiz um update nele, ai coloquei limite de itens para evitar bugs, já que no caso uso só uma storage, se usasse mais, poderia fazer até 8 itens por storages '-'

vodkart_logo.png

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

 

DISCORDvodkart#6090

 

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 luanluciano93
      Olá pessoal, estou desenvolvendo esse sistema vip para TFS 1.x, se precisarem de alguma função nova é só comentar, criei para usar em um servidor meu e resolvi postar, bom proveito a todos.
       
      É só ir no arquivo data/lib/core/player.lua e adicionar esse código no começo do script:
      -- ALTER TABLE `accounts` ADD `vip_time` BIGINT(20) NOT NULL DEFAULT 0; -- player:getVipTime() function Player.getVipTime(self) local resultId = db.storeQuery("SELECT `vip_time` FROM `accounts` WHERE `id` = '".. self:getAccountId() .."';") local time = resultId ~= false and result.getNumber(resultId, "vip_time") or 0 result.free(resultId) return time end -- player:isVip() function Player.isVip(self) return self:getVipTime() > os.time() and true or false end -- player:addVipDays(days) function Player.addVipDays(self, days) return(self:isVip() and tonumber((days * 86400))) and db.query("UPDATE `accounts` SET `vip_time` = '".. (self:getVipTime() + (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") or db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() + (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:removeVipDays(days) function Player.removeVipDays(self, days) return(self:isVip() and tonumber((days * 86400))) and db.query("UPDATE `accounts` SET `vip_time` = '".. (self:getVipTime() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") or db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:setVipDays(days) function Player.setVipDays(self, days) return db.query("UPDATE `accounts` SET `vip_time` = '".. (os.time() - (days * 86400)) .."' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:removeVip() function Player.removeVip(self) db.query("UPDATE `accounts` SET `vip_time` = '0' WHERE `id` ='".. self:getAccountId() .."' LIMIT 1 ;") end -- player:sendVipDaysMessage() function Player.sendVipDaysMessage(self) if self:isVip() then local vipTime = self:getVipTime() - os.time() local vipDays = 1 + (math.floor(vipTime / 86400)) return self:getVipTime() ~= false and self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'You have '.. vipDays .. ' vip day(s) in your account.') end end -- player:checkVipLogin() function Player.checkVipLogin(self) if self:getVipTime() > 0 and not self:isVip() then return self:removeVip() and self:teleportTo(self:getTown():getTemplePosition()) end end  
       
      As funções são:
      • player:getVipTime() - Retorna o valor da tabela vip_time (igual esta na database).
      • player:isVip() - Retorna se o player é vip ou não.
      • player:addVipDays(days) - Usa-se em algum script para para adicionar dias de vip ao player (parâmetro de entrada "days").
      • player:removeVipDays(days) - Usa-se em algum script para para remover dias de vip do player (parâmetro de entrada "days").
      • player:setVipDays(days) - Usa-se em algum script para para mudar os dias de vip do player (parâmetro de entrada "days").
      • player:removeVip() - Usa-se em algum script para para remover todo tempo de vip do player.
      • player:sendVipDaysMessage() - Retorna uma mensagem no player mostrando os dias de vip que ainda restam ao player.
      • player:checkVipLogin() - Checa se a vip do player acabou, se sim teleporta ele para o templo.
       

      Qualquer dúvida ou erro/bug poste aqui.
    • Por Killua
      Como funciona?
      A cada monstro que vc mata, seus itens equipados ganham 1 de exp. Quando seus itens chegarem às quantidades de exp definidas, eles upam e ficam com o nome assim: Demon Helmet + 1. Helmets, armors, legs, e boots recebem 1 de arm a cada vez que upam. Armas recebem 1 de ataque e escudos 1 de defesa.
       
      Para o monstro contar, ele deve dar um mínimo de exp (definido no script). O número de exp a que me refiro é aquele um presente no arquivo .xml.
       
      Para instalar, crie Killua Items Upgrade.lua em data/creaturescripts/scripts e coloque:
        Em data/creaturescripts/creaturescripts.xml coloque essas duas tags:
      <event type="kill" name="Item level" event="script" value="Killua Items Upgrade.lua"/> <event type="login" name="Item levell" event="script" value="Killua Items Upgrade.lua"/> Configurando: Na tabela table_of_slots, coloque em quais slots os itens upam.
      min_exp é a experiência mínima que o monstro deve ter para contar exp para o item. Se vc colocar 500, somente os monstros que tem exp igual ou superior a 500 no arquivo.xml vão valer.
      exp_levels são os valores de exp que os itens devem atingir para upar. No meu caso, quando o item alcançar 50 de exp, ele upa para o level 1. Quando alcançar 50 de exp, upa para o level 2 e assim por diante.
    • Por Sekk
      Bom, procurei esse Castle por MUITO TEMPO, mas não achei em NENHUM LUGAR DA INTERNET. Ontem, eu estava vendo alguns mapas do @Deathrocks, e vi nos prints, que o mapa possuia o evento que eu queria!
       
      Então baixei o mapa e extrai o evento, então venho lhes trazer!
       
       
      Nome: Castle 24H
      Cliente: 8.6
      Versão TFS: 0.4
      Tipo: Evento
       
      Bom, para começar, vamos em actions/scripts e crie 2 arquivos:
       
      castledoor1.lua
       
      castlewar1.lua
       
        Agora em actions.xml adicione as tags:
       
      Agora em monster/traps crie 3 arquivos:
       
      porta.xml
       
      protectcastle.xml  
      statue.xml  
      Agora em monsters.xml adicione as tags:    
      Vamos para movements/scripts e crie 2 arquivos:
       
      castlewar2.lua
       
      level.lua  
      Agora em movements.xml adicione as tags:  
       
      Pronto. Agora você só precisa baixar o mapa, inserir o mesmo ao seu servidor, configurar os teleports, e as hunts dentro do castle etc.
       
      PRINTS:
      1ª parte
       
      2ª parte:
       
      Obs.: Todos os ActionID e monsters já estão no mapa! Você só precisa configurar as coordenadas dos teleports, e o que possui no castle!
       
      Obs².: Tudo o que você pode configurar, já está escrito em cada script!
       
       
      Créditos:
      @DeathRocks
      PC98
      mapa.rar
    • Por gpedro
      Testado: MySQL & SQLite
      Distro: TFS 0.4_SVN & TFS 0.3.6

      MySQL

      ALTER TABLE `players` ADD `resets` INT(11) NOT NULL DEFAULT "0"; SQLite ALTER TABLE players ADD resets INTEGER not null default 0 Adicionando nas sources player.h procure por: uint32_t level; logo abaixo, adicione: uint32_t resets; iologindata.cpp procure por query << "SELECT `id`, `account_id`, `group_id`, `world_id`, `sex`, `vocation`, `experience`, `level`," substitua por: query << "SELECT `id`, `account_id`, `group_id`, `world_id`, `sex`, `vocation`, `experience`, `level`, `resets`, " procure por player->level = std::max((uint32_t)1, (uint32_t)result->getDataInt("level")); logo abaixo adicione: player->resets = (uint32_t)result->getDataInt("resets"); procure por query << "`maglevel` = " << player->magLevel << ", "; logo abaixo adicione: query << "`resets` = " << player->resets << ", "; players.cpp procure por: s << " (Level " << level << ")"; substitua por: s << " (Level " << level << ") [Reset " << resets << "]"; players.h procure por: void setPromotionLevel(uint32_t pLevel); logo abaixo adicione: uint32_t getResets() { return resets;} void setResets(int32_t amount) { resets += amount; if (resets < 0) {resets = 0;} } luascript.cpp para 0.3.6 static int32_t luaDoPlayerSetIdleTime(lua_State* L); logo abaixo adicione: static int32_t luaGetResets(lua_State* L); static int32_t luaSetResets(lua_State* L); talkactions.xml <talkaction words="!rank;/rank" event="script" value="ranks.lua"/> <talkaction words="!reset;/reset" script="reset.lua"/> ranks.lua
      Créditos: Dark Skyllen, Marcryzius, Mock, Kydrai, Cykotitan, gpedro*.
      * adaptação para 0.4
    • Por VitorSubhi
      Apresentação: Olá galera do Tibia King, este é meu primeiro tutorial que desenvolvo após anos apenas sugando da comunidade, chegou a hora de compartilhar um pouco de conhecimento, rsrs...
      Após ver que muitos usuários tinham interesse em um sistema de Trade de Points in-game resolvi trazer um sistema totalmente completo para vocês.
       
      Funcionamento:
      Player 1 após adquirir os Points, pode iniciar uma negociação com o Player 2 através do comando /tradepoints Player 2, Quantidade. Será aberto uma Janela de Trade com o item referente aos Points. Após ambos aceitarem a negociação será realizado a troca de Points pelo item requisitado.
      Observações:
      Necessário ter acesso às Sources de sua Distro. Testado em servidor 8.6 (The Forgotten Server 0.4). Antes que venham falar que possui sistemas parecidos, veja o diferencial (Item não aparece em nenhum inventário, e não é necessário usar/comprar qualquer item).  
      Algumas Imagens:
       
      Instalação:
      Sources > Luascript.cpp Sources > Luascript.cpp Sources > Luascript.h  
       
      Server > Data > Lib > 050-function Server > Data > Creaturescripts > Scripts >Trade_Orbs.lua Server > Data > Creaturescripts > Creaturescripts.xml Server > Data > Creaturescripts > Scripts > Login.lua Server > Data > Talkactions > Scripts > Points_Trade.lua Server > Data > Talkactions > Talkactions.xml Créditos:
      Todo o sistema foi feito completamente por mim: Vítor Subhi.
      The Forgotten Server (Pelas Sources)
      Vodkart, White Wolf, Natanael Beckman, e a todos os demais membros do TK que não lembro o nome, que contribuíram indiretamente através de seus tutoriais.
       
       
       
       
       

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo