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)