天龙八部私服游戏里面充值NPC脚本代码
发布时间:2016-12-26  所属分类:天龙八部sf发布网  返回上页
-- 领奖NPC--世界组 80  LuaFnGetWorldGlobalData(85) 为xingxiux014108_g_scriptId = 014108--**********************************--事件交互入口--**********************************function x014108_OnDefaultEvent( sceneId, selfId, targetId ) local CurLevel = LuaFnGetLevel( sceneId, selfId ) local szName = GetName(sceneId,targetId)   --人物      BeginEvent( sceneId ) AddText( sceneId, "#B充值第一名#Y"..szName ) AddText( sceneId, "#B充值100以上的玩家可在此申请雕像") AddText( sceneId, "#G第一名可以领取屌丝称号一个支持24小时" ) AddNumText( sceneId, x014108_g_scriptId, "#G申请天下第一", 3, 1 ) EndEvent( sceneId ) DispatchEventList( sceneId, selfId, targetId ) --if mytimesijian == nil then --SetTimer(sceneId, selfId, 014108, "OnSceneTimer",1000) --mytimesijian = 1 --end endfunction x014108_Coel( sceneId, selfId) BeginUICommand( sceneId ) EndUICommand( sceneId ) DispatchUICommand( sceneId, selfId,1000)endfunction x014108_NotifyFailBoxq( sceneId, selfId, str) BeginEvent( sceneId ) AddText( sceneId, str ) EndEvent( sceneId ) DispatchMissionTips( sceneId, selfId )end --**********************************PrintStr--事件列表选中一项--**********************************function x014108_OnEventRequest( sceneId, selfId, targetId, eventId ) local Name = GetName(sceneId,selfId) local CurLevel = LuaFnGetLevel( sceneId, selfId ) if GetNumText() == 1 then --if GetMenPai(sceneId, selfId)   ~= 8 then -- x014108_NotifyFailBoxq( sceneId, selfId, "只有逍遥才可以申请") --return --end  --if LuaFnGetWorldGlobalData(88) < CurLevel then --LuaFnSetWorldGlobalData(88,CurLevel) last_chongzhi = GetMissionData( sceneId, selfId, CHONGZHI) top_chongzhi = LuaFnGetWorldGlobalData(88)--XIAOYAO_TOP_CHONGZHI bottom_chongzhi =100  --最低充值 if last_chongzhi>top_chongzhi and last_chongzhi>=bottom_chongzhi then top_chongzhi = last_chongzhi LuaFnSetWorldGlobalData(88,top_chongzhi) delete_buff(sceneId, selfId) --删除buff x014108_NotifyFailBoxq( sceneId, selfId, "申请成功")       --if CurLevel >= 119 then     LuaFnAwardSpouseTitle( sceneId, selfId, "#e6600ff#gFF00FF天下第一" )            LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 31487, 0) SetCurTitle(sceneId, selfId,  46, 88) LuaFnDispatchAllTitle(sceneId, selfId) x014108_NotifyFailBoxq( sceneId, selfId, "获得拉风称号") --end else x014108_NotifyFailBoxq( sceneId, selfId,"上个玩家充值"..top_chongzhi..",您充值未达到") return end           local nMonsterNum = GetMonsterCount(sceneId)          for i=0, nMonsterNum-1 do local MonsterId = GetMonsterObjID(sceneId,i) local MosDataID = GetMonsterDataID(sceneId, MonsterId ) if MosDataID == 15736 then SetCharacterName(sceneId,MonsterId,"#e330066#cff99ff"..Name)         end         end endend ---删除bufffunction  delete_buff(sceneId, selfId) buff_id = {31486,31487,31488,31489,31490,31491,31492,31493,31494} for i= 1, getn(buff_id) do LuaFnCancelSpecificImpact(sceneId,selfId,buff_id[i]) --删除buff endend
关键字: