So I am trying to learn to write Lua's and starting very basic, cant seem to make this work anyone able to point me in right direction?
[CODE lang="Lua" title="Wave"]local mq = require('mq')
local function condition()
-- Optional: Only run if Banker Denton exists in zone
return mq.TLO.SpawnCount('Banker Denton npc')() > 0
end
local function action()
local targetName = mq.TLO.Target.Name()
if targetName and targetName == 'Banker Denton' then
mq.cmdf('/wave')
end
end
return {condfunc=condition, actionfunc=action}[/CODE]
ok i was able to make that one work thanks
[CODE lang="Lua" title="Wave"]local mq = require('mq')
local function condition()
return mq.TLO.SpawnCount('Banker Denton')() > 0
end
local function action()
if mq.TLO.Target.CleanName() == 'Banker Denton' then
mq.cmd('/wave')
end
end
{condfunc=condition, actionfunc=action}[/CODE]
[CODE lang="Lua" title="Wave"]local mq = require('mq')
local function condition()
-- Optional: Only run if Banker Denton exists in zone
return mq.TLO.SpawnCount('Banker Denton npc')() > 0
end
local function action()
local targetName = mq.TLO.Target.Name()
if targetName and targetName == 'Banker Denton' then
mq.cmdf('/wave')
end
end
return {condfunc=condition, actionfunc=action}[/CODE]
ok i was able to make that one work thanks
[CODE lang="Lua" title="Wave"]local mq = require('mq')
local function condition()
return mq.TLO.SpawnCount('Banker Denton')() > 0
end
local function action()
if mq.TLO.Target.CleanName() == 'Banker Denton' then
mq.cmd('/wave')
end
end
{condfunc=condition, actionfunc=action}[/CODE]
Last edited:



