找回密码
 点一下
查看: 1484|回复: 3

[已解决]循环数问题

[复制链接]
发表于 2009-2-8 15:32:40 | 显示全部楼层 |阅读模式
if GetItemCharges(GetManipulatedItem()) != 0  then
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 6
    if GetManipulatedItem() != UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()) then
    if GetItemTypeId(GetManipulatedItem()) == GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) then
    if GetItemCharges(GetManipulatedItem()) + GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()))  >= 1  then
    loop
    exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
    call SetItemCharges( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()), ( GetItemCharges(GetManipulatedItem()) + GetItem    Charges(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) ) )
    call RemoveItem( GetManipulatedItem() )
    return
    set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    else
    loop
    exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
    call DoNothing(  )
    set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    endif
    endif
    endif
    endif
   
      ~~~~~~~~为一个循环A  1~6做多样动作~~~~如果条件成立做动作1否则做动作2~~为什么只能对捡到的第一件物品可以叠加?
对其它的物品没用~~是不是写错了? 试了很久都没解决~~想各位帮下忙~~~~
 楼主| 发表于 2009-2-9 21:50:46 | 显示全部楼层
~~~~~~~没人知道的吗?
回复

使用道具 举报

发表于 2009-2-9 23:08:16 | 显示全部楼层
你仔细看看你写的东西,判断物品根本就在循环外,怎么可能对额

你的循环与条件判断的逻辑是反的额,应该是在循环里面作条件判断
回复

使用道具 举报

 楼主| 发表于 2009-2-9 23:26:54 | 显示全部楼层
自己解决 ~~谢谢~~~~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-5 17:14 , Processed in 0.034230 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表