Log in

View Full Version : Auto tree wall



Orming
03-28-2016, 10:41 PM
I am looking for a auto tree wall lua that will shoot a tree wall 1 and 2 sqm in front of my char. I am willing to pay for it. Need two auto refresh the tree wall when it disappears

kamilqq
03-29-2016, 01:16 AM
I am looking for a auto tree wall lua that will shoot a tree wall 1 and 2 sqm in front of my char. I am willing to pay for it. Need two auto refresh the tree wall when it disappears

Hello i think thats the thing what you looking for.
Usage: say in channel: 2 5 - > it will set position to x + 2 ( right ) and y + 5 ( up ). Not that hard.
Heres the code, theres nothing to edit.
It's ugly because i were writing it asap cause going sleep.
Hope you will find it useful.

-- growth = 2130, mw = 2129
local wGrowthID = 2130
-- growth = 3156 , mw = 3180
local wGrowthRune = 3156






-- You shoudnt edit.
local xDiff = 0
local yDiff = 0
local shooterState = false
local entryMessage = {"To start shooter you have to set coordinates:", "type: '2 4' to start shooter at xPosition + 2 (right) and yPosition +4 (up)," , "type: 'stop' to pause bot, 'start' to start bot."}




local function shootWildGrowth()
local id = Map.GetTopTargetObject(x, y, Self.Position().z).id
if id == wGrowthID then
return
else
Self.UseItemWithGround(wGrowthRune, x, y, Self.Position().z)
end
end

local function sendChannelMessage(color, msg)
if color:lower() == 'yellow' then
channel:SendYellowMessage('Wildgrowth Assistant', msg)
elseif color:lower() == 'orange' then
channel:SendOrangeMessage('Wildgrowth Assistant', msg)
end
end
local function onSpeak(channel, text)
local xDiff, yDiff = string.match(text, "%s?([+-]?%d+)%s([+-]?%d+)")
x, y = tonumber(x), tonumber(y)
if text:lower() == 'stop' then
shooterState = false
elseif text:lower() == 'start' then
shooterState = true
elseif xDiff and yDiff then
x, y = Self.Position().x + xDiff, Self.Position().y - yDiff
shooterState = true
end
end
local function onClose(channel, text)
print('You left channel')
end



local function init()
channel = Channel.New("Management Channel", onSpeak, onClose)
for i = 1, #entryMessage do
sendChannelMessage('yellow', entryMessage[i])
end
end
init()

Module.New('wildGrowthShooter', function()
if shooterState then
shootWildGrowth()
end
end)

kamilqq
03-29-2016, 11:47 PM
I am looking for a auto tree wall lua that will shoot a tree wall 1 and 2 sqm in front of my char. I am willing to pay for it. Need two auto refresh the tree wall when it disappears

You should let me know if it fits your needs.

Orming
04-02-2016, 03:57 AM
Awesome will let you know tomorrow when I test ot