Here's the full list of commands added to the channel.
lua code:local HealType = "UH" -- Main Heal Type (Options: "Sio", "UH", "IH") (type them exactly as I have them here)
local HealingRuneBP = "crown backpack" -- Name of OPEN backpack containing the healing runes.
local PercentHPtoHeal = 85 -- PERCENTAGE of health and below to sio/uh/ih party members&war allies
local RandHP = 0 -- Health randomization percentage (over 5% is unnecessary and can cause slow heal times)
local SelfMP = 1000 -- Minimum amount of mana to have when using SIO ONLY (actual mana, not a percentage)
local RandMP = 0 -- Mana randomization percentage (over 5% is unnecessary and can cause slow heal times)
local SelfHP = 1200 -- Minimum health to have before using sio/ih/uh (actual health, not a percentage)
local RandHP2 = 0 -- Self health randomization percentage (over 5% is unnecessary and can cause slow heal times)
local HealParty = false -- Heal All Party members, true/false
local HealWarAllies = false -- Heal All WarAllies, true/false
local HealWhiteList = true -- Heal All White list players, true/false
local WhiteList = {"Darkstar", ""} -- names of players to heal as long as "HealWhiteList" is true
function Speaker(XenoBotChannel, XenoBotMessage)
XenoBotChannel:SendYellowMessage('You', XenoBotMessage)
XenoBotMessage:trim():lower()
local XenoBotCommand, XenoBotValue = XenoBotMessage:match('^/([a-z]+) (.+)$')
if (XenoBotCommand) then
------------------------------
---- First variable here -----
------------------------------
if (XenoBotCommand == 'healtype') then
if (XenoBotValue) then
if (XenoBotValue == 'sio' or XenoBotValue == 'uh' or XenoBotValue == 'ih') then
if (XenoBotValue == 'sio') then
HealType = "sio"
XenoBotChannel:SendOrangeMessage('XenoBot', 'Healtype set to Sio.')
elseif (XenoBotValue == 'uh') then
HealType = "uh"
XenoBotChannel:SendOrangeMessage('XenoBot', 'Healtype set to UH.')
elseif (XenoBotValue == 'ih') then
HealType = "ih"
XenoBotChannel:SendOrangeMessage('XenoBot', 'Healtype set to IH.')
end
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
------------------------------
--- Second variable here -----
------------------------------
elseif (XenoBotCommand == 'healingrunebp') then
if (XenoBotValue) then
if (XenoBotValue ~= '') then
HealingRuneBP = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealingRuneBP set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
------------------------------
---- Third variable here -----
------------------------------
elseif (XenoBotCommand == 'percenthptoheal') then
if (XenoBotValue) then
if (XenoBotValue ~= nil) then
PercentHPtoHeal = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'PercentHPtoHeal set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
------------------------------
---- And so on -----
------------------------------
elseif (XenoBotCommand == 'randhp') then
if (XenoBotValue) then
if (XenoBotValue ~= nil) then
RandHP = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'RandHP set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'selfmp') then
if (XenoBotValue) then
if (XenoBotValue ~= nil) then
SelfMP = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'SelfMP set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'randmp') then
if (XenoBotValue) then
if (XenoBotValue ~= nil) then
RandMP = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'RandMP set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'selfhp') then
if (XenoBotValue) then
if (XenoBotValue ~= nil) then
SelfHP = XenoBotValue
XenoBotChannel:SendOrangeMessage('XenoBot', 'SelfHP set to ' ..XenoBotValue.. '.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'healparty') then
if (XenoBotValue) then
if (XenoBotValue == 'true' or XenoBotValue == 'false') then
if (XenoBotValue == 'true') then
HealParty = true
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealParty set to ' ..XenoBotValue.. '.')
elseif (XenoBotValue == 'false') then
HealParty = false
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealParty set to ' ..XenoBotValue.. '.')
end
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'healwarallies') then
if (XenoBotValue) then
if (XenoBotValue == 'true' or XenoBotValue == 'false') then
if (XenoBotValue == 'true') then
HealWarAllies = true
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealWarAllies set to ' ..XenoBotValue.. '.')
elseif (XenoBotValue == 'false') then
HealWarAllies = false
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealWarAllies set to ' ..XenoBotValue.. '.')
end
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'healwhitelist') then
if (XenoBotValue) then
if (XenoBotValue == 'true' or XenoBotValue == 'false') then
if (XenoBotValue == 'true') then
HealWhiteList = true
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealWhiteList set to ' ..XenoBotValue.. '.')
elseif (XenoBotValue == 'false') then
HealWhiteList = false
XenoBotChannel:SendOrangeMessage('XenoBot', 'HealWhiteList set to ' ..XenoBotValue.. '.')
end
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
end
elseif (XenoBotCommand == 'whitelist') then
if (XenoBotValue) then
table.insert(WhiteList, XenoBotValue)
XenoBotChannel:SendOrangeMessage('XenoBot', 'Added ' ..XenoBotValue.. ' to whitelist.')
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Error, unknown command.')
end
else
XenoBotChannel:SendOrangeMessage('XenoBot', 'Unknown command.')
end
end
end
function Closer(XenoBotChannel)
print('Xenobot: XenoBot chat has closed.')
end
local XenoBotChat = Channel.Open('XB Chat', Speaker, Closer)
XenoBotChat:SendOrangeMessage('XenoBot', 'In this chat you can change your settings.')