function qff_settings (name, line, wildcards)
if wildcards [1] == "" then
qff_tellme ()
elseif wildcards [1] == "on" then
qff_enable = "yes"
ColourNote ("yellow", "", "Quaffer plugin enabled.")
elseif wildcards [1] == "off" then
qff_enable = "no"
ColourNote ("yellow", "", "Quaffer plugin disabled.")
elseif wildcards [1] == "help" then
qff_help ()
else
if wildcards [2] == "" then
ColourNote ("yellow", "", "You need to enter a value!")
return
end
if wildcards [1] == "hp potion" then
qff_hp_potion = wildcards [2]
ColourNote("yellow", "", "Set quaffer heal pot to : " .. qff_hp_potion)
elseif wildcards [1] == "mn potion" then
qff_mn_potion = wildcards [2]
ColourNote("yellow", "", "Set quaffer mana pot to : " .. qff_mn_potion)
elseif wildcards [1] == "mv potion" then
qff_mv_potion = wildcards [2]
ColourNote("yellow", "", "Set quaffer moves pot to : " .. qff_mv_potion)
elseif wildcards [1] == "bag" then
qff_bag = wildcards [2]
ColourNote("yellow", "", "Set quaffer bag to : " .. qff_bag)
else
if wildcards [1] == "hp percent" then
qff_percent_hp = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer hp percent to : " .. qff_percent_hp)
elseif wildcards [1] == "mn percent" then
qff_percent_mn = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer mn percent to : " .. qff_percent_mn)
elseif wildcards [1] == "mv percent" then
qff_percent_mv = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer mv percent to : " .. qff_percent_mv)
elseif wildcards [1] == "hp count" then
qff_count_hp = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer hp count to : " .. qff_count_hp)
elseif wildcards [1] == "mn count" then
qff_count_mn = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer mn count to : " .. qff_count_mn)
elseif wildcards [1] == "mv count" then
qff_count_mv = tonumber (wildcards [2])
ColourNote ("yellow", "", "Set quaffer mv count to : " .. qff_count_mv)
end
end
end
end -- qff_settings
function qff_tellme (name, line, wildcards)
ColourNote ("yellow", "", "Bag : " .. qff_bag)
ColourNote ("yellow", "", "HP Potion : " .. qff_hp_potion)
ColourNote ("yellow", "", "MN Potion : " .. qff_mn_potion)
ColourNote ("yellow", "", "MV Potion : " .. qff_mv_potion)
ColourNote ("yellow", "", "HP Percent : " .. qff_percent_hp)
ColourNote ("yellow", "", "MN Percent : " .. qff_percent_mn)
ColourNote ("yellow", "", "MV Percent : " .. qff_percent_mv)
ColourNote ("yellow", "", "HP Count : " .. qff_count_hp)
ColourNote ("yellow", "", "MN Count : " .. qff_count_mn)
ColourNote ("yellow", "", "MV Count : " .. qff_count_mv)
ColourNote ("yellow", "", "Enabled : " .. qff_enable)
end
function qff_help (name, line, wildcards)
ColourNote ("teal", "", world.GetPluginInfo (world.GetPluginID (), 3))
return true -- done
end -- qff_help
function OnPluginInstall ()
if GetVariable ("enabled") == "false" then
ColourNote ("yellow", "", "Warning: Plugin " .. GetPluginName ().. " is currently disabled.")
check (EnablePlugin(GetPluginID (), false))
return
end -- they didn't enable us last time
OnPluginEnable () -- do initialization stuff
end -- OnPluginInstall
|