-
Total de Posts
37 -
Registro em
-
Última visita
Sobre Sam

Últimos Visitantes
O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.
Sam's Achievements
-
--Script By Theax "" function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,'[Frags: '..getPlayerFrags(thing.uid)..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,'[Frags: '..getPlayerFrags(cid)..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
-
EU QUERO QUE MUTA QUANDO PLAYER RELOGA ELE CONTINUA MUTADO E NAO TA DANDO SÓ DA QUANDO ELE TA ONLINE QUANDO ELE DESLOGA E LOGA SAI MUTED. local GMGroup = 6 -- grupo mínimo do GM local maxTimeMute = 60 * 24 * 360 --Tempo máximo de mute, em minutos. Sim, isso é necessário. local conditions = {} for i = 1, maxTimeMute do conditions[i] = createConditionObject(CONDITION_MUTED) setConditionParam(conditions[i], CONDITION_PARAM_TICKS, i * 60 * 1000) end function onSay(cid,words,param) local testeGroup = getPlayerGroupId(cid) if testeGroup >= GMGroup then if param ~= "" then local sep = param:explode(",") local playerMuted, timeMuted = getPlayerByName(sep[1]), tonumber(sep[2]) if not timeMuted or not conditions[timeMuted] then doPlayerSendCancel(cid, "Escolha um tempo de mute (em minutos) válido.") elseif isPlayer(playerMuted) then local GMName = getPlayerName(cid) local playerName = getPlayerName(playerMuted) if playerName == GMName then doPlayerSendTextMessage(cid,MESSAGE_STATUS_DEFAULT ,"Por que ao invés aplicar um muted em si mesmo você mesmo não cale a boca?") return 0 end local playerGroup = getPlayerGroupId(playerMuted) if playerGroup >= testeGroup then doPlayerSendTextMessage(cid,MESSAGE_STATUS_DEFAULT ,"Você não pode calar um jogador que tenha um cargo maior ou igual ao seu.") return 0 end doAddCondition(playerMuted, conditions[timeMuted]) setPlayerStorageValue(cid, 91828, os.time() + timeMuted * 60) doPlayerSendTextMessage(cid,MESSAGE_STATUS_DEFAULT ,"Você aplicou um muted de "..timeMuted.." minuto(s) no jogador "..playerName..".") doPlayerSendTextMessage(playerMuted,MESSAGE_STATUS_DEFAULT,"Você foi mutado por "..timeMuted.." minuto(s) pelo "..GMName..".") else doPlayerSendTextMessage(cid,MESSAGE_STATUS_DEFAULT ,"O nome "..param.." está escrito errado ou este está offline.") end end end return true end
-
[TUTORIAL] COMPILAR O TFS PELO CODEBLOCKS
Sam respondeu ao tópico de Tungs em Tutoriais de Infraestrutura
Dahora -
[BRAZIL] [8.60/BAIAK/RESET] DexSoft [RPG/PVP] Patch: [29.11.2025]
Sam postou um tópico no fórum em Anúncios de OTServs
-=[Open Tibia Server]=- -=[GAME]=- - Tibia - IP/DNS: dexsoft.ddns.net IP/FIXO: 177.33.49.248 - Porta: 7171 - Protocolo: TCP - Versão 8.60. Cria Conta Pelo Account Manager Sem Site (ACCM): 1/1 Sobre o Servidor Link: ~brazil.otservlist.org/ots/1662123 ~xat.com/DexSoft ~fb.com/DexSoft.Baiak DexSoft Baiak Reset x99999 RED/BLACK é Ilimitado Você Não Pega Red Skull e Nem Black Skull e Nem Toma Ban Pelos Frags. ::DONATE:: CPF-PIX: 389.429.678-09 VIP 7 DAYS R$20,00 VIP 31 DAYS R$ 50,00 VIP VITALICIO + SET DONATE + PEDRAS BOOSTED FULL R$100,00 ::INFO:: Servidor Type: [PVP] Cria Conta Pelo Account Manager 1/1 (ACCM) Sem Site. Não Tem Cast System + Bônus EXP. Não Tem War System Com Escudo Somente o Tradicional Sem Escudo. Nunca Reseto. Nunca Teve Rollback. Sem Promotion: attackspeed="1500" soulmax="100" basespeed="220" experience="99999". Com Promotion: attackspeed="" soulmax="255" basespeed="1500" experience="100000". Da Pra Loga Mc na Própria Conta Sem Precisa Cria Outra Conta e Abri Outro Client. Config.lua Rate Original: experienceStages = false rateExperience = 99999 rateExperienceFromPlayers = 99999 [PVP-E] rateSkill = 1 rateMagic = 1 rateLoot = 1 rateSpawn = 1 Info do Host: - [Hidden Content] - Contato ao ADM Dono Fundador do Servidor: - [Hidden Content] - [UPDATES] DexSoft Tibia Server ZAP do GRUPO Para Admin Privado Etc: - [Hidden Content] - - Bate-Papo Aberto Para Publico Para Players - - [Hidden Content] - Anuncie Seu Servidor: - [Hidden Content] - DexSoft Pra Players: - [Hidden Content] - DexSoft - Trade: - [Hidden Content] - Discord: - [Hidden Content] - E-Mail e Ticket do HOST: - [email protected] - Telefone Celular do HOST +55 (11) 91230-8360 - Operadora - (VIVO) Host do Servidor Provedor (CLARO) IP de Internet: 177.33.49.248 Servidor Hospedado no Brazil IP-ESTATICO Jogue Com Esse IP Ping -1 MS: -1 FPS: +10.000. Staff Nao Joga, E Não Tem Vaga. Staff Sempre Online e Dando Suporte. Att ADM. ::DOWNLOADS:: Download do Client Proprio [FULL-LIGHT]+[MC]+[IP-FIXO]+[OTClientV8]+APK: Pra Celular Android Iphone e Todos Sistemas Operacionais e IOS-OS. 100% Funcional. Tibia 8.60 Para Linux: - [Hidden Content] - Tibia 8.60 Para MAC So Compila Pra Sua Autoria. Tibia IP Changer 8.60 Para Linux/MAC Pra Sua Autoria Compila. Tibia MC 8.60 - [Hidden Content] - Tibia Client Classico Proprio: - [Hidden Content] - Instalador do Tibia 8.60: - [Hidden Content] - OTClientV8 Mini-Map -=[FULL]=- Customizado o Laucher do OTClientV8 Nao Esqueca de Ler o read me. NEW: - OTClientV8: - [Hidden Content] - NEW: - OTClientV8 - 02.08.2025: - [Hidden Content] - OTClientV8 - Restaurado em Fabrica Resetado: - [Hidden Content] - NEW: - OTClient_Personal-OTclient-Personal: - [Hidden Content] - NEW: - OTClient - DexSoft: - [Hidden Content] NEW: - OTClient - 2025 - [Hidden Content] -apk- do Servidor: - [Hidden Content] - Click no Another e Digita IP:PORTA -apk- do Servidor 2_#Editado: - [Hidden Content] - Click no Another e Digita IP:PORTA -apk- do Servidor 3_#Editado: - [Hidden Content] - Click no Another e Digita IP:PORTA -apk- do Servidor 4_#Editado: - [Hidden Content] - Click no Another e Digita IP:PORTA BOT pra -apk- na Demanda do Player ele que Escolhe Pesquisando na Internet - BOTS & Utilitários - MageBot + ElfBot NG - ElfBot NG ~DexSoft [Crackeado] - Tibia MULTI-IP CHANGER: - [Hidden Content] - Ultima Versão do Pacote Redistribuivel do Microsoft Visual C++ - [Hidden Content] - 32 Bits - - [Hidden Content] - 64 Bits - - [Hidden Content] - ARM64 - Downloads Dos Pacotes Redistribuivel do Microsoft Visual C++ - [Hidden Content] - .NET Frameworks - Microsoft .NET Framework 4.5 - [Hidden Content] - ~[PACK] - [Hidden Content] - Microsoft Edge Web View 2 Setup - [Hidden Content] - Microsoft DirectX® (DX9, DX10, DX11) - [Hidden Content] - - 30 Anos Online! Copyright by CipSoft GmbH. All rights reserved.-
- 7
-
-
[TFS - 0.3.6] [SQLite] Tem Como Cria um Cast System Com 15% Bônus de EXP Pra Quem Abri a Cast???
Sam postou um tópico no fórum em Suporte Clients Old & OTC
[TFS - 0.3.6] [SQLite] Tem Como Cria um Cast System Com 15% Bônus de EXP Pra Quem Abri a Cast??? -
EU NÃO TO CONSEGUINDO CONFIGURA SNAKE SYSTEM PARA TFS 0.3.6
Sam respondeu ao tópico de Sam em Resolvidos
Já Consegui Arruma VLW. -
EU NÃO TO CONSEGUINDO CONFIGURA SNAKE SYSTEM PARA TFS 0.3.6
Sam postou um tópico no fórum em Resolvidos
<action itemid="9564" event="script" value="snakesys.lua"/> function onUse(cid, item, frompos, item2, topos) if not isPlayer(getGlobalStorageValue(SNAKE.freeglobalstorage)) then doTeleportThing(cid,SNAKE.controlpos) SNAKE.timer(cid,1,nil,item.actionid == 0 and 500 or item.actionid) doPlayerSendTextMessage(cid,25,'Hold key CTRL and use the arrows to control snake.') SNAKE.generateFood() else doPlayerSendTextMessage(cid,25,'Please wait.') end end --[[ Script by Mock the bear ]] SNAKE = { _VERSION="1.0 by mock", ---Snake config itemid=1739, freeglobalstorage=28103, itemFood=6394, controlpos={x=1013,y=1164,z=6}, exitpos = {x=1009,y=1157,z=7}, centerpos={x=1012,y=1163,z=7}, timer = function(cid,n,pos_,time) local pos_ = pos_ or {{SNAKE.centerpos}} setGlobalStorageValue(SNAKE.freeglobalstorage,cid) if not isPlayer(cid) then SNAKE.clean() return end for i,pos in pairs(pos_) do SNAKE.find_and_delete(pos[1]) if i == 1 then pos[2] = SNAKE.copypos(pos[1]) pos[1] = getPosByDir({x=pos[1].x,y=pos[1].y,z=pos[1].z,stackpos=255},getCreatureLookDir(cid)) else pos[2] = SNAKE.copypos(pos[1]) pos[1] = pos_[i-1][2] end local ret,p,walk = SNAKE.check(pos[1]) if ret == 1 or ret == 3 then addEvent(doTeleportThing,1000,cid,SNAKE.exitpos) addEvent(doCreatureSay,1100,cid,'Points '..(#pos_-1)..'.') SNAKE.clean() setGlobalStorageValue(SNAKE.freeglobalstorage,0) return end if ret == 2 then doRemoveItem(p.uid,-1) if p.itemid == SNAKE.itemFood then pos_[#pos_+1] = {pos[2],pos[2]} for i=1,5 do addEvent(doSendMagicEffect,100*i,pos[1],29) end SNAKE.generateFood() end end doCreateItem(SNAKE.itemid,1,pos[1]) end local plpos = getCreaturePosition(cid) local generated = {} for i=0,3 do generated = getPosByDir({x=SNAKE.controlpos.x,y=SNAKE.controlpos.y,z=SNAKE.controlpos.z},i) end for i,pos in pairs(generated) do if SNAKE.samepos(plpos,pos) then doTeleportThing(cid,SNAKE.controlpos,false) end addEvent(doSendMagicEffect,100,pos,56,cid) end addEvent(SNAKE.timer,time,cid,n,pos_,time) end, copypos = function(p) return {x=p.x,y=p.y,z=p.z,stackpos=p.stackpos} end, samepos = function(p1,p2) if p1.x == p2.x and p2.y == p2.y then return true end return false end, generateFood = function() local pp = {x=SNAKE.centerpos.x+math.random(-6,6),y=SNAKE.centerpos.y+math.random(-4,4),z=SNAKE.centerpos.z} for i=1,5 do addEvent(doSendMagicEffect,100*i,pp,30) end doCreateItem(SNAKE.itemFood,1,pp) end, clean = function() for y=-4,4 do for x=-6,6 do local pp = {x=SNAKE.centerpos.x+x,y=SNAKE.centerpos.y+y,z=SNAKE.centerpos.z} for i=250,255 do pp.stackpos = i local p = getThingFromPos(pp) if p.itemid ~= 0 then doRemoveItem(p.uid,-1) doSendMagicEffect(pp,15) end end end end end, check = function(pos) for i=1,10 do pos.stackpos = i local p = getThingFromPos(pos) if p.itemid == SNAKE.itemid then return 1,p,true elseif not SNAKE.isWalkable(pos) then return 3,p,false elseif p.itemid ~= 0 then return 2,p end end return false end, find_and_delete = function(pos) for i=0,255 do pos.stackpos = 255-i local p = getThingFromPos(pos) if p.itemid == SNAKE.itemid then return doRemoveItem(p.uid,1) end end end, isWalkable = function(pos, creature, proj, pz)-- by Nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end, } -
TFS 0.3.6 TIBIA 8.60 ALGUEM PODE EXPORTA MINIMAP PRA MIM POR FAVOR PRA MIM COLOCA MINIMAP NO FORMATO .map %appdata% Tibia/Automap [Hidden Content] Master Fusion.otbm Meu Computador Desktop Não Exporta Pelo Remer's e OTCLIENT Maquina Que eu Opero PC-DESKTOP é 8GB RAM PROCESSADOR i5 10 GEN 224GB HD ~SSD Placa de Rede Interna Gigabyte Placa Video Interna INTEL 128MB. [HOST-MACHINE] Nome do Dispositivo DESKTOP-D95O6FF Processador Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz 2.90 GHz RAM instalada 8,00 GB (utilizável: 7,82 GB) Armazenamento 224 GB SSD KINGSTON SA400S37240G Placa de vídeo Intel(R) UHD Graphics 630 (128 MB) ID do dispositivo 6DA8E6D9-2A79-449A-B808-D56E66ED12DD ID do Produto 00330-80000-00000-AA355 Tipo de sistema Sistema operacional de 64 bits, processador baseado em x64 Caneta e toque Nenhuma entrada à caneta ou por toque disponível para este vídeo
-
- 4
-
-
TA TRAVANDO O SERVIDOR QUANDO COLETA DINHEIRO !autoloot money e mata CRIATURAS eu achei o bug quando player tem muita backpack sub backpack trava servidor na hora de mata criatura ME AJUDA CONCERTAR <?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 = { distro = 1, -- 1 = TFS // 2 = talk modificada directory = "data/logs/autoloot", 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 = {}, BlockItemsList = {2123,2515}, Money_ids = {2148, 2152, 2160}, -- id das moedas do ot Max_Slots = {free = 3, premium = 5}, 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 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 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 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 return doPlayerPopupFYI(cid, 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 tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local str, var = "", getContainerItems(tile) if var then local list = getItensFromAutoloot(cid) for _, item in pairs(var) do local id = item.itemid if #list > 0 and isInArray(list, id) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray(info.Money_ids, id) then local info = getItemInfo(id) local amount = isItemStackable(id) and item.type or 1 local total_cap = getItemWeight(item.uid)*amount slots = getAllContainerFree(cid) if slots > 0 and getPlayerFreeCap(cid) >= total_cap then if isItemStackable(id) then str = str.." "..amount.." "..(amount > 1 and info.plural or info.name).."," doPlayerAddItemStackable(cid, id, amount) AutomaticDeposit(cid, id, amount) else str = str.." ".. info.article.." " .. info.name .."," doPlayerAddItem(cid, id) 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, -2)..".") 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 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 ]]></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 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') 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 Gold Colleting "..(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 if info.distro ~= 1 then item = ExistItemByName(tostring(param)) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true end item = getItemIdByName(tostring(param)) else item = getItemIdByName(param, false) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true end end 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, "max "..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>
×
- Criar Novo...
