本帖最后由 欲望魔鬼 于 2012-3-14 11:46 编辑
--战斗武功选择菜单
function War_FightMenu()
local pid = WAR.Person[WAR.CurID]["人物编号"]
local numwugong = 0
local menu = {}
for i = 1, 10 do
local tmp = JY.Person[pid]["武功" .. i]
if tmp > 0 then
if JY.WGLVXS == 1 then
menu = {JY.Wugong[tmp]["名称"] .. "·" .. JY.Person[pid]["武功等级" .. i], nil, 1}
else
menu = {JY.Wugong[tmp]["名称"], nil, 1}
end
--内力少不显示
if JY.Person[pid]["内力"] < JY.Wugong[tmp]["消耗内力点数"] then
menu[3] = 0
end
--北冥神功、化功大法、吸星大法、斗转星移不显示
if tmp == 85 or tmp == 87 or tmp == 88 or tmp == 43 then
menu[3] = 0
end
--如果不是游坦之,内功武功不显示
if pid ~= 48 and tmp > 88 and tmp < 109 then
menu[3] = 0
end
--如果主角是天罡,内功武功显示
if pid == 0 and GetS(4, 5, 5, 5) == 5 and tmp > 88 and tmp < 109 then
menu[3] = 1
end
--林平之 显示葵花神功
if tmp == 105 and pid == 36 then
menu[3] = 1
end
--石破天 显示太玄神功
if tmp == 102 and pid == 38 then
menu[3] = 1
end
--张无忌 显示九阳神功
if tmp == 106 and pid == 9 then
menu[3] = 1
end
--狄云 显示神经照
if tmp == 94 and pid == 37 then
menu[3] = 1
end
--慕容复 显示斗转星移
if tmp == 43 and pid == 51 then
menu[3] = 1
end
numwugong = numwugong + 1
end
end
if numwugong == 0 then
return 0
end
local r = nil
r = ShowMenu(menu, numwugong, 0, CC.MainSubMenuX, CC.MainSubMenuY, 0, 0, 1, 1, CC.DefaultFont, C_ORANGE, C_WHITE)
if r == 0 then
return 0
end
WAR.ShowHead = 0
local r2 = War_Fight_Sub(WAR.CurID, r)
WAR.ShowHead = 1
Cls()
return r2
end在这里控制 武功显示~
|