• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Auto Wild growth

Rolandos

New Member
Joined
Oct 28, 2022
Messages
1
Reaction score
0
Hi, anyone can helb me to fix this script for OTCV8 Client?

Lua:
local spot = nil
local id = Item.GetID("wild growth rune")

function onSpeak(c, msg)
    msg = msg:lower()
    c:SendYellowMessage(Self.Name(), msg)
    if msg == "spot" then
        spot = Self.Position()
        c:SendOrangeMessage("Xenobot", "Coordinates updated: ("..spot.x..", "..spot.y..", "..spot.z..")")
    elseif msg == "reset" then
        spot = nil
        c:SendOrangeMessage("Xenobot", "Coordinates reset.")
    end
end

function onClose(c)
end

local c = Channel.Open("Wild Growth", onSpeak, onClose)
c:SendOrangeMessage("Xenobot", "Welcome to Tools Channel! Type 'spot' while standing on the coordinates you want to place a magic wall. Type 'reset' to clear all values.")

Module.New("Module:RuneField", function(mod)
    if (spot ~= nil) then
        if (Map.IsTileWalkable(spot.x, spot.y, spot.z)) then
            Self.UseItemWithGround(id, spot.x, spot.y, spot.z)
        end
    end
    mod:Delay(200)
end)
 
Back
Top