|
求助高手修改哪一个数据是物品盗窃最大化的?每次偷物品运气差最多一次一个 偷完全场必定内伤……比较郁闷
for i = 1, 4 do
if JY.Person[victimid]["携带物品数量" .. i] > 0 and JY.Person[victimid]["携带物品" .. i] > -1 then
hasitem = 1
break
end
end
if hasitem == 0 then
QZXS(JY.Person[victimid]["姓名"].."身上没有物品")
else
local itemrandom
while itemid == -1 do
itemrandom = math.random(4)
if JY.Person[victimid]["携带物品数量" .. itemrandom] > 0 and
JY.Person[victimid]["携带物品" .. itemrandom] > -1 then
itemnumber = math.random(JY.Person[victimid]["携带物品数量" .. itemrandom])
itemid = JY.Person[victimid]["携带物品" .. itemrandom]
end
end
if itemnumber == JY.Person[victimid]["携带物品数量" .. itemrandom] then
JY.Person[victimid]["携带物品数量" .. itemrandom] = 0
JY.Person[victimid]["携带物品" .. itemrandom] = -1
else
JY.Person[victimid]["携带物品数量" .. itemrandom] =
JY.Person[victimid]["携带物品数量" .. itemrandom] - itemnumber
end
instruct_32(itemid, itemnumber)
QZXS("窃取"..JY.Thing[itemid]["名称"]..tostring(itemnumber).."件")
end
SetWarMap(nx, ny, 4, -1)
else
DrawStrBoxWaitKey(CC.EVB176, C_WHITE, 30)
return 0
end
end |
|