Ir para conteúdo
  • Cadastre-se

Mod TFS 0.X [OTX] New Auto Loot Unlimited Edition 2.0


Posts Recomendados

Em 08/10/2020 em 21:23, Vodkart disse:

 [ + ] Descrição: Autoloot refeito para VERSÃO OTX e adicionado algumas outras funções que estarei explicando ao decorrer do tópico.

 

[ + ] Se você quer o Autoloot ara Versão TFS clica neste LinkAUTOLOOT TFS

 

kI7fIUt.jpg

 

 

[ + ] Imagem do comando:

 

YoOtOgb.jpg

 

[ + ] Features:

 

[ - ] Você pode ativar ou desativar o autoloot a hora que achar necessário.

[ - ] Também existe um comando para ativar ou desativar mensagens do loot que o autoloot coleta!

[ - ] Você pode escolher a cor do texto em que irá aparecer a coleta do loot!

[ - ] O autoloot informará para você se estiver com pouco slots na sua backpack, e o jogador poderá escolher se quer habilitar ou não está função no autloot.

[ - ] Versão ilimitada de itens(não ficam armazenadas em storages.

[ - ] O jogador poderá optar por depositar direto no banco os golds que forem dropados.

 

[ + ] Instalação:

 

Primeiramente CRIE uma PASTA VAZIA chamanda "autoloot" em DATA/LOGS, ficando assim:

 

FqlVkAf.jpg

 

Depois instale o MODS normalmente na pasta MODS do seu servidor.

 

TeFzEjO.jpg

 

new_perfect_autoloot_otx.xml

 

Link: https://pastebin.com/raw/CW6jgerg

 

 

 [ + ] Configuração:

 

Dentro do mods tem essa tabela


info = {
	directory = "data/logs/autoloot", -- não mexer
	Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador
	Talkaction_delay = 5, -- em segundos // delay para remover e adicionar item
	BlockMonsters = {}, -- Lista de monstros que o autoloot nao vai funcionar 
	BlockItemsList = {2123,2515}, -- Lista de itens que o autoloot nao coleta
	Money_ids = {2148, 2152, 2160}, -- id das moedas do ot
	Max_Slots = {free = 3, premium = 5}, -- quantidade de itens que podem ser adicionados no autoloot por free e premium
	Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807} -- não mexer
}

 

Basta ler acima para esclarecer as dúvidas!!

 

Estarei anexando o autoloot 2.0 versão atualizada para quem tiver preguiça de copiar e colar!!

 

 

 

new_perfect_autoloot_otx.xml 14 kB · 61 downloads

@Vodkartprevisão de atualização desse sistema?

Link para o post
Compartilhar em outros sites
Agora, Vodkart disse:

Mas pq? não está funcionando?

Funciona, mas no meu OTX pro exemplo da erro (esporádico) ao usar talkaction de adicionar item. Esse sistema de consultar arquivo TXT também poderia ser migrado pra database, não?

Link para o post
Compartilhar em outros sites
1 minuto atrás, Bruno Rezende disse:

Funciona, mas no meu OTX pro exemplo da erro (esporádico) ao usar talkaction de adicionar item. Esse sistema de consultar arquivo TXT também poderia ser migrado pra database, não?

daria sim, inclusive já fiz um sistema test de autoloot por db... Mas qual é o erro esporádico?

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
Agora, Vodkart disse:

daria sim, inclusive já fiz um sistema test de autoloot por db... Mas qual é o erro esporádico?

