fodev.net

Other => FOnline:2238 Forum => Archives => General Game Discussion => Topic started by: Gimper on May 24, 2013, 05:58:45 am

Title: Treasure Hunter is bogus (Proof!)
Post by: Gimper on May 24, 2013, 05:58:45 am
I have proof treasure hunter is fake.
If I didn't have treasure hunter, what would have been in there?!?!?!!!!
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: S.T.A.L.K.E.R on May 24, 2013, 06:00:49 am
Just go play another game.

It's dead, game over! NADA, DEVS DOING NOTHING
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: the underground on May 24, 2013, 07:29:18 am
If I didn't have treasure hunter, what would have been in there?!?!?!!!!
No chest to open?
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Mike Crosser on May 24, 2013, 10:13:52 am
Just go play another game.

It's ded, gaem over! NADAL, DEVS DING NONG
Ahhh this takes me back....
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Cheesey Dean on May 24, 2013, 11:53:39 am
Treasure Hunter makes you find less loot from trunks, this IS PROVEN. It's been like this since February of last year, and there's no reason to believe it's ever going to be changed.
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Mike Crosser on May 24, 2013, 12:05:54 pm
Treasure Hunter makes you find less loot from trunks, this IS PROVEN. It's been like this since February of last year, and there's no reason to believe it's ever going to be changed.
There have been 1 or 2 attempts to fix it I think.
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Mayck on May 24, 2013, 04:03:06 pm
If I didn't have treasure hunter, what would have been in there?!?!?!!!!
1 cap

There have been 1 or 2 attempts to fix it I think.
Yeah and everytime someone has a bad luck, I check again to find that there is nothing wrong in the code and waste my goddamn time... you know what? here you have that uber bugged code, if you will tell me what is wrong with it you will get a cookie...
Code: [Select]
if(cr.Perk[PE_TREASURE_HUNTER]>0)
{
array<Item@> items;
for(uint i=0,j=chest.GetItems(0,items);i<j;i++)
{
if(items[i].IsStackable()) items[i].SetCount((items[i].GetCount()*23)/20);
else if(Random(1,100)<=15) chest.AddItem(items[i].GetProtoId(),1,0);
}
}
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Floodnik on May 24, 2013, 06:11:35 pm
Quote
Random(1,100)
:)
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Gimper on May 24, 2013, 06:51:04 pm
Another one.

And if treasure hunter doesn't work, then why even have it in the game? Maybe remove it, and make a USEFUL perk.
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: JovankaB on May 24, 2013, 07:08:24 pm
And if treasure hunter doesn't work

But it works. Just because you find one cap once in a while it doesn't mean it's not working.
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Marko on May 24, 2013, 07:15:57 pm
TH works fine. Without it, you find fewer caps in those footlockers*. With TH, the bottom limit of the caps range is still 1, but the upper limit is much higher than without it.

*Unless the number of caps you find is 1, in which case you don't find any less. ;)
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: the underground on May 24, 2013, 10:10:02 pm
Code: [Select]
if(cr.Perk[PE_TREASURE_HUNTER]>0)
{
array<Item@> items;
for(uint i=0,j=chest.GetItems(0,items);i<j;i++)
{
if(items[i].IsStackable()) items[i].SetCount((items[i].GetCount()*23)/20);
else if(Random(1,100)<=15) chest.AddItem(items[i].GetProtoId(),1,0);
}
}
Sorry, this is Latin to me. Could you translate it?
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Edik on May 24, 2013, 10:49:49 pm
Code: [Select]
if(items[i].IsStackable()) items[i].SetCount((items[i].GetCount()*23)/20);you multiply by 23 and divide by 20, so when you do that with 1$, you still get 1$ :D

on the other hand, in c++ 7/9*9 is 0 so :P
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: racoon on May 26, 2013, 11:39:18 am
Code: [Select]
if(cr.Perk[PE_TREASURE_HUNTER]>0)
{
array<Item@> items;
for(uint i=0,j=chest.GetItems(0,items);i<j;i++)
{
if(items[i].IsStackable()) items[i].SetCount((items[i].GetCount()*2);
else if(Random(100,300)<=15) chest.AddItem(items[i].GetProtoId(),1,0);
}
}

repaired it
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: Mayck on May 26, 2013, 11:43:55 am
on the other hand, in c++ 7/9*9 is 0 so :P
Yep, and that's why we multiply before division.
Title: Re: Treasure Hunter is bogus (Proof!)
Post by: gauvaran on May 26, 2013, 04:42:06 pm
Bug because the item list is inserted in the for loop?