Você quer tirar os items da house?
Se for entra na house e fala /owner nobody
By TheMrDCS, 29 de ago. de 2013 in Tópicos Sem Resposta
info
Group: Infante
Joined: 27/01/13
Posts: 1.7k
Reputation: +104
Gender: Masculino

Você quer tirar os items da house?
Se for entra na house e fala /owner nobody
Você quer tirar os items da house?
Se for entra na house e fala /owner nobody
Bom, obrigado por tentar me ajudar.
Sim amigo... quero limpa a house.. e algumas sao bem grandes... O metodo que voce citou nao funciona infelizmente.... Se nao me engano isso so funciona em servers que usam sql nao? o meu e todo em xml. Quando uso o comando que voce citou a house fica sendo de um outro player comum.. Nao aleatorio.. sempre o mesmo.
(nao e a primeira talkaction que nao funciona no meu serv.. coloquei tbm essa http://www.xtibia.com/forum/topic/134914-talkaction-comando-spells-funcionando/ e nao deu
)
Edited Agosto 29 by TheMrDCS
info
Group: Artesão
Joined: 09/06/13
Posts: 144
Reputation: +15
Gender: Masculino
Tibia Character: Jack Powerful

E se você quiser arrumar o comando /r, entra em data/talkactions/scripts/ e procura remoreve.lua, abre apague tudo e coloque
function onSay(cid, words, param, channel)
local toPos = getCreatureLookPosition(cid)
if(isInArray({"full", "all"}, param:lower())) then
doCleanTile(toPos, false)
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
local amount = 1
param = tonumber(param)
if(param) then
amount = param
end
toPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
if(isCreature(tmp.uid) and (not isPlayer(tmp.uid) or (not isPlayerGhost(tmp.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(tmp.uid)))) then
doRemoveCreature(tmp.uid)
else
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
end
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
toPos.stackpos = STACKPOS_TOP_FIELD
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
toPos.stackpos = STACKPOS_TOP_CREATURE
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
doRemoveCreature(tmp.uid)
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
for i = 5, 1, -1 do
toPos.stackpos = i
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
if(isCreature(tmp.uid)) then
doRemoveCreature(tmp.uid)
else
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
end
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return true
end
Depois volta na pasta data/talkactions e abre talkactions.xml e vai nos comando de CM e coloca juntos deles
<talkaction log="yes" words="/r" access="3" event="script" value="remove.lua"/>
Espero que ajudei ![]()
E se você quiser arrumar o comando /r, entra em data/talkactions/scripts/ e procura remoreve.lua, abre apague tudo e coloque
function onSay(cid, words, param, channel)
local toPos = getCreatureLookPosition(cid)
if(isInArray({"full", "all"}, param:lower())) then
doCleanTile(toPos, false)
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
local amount = 1
param = tonumber(param)
if(param) then
amount = param
end
toPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
if(isCreature(tmp.uid) and (not isPlayer(tmp.uid) or (not isPlayerGhost(tmp.uid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(tmp.uid)))) then
doRemoveCreature(tmp.uid)
else
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
end
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
toPos.stackpos = STACKPOS_TOP_FIELD
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
toPos.stackpos = STACKPOS_TOP_CREATURE
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
doRemoveCreature(tmp.uid)
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
for i = 5, 1, -1 do
toPos.stackpos = i
tmp = getThingFromPos(toPos)
if(tmp.uid ~= 0) then
if(isCreature(tmp.uid)) then
doRemoveCreature(tmp.uid)
else
doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount))
end
doSendMagicEffect(toPos, CONST_ME_MAGIC_RED)
return true
end
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return true
end
Depois volta na pasta data/talkactions e abre talkactions.xml e vai nos comando de CM e coloca juntos deles
<talkaction log="yes" words="/r" access="3" event="script" value="remove.lua"/>
Espero que ajudei
Obrigado por tentar me ajudar mas tambem nao funcionou.. fiz como falou e nada.. Nao da nem erro no distro.. Estou usando o distro Aries 0.4.5 ot todo em xml... O GOD nao e nem definido por access e sim por flags ![]()
Bom encontrei isso aqui no forum mas nao sei como usa.. se alguem poder me dizer posso testar rrrsrsrs http://www.xtibia.com/forum/topic/220102-house-clean/
Edited Agosto 30 by TheMrDCS
info
Group: Artesão
Joined: 09/06/13
Posts: 144
Reputation: +15
Gender: Masculino
Tibia Character: Jack Powerful

