• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Auto Convert

    Discussion in 'Rebornbuddy Support' started by MrFish, Apr 19, 2016.

    1. MrFish

      MrFish New Member

      Joined:
      Nov 15, 2015
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      1
      Hello, I was wondering if anyone has been working on a SB convert formula that can be plugged into a profile, kinda like aetherial reduction.
      Is this possible or not so?
       
    2. MrFish

      MrFish New Member

      Joined:
      Nov 15, 2015
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      1
      Code:
      		<CodeChunk Name="Convert">
            <![CDATA[
              // Junk List
              List<int> junkIds = new List<int>() {
              11985,
              12008,
              11995,
              11967,
              11980,
              11990,
              11904,
              11884,
              11970,
              11962,
              11975,
              12003,
              11957,
              11998,
              };
      
              var itemList = ff14bot.Managers.InventoryManager.EquippedItems;
              var items = itemList.Where(i => junkIds.Contains((int)i.RawItemId));
              if (items  != null)
              {
      			while (bagslot.SpiritBond >= 100)
                {
                  foreach(var item in items)
                  {
                    await CommonTasks.ConvertToMateria(item);
                    await Buddy.Coroutines.Coroutine.Sleep(500);
                  }
                  await Coroutine.Sleep(500);
                }
              }
            ]]>
      		</CodeChunk>
      I am getting an error with this code. I am struggling with coding :-(
       
      Last edited: Apr 22, 2016
    3. ExMatt

      ExMatt Active Member

      Joined:
      Jul 5, 2015
      Messages:
      1,030
      Likes Received:
      14
      Trophy Points:
      38
      that while loop is misplaced.... remove it.
      you also need to remove the line await Coroutine.Sleep(500);
      you should also change the type on your junkIds list to uint so you don't need to cast to int.

      you need to add a new first line to the foreach loop

      Code:
              var items = ff14bot.Managers.InventoryManager.EquippedItems.Where(i => junkIds.Contains(i.RawItemId));
      
                  foreach(var item in items)
                  {
                    if(item.SpiritBond < 100)
                    {
                      continue;
                    }
                    await CommonTasks.ConvertToMateria(item);
                    await Buddy.Coroutines.Coroutine.Sleep(500);
                  }
      
       

    Share This Page