function OnRedenvelopeDo(player,money) if player:get_vcoin() > money then local i = money*0.70; player:sub_vcoin(money); player:add_donate(money); player:alert(10,0,0,"成功捐献"..money.."元宝,"..i.."元宝进入奖池"); player:alert(14,1,0,"玩家"..player:GetName().."捐献"..money.."元宝到红包池,大家赶快抢红包吧");return i;end return 0; end
function OnRedenvelopeGo(player,money) if player:get_player_type() > 1 then local i = math.random(1,100000); if money < i then i = money;end player:alert(0,0,0,"获得 "..i.." 元宝");return i;end player:alert(10,0,0,"VIP玩家才可抢元宝,充值10元即可成为VIP"); return 0; end
function OnCityMoneyGo(player,type) local t = tonumber(os.date("%H%M",os.time())); local num = g_get_param(50); local msg ="活动还未开始" if type == 1 then if t > 2200 then if num == 0 then msg = "活动已结束";else msg = "活动进行中剩余元宝"..num;end end player:SendCityMoneyInfo(msg);return 1;end if type == 2 and player:get_king_guild() == 1 then local money = math.random(1,100000); if num < money then money=num;g_set_param(50,g_get_param(50)-money);end return money;end player:alert(10,0,0,"只有占领王城的帮会成员才能参与");return 0; end