分享下天龙八部元宝兑换代码,端的话大家自行网上找,看代码:
--领CD-KEY、查询点数、购买元宝
x888899_g_scriptId = PRIZE_SCRIPT_ID
x888899_g_prizeGems = {
50101001,
50101002,
50102001,
50102002,
50102003,
50102004,
50103001,
50104002,
50111001,
50111002,
50112001,
50112002,
50112003,
50112004,
50113001,
50113002,
50113003,
50113004,
50113005,
50114001
};
-- 检查 CDKey
function x888899_AskCDKey( sceneId, selfId )
GetCharPrize( sceneId, selfId, 1, 980,0,0 ) --领CD-KEY (980是CD-KEY在Billing的物品类型)
end
-- 检查 财富卡
function x888899_AskNewUserCard( sceneId, selfId, card, op)
NewUserCard( sceneId, selfId, card, op) --领财富卡/体育竞猜卡 (card是卡号字符串)
end
-- 购买 元宝
function x888899_AskYuanBao( sceneId, selfId, nYuanBao, nPoint )
GetCharPrize(sceneId,selfId,3,999,nYuanBao,nPoint); --买nYuanBao个共nPoint点的元宝
end
-- 查询 点数
function x888899_AskPoint( sceneId, selfId )
GetCharPrize(sceneId,selfId,2,0,0,0); --查询人物点数
end
-- 抽奖
function x888899_AskPrize( sceneId, selfId )
GetCharPrize(sceneId,selfId,6,0,0,0); --先查询人物奖品
end
-- 检查 CDKey 的返回回调函数
-- ntype 请参考 enum PRIZE_TYPE_ENUM
function x888899_PrizeRet( sceneId, selfId, ntype, nserial, num )
-- 另外,这里没有 targetId,不知道写 -1 会不会有问题
local targetId = -1
--CD-KEY
if( 1 == ntype ) then
SetMissionFlag( sceneId, selfId, MF_GetAwardFlag, 1 )
x888899_NotifyFailBox( sceneId, selfId, targetId, " 你已经成功激活你的领奖条件,你可以到我这里来领取奖励物品。" )
--财富卡
elseif( 3 == ntype ) then
SetMissionFlag( sceneId, selfId, MF_ActiveNewUserCard, 1 )
x888899_NotifyFailBox( sceneId, selfId, targetId, " 恭喜!你已经成功启动财富卡,到达一定等级之后可以到大理都大爽(157,164)处领取奖励。" )
--赠点
elseif( 4 == ntype ) then
ZengDian(sceneId,selfId,-1,1,nserial*num)
--物品
elseif( 5 == ntype ) then
LuaFnBeginAddItem( sceneId )
LuaFnAddItem( sceneId, nserial, num)
local ret = LuaFnEndAddItem( sceneId, selfId )
if 1 == ret then
AddItemListToHuman(sceneId,selfId)
--神笛一个玩家只能参加一次活动
if( nserial == 30309052 ) then
SetMissionFlag( sceneId, selfId, MF_ActiveWenZhouCard, 1 )
BroadMsgByChatPipe(sceneId, selfId, "@*;SrvMsg;DBD:恭喜您成功领取了活动奖励,请查收", 0);
end
x888899_NotifyFailBox( sceneId, selfId, targetId, "物品换取成功!感谢您对《天龙八部》的支持!" )
en