- A+
所属分类:LUA脚本
function ljcard(itemindex, charaindex, toindex, haveitemindex)
char.DelItem(charaindex, haveitemindex)
rnd = math.random(1000)
if rnd <= 1 then
local itemlist = {20811,20817,20869,22256,22257}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 13 then
local itemlist = {20812,20813,20814,20815,20816,22253,22254,22255}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 163 then
local itemlist = {20836,20837,20838,20857,20856,20855,20854,20858,20859,20860,20861,22232}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 263 then
local itemlist = {20839,20840,20841,20850,20851,20852,20853,20842,20843,20845,20846,20847,20848,20849,22230,22231}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 363 then
local itemlist = {15384,15386,15083,15084,15086,20863,20864,20865,20866}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 420 then
local itemlist = {20808,20804,17809,17808,16583,16584,16586,20867}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 520 then
local itemlist = {20818,20819,20820,20821,20822,20823,20824,20825,20826,20827,20828,20829}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
elseif rnd <= 1000 then
local itemlist = {22210,20830,20831,20832,20833,20800,1509,20172,20210,20211,20212,20213}
id = math.random(table.getn(itemlist))
itemid = itemlist[id]
else
itemid = -1
end
if itemid > -1 then
npc.AddItem(charaindex, itemid)
if rnd <= 5 then
char.talkToServer(-1, "[来吉卡快讯]" .. char.getChar(charaindex, "名字") .. "幸运抽取奖品" .. item.getNameFromNumber(itemid), "绿色")
end
else
char.TalkToCli(charaindex, -1, "[来吉卡快讯]TMD,啥都没抽到", "黄色")
end
end
function main()
item.addLUAListFunction( "ITEM_LJCARD", "ljcard", "")
end
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-