--动态天气
if numText == 185003 then
-- 动态天气
-- 1 小雨、2 大雨、3 雷阵雨、4 下雪、
-- 动态天气
-- 18 大风天气、19 小雨(新)、20 玫瑰花雨
-- 全景烟花
-- 5 花雨蹁跹、6 竹叶青青 7 枫叶红红、8 黄沙漫天 9、财源滚滚
-- 10 五一劳动节星星、11 紫色花瓣、12 粉色花瓣、13 黄色花瓣、14 金色花瓣、15 蓝色花瓣、
-- 16 绿色花瓣、20 满天玫瑰、21 彩色礼花+花瓣(未见过)、22 生日快乐、23 周年庆花蕊、24 微小星光
-- 25 大雪+闪电、26 红色闪电+星火+熔浆掉落、27 满屏花朵+闪电、28 紫色蝴蝶+心形、29 紫色星星
-- 特殊类
-- 30 战斗开始
BeginEvent( sceneId )
AddNumText( sceneId, x666889_g_scriptId, "清除动态天气", 6, 185033)
--AddNumText( sceneId, x666889_g_scriptId, "小雨", 6, 185010)
AddNumText( sceneId, x666889_g_scriptId, "大雨", 6, 185011)
AddNumText( sceneId, x666889_g_scriptId, "雷阵雨", 6, 185012)
AddNumText( sceneId, x666889_g_scriptId, "下雪", 6, 185013)
AddNumText( sceneId, x666889_g_scriptId, "大风天气", 6, 185014)
AddNumText( sceneId, x666889_g_scriptId, "小雨(新)", 6, 185015)
AddNumText( sceneId, x666889_g_scriptId, "玫瑰花雨", 6, 185016)
AddNumText( sceneId, x666889_g_scriptId, "花雨蹁跹", 6, 185017)
AddNumText( sceneId, x666889_g_scriptId, "竹叶青青", 6, 185018)
AddNumText( sceneId, x666889_g_scriptId, "枫叶红红", 6, 185019)
AddNumText( sceneId, x666889_g_scriptId, "黄沙漫天", 6, 185020)
AddNumText( sceneId, x666889_g_scriptId, "财源滚滚", 6, 185021)
AddNumText( sceneId, x666889_g_scriptId, "五一劳动节星星", 6, 185022)
AddNumText( sceneId, x666889_g_scriptId, "下一页", 6, 185040)
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end
if numText == 185040 then
BeginEvent( sceneId )
AddNumText( sceneId, x666889_g_scriptId, "紫色花瓣", 6, 185023)
AddNumText( sceneId, x666889_g_scriptId, "粉色花瓣", 6, 185024)
AddNumText( sceneId, x666889_g_scriptId, "黄色花瓣", 6, 185025)
AddNumText( sceneId, x666889_g_scriptId, "金色花瓣", 6, 185026)
AddNumText( sceneId, x666889_g_scriptId, "蓝色花瓣", 6, 185027)
AddNumText( sceneId, x666889_g_scriptId, "绿色花瓣", 6, 185028)
AddNumText( sceneId, x666889_g_scriptId, "满天玫瑰", 6, 185029)
AddNumText( sceneId, x666889_g_scriptId, "彩色礼花+花瓣", 6, 185030)
AddNumText( sceneId, x666889_g_scriptId, "生日快乐", 6, 185031)
AddNumText( sceneId, x666889_g_scriptId, "周年庆花蕊", 6, 185032)
AddNumText( sceneId, x666889_g_scriptId, "大雪+闪电", 6, 185034)
AddNumText( sceneId, x666889_g_scriptId, "红色闪电+星火+熔浆掉落", 6, 185035)
AddNumText( sceneId, x666889_g_scriptId, "满屏花朵+闪电", 6, 185036)
AddNumText( sceneId, x666889_g_scriptId, "紫色蝴蝶+心形", 6, 185037)
AddNumText( sceneId, x666889_g_scriptId, "紫色星星", 6, 185038)
AddNumText( sceneId, x666889_g_scriptId, "上一页", 6, 185003)
--AddNumText( sceneId, x666889_g_scriptId, "战斗开始", 6, 185039)
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
end
-- 创建一个查找表,将 GetNumText() 的值映射到天气代码
local weatherCodeLookup = {
[185010] = 1,
[185011] = 2,
[185012] = 3,
[185013] = 4,
[185014] = 18,
[185015] = 19,
[185016] = 20,
[185017] = 5,
[185018] = 6,
[185019] = 7,
[185020] = 8,
[185021] = 9,
[185022] = 10,
[185023] = 11,
[185024] = 12,
[185025] = 13,
[185026] = 14,
[185027] = 15,
[185028] = 16,
[185029] = 20,
[185030] = 21,
[185031] = 22,
[185032] = 23,
[185033] = 24,
[185034] = 25,
[185035] = 26,
[185036] = 27,
[185037] = 28,
[185038] = 29,
[185039] = 30,
}
local weatherCode = weatherCodeLookup[numText]
if weatherCode then
LuaFnSetSceneWeather(sceneId, weatherCode, 1*60*60*1000)
return
end