烈焰可用中秋活动脚本[需自行添加或修改]
function ontalk2208(npc,event,player)
player:echo(0,npc:GetLowGUID(),[[
圣诞活动:
1、活动期间内<font color='#FFFF00'>(2015年12月24日-2015年12月27日)</font>
完成怪物猎人任务、俘虏护送任务、保龙夺位战任务都有
几率获得圣诞卡或圣诞袜
(怪物猎人任务3倍领取,有更高几率获得圣诞袜)
(护送美女任务级别越高,获得圣诞袜的几率越高)
2、圣诞卡可直接使用,可获得50000经验
3、可使用5个圣诞卡兑换一个圣诞袜
4、圣诞袜打开后可获得
幻灵 注灵淬炼石 灵珠碎片 魄石碎片 真元丹 等极品道具
5、玩家每天登录可以领取一个圣诞袜
<a href='event:M2402,1'><u>我要兑换圣诞袜</u></a>
<a href='event:M2402,2'><u>我要领取圣诞袜</u></a>
]]);
end
function ontalk2208_1(npc,player)
if player:num_bag_black() >= 1 then
if player:num_item(10602) >= 5 then
player:remove_item(10602,5);-- 月饼
player:add_item(10603,1,1);-- 至珍月饼礼盒
player:alert(10,0,0,"恭喜您兑换圣诞袜成功");
else
player:alert(10,0,0,"圣诞卡数量不足,无法兑换");
end
else
player:alert(10,0,0,"背包空间不足");
end
ontalk2208(npc,0,player);
end
function ontalk2208_2(npc,player)
local t = tonumber(os.date("%m%d",os.time()));
if t >= ZhongqiuStart and t <= ZhongqiuEnd then
if player:num_bag_black() >= 1 then
if player:get_param(376) == 0 then
player:set_param(376,1);
player:add_item(10603,1,1);-- 至珍月饼礼盒
player:alert(10,0,0,"恭喜您成功领取圣诞袜");
else
player:alert(10,0,0,"您今天已经领取了圣诞袜,请明天再来");
end
else
player:alert(10,0,0,"背包空间不足");
end
else
player:alert(10,0,0,"现在不是活动时间无法领取");
end
ontalk2208(npc,0,player);
end
Npc2208Funid =
{
[1] = ontalk2208_1;
[2] = ontalk2208_2;
}
function CreatureNpcFun(npc,event,player,funid)
if Npc2208Funid[funid] ~= nil then
Npc2208Funid[funid](npc,player);
end
end
RegisterUnitEvent(2208,20,"ontalk2208")
RegisterUnitEvent(2208,29,"CreatureNpcFun")
- 上一篇:烈焰可用宗族荣誉系统脚本
- 下一篇:烈焰服务端用烈焰币兑换烈焰会员的脚本