• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS House Problem

Cryzt

New Member
Joined
May 18, 2008
Messages
3
Reaction score
0
Hey

How to make free account characters able to own houses on a TFS server?

Regards Cryzt
 
Go to your config.lua and then:

Change this:

Code:
	-- Houses
	buyableAndSellableHouses = "yes"
	housesPerAccount = 0
	levelToBuyHouse = 1
	houseRentAsPrice = "no"
	housePriceAsRent = "no"
	housePriceEachSQM = 1000
	houseRentPeriod = "never"
[B][COLOR="Red"]	houseNeedPremiumAccount = "yes"[/COLOR][/B]

To this:

Code:
	-- Houses
	buyableAndSellableHouses = "yes"
	housesPerAccount = 0
	levelToBuyHouse = 1
	houseRentAsPrice = "no"
	housePriceAsRent = "no"
	housePriceEachSQM = 1000
	houseRentPeriod = "never"
[B][COLOR="Red"]	houseNeedPremiumAccount = "no"[/COLOR][/B]
 
Yeah it's 0.3.

@Znote:

I died in your OT. :/

The room where the hunting spots for newbies are it's just messed up. :(
 
For 0.2 you need to edit the source:

in commands.cpp

houses part has to be like this:
Code:
			if(HouseTile* houseTile = dynamic_cast<HouseTile*>(tile))
			{
				if(House* house = houseTile->getHouse())
				{
					if(house->getDoorByPosition(pos))
					{
						if(!house->getHouseOwner())
						{
								uint32_t price = 0;
								for(HouseTileList::iterator it = house->getHouseTileBegin(); it != house->getHouseTileEnd(); it++)
									price += g_config.getNumber(ConfigManager::HOUSE_PRICE);
								if(price)
								{
									uint32_t money = g_game.getMoney(player);
									if(money >= price && g_game.removeMoney(player, price))
									{
										house->setHouseOwner(player->guid);
										player->sendTextMessage(MSG_INFO_DESCR, "You have successfully bought this house, be sure to have the money for the rent in your depot of this city.");
										return true;
									}
									else
										player->sendCancel("You do not have enough money.");
								}
								else
									player->sendCancel("That house doesn't contain any house tile.");
							}
						else
							player->sendCancel("This house alreadly has an owner.");
					}
					else
						player->sendCancel("You have to be looking at the door of the house you would like to buy.");
				}
				else
					player->sendCancel("You have to be looking at the door of the house you would like to buy.");
			}
			else
				player->sendCancel("You have to be looking at the door of the house you would like to buy.");
		}
		else
			player->sendCancel("You have to be looking at the door of the house you would like to buy.");
	}
	return false;
}
I dont have the premium part on my compiler anymore cause I already took it out but thats what it should look like.

This is patch 19 for tfs with free players able to buy houses (obviously all credits go to tfs team):
TheForgottenServer[Patched].exe

I don't know if this was the only thing changed in the .exe (or if it was even changed this way) for patch 20 but it works for me.
 
For 0.2 you need to edit the source:

in commands.cpp

houses part has to be like this:
Code:
			if(HouseTile* houseTile = dynamic_cast<HouseTile*>(tile))
			{
				if(House* house = houseTile->getHouse())
				{
					if(house->getDoorByPosition(pos))
					{
						if(!house->getHouseOwner())
						{
								uint32_t price = 0;
								for(HouseTileList::iterator it = house->getHouseTileBegin(); it != house->getHouseTileEnd(); it++)
									price += g_config.getNumber(ConfigManager::HOUSE_PRICE);
								if(price)
								{
									uint32_t money = g_game.getMoney(player);
									if(money >= price && g_game.removeMoney(player, price))
									{
										house->setHouseOwner(player->guid);
										player->sendTextMessage(MSG_INFO_DESCR, "You have successfully bought this house, be sure to have the money for the rent in your depot of this city.");
										return true;
									}
									else
										player->sendCancel("You do not have enough money.");
								}
								else
									player->sendCancel("That house doesn't contain any house tile.");
							}
						else
							player->sendCancel("This house alreadly has an owner.");
					}
					else
						player->sendCancel("You have to be looking at the door of the house you would like to buy.");
				}
				else
					player->sendCancel("You have to be looking at the door of the house you would like to buy.");
			}
			else
				player->sendCancel("You have to be looking at the door of the house you would like to buy.");
		}
		else
			player->sendCancel("You have to be looking at the door of the house you would like to buy.");
	}
	return false;
}
I dont have the premium part on my compiler anymore cause I already took it out but thats what it should look like.

This is patch 19 for tfs with free players able to buy houses (obviously all credits go to tfs team):
TheForgottenServer[Patched].exe

I don't know if this was the only thing changed in the .exe (or if it was even changed this way) for patch 20 but it works for me.


thanks. Using it now. (MidBird helped me with this part.

++rep! ^^
 
Back
Top