Changing the historical_price

Winterbay

Active member
There have been a few instances over the last week with prices skyrocketing over night and then slowly going down again. The two examples I have are wurstbrau and deluxe scimitars (jumping from ~300meat to ~20k meat). Is there a way to reset the historical price to another (older) value after a mall search have been done?

I have currently implemented
Code:
		backup = historical_price(it);
		val = mall_price(it);
		if(val > backup * 50)
		{
			print("Ignoring today's mallprice as it is hyperinflated");
			val = backup;
		}
in one of my scripts but that will only work the first day and if the prices don't go down over the course of one day so I would love to be able to use something along the lines of
Code:
		backup = historical_price(it);
		val = mall_price(it);
		if(val > backup * 50)
		{
			print("Ignoring today's mallprice as it is hyperinflated");
			val = backup;
			[COLOR="red"]set_historical_price(it, backup);[/COLOR]
		}

Is there any sane way of doing this?
 
Why would historical_price() return something other than the most recent mall price ?

You should save the prices of the items you want to follow in your own data file.
 
Good point. Script have been modified to keep a map of the items it considered hyperinflated and to compare to that the next time it is run.
 
Back
Top