|  | 
 
 
 楼主|
发表于 2012-8-31 19:49
|
显示全部楼层 
| 本帖最后由 77113891 于 2012-9-2 16:29 编辑 
 除了这些外还要修改什么?复制代码  --北冥神功和吸星大法,加内力上限
  if (WAR.BMXH == 1 or WAR.BMXH == 2 or WAR.BMXH1 == 1 or WAR.BMXH2 == 1) and 0 < hurt and DWPD() and wugong ~= 92 and not JIENU(eid) and not T11LB(eid) then
    local xnl = nil
    xnl = math.modf(JY.Person[eid]["内力"] / 12 + math.random(10))        --brolycjw: 改
    WAR.Person[emenyid]["内力点数"] = (WAR.Person[emenyid]["内力点数"] or 0) + AddPersonAttrib(eid, "内力", -xnl);
        if JIENU(pid) then
                WAR.Person[WAR.CurID]["内力点数"] = (WAR.Person[WAR.CurID]["内力点数"] or 0) + AddPersonAttrib(pid, "内力", limitX(xnl,0,200))
        else
                WAR.Person[WAR.CurID]["内力点数"] = (WAR.Person[WAR.CurID]["内力点数"] or 0) + AddPersonAttrib(pid, "内力", math.modf(xnl + 1))
    end
        AddPersonAttrib(pid, "内力最大值", math.modf(xnl * 2 / 3 + 10))
  end
  --化功大法 上毒 减内力
  if (WAR.BMXH == 3 or WAR.BMXH3 == 1) and 0 < hurt and DWPD() then
    local xnl = nil
        if not JIENU(eid) and not T11LB(eid) then
                xnl = math.modf(JY.Person[eid]["内力"] / 20 + 2)
                WAR.Person[emenyid]["内力点数"] = AddPersonAttrib(eid, "内力", -xnl);
    end
    WAR.Person[emenyid]["中毒点数"] = AddPersonAttrib(eid, "中毒程度", 20)
  end
  
  --吸星大法 吸体力
  if (WAR.BMXH == 2 or WAR.BMXH2 == 1) and 0 < hurt and DWPD() then
    local xt1 = Rnd(3) + 2
    local xt2 = Rnd(5) + 6
    local xt3 = 2 + Rnd(2)
    local n = AddPersonAttrib(eid, "体力", -xt1)
    local m = AddPersonAttrib(pid, "体力", xt3)
    --ivansz:027得到吸星大法之后 额外吸体力
    --任我行 额外吸体力
    if DT(pid,26) or (T1LEQ(pid) and instruct_18(65)) then
            n = n + AddPersonAttrib(eid, "体力", -xt2)
            m = m + AddPersonAttrib(pid, "体力", xt2)
          end
          
          WAR.Person[emenyid]["体力点数"] = (WAR.Person[emenyid]["体力点数"] or 0) + n;
          WAR.Person[WAR.CurID]["体力点数"] = (WAR.Person[WAR.CurID]["体力点数"] or 0) + m;
  end
        --ivansz:027身具三大吸功并可同时触发,得到三本吸功秘籍之后必触发
    --如果学会北冥神功或者角色是零二七
    if (PersonKF(pid, 85) or T1LEQ(pid)) and JLSD(25, 75, pid) or DT(pid,118) or (T1LEQ(pid) and instruct_18(64)) then
      if WAR.Person[id][CC.TXDH] == -1 then
        WAR.Person[id][CC.TXDH] = math.fmod(85, 10) + 85
      end
          if T1LEQ(pid) then
          else
                  if WAR.Person[id][CC.TXWZ2] == nil then
                        WAR.Person[id][CC.TXWZ2] = CC.WARS33
                  else
                        WAR.Person[id][CC.TXWZ2] = WAR.Person[id][CC.TXWZ2] .. "+" .. CC.WARS33
                  end
          end
          if not T1LEQ(pid) then
                WAR.BMXH = 1
          else
                WAR.BMXH1 = 1
          end
      
      --北冥神功升级
      for w = 1, 10 do
        if JY.Person[pid]["武功" .. w] == 85 then
          JY.Person[pid]["武功等级" .. w] = JY.Person[pid]["武功等级" .. w] + 10
        end
        if JY.Person[pid]["武功等级" .. w] > 999 then
          JY.Person[pid]["武功等级" .. w] = 999
        end
      end
    end
        
    --吸星大法,任我行必触发,与北冥不可同时触发
    if ((PersonKF(pid, 88) or T1LEQ(pid)) and JLSD(25, 75, pid) and WAR.BMXH == 0) or DT(pid,26) or (T1LEQ(pid) and instruct_18(65)) then
      if WAR.Person[id][CC.TXDH] == -1 then
        WAR.Person[id][CC.TXDH] = math.fmod(88, 10) + 85
      end
      if T1LEQ(pid) then
          else
                  if WAR.Person[id][CC.TXWZ2] == nil then
                        WAR.Person[id][CC.TXWZ2] = CC.WARS34
                  else
                        WAR.Person[id][CC.TXWZ2] = WAR.Person[id][CC.TXWZ2] .. "+" .. CC.WARS34
                  end
          end
          if not T1LEQ(pid) then
                WAR.BMXH = 2
          else
                WAR.BMXH2 = 1
          end
      
      --吸星大法升级
      for w = 1, 10 do
        if JY.Person[pid]["武功" .. w] == 88 then
          JY.Person[pid]["武功等级" .. w] = JY.Person[pid]["武功等级" .. w] + 10
        end
        if JY.Person[pid]["武功等级" .. w] > 999 then
          JY.Person[pid]["武功等级" .. w] = 999
        end
      end
    end
    
    --化功大法
    if (PersonKF(pid, 87) or T1LEQ(pid)) and JLSD(25, 75, pid) and WAR.BMXH == 0 or (T1LEQ(pid) and instruct_18(66)) then
      if WAR.Person[id][CC.TXDH] == -1 then
        WAR.Person[id][CC.TXDH] = math.fmod(87, 10) + 85
      end
      if T1LEQ(pid) then
          else
                  if WAR.Person[id][CC.TXWZ2] == nil then
                        WAR.Person[id][CC.TXWZ2] = CC.WARS35
                  else
                        WAR.Person[id][CC.TXWZ2] = WAR.Person[id][CC.TXWZ2] .. "+" .. CC.WARS35
                  end
          end
          if not T1LEQ(pid) then
                WAR.BMXH = 3
          else
                WAR.BMXH3 = 1
      end
          
      --化功大法升级
      for w = 1, 10 do
        if JY.Person[pid]["武功" .. w] == 87 then
          JY.Person[pid]["武功等级" .. w] = JY.Person[pid]["武功等级" .. w] + 10
        end
        if JY.Person[pid]["武功等级" .. w] > 999 then
          JY.Person[pid]["武功等级" .. w] = 999
        end
      end
    end
    
        --ivansz:027鲸息功
        if T1LEQ(pid) and (WAR.BMXH1 == 1 or WAR.BMXH2 == 1 or WAR.BMXH3 == 1) then
                if WAR.Person[id][CC.TXDH]==nil then
                        WAR.Person[id][CC.TXDH] = 6
                end
                if WAR.Person[id][CC.TXWZ2] == nil then
                        WAR.Person[id][CC.TXWZ2] = CC.WARS131
                else
                        WAR.Person[id][CC.TXWZ2] = WAR.Person[id][CC.TXWZ2] .. "+" .. CC.WARS131
                end
        end
  CC.WARS131 = "鲸息功"
 16:26:09 JY_Main start.
 16:26:12 Start game cycle
 16:26:20 load war map 70
 16:26:26 .\script\LDCR.lua:4448: attempt read read to undeclared variable JIENU
 16:26:26 stack traceback:
 .\script\LDCR.lua:27680: in function <.\script\LDCR.lua:27678>
 [C]: in function 'error'
 .\script\LDCR.lua:26580: in function <.\script\LDCR.lua:26579>
 .\script\LDCR.lua:4448: in function 'War_WugongHurtLife'
 .\script\LDCR.lua:10465: in function 'War_Fight_Sub'
 .\script\LDCR.lua:6211: in function 'DIY_War_FightMenu'
 .\script\LDCR.lua:30937: in function 'ShowMenu'
 .\script\LDCR.lua:11529: in function 'War_Manual_Sub'
 .\script\LDCR.lua:10987: in function 'War_Manual'
 .\script\LDCR.lua:15191: in function <.\script\LDCR.lua:14510>
 (tail call): ?
 .\script\LDCR.lua:28659: in function '?'
 .\script\LDCR.lua:29001: in function 'oldEventExecute'
 .\script\LDCR.lua:20505: in function 'EventExecute'
 .\script\LDCR.lua:21143: in function 'Game_SMap'
 .\script\LDCR.lua:20762: in function 'Game_Cycle'
 .\script\LDCR.lua:26656: in function <.\script\LDCR.lua:26571>
 [C]: in function 'xpcall'
 .\script\LDCR.lua:26569: in function <.\script\LDCR.lua:26567>
 
 这是攻击出错的DEBUG 表示看不懂...
 
 | 
 |