- Joined
- Jan 26, 2023
- RedCents
- 1,247¢
How do I keep this (or any) Lua script running when I zone?
Thanks, in advance, for your help.
[CODE lang="Lua" title="Travel to LS"]---@type Mq
mq = require('mq')
function Main()
local use_gh = {
['Guild Lobby'] = true,
['The Bazaar'] = true,
['The Plane of Knowledge'] = true,
}
local current_zone = mq.TLO.Zone.Name()
print(current_zone)
if use_gh[current_zone] ~= nil then
mq.cmd('/travelto guildhalllrg')
while mq.TLO.Navigation.Active() do
mq.doevents()
mq.delay(100)
end
mq.delay(100)
end
if mq.TLO.Zone.Name() == "Palatial Guild Hall" then
mq.cmd('/Lua run guildclicky')
mq.delay(1000)
mq.cmd('/gc laurion')
end
end
Main()[/CODE]
Thanks, in advance, for your help.
[CODE lang="Lua" title="Travel to LS"]---@type Mq
mq = require('mq')
function Main()
local use_gh = {
['Guild Lobby'] = true,
['The Bazaar'] = true,
['The Plane of Knowledge'] = true,
}
local current_zone = mq.TLO.Zone.Name()
print(current_zone)
if use_gh[current_zone] ~= nil then
mq.cmd('/travelto guildhalllrg')
while mq.TLO.Navigation.Active() do
mq.doevents()
mq.delay(100)
end
mq.delay(100)
end
if mq.TLO.Zone.Name() == "Palatial Guild Hall" then
mq.cmd('/Lua run guildclicky')
mq.delay(1000)
mq.cmd('/gc laurion')
end
end
Main()[/CODE]