qual versão você usa? e qual tipo de mapa?
qual versão você usa? e qual tipo de mapa?
versao 8.1 mapa proprio.. o ot roda beleza.. so que o mapa e nas propriedades do RME aparece como 7.4 e os items sao pelo 8.0 hehe ot mt bugado mas amo esse mapa
info
Group: Artesão
Joined: 09/06/13
Posts: 144
Reputation: +15
Gender: Masculino
Tibia Character: Jack Powerful

Entendo amigo, desculpe não poder ajudar, aguarde mais ajude.
Boa sorte!!!
Atenciosamente,
Jackgoku
Entendo amigo, desculpe não poder ajudar, aguarde mais ajude.
Boa sorte!!!
Atenciosamente,
Jackgoku
Obrigado pela atenção. Por um acaso sabe como usar isso
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Cleanhouses" version="1.03" author="nsanee" contact="otland.net" enabled="yes">
<globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[
local config = {
days = 14,
log = true,
file = getDataDir() .. "/logs/cleanhouses.txt",
onlyNonPremium = true
}
local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses
LEFT JOIN players ON players.id=houses.owner
LEFT JOIN accounts ON players.account_id=accounts.id
WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60)
]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[
AND players.world_id =]] .. getConfigValue("worldId")
local house = db.getResult(ns_query)
local logs = "
Houses cleaned:\n\n"
if house:getID() ~= -1 then
repeat
logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n"
setHouseOwner(house:getDataInt('hid'), 0)
until not house:next()
house:free()
else
logs = logs .. "There were no houses to clean."
end
if config.log then
doWriteLogFile(config.file, logs)
end
addEvent(doSaveServer, 1000)
]]></globalevent>
</mod>
info
Group: Artesão
Joined: 09/06/13
Posts: 144
Reputation: +15
Gender: Masculino
Tibia Character: Jack Powerful

Não sei não amigo. :\
Não sei não amigo. :\
Obrigado mesmo assim, tenha uma boa noite.
info
Group: Campones
Joined: 18/08/11
Posts: 40
Reputation: +2
Tibia Character: GODYoroshi

Entendo amigo, desculpe não poder ajudar, aguarde mais ajude.
Boa sorte!!!
Atenciosamente,
Jackgoku
Obrigado pela atenção. Por um acaso sabe como usar isso
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Cleanhouses" version="1.03" author="nsanee" contact="otland.net" enabled="yes">
<globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[
local config = {
days = 14,
log = true,
file = getDataDir() .. "/logs/cleanhouses.txt",
onlyNonPremium = true
}
local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses
LEFT JOIN players ON players.id=houses.owner
LEFT JOIN accounts ON players.account_id=accounts.id
WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60)
]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[
AND players.world_id =]] .. getConfigValue("worldId")
local house = db.getResult(ns_query)
local logs = "
Houses cleaned:\n\n"
if house:getID() ~= -1 then
repeat
logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n"
setHouseOwner(house:getDataInt('hid'), 0)
until not house:next()
house:free()
else
logs = logs .. "There were no houses to clean."
end
if config.log then
doWriteLogFile(config.file, logs)
end
addEvent(doSaveServer, 1000)
]]></globalevent>
</mod>
Se o script estiver totalmente correto, sem erros, somente colocar o mesmo em "data\talkactions\scripts ", em seguida abrir o talkactions.xml, e adicionar, uma linha :
" <talkaction log="yes" words="/cleanhouse" access="4" event="script" value="cleanhouse.lua"/> " ]
Roxo : Palavra dita para dar clean na house.
Azul : Acesso, que no qual 4 séria GM, 5 CM, e 6 GOD.
Vermelho : Nome do script, que estaria em talkactions/scripts.
info
Group: Herói
Joined: 14/12/10
Posts: 3.6k
Reputation: +846
Gender: Masculino

#TheMrDCS, você não é novato na comunidade, creio que sabe as regras.
Esta seção serve para postar códigos prontos, e não pedidos / dúvidas. Movido!
info
Group: Herói
Joined: 28/11/10
Posts: 3.4k
Reputation: +585
Gender: Masculino

info
Group: Campones
Joined: 14/05/13
Posts: 24
Reputation: 0
Bom galera, to aqui mais uma vez pra contar com o apoio e sabedoria de voces. Gostaria de pedir que alguem me salve nisso xD.
Infelizmente perdi TODO meu ot.. todas modificações e tudo.. mas encontrei em um pendrive uma copia dele que fiz a um tempo atraz.. mas as houses estao cheia de intens.. e da ultima vez foram 5 pessoas tirando demorou umas 3 horas se nao me engano.. no meu ot nao funciona o comando /r nem !r ja tentei trocar em talkactions e tudo mas nao vai.. Alguem poderia me ajudar? Desde já, agradeço.