Like I mentioned, I just wanted to disable Damage cappy without taking away any other settings (Classic moveset, cappyless, etc). BUT your script was a great start. I think I found my solution and will share below for any other Flood hosts interested. I'm hella new to LUA coding so polish this as you wish
In the
Then I added your HOOK example towards the end of the API file, as so:
I think its working but I'll have to wait for some people to join to see, thanks a lot Isaac!!
Edit: Seems to be working, I was worried itd only effect host but I'm guessing player ID #0 is the client user playing the game, not the host player?
In the
omm-api-z.lua
file I created a new "set settings" function (marked by comments below):
Code:
--------------
-- Settings --
--------------
omm_get_setting = function (m, setting)
return omm_data_get_settings(m)[setting]:get()
end,
-- new code
omm_set_setting = function (m, setting, value)
return omm_data_get_settings(m)[setting]:set(value)
end,
--
omm_force_setting = function (setting, value)
gOmmSettingForceValues[setting] = value
end,
omm_get_forced_setting = function (setting)
return gOmmSettingForceValues[setting]
end,
Then I added your HOOK example towards the end of the API file, as so:
Code:
hook_event(HOOK_UPDATE, function ()
if not OmmApi then return end
if OmmApi.omm_get_setting({ playerIndex = 0 }, "cappy") == 3 then
djui_chat_message_create("Damage cappy disabled.")
OmmApi.omm_set_setting({ playerIndex = 0 }, "cappy", 2)
end
end)
I think its working but I'll have to wait for some people to join to see, thanks a lot Isaac!!
Edit: Seems to be working, I was worried itd only effect host but I'm guessing player ID #0 is the client user playing the game, not the host player?
Last edited: