Donating Meat

mredge73

Member
Hey
How do you donate meat to your clan through ash?
The command calls for items to be donated: put_stash(int, item)

I want to donate fluid meat, trying to build a function that pulls dense meat stacks from the stash, autosells them, and dumps the meat into the stash for advertising.

I cannot figure out the visit_url() to do that, there must be an existing function that can do that.

Code:
int IncreaseCoffer(int howmuch)
{
	int howmany= howmuch/1000 +1;
	if(!take_stash( howmany, $item[dense meat stack] ))
		print("Your Clan does not have enough Meat Stacks or you don't have permission to take them","red");
	else
	{
		autosell( howmany, $item[dense meat stack]  );
		//visit_url("clan_stash.php?&action=contribute&howmuch="+howmuch.to_string());
	}
	return howmany;
}
 

jasonharper

Developer
Hmmm, mafia contains code for donating meat to your clan, but it's only currently used by the Clan Manager window - there's no CLI or ASH command to access that functionality.

Your visit_url has a bogus "&" in front of "action" - ampersands separate HTTP parameters, there isn't one in front of the first parameter. You may also need to add "&pwd" at the end.
 

mredge73

Member
clan_stash.php?action=contribute&howmuch=100&pwd
no luck

I tried almost every combination of these that I can think of:
I have done several of these visit_url() but this one has been giving me the hardest time.
 

kain

Member
I just visited the mini browser and tossed some meat into my clan stash using:
clan_stash.php?action=contribute&howmuch=50000&contribute=Contribute&pwd
 

mredge73

Member
I copy/pasted the link that you used into my mini-browser

All I get is this from mafia's gui:
Server www3.kingdomofloathing.com returned empty response from clan_stash.php

Same if I switch servers:
Server www7.kingdomofloathing.com returned empty response from clan_stash.php

I tried both pasting it into my relay browser and mini-browser, same error and it returns a blank page and no meat changes hands.

I also tried it with and without the &pwd, still no luck
con tribute with and without the space in the middle, no luck

this sucks
 

kain

Member
it works for me in the mini browser and in the CLI. Notice that the forum software inserted a space into the URL ...
 

mredge73

Member
weird
your link works great in my visit_url(), but I cannot manually check it. Thanks for your help, I only need it to work in ash and it is working perfectly!
 
Top