Hola, estoy pidiendo aplicacion de modder, he hecho algunos mods entre ellos el mejor es Coords Plus DX, el mod muestra coordenadas, velocidad tiene su propio menu, tiene animaciones y mas les dejo algunas imagenes de el, no puedp asi que dejare el codigo:
-- name: \\#ffff1e\\Coords\\#0000ff\\Plus DX
-- description: XYZ, Speed, /cc, /a, /s, /c. Con filtros de error para comandos.
local r, g, b = 255, 255, 30
local show_xyz = true
local show_spd = false
local use_anim = true
local config_loaded = false
local timer_load = 0
local glitch_intensity = 0
local last_health = 0x0880
local anim_x_xyz, anim_x_spd = -400, -400
local exiting_xyz, exiting_spd = false, false
local current_y_offset = 0
local function play_select_sound()
if gMarioStates[0] and gMarioStates[0].marioObj then
play_sound(SOUND_MENU_CLICK_FILE_SELECT, gMarioStates[0].marioObj.header.gfx.cameraToObject)
end
end
local function play_error_sound()
if gMarioStates[0] and gMarioStates[0].marioObj then
play_sound(SOUND_MENU_REVERSE_PAUSE, gMarioStates[0].marioObj.header.gfx.cameraToObject)
end
end
local function save_config()
local data_string = string.format("%d %d %d %d %d %d", r, g, b, show_xyz and 1 or 0, show_spd and 1 or 0, use_anim and 1 or 0)
mod_storage_save("cp_final_stable", data_string)
end
local function load_config()
local data = mod_storage_load("cp_final_stable")
if data ~= nil and data ~= "" then
local t = {}
for val in string.gmatch(data, "%S+") do table.insert(t, tonumber(val)) end
if #t >= 6 then
r, g, b, show_xyz, show_spd, use_anim = t[1], t[2], t[3], (t[4] == 1), (t[5] == 1), (t[6] == 1)
end
end
config_loaded = true
end
local function format_num(val)
local n = tonumber(val) or 0
return tostring(tonumber(string.format("%.10f", n)))
end
hook_chat_command("s", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then show_spd = true exiting_spd = false
elseif arg == "off" then show_spd = false exiting_spd = true
elseif arg == "" then show_spd = not show_spd exiting_spd = not show_spd
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /s on, /s off o solo /s")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("Speed: " .. (show_spd and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("c", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then show_xyz = true exiting_xyz = false
elseif arg == "off" then show_xyz = false exiting_xyz = true
elseif arg == "" then show_xyz = not show_xyz exiting_xyz = not show_xyz
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /c on, /c off o solo /c")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("XYZ: " .. (show_xyz and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("a", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then use_anim = true
elseif arg == "off" then use_anim = false
elseif arg == "" then use_anim = not use_anim
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /a on, /a off o solo /a")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("Animaciones: " .. (use_anim and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("cc", "[R G B]", function(msg)
local col = {}
for w in string.gmatch(msg, "%S+") do table.insert(col, tonumber(w)) end
if #col >= 3 and col[1] and col[2] and col[3] then
r = math.max(0, math.min(255, col[1]))
g = math.max(0, math.min(255, col[2]))
b = math.max(0, math.min(255, col[3]))
play_select_sound()
save_config()
djui_chat_message_create("Color: \\#ff0000\\"..r.." \\#00ff00\\"..g.." \\#0000ff\\"..b)
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: /cc necesita 3 números (Ej: /cc 255 255 30)")
end
return true
end)
function on_hud_render()
if not config_loaded then
timer_load = timer_load + 1
if timer_load > 10 then load_config() end
return
end
local m = gMarioStates[0]
if not m or not m.marioObj then return end
-- TUS AJUSTES PERSONALIZADOS
local health_loss = last_health - m.health
if health_loss > 10 then glitch_intensity = 10 end
last_health = m.health
if glitch_intensity > 0 then
glitch_intensity = glitch_intensity - 0.3
else
glitch_intensity = 0
end
local cur_t_in = use_anim and 0.08 or 1
local cur_t_out = use_anim and 0.04 or 1
local target_x_xyz = (show_xyz and not exiting_xyz) and 0 or -400
anim_x_xyz = anim_x_xyz + (target_x_xyz - anim_x_xyz) * ((target_x_xyz == 0) and cur_t_in or cur_t_out)
if not show_xyz and anim_x_xyz < -390 then exiting_xyz = false end
local target_x_spd = (show_spd and not exiting_spd) and 0 or -400
anim_x_spd = anim_x_spd + (target_x_spd - anim_x_spd) * ((target_x_spd == 0) and cur_t_in or cur_t_out)
if not show_spd and anim_x_spd < -390 then exiting_spd = false end
local target_y_offset = show_xyz and 100 or 0
current_y_offset = current_y_offset + (target_y_offset - current_y_offset) * cur_t_in
djui_hud_set_resolution(RESOLUTION_DJUI)
djui_hud_set_font(FONT_ALIASED)
local base_y = djui_hud_get_screen_height() - 420
local function dibujar_dato_glitch(texto, x, y)
local x_cursor = x
local s_int = math.floor(glitch_intensity)
for i = 1, #texto do
local char = texto:sub(i, i)
local rx, ry = 0, 0
if s_int > 0 then
rx, ry = math.random(-s_int, s_int), math.random(-s_int, s_int)
end
djui_hud_set_color(0, 0, 0, 255)
djui_hud_print_text(char, x_cursor + rx + 2, y + ry + 2, 1)
djui_hud_set_color(r, g, b, 255)
djui_hud_print_text(char, x_cursor + rx, y + ry, 1)
x_cursor = x_cursor + djui_hud_measure_text(char)
end
end
if show_xyz or exiting_xyz or anim_x_xyz > -395 then
dibujar_dato_glitch("X: " .. format_num(m.pos.x), 40 + anim_x_xyz, base_y + 30)
dibujar_dato_glitch("Y: " .. format_num(m.pos.y), 40 + anim_x_xyz, base_y + 60)
dibujar_dato_glitch("Z: " .. format_num(m.pos.z), 40 + anim_x_xyz, base_y + 90)
end
if show_spd or exiting_spd or anim_x_spd > -395 then
local py_base = base_y + current_y_offset
dibujar_dato_glitch("Vel X: " .. format_num(m.vel.x), 40 + anim_x_spd, py_base + 30)
dibujar_dato_glitch("Vel Y: " .. format_num(m.vel.y), 40 + anim_x_spd, py_base + 60)
dibujar_dato_glitch("Vel Z: " .. format_num(m.vel.z), 40 + anim_x_spd, py_base + 90)
end
end
hook_event(HOOK_ON_HUD_RENDER, on_hud_render)
local function toggle_speed_display()
show_spd = not show_spd
exiting_spd = not show_spd
play_select_sound()
save_config()
end
local function toggle_xyz_display()
show_xyz = not show_xyz
exiting_xyz = not show_xyz
play_select_sound()
save_config()
end
local function toggle_anim_setting()
use_anim = not use_anim
play_select_sound()
save_config()
end
hook_mod_menu_button("Mostrar/Ocultar XYZ", toggle_xyz_display)
hook_mod_menu_button("Mostrar/Ocultar Velocidad", toggle_speed_display)
hook_mod_menu_button("Activar/Desactivar Animaciones", toggle_anim_setting)
-- name: \\#ffff1e\\Coords\\#0000ff\\Plus DX
-- description: XYZ, Speed, /cc, /a, /s, /c. Con filtros de error para comandos.
local r, g, b = 255, 255, 30
local show_xyz = true
local show_spd = false
local use_anim = true
local config_loaded = false
local timer_load = 0
local glitch_intensity = 0
local last_health = 0x0880
local anim_x_xyz, anim_x_spd = -400, -400
local exiting_xyz, exiting_spd = false, false
local current_y_offset = 0
local function play_select_sound()
if gMarioStates[0] and gMarioStates[0].marioObj then
play_sound(SOUND_MENU_CLICK_FILE_SELECT, gMarioStates[0].marioObj.header.gfx.cameraToObject)
end
end
local function play_error_sound()
if gMarioStates[0] and gMarioStates[0].marioObj then
play_sound(SOUND_MENU_REVERSE_PAUSE, gMarioStates[0].marioObj.header.gfx.cameraToObject)
end
end
local function save_config()
local data_string = string.format("%d %d %d %d %d %d", r, g, b, show_xyz and 1 or 0, show_spd and 1 or 0, use_anim and 1 or 0)
mod_storage_save("cp_final_stable", data_string)
end
local function load_config()
local data = mod_storage_load("cp_final_stable")
if data ~= nil and data ~= "" then
local t = {}
for val in string.gmatch(data, "%S+") do table.insert(t, tonumber(val)) end
if #t >= 6 then
r, g, b, show_xyz, show_spd, use_anim = t[1], t[2], t[3], (t[4] == 1), (t[5] == 1), (t[6] == 1)
end
end
config_loaded = true
end
local function format_num(val)
local n = tonumber(val) or 0
return tostring(tonumber(string.format("%.10f", n)))
end
hook_chat_command("s", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then show_spd = true exiting_spd = false
elseif arg == "off" then show_spd = false exiting_spd = true
elseif arg == "" then show_spd = not show_spd exiting_spd = not show_spd
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /s on, /s off o solo /s")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("Speed: " .. (show_spd and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("c", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then show_xyz = true exiting_xyz = false
elseif arg == "off" then show_xyz = false exiting_xyz = true
elseif arg == "" then show_xyz = not show_xyz exiting_xyz = not show_xyz
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /c on, /c off o solo /c")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("XYZ: " .. (show_xyz and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("a", "[on|off]", function(msg)
local arg = msg:lower():gsub("%s+", "")
if arg == "on" then use_anim = true
elseif arg == "off" then use_anim = false
elseif arg == "" then use_anim = not use_anim
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: Usa /a on, /a off o solo /a")
return true
end
play_select_sound()
save_config()
djui_chat_message_create("Animaciones: " .. (use_anim and "\\#00ff00\\ON" or "\\#ff0000\\OFF"))
return true
end)
hook_chat_command("cc", "[R G B]", function(msg)
local col = {}
for w in string.gmatch(msg, "%S+") do table.insert(col, tonumber(w)) end
if #col >= 3 and col[1] and col[2] and col[3] then
r = math.max(0, math.min(255, col[1]))
g = math.max(0, math.min(255, col[2]))
b = math.max(0, math.min(255, col[3]))
play_select_sound()
save_config()
djui_chat_message_create("Color: \\#ff0000\\"..r.." \\#00ff00\\"..g.." \\#0000ff\\"..b)
else
play_error_sound()
djui_chat_message_create("\\#ff3333\\Error: /cc necesita 3 números (Ej: /cc 255 255 30)")
end
return true
end)
function on_hud_render()
if not config_loaded then
timer_load = timer_load + 1
if timer_load > 10 then load_config() end
return
end
local m = gMarioStates[0]
if not m or not m.marioObj then return end
-- TUS AJUSTES PERSONALIZADOS
local health_loss = last_health - m.health
if health_loss > 10 then glitch_intensity = 10 end
last_health = m.health
if glitch_intensity > 0 then
glitch_intensity = glitch_intensity - 0.3
else
glitch_intensity = 0
end
local cur_t_in = use_anim and 0.08 or 1
local cur_t_out = use_anim and 0.04 or 1
local target_x_xyz = (show_xyz and not exiting_xyz) and 0 or -400
anim_x_xyz = anim_x_xyz + (target_x_xyz - anim_x_xyz) * ((target_x_xyz == 0) and cur_t_in or cur_t_out)
if not show_xyz and anim_x_xyz < -390 then exiting_xyz = false end
local target_x_spd = (show_spd and not exiting_spd) and 0 or -400
anim_x_spd = anim_x_spd + (target_x_spd - anim_x_spd) * ((target_x_spd == 0) and cur_t_in or cur_t_out)
if not show_spd and anim_x_spd < -390 then exiting_spd = false end
local target_y_offset = show_xyz and 100 or 0
current_y_offset = current_y_offset + (target_y_offset - current_y_offset) * cur_t_in
djui_hud_set_resolution(RESOLUTION_DJUI)
djui_hud_set_font(FONT_ALIASED)
local base_y = djui_hud_get_screen_height() - 420
local function dibujar_dato_glitch(texto, x, y)
local x_cursor = x
local s_int = math.floor(glitch_intensity)
for i = 1, #texto do
local char = texto:sub(i, i)
local rx, ry = 0, 0
if s_int > 0 then
rx, ry = math.random(-s_int, s_int), math.random(-s_int, s_int)
end
djui_hud_set_color(0, 0, 0, 255)
djui_hud_print_text(char, x_cursor + rx + 2, y + ry + 2, 1)
djui_hud_set_color(r, g, b, 255)
djui_hud_print_text(char, x_cursor + rx, y + ry, 1)
x_cursor = x_cursor + djui_hud_measure_text(char)
end
end
if show_xyz or exiting_xyz or anim_x_xyz > -395 then
dibujar_dato_glitch("X: " .. format_num(m.pos.x), 40 + anim_x_xyz, base_y + 30)
dibujar_dato_glitch("Y: " .. format_num(m.pos.y), 40 + anim_x_xyz, base_y + 60)
dibujar_dato_glitch("Z: " .. format_num(m.pos.z), 40 + anim_x_xyz, base_y + 90)
end
if show_spd or exiting_spd or anim_x_spd > -395 then
local py_base = base_y + current_y_offset
dibujar_dato_glitch("Vel X: " .. format_num(m.vel.x), 40 + anim_x_spd, py_base + 30)
dibujar_dato_glitch("Vel Y: " .. format_num(m.vel.y), 40 + anim_x_spd, py_base + 60)
dibujar_dato_glitch("Vel Z: " .. format_num(m.vel.z), 40 + anim_x_spd, py_base + 90)
end
end
hook_event(HOOK_ON_HUD_RENDER, on_hud_render)
local function toggle_speed_display()
show_spd = not show_spd
exiting_spd = not show_spd
play_select_sound()
save_config()
end
local function toggle_xyz_display()
show_xyz = not show_xyz
exiting_xyz = not show_xyz
play_select_sound()
save_config()
end
local function toggle_anim_setting()
use_anim = not use_anim
play_select_sound()
save_config()
end
hook_mod_menu_button("Mostrar/Ocultar XYZ", toggle_xyz_display)
hook_mod_menu_button("Mostrar/Ocultar Velocidad", toggle_speed_display)
hook_mod_menu_button("Activar/Desactivar Animaciones", toggle_anim_setting)
Last edited: