What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

packprice

nick1988

New Member
Joined
Sep 1, 2014
Messages
163
Reaction score
2
I totaly hit a wall here. I am trying to get the current percentage for a certain pack.

Using this:

var li = backpacksPercentPrice("Tigerspine Mountains", "Villanelle");
foreach (var l in li)
{
Log(l.item.name + " = " + l.percentPrice + "%");
}

I get a list printed, that contains all packs that originate from "Tigerspine" and there current value (in %) for Villanelle.

How can I now just grap the price for 1 specific pack with this stats? (Like "Tigerspine Mastercraft Ingots" or "Tigerspine Grape Jam")

Thanks in advance.
 
Find in this list pack that you need? By id or by name?
Code:
public int MyPackPrice(string packName)
{
  foreach (var packInfo in backpacksPercentPrice("Tigerspine Mountains", "Villanelle"))
  {
	if (string.Compare(packInfo.item.name, packName, true) == 0)
		return packInfo.percentPrice;
  }
  return 0; //if we dont found pack in this list
}
 
Find in this list pack that you need? By id or by name?
Code:
public int MyPackPrice(string packName)
{
  foreach (var packInfo in backpacksPercentPrice("Tigerspine Mountains", "Villanelle"))
  {
	if (string.Compare(packInfo.item.name, packName, true) == 0)
		return packInfo.percentPrice;
  }
  return 0; //if we dont found pack in this list
}

By name would be fine. I will try this, thank you!
 
Back
Top