Changes to the trapper's fur trade

Tirian

Member
Over the weekend, a change was made to the trapper so that you could trade fewer than all of your furs if you wanted. This change to the URL threw a wrench into CLI's "trapper" and ASH's "trade_trapper" functions. At this moment, in the SVN the former has been fixed and the latter not so much yet, but the regular users are going to have to wait for the next scheduled release.

If you've been using trade_trapper(), you might consider substituting in the following function until the next release. The first parameter is for the number of furs you wish to trade, or 0 for all of them. I don't have any error-checking in the function, but I'm pretty sure that they closed the exploit that lets you trade your yeti furs for Misters Accessory a long time ago. :)

Code:
void temp_trade_trapper(int count, item it)
{
	string command = "trapper.php?action=Yep&pwd&whichitem=" + item_to_int(it);
	if (count > 0)
	{
		command = command + "&qty=" + count;
	}
	else
	{
		command = command + "&qty=1&max=on";
	}
	cli_execute(command);
}
 

Veracity

Developer
Staff member
Is that what you want? An incompatible change to an existing function?
OK.

Code:
item hippo = $item[ hippopotamus skin ];
item yeti = $item[ yeti fur ];

print( "I have " + item_amount( yeti ) + " " + yeti + " and " + item_amount( hippo ) + " " + hippo );
trade_trapper( 5, hippo );
print( "I have " + item_amount( yeti ) + " " + yeti + " and " + item_amount( hippo ) + " " + hippo );

Now yields:

> trapper.ash
I have 403 yeti fur and 65 hippopotamus skin
Robbing the trapper...
Trapper has been looted.
You acquire 5 hippopotamus skins
I have 398 yeti fur and 70 hippopotamus skin
Script succeeded!
 

Tirian

Member
Don't mind me, I don't know what I want. :) There's a very large part of me that wants the backwards compatibility because I only trade all of them, but maybe there's someone out there with Armorcraftiness who would want to trade some but not all of them. I figured that a dual-function bandage would be ideal while you work out all of the thorny philosophical design issues.

ETA: Daychilde's going to come scold us if we keep this discussion going here in CS. :) But not implementing trading "some" furs is not crippling to the user base. The bounty hunter only gives the options of trading one or all, and my script trades all but one by sticking one in the closet before trading all. My hypothetical hardcore Turtle Tamer could do the same.
 
Top