kito2
www.masteria.net
I have been working with this a while and developed this talkaction that may help a few admins to manage their server.
On your talkactions.xml add this line below <talkactions>:
Create a file named mhi.lua at talkaction/scripts/
How it works?
First checks if the player executing the command has access.
Then it get all existing houses on game, and if they do have owner, then it resets to "0" the owner, and empty the invited list, subowners list and doors access list.
When the owner is set to "0", all items are moved to owner depot.
Hope this helps you guys!
On your talkactions.xml add this line below <talkactions>:
HTML:
<talkaction words="/emptyhouses" script="mhi.lua" />
Create a file named mhi.lua at talkaction/scripts/
Lua:
function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
for _, house in ipairs(Game.getHouses()) do
if house:getOwnerGuid() == 0 then
--
else
house:setOwnerGuid(0)
house:setAccessList(256, "")
house:setAccessList(257, "")
house:setAccessList(1, "")
end
end
print("Items moved to depot.")
return false
end
How it works?
First checks if the player executing the command has access.
Then it get all existing houses on game, and if they do have owner, then it resets to "0" the owner, and empty the invited list, subowners list and doors access list.
When the owner is set to "0", all items are moved to owner depot.
Hope this helps you guys!