int guildnumber; char stonename[60];
void StonePlacement(UOXSOCKET s){	int guildnumber;	char stonename[60];	P_CHAR pc = currchar[s];	P_ITEM pDeed = FindItemBySerial(pc->fx1);	cGuildStone* pStone = NULL;	if (CheckValidPlace(s)!=1)	{		sysmessage(s, "You cannot place guildstones at any other location than your house");		return;	}		if (pDeed->id()==0x14F0)	{		if (pc->guildstone != INVALID_SERIAL)		{			itemmessage(s,"You are already in a guild.",pDeed->serial);			return;		}		pStone = new cGuildStone;				if (!pStone)		{//AntiChrist - to prevent crashes			sysmessage(s, "Cannot create guildstone");			return;		}		pStone->Init();		pStone->setId(0x0ED5);		pStone->name = "Guildstone for an unnamed guild";		Items->GetScriptItemSetting(pStone);		pc->guildstone = pStone->serial;		if (pc->id() == 0x0191)				pc->guildtitle = "Guildmistress";			else			pc->guildtitle = "Guildmaster";		pStone->webpage = DEFAULTWEBPAGE;		pStone->charter = DEFAULTCHARTER;		pStone->addMember( pc );		pStone->guildType = cGuildStone::standard;		pStone->MoveTo(pc->pos.x,pc->pos.y,pc->pos.z);		pStone->type = 202;		pStone->priv = 0;		pStone->setLockedDown();		pStone->setOwnSerialOnly(pc->serial);		RefreshItem(pStone);//AntiChrist		Items->DeleItem(pDeed);		entrygump(s, pc->serial,100,1,40,"Enter a name for the guild.");	}	else	{/*		guildnumber = SearchByStone(s);		if (guildnumber==-1)		{//AntiChrist			sysmessage(s,"There are already enough guildstones placed.");			return;		}		if (( pDeed->serial==guilds[guildnumber].stone &&			pc->serial == guilds[guildnumber].master) ||			pc->isGM() )		{			sprintf(stonename, "Guildstone for %s", guilds[guildnumber].name);			pStone = Items->SpawnItem(currchar[s], 1, stonename, 0, 0x0ED5, 0, 0);			if (!pStone)			{				sysmessage(s,"Cannot create guildstone");				return;			}			pStone->MoveTo(pc->pos.x,pc->pos.y,pc->pos.z);			pStone->type = 202;			pStone->priv = 0;					RefreshItem(pStone);//AntiChrist			Items->DeleItem(pDeed);			pc->fx1 = INVALID_SERIAL;			guilds[guildnumber].stone = pStone->serial;		}		else			itemmessage(s,"You are not the guildmaster of this guild. Only the guildmaster may use this guildstone teleporter.",pDeed->serial);*/	}}