local ftml_help_NPCxq = {100905,"新手指引NPC",6,7777,1,1} --NPC详情
local ftml_help_Word = "/help" --呼出指令
----------
Global_Reg.RegInit("ftml_help_zhuce");--全局注册
Global_Reg.RegTalkEvent("TalkEvent_ftml_help");--对话注册
function TalkEvent_ftml_help(player, msg, color, range, size)
if(string.sub(msg,1,7)=="P|"..ftml_help_Word) then
ftml_help_chuangkou(LuaNpcIndex["ftml_help_npc"],player)
end
end
function ftml_help_zhuce() --NPC注册
ftml_help_NPC()
return 0
end
function ftml_help_NPC(npc) --NPC设置
if npc == nil then
npc = NL.CreateNpc(nil,"ftml_help_NPCzhizuo")
end
Char.SetData(npc,1,ftml_help_NPCxq[1])
Char.SetData(npc,2,ftml_help_NPCxq[1])
Char.SetData(npc,2000,ftml_help_NPCxq[2])
Char.SetData(npc,7,ftml_help_NPCxq[3])
Char.SetData(npc,4,ftml_help_NPCxq[4])
Char.SetData(npc,5,ftml_help_NPCxq[5])
Char.SetData(npc,6,ftml_help_NPCxq[6])
LuaNpcIndex["ftml_help_npc"]=npc;--读取使用用 LuaNpcIndex.ftml_help_npc 就可以读取对应NPC index
InstallNpc("ftml_help_npc",npc);
NLG.UpChar(npc)
Char.SetTalkedEvent(nil,"ftml_help_chuangkou",npc)
Char.SetWindowTalkedEvent(nil,"ftml_help_gongneng",npc)
return true
end
function ftml_help_NPCzhizuo(index)
return true;
end
function ftml_help_chuangkou(npc,player) --窗口
NLG.ShowWindowTalked(player,2,2,222,"7\n\n$1本服便捷指令:$0\n\n$4/0$0 整理背包 $4/3$0 停止自动 $4/7$0 远程观战\n$4/伙伴编号$0 召唤对应编号伙伴 $4F11$0 屏蔽人物名字 \n$4ctrl+F11$0 显示血条 $4ctrl+home$0 变更聊天框状态 \n$4home$0 清理聊天窗记录 $4F1$0 开关自动战斗\n\n$4 跳转至新人指引贴$0",npc)
end
function ftml_help_gongneng(npc,player,_SqeNo,_select,_data) --功能
--NLG.SystemMessage(player,"\n _SqeNo是:"..(_SqeNo or "空").."它的类型是"..type(_SqeNo).."\n _select是:".. (_select or "空").."它的类型是"..type(_select).."\n _data是:"..(_data or "空").."它的类型是"..type(_data))
if _SqeNo == 222 then
if _select == 0 then
if _data == "2" then
Char.OpenHttp(player,"http://bbs.ftmoli.com/forum.php?mod=viewthread&tid=115")
end
end
end
end
|
|