|
-- 领奖NPC
x002093_g_scriptId = 002093
-- 奖励标记
x002093_g_flag={
[70] =MF_LINGQUZENGDIAN
[80] =MF_LINGQUYUANBAO80
[90] =MF_LINGQUYUANBAO90
}
--*****************************
--事件交互入口
--*****************************
function x002093_OnDefaultEvent(scencId,selfId,targetId)
BeginEvent(sceneId)
strText = "欢迎光临我爱天龙"
AddText(sceneid,str Text)
AddNum Text(sceneId,x002093_g_scriptId,"领取赠点",5,101)
AddNum Text(sceneId,x002093_g_scriptId,"领取元宝",5,101)
EndEvent(sceneId)
DispatchEventList(scencId,selfId,targetId)
end
--**********************
--事件列表选中一项
--**********************
function x002093_OnEventRequest( sceneId, selfId, targetId, eventId )
if GetNumText() == 101 then
local index = GetMissonFlag( sceneId, selfId,MF_LINGQUZENGDIAN)
if index == 1 then
x002093_g_TalkMsg( sceneId, selfId, targetId,"您已经领取该项奖励,不能再领取.")
return
end
ZengDian(SceneId,selfId,targetId,1,10000)
SetMissionFlag(SceneId,selfId,MF_LINGQUZENGDIAN,1)
BeginEvent(sceneID)
AddText(sceneId,"领取元宝成功,您获得了10000赠点,谢谢你对[我爱天龙]的支持")
EndEvent(sceneId)
DiapatchEventList( sceneId, selfId, targetId)
elsif GetNum Text() == 102 then
BeginEvent(sceneId)
DispatchEventList(sceneId,selfid,targetId)
elseif GetNum Text() == 102 then
BeginEvent(secneId)
AddText(sceneId,"为了回馈广大玩家对[我爱天龙]的支持,现推出免费领取赠点的活动,请选择相应的等级领取奖励")
AddText(scened,x002093_g_scriptId,"领取80级7万元宝奖励",5,80)
AddText(scened,x002093_g_scriptId,"领取90级15万元宝奖励",5,90)
EndEvent(scened)
DispatchEventList(scenedId,selfid,targetId)
elseif GetNum Text() == 80 or GetNum Text() == 90 then
x002093_lingquyuanbao(scened,selfId,targetid)
return
end
end
--********************
--对话提示
--********************
function x002093_OnEventRequest( sceneId, selfId, targetId, eventId )
BeginEvent(sceneId)
AddText(sceneId,str)
EndEvent(sceneId)
DispatchEventList( sceneId, selfId, targetId, eventId)
end
--*******************
--领取元宝
--*******************
function x002093_OnEventRequest( sceneId, selfId, targetId, eventId )
local mylevel = GetLevel(sceneId, selfId, targetId, eventId)
if mylevel < GetNumText() then
local str Text = format("您的等级不够,待等级达到%d再来找我吧",GetNumText())
X002093,TalkMsg(sceneId, selfId, targetId,str Text)
return
end
if GetNumText()==80 then
local index = GetMissionFlag(sceneId, selfId, MF_LINGQUYUANBAO80)
if index == 1 then
x002093_TalkMsg(sceneId, selfId, targetId,"您已经领取过该奖励,不能再领取了")
return
end
YuanBao(sceneId,selfId,targetId,1,70000)
ZengDian(sceneId,selfId,targetId,1,70000)
SetMissionFlag((sceneId,selfId,targetId,"领取元宝成功,您获得了70000元宝和赠点,谢谢你对[我爱天龙]的支持")
elseif GetNum Text() == 90 then
local index = GetMissionFlag(sceneId,selfId,MF_LINGQUYUANBAO90)
if index == 1 then
x002093_TalkMsg(sceneId,selfId,targetId,"您已经领取过该项奖励,不能再领取了")
return
end
YuanBao(sceneId,selfId,targetId,1,150000)
ZengDian(sceneId,selfId,targetId,1,150000)
SetMissionFlag((sceneId,selfId,MF_LINGQUYUANBAO90,1)
x002093_TalkMsg(sceneId,selfId,targetId,"领取元宝成功,您获得了150000元宝和150000赠点,感谢您对[我爱天龙]的支持")
end
end
|
|