Painel do Usuário
Mensagens: 0
-
Alterar
-
Ver
-
Tópicos e mensagens
Últimos assuntos
Tópicos mais visitados
Os que mais criam tópicos
xtrac | ||||
Kelvin Victor | ||||
Hostereme | ||||
Rhamos | ||||
KyoK | ||||
Renan Marape | ||||
Slaash | ||||
josean | ||||
Gualdani | ||||
Laionelxxt |
Os membros mais ativos do mês
Nenhum usuário |
Top dos mais postadores
xtrac | ||||
Kelvin Victor | ||||
Hostereme | ||||
Renan Marape | ||||
Slaash | ||||
angelstyle | ||||
KyoK | ||||
Rhamos | ||||
Kina Dos Loko | ||||
mulukete |
www.warever.org Estreia em 31/01/2015 [10.53]
Qui Jan 29, 2015 9:44 am por godsucksoul@gmail.com
Venha jogar no Warever!
OT Server estreia em 31/01/2015!
Com mapa totalmente global, sem missões, rates otimas para um game play divertido, com mais de 1 ano online e equipe dedicada.
Nossa missão é oferecer um jogo divertido e que sejamos lembrados sempre como um dos maiores servidores Open Tibia.
Conectividade:
Site: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
IP: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Port: 7171
Versão: 10.53
Rates:
…
[ Leitura completa ]
OT Server estreia em 31/01/2015!
Com mapa totalmente global, sem missões, rates otimas para um game play divertido, com mais de 1 ano online e equipe dedicada.
Nossa missão é oferecer um jogo divertido e que sejamos lembrados sempre como um dos maiores servidores Open Tibia.
Conectividade:
Site: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
IP: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
Port: 7171
Versão: 10.53
Rates:
…
[ Leitura completa ]
Comentários: 0
-Autoloot-
2 participantes
Página 1 de 1
-Autoloot-
Primeiro, vá em data/creaturescripts e abre o creaturescripts.xml, e adicione isso :Autor: Jano
Versão testada : 8.54
Função: ele pega os itens dos monstros que são mortos sem precisar abrir o corpo e por na bag.
- Código:
<event type="login" name="aloot_reg" event="script" value="aloot.lua"/>
<event type="kill" name="aloot_kill" event="script" value="aloot.lua"/>
Agora data/creaturescripts/scripts crie um arquivo aloot.lua e adicione isso:
- Código:
function onLogin(cid)
registerCreatureEvent(cid, "aloot_kill")
return true
end
local stor = 7575
function autoloot(cid, target, pos)
local function doStack(cid, itemid, new)
local count = getPlayerItemCount(cid, itemid)
if (count > 100) then
count = count - math.floor(count / 100) * 100
end
local newCount = count + new
if (count ~= 0) then
local find = getPlayerItemById(cid, true, itemid, count).uid
if (find > 0) then
doRemoveItem(find)
else
newCount = new
end
end
local item = doCreateItemEx(itemid, newCount)
doPlayerAddItemEx(cid, item, true)
end
local function scanContainer(cid, uid, list)
for k = (getContainerSize(uid) - 1), 0, -1 do
local tmp = getContainerItem(uid, k)
if (isInArray(list, tmp.itemid)) then
if isItemStackable(tmp.itemid) and (getPlayerItemCount(cid, tmp.itemid) > 0) then
doStack(cid, tmp.itemid, tmp.type)
else
local item = doCreateItemEx(tmp.itemid, tmp.type)
doPlayerAddItemEx(cid, item, true)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Looted ' .. tmp.type .. ' ' .. getItemNameById(tmp.itemid) .. '.')
doRemoveItem(tmp.uid)
elseif isContainer(tmp.uid) then
scanContainer(cid, tmp.uid, list)
end
end
end
local items = {}
for i = getTileInfo(pos).items, 1, -1 do
pos.stackpos = i
table.insert(items, getThingFromPos(pos))
end
if (#items == 0) then
return
end
local corpse = -1
for _, item in ipairs(items) do
local name = getItemName(item.uid):lower()
if name:find(target:lower()) then
corpse = item.uid
break
end
end
if (corpse ~= -1) and isContainer(corpse) then
scanContainer(cid, corpse, tostring(getPlayerStorageValue(cid, stor)):gsub('_', ''):explode(','))
end
end
function onKill(cid, target, lastHit)
if not isPlayer(target) then
local infos = getPlayerStorageValue(cid, stor)
if (infos == -1) then
return true
end
local list = tostring(infos):explode(',')
if (#list == 0) then
return true
end
addEvent(autoloot, 150, cid, getCreatureName(target), getCreaturePosition(target))
end
return true
end
Agora vá em data/talkactions abra o talkaction.xml e adicione isto :
- Código:
<talkaction words="/aloot" hide="yes" event="script" value="aloot.lua"/>
Agora vá em data/talkactions/scripts e crie um arquivo aloot.lua e adicione isso:
- Código:
local stor, limit = 7575, 5 --storage, limit to add.
local allow_container = false --empty! not looted with items, atleast for now.
function onSay(cid, words, param)
local expl = param:explode(':')
local action, rst = expl[1], expl[2]
if (action:lower() == 'check') then
local infos, list = getPlayerStorageValue(cid, stor), {}
if (infos ~= -1) then
list = tostring(infos):explode(',')
end
local txt = 'Autoloot List:\n'
if (#list > 0) then
for k, id in ipairs(list) do
id = id:gsub('_', '')
if tonumber(id) then
txt = txt .. getItemNameById(tonumber(id)) .. ((k < #list) and '\n' or '')
end
end
else
txt = 'Empty'
end
doPlayerPopupFYI(cid, txt)
elseif (action:lower() == 'add') then
local infos, list = getPlayerStorageValue(cid, stor), {}
if (infos ~= -1) then
list = tostring(infos):gsub('_', ''):explode(',')
end
if (#list >= limit) then
return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
end
local item = tonumber(rst)
if not item then
item = getItemIdByName(rst, false)
if not item then
return doPlayerSendCancel(cid, 'not valid item.')
end
end
if not allow_container and isItemContainer(item) then
return doPlayerSendCancel(cid, 'this item can not be autolooted.')
end
local attrs = getItemInfo(item)
if not attrs then
return doPlayerSendCancel(cid, 'not valid item.')
elseif not attrs.movable or not attrs.pickupable then
return doPlayerSendCancel(cid, 'this item can not be autolooted.')
end
if isInArray(list, item) then
return doPlayerSendCancel(cid, 'already added.')
end
table.insert(list, tostring(item))
local new = ''
for v, id in ipairs(list) do
new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
end
doPlayerSetStorageValue(cid, stor, tostring(new))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< has been added to the autoloot list.')
elseif (action:lower() == 'remove') then
local infos, list = getPlayerStorageValue(cid, stor), {}
if (infos ~= -1) then
list = tostring(infos):gsub('_', ''):explode(',')
end
if (#list == 0) then
return doPlayerSendCancel(cid, 'You dont have any item added.')
end
if (#list >= limit) then
return doPlayerSendCancel(cid, 'You already have ' .. limit .. ' autolooting items.')
end
local item = tonumber(rst)
if not item then
item = getItemIdByName(rst, false)
if not item then
return doPlayerSendCancel(cid, 'not valid item.')
end
end
if not isInArray(list, item) then
return doPlayerSendCancel(cid, 'This item is not in the list.')
end
local new = ''
for v, id in ipairs(list) do
if (tonumber(id) ~= item) then
new = new .. '_' .. id:gsub('_' ,'') .. ((v < #list) and ',' or '')
end
end
doPlayerSetStorageValue(cid, stor, tostring(new))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Item >>' .. getItemNameById(item) .. '<< removed from the autoloot list.')
end
return true
end
Agora os comandos :
/aloot check - Checa a lista de itens do seu server.
/aloot add:worm - Adiciona na lista dos itens para pegar automaticamente
/aloot add:2170
/aloot remove:worm - Remove da lista dos itens para pegar automaticamente
/aloot remove:2170
Créditos: Jono
KyoK- Novato
- Mensagens : 10
V$ : 23
Reputação : 1
Data de inscrição : 06/09/2011
Idade : 33
Re: -Autoloot-
Ótimo tutorial, inclusive eu ia postar ele aqui.
Obrigado por trazer conteudos ao TIBIA OTS
Obrigado por trazer conteudos ao TIBIA OTS
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|
Seg Jan 15, 2018 7:57 pm por xtrac
» Hexera.net Bot Download - Crack Hexera Bot grátis - Tibia 10.100
Seg Jan 15, 2018 7:54 pm por xtrac
» MediviaPro Bot Crack !! Medivia ProBot Crack Download - Medivia Online Bot
Seg Jan 15, 2018 7:51 pm por xtrac
» Tibia Combat 11 Crack - TibiaCombat 11 Baixar
Seg Jan 15, 2018 7:47 pm por xtrac
» Tibia 11 J-Bot Crack ! Tibia New Heal Bot Baixar
Seg Jan 15, 2018 7:44 pm por xtrac
» Bots Para Tibia 11.50 - iBot 11.50 / BBot 11.50 / XenoBot 11.50 - Winter Update 2017 !
Qua Dez 06, 2017 10:36 am por xtrac
» Tibia BBot 11.50 Baixar - New Winter Update 2017 !
Qua Dez 06, 2017 9:23 am por xtrac
» [BAIXAR] Tibia Xenobot 11 Official Download
Sex Nov 24, 2017 5:21 pm por xtrac
» [OFFICIAL] Tibia WindBot 11 Baixar
Sex Nov 24, 2017 5:10 pm por xtrac
» [Baixar] Tibia MC 11 - All Version
Sex Nov 24, 2017 4:53 pm por xtrac
» [LIVRE] Tibia Maps 11 Download Full
Sex Nov 24, 2017 4:45 pm por xtrac
» [Official] Tibia Auto 11 + crack Baixar
Sex Nov 24, 2017 4:36 pm por xtrac
» Tibia Bots 11 Tibia Auto 11 / Tibia Maps 11 / Tibia MC 11 + crack Baixar
Sex Nov 24, 2017 3:19 pm por xtrac
» [Official] Tibia Red Bot 11 Baixar
Sex Nov 24, 2017 3:08 pm por xtrac
» [Baixar] Tibia Bot NG 11 + Crack official
Sex Nov 24, 2017 2:59 pm por xtrac
» Tibia Bots 11 - NG 11 / Red Bot 11 / Tibia Cast 11 Baixar
Sex Nov 24, 2017 2:49 pm por xtrac
» [Official] Tibia MageBot 11 Baixar
Sex Nov 24, 2017 2:31 pm por xtrac
» [Official] Tibia IP Changer 11 Baixar
Sex Nov 24, 2017 1:47 pm por xtrac
» [Official] Tibia iBot 11 Baixar
Sex Nov 24, 2017 1:30 pm por xtrac
» Bots Para Tibia 11 - iBot 11 / BBot 11 / XenoBot 11 + crack Official Baixar
Sex Nov 24, 2017 11:55 am por xtrac
» Tibia BBot 11 Baixar
Sex Nov 24, 2017 11:43 am por xtrac
» [BAIXAR] Tibia Xenobot 11 Crack | Download | Baixar + Anty Battleye
Qui Out 12, 2017 5:03 pm por xtrac
» Tibia WindBot 11 Crack | Download | Baixar + Anty Battleye |
Qui Out 12, 2017 4:45 pm por xtrac
» Tibia MC 11 | Multiclient 11 | Download | Baixar + Anty Battleye
Qui Out 12, 2017 4:08 pm por xtrac
» Tibia Maps 11 FULL | Download | Baixar + Anty Battleye
Qui Out 12, 2017 3:52 pm por xtrac
» Tibia Auto 11 Crack | Download | Baixar + Anty Battleye
Qui Out 12, 2017 3:31 pm por xtrac
» Tibia Bots 11 Tibia Auto 11 | Tibia Maps 11 | Tibia MC 11 | Download | Baixar + Anty Battleye
Qui Out 12, 2017 3:03 pm por xtrac
» Tibia Red Bot 11 Crack | Download | Baixar + Anty Battleye
Qui Out 12, 2017 2:30 pm por xtrac
» Tibia Bot NG 11 Crack | Download | Baixar + Anty Battleye
Qui Out 12, 2017 1:43 pm por xtrac
» Tibia Bots 11 - NG 11 | Red Bot 11 | Tibia Cast 11 | Download | Baixar + Anty Battleye
Qui Out 12, 2017 1:30 pm por xtrac