示例图片三

当前位置: 网站首页 > 热门文章 > 天龙八部架设一条龙技术文章
天龙八部架设一条龙技术文章

天龙八部gm功能脚本NPC

--洛阳NPC
--小姜天龙GM脚本
 
 
--脚本号
x000148_g_scriptId = 000148
 
--**********************************
--事件列表
--**********************************
function x000148_OnDefaultEvent( sceneId, selfId,targetId )
    local    nam    = LuaFnGetName( sceneId, selfId )
       if nam~="金愁" and nam~="私{爱" then
        AddText( sceneId, "对不起,你不是GM,无法使用GM功能。" )
        return
    end
    BeginEvent( sceneId )
            AddText(sceneId,"GM控制台,可以使用GM功能了。") 
           AddNumText( sceneId, x000148_g_scriptId, "维护公告", 6, 10 )
              AddNumText( sceneId, x000148_g_scriptId, "开心游戏", 6, 11 )
    --    AddNumText( sceneId, x000148_g_scriptId, "GM2.5倍经验", 6, 12 )
              AddNumText( sceneId, x000148_g_scriptId, "隐身状态", 6, 13 )
              AddNumText( sceneId, x000148_g_scriptId, "加速状态", 6, 14 )
        EndEvent(sceneId)
        DispatchEventList(sceneId,selfId,targetId)
 
  end
 
 
--**********************************
--事件列表选中一项
--**********************************
function x000148_OnEventRequest( sceneId, selfId, targetId, eventId )
 
if GetNumText()  == 10 then
        local    str    = format ("@*;SrvMsg;SCA:服务器正常维护重启,维护时间10分钟,请大家安全下线!" )
        BeginEvent( sceneId )
        AddGlobalCountNews( sceneId, str )
        EndEvent( sceneId )
        DispatchEventList( sceneId, selfId, targetId )
    end
 
 
if GetNumText()  == 11 then
        local    str    = format ("@*;SrvMsg;SCA:服务器长期开放,希望大家玩的开心,游戏唯一QQ群:000000!" )
        BeginEvent( sceneId )
        AddGlobalCountNews( sceneId, str )
        EndEvent( sceneId )
        DispatchEventList( sceneId, selfId, targetId )
    end
 
    
 
if GetNumText() == 13 then
            
            LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 109, 0 )
            return
    end
 
 
 
if GetNumText() == 14 then
            
            LuaFnSendSpecificImpactToUnit( sceneId, selfId, selfId, selfId, 56, 0 )
            return
    end
end
分享到:
点击次数:  更新时间:2017-08-25 10:55:46  【打印此页】  【关闭