|
function CreateDailyNpc(Image, Name, MapType, MapID, PosX, PosY, Dir)
local DailyScriptNpcIndex = NL.CreateNpc("./lua/System/BaseModule/Base.lua", "Myinit");
Char.SetData( DailyScriptNpcIndex, %对象_形象%, Image);
Char.SetData( DailyScriptNpcIndex, %对象_原形%, Image);
Char.SetData( DailyScriptNpcIndex, %对象_地图类型%, MapType);
↑-- unexpected symbol near <eof>) ?_?WHY
Char.SetData( DailyScriptNpcIndex, %对象_地图%, MapID);
Char.SetData( DailyScriptNpcIndex, %对象_X%, PosX);
Char.SetData( DailyScriptNpcIndex, %对象_Y%, PosY);
Char.SetData( DailyScriptNpcIndex, %对象_方向%, Dir);
Char.SetData( DailyScriptNpcIndex, %对象_原名%, Name);
Char.SetData( DailyScriptNpcIndex, %对象_名色%, NameColor);
tbl_LuaNpcIndex = tbl_LuaNpcIndex or {}
tbl_LuaNpcIndex["DailyNpc"] = DailyScriptNpcIndex
Char.SetTalkedEvent(nil, "DailyNpc__Talked", DailyScriptNpcIndex)
Char.SetWindowTalkedEvent(nil, "DailyNpc__WindowTalked", DailyScriptNpcIndex)
Char.SetLoopEvent(nil, "DailyNpc_LoopEvent", DailyScriptNpcIndex, math.random(1000,5000))
NLG.UpChar(DailyScriptNpcIndex)
return DailyScriptNpcIndex
end
|
|