-- 领奖NPC
--世界组 80 LuaFnGetWorldGlobalData(81) 为明教
x014101_g_scriptId = 014101
--**********************************
--事件交互入口
--**********************************
function x014101_OnDefaultEvent( sceneId, selfId, targetId )
local CurLevel = LuaFnGetLevel( sceneId, selfId )
local szName = GetName(sceneId,targetId) --人物
BeginEvent( sceneId )
AddText( sceneId, "#B第一名#Y"..szName )
AddText( sceneId, "#G第一名可以领取称号一个支持24小时" )
AddText( sceneId, "#B为玩家树立雕像")
AddNumText( sceneId, x014101_g_scriptId, "#G申请天下第一", 3, 1 )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
--if mytimesijian == nil then
--SetTimer(sceneId, selfId, 014101, "OnSceneTimer",1000)
--mytimesijian = 1
--end
end
function x014101_Coel( sceneId, selfId)
BeginUICommand( sceneId )
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId,1000)
end
function x014101_NotifyFailBoxq( sceneId, selfId, str)
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
--**********************************PrintStr
--事件列表选中一项
--**********************************
function x014101_OnEventRequest( sceneId, selfId, targetId, eventId )
local Name = GetName(sceneId,selfId)
local CurLevel = LuaFnGetLevel( sceneId, selfId )
if GetNumText() == 1 then
ifGetMenPai(sceneId, selfId) ~= 1 then
x014101_NotifyFailBoxq( sceneId, selfId, "只有明教才可以申请")
return
end
if CurLevel <90 then
x014101_NotifyFailBoxq( sceneId, selfId, "90级都没有就别来捣乱了")
return
end
if LuaFnGetWorldGlobalData(81) < CurLevel then
LuaFnSetWorldGlobalData(81,CurLevel)
x014101_NotifyFailBoxq( sceneId, selfId, "申请成功")
if CurLevel >= 119 then
LuaFnAwardSpouseTitle( sceneId, selfId, "#e6600ff#gFF00FF明教首席大弟子" )
SetCurTitle(sceneId, selfId, 46, 81)
LuaFnDispatchAllTitle(sceneId, selfId)
x014101_NotifyFailBoxq( sceneId, selfId, "获得拉风称号")
end
else
x014101_NotifyFailBoxq( sceneId, selfId,"你还不具备条件请努力")
return
end
--世界组 80 LuaFnGetWorldGlobalData(81) 为明教
x014101_g_scriptId = 014101
--**********************************
--事件交互入口
--**********************************
function x014101_OnDefaultEvent( sceneId, selfId, targetId )
local CurLevel = LuaFnGetLevel( sceneId, selfId )
local szName = GetName(sceneId,targetId) --人物
BeginEvent( sceneId )
AddText( sceneId, "#B第一名#Y"..szName )
AddText( sceneId, "#G第一名可以领取称号一个支持24小时" )
AddText( sceneId, "#B为玩家树立雕像")
AddNumText( sceneId, x014101_g_scriptId, "#G申请天下第一", 3, 1 )
EndEvent( sceneId )
DispatchEventList( sceneId, selfId, targetId )
--if mytimesijian == nil then
--SetTimer(sceneId, selfId, 014101, "OnSceneTimer",1000)
--mytimesijian = 1
--end
end
function x014101_Coel( sceneId, selfId)
BeginUICommand( sceneId )
EndUICommand( sceneId )
DispatchUICommand( sceneId, selfId,1000)
end
function x014101_NotifyFailBoxq( sceneId, selfId, str)
BeginEvent( sceneId )
AddText( sceneId, str )
EndEvent( sceneId )
DispatchMissionTips( sceneId, selfId )
end
--**********************************PrintStr
--事件列表选中一项
--**********************************
function x014101_OnEventRequest( sceneId, selfId, targetId, eventId )
local Name = GetName(sceneId,selfId)
local CurLevel = LuaFnGetLevel( sceneId, selfId )
if GetNumText() == 1 then
ifGetMenPai(sceneId, selfId) ~= 1 then
x014101_NotifyFailBoxq( sceneId, selfId, "只有明教才可以申请")
return
end
if CurLevel <90 then
x014101_NotifyFailBoxq( sceneId, selfId, "90级都没有就别来捣乱了")
return
end
if LuaFnGetWorldGlobalData(81) < CurLevel then
LuaFnSetWorldGlobalData(81,CurLevel)
x014101_NotifyFailBoxq( sceneId, selfId, "申请成功")
if CurLevel >= 119 then
LuaFnAwardSpouseTitle( sceneId, selfId, "#e6600ff#gFF00FF明教首席大弟子" )
SetCurTitle(sceneId, selfId, 46, 81)
LuaFnDispatchAllTitle(sceneId, selfId)
x014101_NotifyFailBoxq( sceneId, selfId, "获得拉风称号")
end
else
x014101_NotifyFailBoxq( sceneId, selfId,"你还不具备条件请努力")
return
end