Yvan Major

Member
Hi all, anyone can point me to the good direction if i am looking to decrease the vendors cost per day on the server ?

Thanks !
 
Hi all, anyone can point me to the good direction if i am looking to decrease the vendors cost per day on the server ?

Thanks !
I will post mine as soon as I get home, it is very simple to do and makes it much nicer for a small server like ours.
(I get home in about 3 hours)
 
Check Playervendor class (would need to check) we lowered ours as well... If noone were able to help until i wake up i will check code.
 
Code:
 public int ChargePerDay
  {
  get
  {
  if (BaseHouse.NewVendorSystem)
  {
  return this.ChargePerRealWorldDay / 2;//was 12
  }
  else
  {
  long total = 0;
  foreach (VendorItem vi in this.m_SellItems.Values)
  {
  total += vi.Price;
  }

  total -= 500;

  if (total < 0)
  total = 0;

  return (int)(20 + (total / 500));
  }
  }
  }
  public int ChargePerRealWorldDay
  {
  get
  {
  if (BaseHouse.NewVendorSystem)
  {
  long total = 0;
  foreach (VendorItem vi in this.m_SellItems.Values)
  {
  total += vi.Price;
  }
           return (int)( 2 + (total / 500) ); // * 3 );
  //return (int)(60 + (total / 500) * 3);
  }
  else
  {
  //return this.ChargePerDay * 12;
  return ChargePerDay * 2;//was 12
  }
  }
  }
The ChargePerDay and ChargePerRealWorldDay are the changes in PlayerVendor. I have included our file to compare. This works great for us, someone might have something better.
Hope that helps!
:)
 

Attachments

  • PlayerVendor.cs
    55.4 KB · Views: 11
Thanks for your help, on a low pop server you dont want players to get rid of their stuff instead of keeping a low cost per day. :)
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back