Modules = {}
Modules.SSA = false
Modules.MightRing = false
Modules.Trasher = false
-- Don't touch below this line
VialID = { 283, 284, 285 }
GoldID = 3031
WormID = 3492
function onSpeak(channel, m)
channel:SendYellowMessage(Self.Name(), m)
if (m == '/help') then
channel:SendYellowMessage('', 'COMMANDS')
channel:SendOrangeMessage('', 'ssa - Enable/disable using stone skin amulets.')
channel:SendOrangeMessage('', 'might - Enable/disable using might rings.')
channel:SendOrangeMessage('', 'trash - Enable/disable trashing under you.')
channel:SendOrangeMessage('', 'status - Show current statuses.')
elseif (m == 'ssa') then
channel:SendOrangeMessage('', (Modules.SSA) and 'SSA module: Disabled' or 'SSA module: Enabled')
Modules.SSA = not Modules.SSA
elseif (m == 'might') then
channel:SendOrangeMessage('', (Modules.MightRing) and 'Might Ring module: Disabled' or 'Might Ring module: Enabled')
Modules.MightRing = not Modules.MightRing
elseif (m == 'trash') then
channel:SendOrangeMessage('', (Modules.Trasher) and 'Trasher module: Disabled' or 'Trasher module: Enabled')
Modules.Trasher = not Modules.Trasher
elseif (m == 'status') then
channel:SendOrangeMessage('', (Modules.Trasher) and 'Trasher: Enabled' or 'Trasher: Disabled')
channel:SendOrangeMessage('', (Modules.MightRing) and 'Might Ring: Enabled' or 'Might Ring: Disabled')
channel:SendOrangeMessage('', (Modules.SSA) and 'SSA: Enabled' or 'SSA: Disabled')
end
end
function onClose(channel)
print('Please re-execute to begin using the script again.')
end
local channel = Channel.New('War Channel', onSpeak, onClose)
channel:SendOrangeMessage('', 'Hello! Type /help for a list of commands.')
Module('War.SSA', function(Mod)
if (Modules.SSA) then
if (Self.ItemCount(3081) > 0) and (Self.Amulet().id ~= 3081) then
Self.Equip(3081, 'amulet')
end
end
end)
Module('War.MightRing', function(Mod)
if (Modules.MightRing) then
if (Self.ItemCount(3048) > 0) and (Self.Ring().id ~= 3048) then
Self.Equip(3048, 'ring')
end
end
end)
Module('War.Trasher', function(Mod)
if (Modules.Trasher) then
local Position = Self.Position()
local GoldDrop = true
local WormDrop = false
local VialDrop = false
local DropItem = false
for index, container in Container.iContainers() do
for spot, item in container:iItems() do
if (table.contains({GoldID, WormID}, item.id) or table.contains(VialID, item.id)) then
if ((Self.ItemCount(GoldID) >= 1 and not GoldDrop)) then
DropItem = true
GoldDrop = false
WormDrop = true
elseif ((Self.ItemCount(WormID) >= 1 and not WormDrop)) then
DropItem = true
WormDrop = false
VialDrop = true
else
for _, id in ipairs(VialID) do
if ((Self.ItemCount(id) >= 1 and not VialDrop)) then
DropItem = true
VialDrop = false
GoldDrop = true
break
end
end
end
if (DropItem) then
DropItem = false
container:MoveItemToGround(spot, Position.x, Position.y, Position.z, 1)
wait(200)
end
end
end
end
end
Module:Delay(800)
end)
Ostatnio zmieniony przez Xard Flor : 02-02-2014, 12:53
Ostatnio zmieniony przez Zabbit : 02-02-2014, 14:45
Showupowicz [323]: som jakies fajne niunie do 55kg?
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki