• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • 请问收藏品的id如何查询

    Discussion in 'Rebornbuddy 援助区' started by pia, Oct 21, 2017.

    1. pia

      pia Member

      Joined:
      Sep 25, 2013
      Messages:
      126
      Likes Received:
      0
      Trophy Points:
      16
      例如:做栗子冰糕收藏品,想在脚本中加入收藏品的判断制作数量,但它和不是收藏品的物品不是一个id,所以没法判断。
       
    2. EricPhone

      EricPhone Moderator Moderator

      Joined:
      Feb 17, 2013
      Messages:
      5,665
      Likes Received:
      3
      Trophy Points:
      38
      你可以在插件RebornConsole里打开运行下面代码
      获取背包里所有物品和物品代码
      Code:
      ClearLog();
      foreach(var slot in InventoryManager.FilledSlots)
      {
      Log("物品名字: {0} ,物品ID: {1}",DataManager.GetItem(slot.RawItemId).CurrentLocaleName,slot.RawItemId);
      }
      
       
    3. pia

      pia Member

      Joined:
      Sep 25, 2013
      Messages:
      126
      Likes Received:
      0
      Trophy Points:
      16
      你这个方法我用过了,还是不行。

      以栗子冰糕为例:制作的时候RecipeId="2798" 背包里的物品id是12847,但这俩个都不是栗子冰糕收藏品的id,没法判断收藏品数量,也就是无法写出下面这个判断语句

      <!--数量判断-->
      <If Condition="not HasAtLeast(12847,9)">
       
    4. EricPhone

      EricPhone Moderator Moderator

      Joined:
      Feb 17, 2013
      Messages:
      5,665
      Likes Received:
      3
      Trophy Points:
      38
      你可以改成HqHasAtLeast或者NqHasAtLeast试试
       
    5. pia

      pia Member

      Joined:
      Sep 25, 2013
      Messages:
      126
      Likes Received:
      0
      Trophy Points:
      16
      谢谢,有机会试试
       
    6. pia

      pia Member

      Joined:
      Sep 25, 2013
      Messages:
      126
      Likes Received:
      0
      Trophy Points:
      16
      测试了,都不行,由于我英语不好,能不能帮我去英文论坛问问,或者问问一些脚本的作者?谢谢了!
       
    7. EricPhone

      EricPhone Moderator Moderator

      Joined:
      Feb 17, 2013
      Messages:
      5,665
      Likes Received:
      3
      Trophy Points:
      38
      我咨询过回复就是使用HqHasAtLeast来判断的,收藏品和非收藏品的物品ID都是一样的
      <If Condition="not HqHasAtLeast(12847,9)">
       
    8. pia

      pia Member

      Joined:
      Sep 25, 2013
      Messages:
      126
      Likes Received:
      0
      Trophy Points:
      16
      通过英文论坛已解决,辛苦了
       
      Last edited: Nov 15, 2017

    Share This Page