[Error - TalkAction Interface] 
2022-01-30 15:27:54 -  local cid = 268570304
2022-01-30 15:27:54 -  local words = "!autoloot"
2022-01-30 15:27:54 -  local param = "wand of inferno"
2022-01-30 15:27:54 -  local channel = 65534
2022-01-30 15:27:54 -  domodlib('Loot_func')
2022-01-30 15:27:54 -  if isVIP(cid) == false then
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.")
2022-01-30 15:27:54 -      return true
2022-01-30 15:27:54 -  end
2022-01-30 15:27:54 -  local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free
2022-01-30 15:27:54 -  if not param or param == "" then
2022-01-30 15:27:54 -      ShowItemsTabble(cid) return true
2022-01-30 15:27:54 -  elseif tonumber(param) then
2022-01-30 15:27:54 -      doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true
2022-01-30 15:27:54 -  elseif isInArray({"clean","limpar", "clear"}, param) then
2022-01-30 15:27:54 -      if existsAutoloot(cid) then doCleanAutoloot(cid) end
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true
2022-01-30 15:27:54 -  elseif isInArray({"start","stop","on","off"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true
2022-01-30 15:27:54 -  elseif isInArray({"warn","aviso"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true
2022-01-30 15:27:54 -  elseif isInArray({"mensagem","message","mensagen","msg"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true
2022-01-30 15:27:54 -  elseif isInArray({"cor","color","type"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") return true
2022-01-30 15:27:54 -  elseif isInArray({"money","gold","gps","dinheiro"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
2022-01-30 15:27:54 -  elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then
2022-01-30 15:27:54 -      setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0)
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true
2022-01-30 15:27:54 -  end
2022-01-30 15:27:54 -  local item = ExistItemByName(tostring(param))
2022-01-30 15:27:54 -  if not item then
2022-01-30 15:27:54 -      doPlayerSendCancel(cid, "This item does not exist.") return true
2022-01-30 15:27:54 -  end
2022-01-30 15:27:54 -  local item = getItemIdByName(tostring(param))
2022-01-30 15:27:54 -  local var = isInTable(cid, item)
2022-01-30 15:27:54 -  if isInArray(info.Money_ids, item) then
2022-01-30 15:27:54 -      doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true   
2022-01-30 15:27:54 -  elseif isInArray(info.BlockItemsList, item) then
2022-01-30 15:27:54 -      doPlayerSendCancel(cid, "You can not add this item in the list!") return true
2022-01-30 15:27:54 -  elseif not var and #getItensFromAutoloot(cid) >= slots then
2022-01-30 15:27:54 -      doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true
2022-01-30 15:27:54 -  elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then
2022-01-30 15:27:54 -          doPlayerSendCancel(cid, "wait a second to use this command again") return true
2022-01-30 15:27:54 -  end
2022-01-30 15:27:54 -  if not var then
2022-01-30 15:27:54 -      doAddItemFromAutoloot(cid, item)
2022-01-30 15:27:54 -  else
2022-01-30 15:27:54 -      doremoveItemFromAutoloot(cid, item)
2022-01-30 15:27:54 -  end
2022-01-30 15:27:54 -  setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay)
2022-01-30 15:27:54 -  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, please wait 5 seconds to save the directory.")
2022-01-30 15:27:54 -  return true
2022-01-30 15:27:54 -  Description: 
2022-01-30 15:27:54 -  [string "info = {..."]:60: attempt to index local 'file' (a nil value)
2022-01-30 15:28:26 -  
2022-01-30 15:28:26 -  [Error - TalkAction Interface] 
2022-01-30 15:28:26 -  local cid = 268570304
2022-01-30 15:28:26 -  local words = "!autoloot"
2022-01-30 15:28:26 -  local param = "wand of inferno"
2022-01-30 15:28:26 -  local channel = 65534
2022-01-30 15:28:26 -  domodlib('Loot_func')
2022-01-30 15:28:26 -  if isVIP(cid) == false then
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.")
2022-01-30 15:28:26 -      return true
2022-01-30 15:28:26 -  end
2022-01-30 15:28:26 -  local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free
2022-01-30 15:28:26 -  if not param or param == "" then
2022-01-30 15:28:26 -      ShowItemsTabble(cid) return true
2022-01-30 15:28:26 -  elseif tonumber(param) then
2022-01-30 15:28:26 -      doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true
2022-01-30 15:28:26 -  elseif isInArray({"clean","limpar", "clear"}, param) then
2022-01-30 15:28:26 -      if existsAutoloot(cid) then doCleanAutoloot(cid) end
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true
2022-01-30 15:28:26 -  elseif isInArray({"start","stop","on","off"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true
2022-01-30 15:28:26 -  elseif isInArray({"warn","aviso"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true
2022-01-30 15:28:26 -  elseif isInArray({"mensagem","message","mensagen","msg"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true
2022-01-30 15:28:26 -  elseif isInArray({"cor","color","type"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") return true
2022-01-30 15:28:26 -  elseif isInArray({"money","gold","gps","dinheiro"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
2022-01-30 15:28:26 -  elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then
2022-01-30 15:28:26 -      setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0)
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true
2022-01-30 15:28:26 -  end
2022-01-30 15:28:26 -  local item = ExistItemByName(tostring(param))
2022-01-30 15:28:26 -  if not item then
2022-01-30 15:28:26 -      doPlayerSendCancel(cid, "This item does not exist.") return true
2022-01-30 15:28:26 -  end
2022-01-30 15:28:26 -  local item = getItemIdByName(tostring(param))
2022-01-30 15:28:26 -  local var = isInTable(cid, item)
2022-01-30 15:28:26 -  if isInArray(info.Money_ids, item) then
2022-01-30 15:28:26 -      doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true   
2022-01-30 15:28:26 -  elseif isInArray(info.BlockItemsList, item) then
2022-01-30 15:28:26 -      doPlayerSendCancel(cid, "You can not add this item in the list!") return true
2022-01-30 15:28:26 -  elseif not var and #getItensFromAutoloot(cid) >= slots then
2022-01-30 15:28:26 -      doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true
2022-01-30 15:28:26 -  elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then
2022-01-30 15:28:26 -          doPlayerSendCancel(cid, "wait a second to use this command again") return true
2022-01-30 15:28:26 -  end
2022-01-30 15:28:26 -  if not var then
2022-01-30 15:28:26 -      doAddItemFromAutoloot(cid, item)
2022-01-30 15:28:26 -  else
2022-01-30 15:28:26 -      doremoveItemFromAutoloot(cid, item)
2022-01-30 15:28:26 -  end
2022-01-30 15:28:26 -  setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay)
2022-01-30 15:28:26 -  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, please wait 5 seconds to save the directory.")
2022-01-30 15:28:26 -  return true
2022-01-30 15:28:26 -  Description: 
2022-01-30 15:28:26 -  [string "info = {..."]:60: attempt to index local 'file' (a nil value)

Meu mod de autoloot atual @Vodkart

 

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Perfect Auto Loot" version="2.0" author="Vodkart" contact="none.com" enabled="yes">
<config name="Loot_func"><![CDATA[

info = {
    directory = "data/logs/autoloot",
    Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador
    Talkaction_delay = 1, -- em segundos // delay para remover e adicionar item
    BlockMonsters = {},
    BlockItemsList = {2148,2152},
    Money_ids = {2160}, -- id das moedas do ot
    Max_Slots = {free = 20, premium = 20},
    Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807}
}

Color_Loot = {
           [0] = {MESSAGE_EVENT_ORANGE, "Orange"},
           [1] = {MESSAGE_STATUS_CONSOLE_BLUE, "Blue"},
           [2] = {MESSAGE_INFO_DESCR, "Green"},
           [3] = {MESSAGE_STATUS_CONSOLE_RED, "Red"},
           [4] = {MESSAGE_STATUS_SMALL, "White"}
}
function getPlayerColorLootMessage(cid)
    return getPlayerStorageValue(cid, info.Storages[5]) <= 0 and 0 or getPlayerStorageValue(cid, info.Storages[5])
end
function isInTable(cid, item)
    for _,i in pairs(getItensFromAutoloot(cid)) do
        if tonumber(i) == tonumber(item) then
            return true
        end
    end
   -- return false
end
function doremoveItemFromAutoloot(cid, itemid)
    local file, fileContent = io.open(info.directory.."/"..getCreatureName(cid)..".txt", 'r'),{}
    for line in file:lines() do
     if line ~= "" and tonumber(line) ~= tonumber(itemid) then
             fileContent[#fileContent + 1] = line
        end
    end
    io.close(file)
    file = io.open(info.directory.."/"..getCreatureName(cid)..".txt", 'w')
    for index, value in ipairs(fileContent) do
    file:write(value..'\n')
    end
    io.close(file)
end

function existsAutoloot(cid)
  local f = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "rb")
  if f then f:close() end
  return f ~= nil
end
function doCreateLootUserName(cid, itemid)
    newFile = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "w+" )
    newFile:write(itemid)
    newFile:close()
end
function doAddItemFromAutoloot(cid, itemid)
         if not existsAutoloot(cid) then
            doCreateLootUserName(cid, itemid) return true
         end
         local file = io.open(info.directory.."/"..getCreatureName(cid)..".txt", "a+")                           
         file:write('\n'..itemid)
         file:close()
end
function getItensFromAutoloot(cid)
  if not existsAutoloot(cid) then return {} end
  lines = {}
  for line in io.lines(info.directory.."/"..getCreatureName(cid)..".txt") do
      if line ~= "" then
              lines[#lines + 1] = tonumber(line)
      end
  end
  return lines
end
function doCleanAutoloot(cid)
return os.remove(info.directory.."/"..getCreatureName(cid)..".txt")
end
function ShowItemsTabble(cid)
    local auto_list = getItensFromAutoloot(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!autoloot message --> To enable or disable message from Collect items.\n!autoloot color --> To change Color message in Auto Loot Collect.\n!autoloot warn --> To enable or disable message warning of "..info.Warn_Bp_Slots.." or less slots in the backpack.\n!autoloot deposit --> To enable or disable automatic money deposit at the bank.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[1]) <= 0 and "Activated" or "Disabled")..".\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nMessage: "..(getPlayerStorageValue(cid, info.Storages[6]) <= 0 and "Activated" or "Disabled")..".\nColor Message: "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".\nWarn Backpack: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nAutomatic Gold Deposit: "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "Disabled")..".\nTotal Bank Balance: ["..getPlayerBalance(cid).."]\nMaximum Slots: ["..#auto_list.."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n"
    if #auto_list > 0 then
        for i = 1, #auto_list do
            n = n + 1
            str = str.."Slot "..n.." - "..getItemNameById(auto_list[i]).."\n"
        end
    end
    doShowTextDialog(cid, 1961, str)
end
function getContainerItems(container, array, haveCap)
    array = array or {}
    haveCap = haveCap or false
    if not isContainer(container.uid) or getContainerSize(container.uid) == 0 then
        array[#array +1] = container
    else
        local size = getContainerSize(container.uid)
        haveCap = (getContainerCap(container.uid) -size) > 0
        for slot = 0, (size -1) do
            local item = getContainerItem(container.uid, slot)
            if item.itemid > 1 then
                getContainerItems(item, array, haveCap)
            end
        end
    end
    return #array >= 1 and array, haveCap
end
function getContainerItemsById(container, itemid)
    local founds = {}
    local items = not container.uid and container or getContainerItems(container)
    for index, item in pairs(items) do
        if item.itemid == itemid then
            founds[#founds +1] = item
        end
    end
    return #founds >= 1 and founds
end
function AutomaticDeposit(cid, item, n)
    if isInArray(info.Money_ids, item) and getPlayerStorageValue(cid, info.Storages[4]) > 0 then
        local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n)
        doPlayerDepositMoney(cid, deposit)
    end
    return true
end
function getAllContainerFree(cid) -- by vodka
    local containers,soma = {},0
    for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do
        local sitem = getPlayerSlotItem(cid, i)
        if sitem.uid > 0 then
            if isContainer(sitem.uid) then
                table.insert(containers, sitem.uid)
        soma = soma + getContainerSlotsFree(sitem.uid)
            end
        end
    end
    while #containers > 0 do
        for k = (getContainerSize(containers[1]) - 1), 0, -1 do
            local tmp = getContainerItem(containers[1], k)
            if isContainer(tmp.uid) then
                table.insert(containers, tmp.uid)
                soma = soma + getContainerSlotsFree(tmp.uid)
            end
        end
        table.remove(containers, 1)
    end
    return soma
end
function getContainerSlotsFree(container) -- by vodka
         return getContainerCap(container)-getContainerSize(container)
end
function doPlayerAddItemStackable(cid, itemid, count)
    local container = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK)
    if container.itemid > 1 then
        local items = getContainerItemsById(container, itemid)
        if not items then
            return doPlayerAddItem(cid, itemid, count)
        else
            local piles = #items
            for index, item in pairs(items) do
                if item.type < 100 then
                    local sum = item.type + count
                    local result = doTransformItem(item.uid, itemid, sum)
                    if sum <= 100 then
                        return result
                    else
                        return doPlayerAddItem(cid, itemid, sum - 100)
                    end
                else
                    piles = piles - 1
                    if piles == 0 then
                        return doPlayerAddItem(cid, itemid, count)
                    end
                end
            end
        end
    end
    return false
end
function corpseRetireItems(cid, pos)
    local check, slots = false, 0
    for i = 0, 255 do
        pos.stackpos = i
        if getThingFromPos(pos).uid > 0 and isContainer(getThingFromPos(pos).uid) then
            corpse = getThingFromPos(pos)
            check = true
            break
        end
    end
    if check == true then
        local str, id_list = "", getItensFromAutoloot(cid)
        for _, item in pairs(getContainerItems(corpse)) do
            local id = item.itemid
            if #id_list > 0 and isInArray(id_list, id) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray(info.Money_ids, id) then
                local amount = isItemStackable(id) and item.type or 1
                local total_cap = getItemWeightById(id, amount)
                slots = getAllContainerFree(cid)
                if slots > 0 and getPlayerFreeCap(cid) >= total_cap then
                    str = str.." " .. getItemInfoLoot(id, amount)
                    if isItemStackable(id) then
                        doPlayerAddItemStackable(cid, id, amount)
                        AutomaticDeposit(cid, id, amount)
                    else
                        doPlayerAddItem(cid, id, getItemInfo(id).charges or 1)
                    end
                    doRemoveItem(item.uid)   
                end
            end
        end
        if str ~= "" and getPlayerStorageValue(cid, info.Storages[6]) <= 0 then
            doPlayerSendTextMessage(cid, Color_Loot[getPlayerColorLootMessage(cid)][1],"[Auto Loot Collect]:"..string.sub(str, 1, -1)..".")
        end
        if getPlayerStorageValue(cid, info.Storages[3]) <= 0 and slots > 0 and slots <= info.Warn_Bp_Slots then
            doPlayerSendTextMessage(cid,18, "[Auto Loot Warn] You only have "..slots.." slots free in your backpack!")
        end
    end
end
function ExistItemByName(name) -- by vodka
    local items = io.open("data/items/items.xml", "r"):read("*all")
    local get = items:lower():match('name="' .. name:lower() ..'"')
    if get == nil or get == "" then
        return false
    end
return true
end
function getItemInfoLoot(id, amount)
    local info = getItemInfo(id)
    return isItemStackable(id) and amount.." "..(amount > 1 and info.plural or info.name).."," or info.article.." " .. info.name ..","
end
]]></config>
<event type="login" name="LootLogin" event="script"><![CDATA[
domodlib('Loot_func')
function onLogin(cid)
    registerCreatureEvent(cid, "LootEventKIll")
    if isPremium(cid) and getPlayerStorageValue(cid, 853608) <= 0 then
        setPlayerStorageValue(cid, 853608, 1)
    elseif getPlayerStorageValue(cid, 853608) > 0 and not isPremium(cid) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!")
        setPlayerStorageValue(cid, 853608, -1)
        doCleanAutoloot(cid)
    end
    return true
end]]></event>
<event type="kill" name="LootEventKIll" event="script"><![CDATA[
domodlib('Loot_func')
function onKill(cid, target, lastHit)
 if isVIP(cid) == false then
        return true
    end
    if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[1]) <= 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')
if isVIP(cid) == false then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Only VIP players can use auto loot.")
    return true
end
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
    if existsAutoloot(cid) then doCleanAutoloot(cid) end
    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[1], getPlayerStorageValue(cid, info.Storages[1]) <= 0 and 1 or 0)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot "..(getPlayerStorageValue(cid, info.Storages[1]) > 0 and "Stopped" or "Started")..".") return true
elseif isInArray({"warn","aviso"}, 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 Backpack Warn "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "disabled" or "Activated")..".") return true
elseif isInArray({"mensagem","message","mensagen","msg"}, param) then
    setPlayerStorageValue(cid, info.Storages[6], getPlayerStorageValue(cid, info.Storages[6]) <= 0 and 1 or 0)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message "..(getPlayerStorageValue(cid, info.Storages[6]) > 0 and "disabled" or "Activated")..".") return true
elseif isInArray({"cor","color","type"}, param) then
    setPlayerStorageValue(cid, info.Storages[5], getPlayerColorLootMessage(cid) == #Color_Loot and 0 or getPlayerColorLootMessage(cid)+1)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Auto Loot Message Color Changed to "..Color_Loot[getPlayerColorLootMessage(cid)][2]..".") 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 Colleting only Crystal Coin is "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
elseif isInArray({"deposito","bank","gbank","deposit","autodeposit"}, param) then
    setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Gold Bank "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true
end
local item = ExistItemByName(tostring(param))
if not item then
    doPlayerSendCancel(cid, "This item does not exist.") return true
end
local item = getItemIdByName(tostring(param))
local var = isInTable(cid, item)
if isInArray(info.Money_ids, item) then
    doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true   
elseif isInArray(info.BlockItemsList, item) then
    doPlayerSendCancel(cid, "You can not add this item in the list!") return true
elseif not var and #getItensFromAutoloot(cid) >= slots then
    doPlayerSendCancel(cid, "You have reached the maximum number of "..slots.." slots from auto loot.") return true
elseif getPlayerStorageValue(cid, info.Storages[7]) - os.time() > 0 then
        doPlayerSendCancel(cid, "wait a second to use this command again") return true
end
if not var then
    doAddItemFromAutoloot(cid, item)
else
    doremoveItemFromAutoloot(cid, item)
end
setPlayerStorageValue(cid, info.Storages[7], os.time()+info.Talkaction_delay)
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, please wait 5 seconds to save the directory.")
return true]]></talkaction>
</mod>

 

Link para o post
Compartilhar em outros sites
1 minuto atrás, Vodkart disse:

@Bruno Rezende Esse erro diz que não está achando o diretório, você criou a pasta e tudo?

Sim, inclusive funciona. Como eu falei, acontece esporadicamente.

Link para o post
Compartilhar em outros sites
1 minuto atrás, Bruno Rezende disse:

Sim, inclusive funciona. Como eu falei, acontece esporadicamente.

então vou adicionar a versão por db no tópico e te aviso!

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 month later...
  • 2 months later...
46 minutos atrás, joaogomess disse:

usando no tfs 1.3 nao esta funcionando fiz tudo passo a passo nao acusa nada porem no jogo nao tem o comando

 

nem funcionará joao, é pra OTX numa engine antiga, teste esse:

 

https://tibiaking.com/forums/topic/96933-auto-loot-sytem-for-tfs-13-revscripts/

Link para o post
Compartilhar em outros sites
17 minutos atrás, Bruno Rezende disse:

nem funcionará joao, é pra OTX numa engine antiga, teste esse:

 

https://tibiaking.com/forums/topic/96933-auto-loot-sytem-for-tfs-13-revscripts/

blz man vou tentar, to com o map que era do epic ai to querendo colocar uns eventos novos to o dia todo tentando e nenhum roda. tem os 2 tfs 1.0 e o 1.3 mas tudo sem sucesso. kk vou tentar esse valeu

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
Em 08/10/2020 em 21:23, Vodkart disse:

 [ + ] Descrição: Autoloot refeito para VERSÃO OTX e adicionado algumas outras funções que estarei explicando ao decorrer do tópico.

 

[ + ] Se você quer o Autoloot ara Versão TFS clica neste LinkAUTOLOOT TFS

 

kI7fIUt.jpg

 

 

[ + ] Imagem do comando:

 

YoOtOgb.jpg

 

[ + ] Features:

 

[ - ] Você pode ativar ou desativar o autoloot a hora que achar necessário.

[ - ] Também existe um comando para ativar ou desativar mensagens do loot que o autoloot coleta!

[ - ] Você pode escolher a cor do texto em que irá aparecer a coleta do loot!

[ - ] O autoloot informará para você se estiver com pouco slots na sua backpack, e o jogador poderá escolher se quer habilitar ou não está função no autloot.

[ - ] Versão ilimitada de itens(não ficam armazenadas em storages.

[ - ] O jogador poderá optar por depositar direto no banco os golds que forem dropados.

 

[ + ] Instalação:

 

Primeiramente CRIE uma PASTA VAZIA chamanda "autoloot" em DATA/LOGS, ficando assim:

 

FqlVkAf.jpg

 

Depois instale o MODS normalmente na pasta MODS do seu servidor.

 

TeFzEjO.jpg

 

new_perfect_autoloot_otx.xml

 

Link: https://pastebin.com/raw/CW6jgerg

 

 

 [ + ] Configuração:

 

Dentro do mods tem essa tabela


info = {
	directory = "data/logs/autoloot", -- não mexer
	Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador
	Talkaction_delay = 5, -- em segundos // delay para remover e adicionar item
	BlockMonsters = {}, -- Lista de monstros que o autoloot nao vai funcionar 
	BlockItemsList = {2123,2515}, -- Lista de itens que o autoloot nao coleta
	Money_ids = {2148, 2152, 2160}, -- id das moedas do ot
	Max_Slots = {free = 3, premium = 5}, -- quantidade de itens que podem ser adicionados no autoloot por free e premium
	Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807} -- não mexer
}

 

Basta ler acima para esclarecer as dúvidas!!

 

Estarei anexando o autoloot 2.0 versão atualizada para quem tiver preguiça de copiar e colar!!

 

 

 

new_perfect_autoloot_otx.xml 14 kB · 88 downloads

Eai @Vodkart ! Uso este seu MOD desde quando iniciei meu server, e de uma semana pra ca começaram uns lags sinistros, e pesquisei na internet algumas possibilidades, e por alguma razão, umas delas era tirar o autoloot por MODS, entao quando desativei parou instantaneamente o lag... Mas nao ocorria isso antes, sabe me dizer o que pode estar acontecendo? Ja zerei os storages, ja adicionei alguns items que eu pensei poderem estar bugados, já apaguei todos os logs... Sinceramente nao sei o que pode ser, me da uma luz? Uso o OTX2

Link para o post
Compartilhar em outros sites
  • 1 year 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

×   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 willian646
      Olá a todos, é a minha primeira vez aqui, e não sei se já possui algum tutorial disso ou se estou na área correta, mas vou mostrar aqui como fazer com que o chat no jogo suma quando não tiver nenhuma mensagem e quando tiver ,enviar, é bem simples.
       
      Primeiro vá na pasta do seu client>modules>game_console e abra o console.lua
       
      tendo feito isso procure por
      g_keyboard.bindKeyPress('Enter', sendCurrentMessage, consolePanel)  
      e troque por 
      g_keyboard.bindKeyPress('Enter', hideChat)  
      agora procure por essa função: 
      e troque por: 
      Pronto agora só testar.
    • Por paulo thush
      Advanced Pet System By Races
      Nome: Advanced Pet System By R.aces
      Versão: Bom eu testei no meu 8.60.
      Descrição: Bom eu procurei esse systema por muito tempo nunca achei um que funcionase perfeito, porem com muito esforço retirando de muitos servidores consegui fazer que ele funcionase com todos os script sem erro ao logar o char e nem deslogar os npc funcionando perfeitamente, Esse Pet pelo que eu saiba foi feito pelo josejunior. Como eu sempre vivi pedindo ajuda para comunidade, hoje eu resolvi trazer esse sistema para ajudar também muitos que precisa... E bom você ser ajudado e lembrar de ajudar também. Um pelo outro.
      Comandos:
       
      Pet-trainer.xml (em data/npc)
       
      Pet-trainer.lua (em npc/scripts)
       
      Va na pasta data/lib crie e nomeie para APS_lib.lua 
       
      Agora e so baixar o resto dos arquivos e jogar dentro da pasta do seu Ot principal. E ser feliz... Não dou suporte para algum tipo de erro pois não sou Scripter kk apenas um Fuçado kkk.
       
      Ah: Caso der erro quando você for logar no servidor e de erro nos arquivos do PET, Pode ter algo em conflito com ele, ou Você tera que mudar algo do seu login.lua, Qual quer coisa eu passo o meu que ta muito fuçado porem sem erro em nada kkkk. Por Enquanto...
       
      CREDITOS: josejunior
       
       
      Advanced Pet System By Races.rar
    • Por Vodkart
      [ + ] Descrição: Autoloot refeito para VERSÃO TFS e adicionado algumas outras funções que estarei explicando ao decorrer do tópico.
       
      [ + ] Se você quer o Autoloot para VERSÃO OTX clica neste Link: AUTOLOOT OTX
       
       

       
       
      [ + ] Imagem do comando:
       

       
      [ + ] Features:
       
      [ - ] Você pode ativar ou desativar o autoloot a hora que achar necessário.
      [ - ] Também existe um comando para ativar ou desativar mensagens do loot que o autoloot coleta!
      [ - ] Você pode escolher a cor do texto em que irá aparecer a coleta do loot!
      [ - ] O autoloot informará para você se estiver com pouco slots na sua backpack, e o jogador poderá escolher se quer habilitar ou não está função no autoloot.
      [ - ] Versão ilimitada de itens(não ficam armazenadas em storages).
      [ - ] O jogador poderá optar por depositar direto no banco os golds que forem dropados.
       
      [ + ] Instalação:
       
      Primeiramente CRIE uma PASTA VAZIA chamanda "autoloot" em DATA/LOGS, ficando assim:
       

       
       
      Depois instale o MODS normalmente na pasta MODS do seu servidor.
       

       
       
      new_perfect_autoloot_tfs.xml
       
      Link: https://pastebin.com/raw/0xJR4nwr
       
       
       [ + ] Configuração:
       
      Dentro do mods tem essa tabela
      info = { distro = 1, -- 1 = TFS // 2 = talk modificada directory = "data/logs/autoloot", -- não mexer Warn_Bp_Slots = 5, -- quando tiver 5 ou menos slots na BP vai avisar o jogador Talkaction_delay = 5, -- em segundos // delay para remover e adicionar item BlockMonsters = {}, -- Lista de monstros que o autoloot nao vai funcionar BlockItemsList = {2123,2515}, -- Lista de itens que o autoloot nao coleta Money_ids = {2148, 2152, 2160}, -- id das moedas do ot Max_Slots = {free = 3, premium = 5}, -- quantidade de itens que podem ser adicionados no autoloot por free e premium Storages = {988801, 988802, 988803, 988804, 988805, 988806, 988807} -- não mexer }  
      Sobre o distro = 1
       
      Isso significa que ele usa versão padrão (1), pois existem 2 versões, caso aconteça esse error no seu console ao usar a talkaction do autoloot:
       
      [8/10/2020 19:19:58] [Error - TalkAction Interface]
      [8/10/2020 19:19:58] local words = "!autoloot"
      (...)
      [8/10/2020 19:19:59] return true
      [8/10/2020 19:19:59] Description: 
      [8/10/2020 19:19:59] (LuaInterface::luaGetItemIdByName) Item not found
       
      Você deverá colocar:
       
      distro = 2
       
      Pq? acontece que em alguns servidores não reconhecem o parâmetro "false" da função "getItemIdByName"
       
      OBS: Estarei anexando o autoloot já atualizado na versão 2.0 para quem tiver preguiça de copiar e colar!!
       
       
       
      new_perfect_autoloot_tfs.xml
    • Por xWhiteWolf
      Aeeeeeee carai, hoje vim trazer pra vocês meu mais novo sistema *-*. É uma fodenda spell que você seleciona alguém pra ser seu voodoo e a partir disso durante um tempo X ela vai receber todos os hit's que você deveria receber... INCRÍVEL, NÃO?
      Agora se nesse meio tempo ela deslogar ou entrar em pz você vai tomar o dano normal, mas se ainda tiver nesse tempo X e ela sair ela vai receber o dano instantaneamente (É BOM DEMAIS PRA SER VERDADE).

      Agora você deve estar imaginando, e se eu usar a magia pra transferir o dano pra um amigo e ele fizer a mesma coisa em mim, pra onde vai o dano?
      PRA LUGAR NENHUM!!!! Até porque eu já me previni contra esse bug fazendo com que não seja possível fazer alguém de voodoo se ele já tiver alguém de voodoo.
      Testado em versão 8.54 TFS Crying Damnson mas deve funcionar em todas as versões que tenham a função onStatsChange no creaturescripts.
      Bom, o script tá 100% funcional e livre de bugs (se vc achar algum eu te dou 3 REP).

      Agora vamos à mágica:
       
      Crie um arquivo em mods com extensão .xml e adiciona isso daqui nele
      <?xml version="1.0" encoding="UTF-8"?> <mod name="Voodoo System" version="1.0" author="Night Wolf" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="feitisso"><![CDATA[ configuration = { storage = 24567,  tempo = 20, cooldown = 45, effect1 = 13, effect2 = 65 } storagecool = 24568 ]]></config> ---------------------------------------------------------------------------------- <event type="login" name="registerVoodoo" event="script"><![CDATA[ function onLogin(cid) domodlib('feitisso') if getPlayerStorageValue(cid, configuration.storage) > 0 then doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end registerCreatureEvent(cid,"voodoo") return true end ]]></event> ------------------------------------------------------------------------------------ <instant name="Feitiço" words="voodoo" lvl="50" mana="10" prem="1" range="3" needtarget="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script"> <vocation id="5"/> <vocation id="6"/> <vocation id="7"/> <vocation id="8"/> <![CDATA[ function onCastSpell(cid, var) domodlib('feitisso') if not (isPlayer(variantToNumber(var))) then doPlayerSendCancel(cid, "You can only use this spell in players.") return false end if getPlayerStorageValue(variantToNumber(var), configuration.storage) > 0 then doPlayerSendCancel(cid, "You can't make a voodoo of someone who already has a voodoo.") return false end if (os.time() - getPlayerStorageValue(cid, storagecool)) >= configuration.cooldown then if getPlayerStorageValue(cid, configuration.storage) <= 0 then timeleft = (os.time() + configuration.cooldown) doPlayerSetStorageValue(cid, storagecool, timeleft) local target = getPlayerGUID(variantToNumber(var)) doPlayerSetStorageValue(cid, configuration.storage, target) doSendMagicEffect(getPlayerPosition(cid), configuration.effect1) doSendMagicEffect(getThingPos(variantToNumber(var)), configuration.effect1) addEvent(function()   if isCreature(cid) then doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) doPlayerSendTextMessage(cid, 22, "Your victim is not receiving your hits anymore.") doPlayerSetStorageValue(cid, configuration.storage, 0) end  end, 100+1000*configuration.tempo) elseif getPlayerStorageValue (cid, configuration.storage) > 0 then doPlayerSendCancel(cid, "You've already set a target.") end else doPlayerSendCancel(cid, "Your skill is in cooldown, you must wait "..(configuration.cooldown - (os.time() - getPlayerStorageValue(cid, storagecool))).." seconds.") end return true end ]]></instant> ------------------------------------------------------------------------------------ <event type="statschange" name="voodoo" event="script"><![CDATA[ function onStatsChange(cid, attacker, type, combat, value) domodlib('feitisso') if isPlayer(cid) and (not (attacker == cid)) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerStorageValue(cid, configuration.storage) >= 1 then local name = getPlayerNameByGUID(getPlayerStorageValue(cid, configuration.storage)) local victim = getCreatureByName(name) if isCreature(victim) and not (getTilePzInfo(getPlayerPosition(victim)))  then dano = math.ceil(value) doSendMagicEffect(getPlayerPosition(cid), configuration.effect2) if attacker == victim then doTargetCombatHealth(cid, victim, combat, -dano, -dano, configuration.effect2) else doTargetCombatHealth(attacker, victim, combat, -dano, -dano, configuration.effect2) end return false end end return true end ]]></event> ------------------------------------------------------------------------------------ </mod> aqui você edita os storages da magia e do cooldown, além do tempo que ela dura, o tempo de cooldown (um uso e outro) e os efeitos que vão sair.
      -------------------------------------------------------------------------------------------------------------
       
      aqui você edita o nome da spell, as palavras pra ela sair, level, custo de mana, se é preciso ser premium pra usar, o range dela, e as vocações que podem usá-la.

      OBS: se vc quiser que essa spell seja ganha em uma quest (por se tratar de algo bastante apelativo), é só colocar needlearn = "1" e fazer uma quest pra ganhar a spell (tem no meu Darkness Pact Quest uma quest de ganhar Spell, é só ir lá no meu perfil e procurar o tópico).

      Essa spell não serve somente pra ATS, use a criatividade pra criar uma história e fazer ela se encaixar... foque nos elementos de RPG e tcharam, está feito!.

      Façam bom uso e espero que não saiam postando em outros lugares sem os devidos créditos. Abraços do lobinho pra vcs

      PS: a foto ficou meio bosta mas vou postar mesmo assim 

       
      Eu (sorc) ataquei a zuera e tomei o dano de volta e ainda saiu esse efeitinho bonito. 

      Espero que tenham gostado e usem essa spell como base pra fazer outras coisas maravilhosas pra esse fórum   
      E não esqueça de clicar em "gostei" caso tenha curtido a idéia.

      Ahhh, e antes que eu me esqueça dos agradecimentos:
      @ViitinG por me ajudar a testar
      @CreatServer por me dar a idéia
      @MaXwEllDeN por me orientar a trocar a table pelo storage possibilitando que o script fosse possível.
    • Por MaXwEllDeN
      #Introdução
      Bem, este é um sistema no qual você pode protejer o seu locker(depot) com senha, assim evitando hackers http://forums.otserv.com.br/images/smilies/biggrin.gif.
      #Instalação
      http://1.imgland.net/3CaRNl.png
      Primeiro faça o download do sistema e cole na sua pasta data.
      Após ter instalado os arquivos nas suas respectivas pastas adicione as tags:
      @Actions
        <action itemid="2589; 2590; 2591; 2592" event="script" value="DPPass.lua"/> <!-- DP Pass --> @Creaturescripts
        <event type="login" name="LockerPass" event="script" value="DPPass.lua"/> <!-- DPPass --> @Movements
        <movevent type="StepOut" actionid="96475" event="script" value="DPPass.lua"/> <!-- DPPass --> @Talkactions
        <talkaction words="!locker" script="DPPass.lua"/> <!-- DP Pass --> Talvez eu poste uma V. 2, podendo recuperar a senha via Recovery Key!
      Abraço.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo