• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Feature [1.x] Buy house with gold ingot as example

Levi999x

AoT
Joined
Dec 14, 2017
Messages
2,169
Solutions
58
Reaction score
1,407
Location
Germany
Since I couldn't really find a thread about it I just release it to avoid people creating 100 threads about it xD

house.cpp
line 124:
Lua:
it->setSpecialDescription(fmt::format("It belongs to house '{:s}'. {:s} owns this house.{:s}", houseName, (owner != 0) ? ownerName : "Nobody", g_config.getBoolean(ConfigManager::HOUSE_DOOR_SHOW_PRICE) && (housePrice != -1) && (owner == 0) ? fmt::format(" It costs {:d} gold coins.", (houseTiles.size() * housePrice)) : ""));

Lua:
It costs {:d} gold coins

change it to gold ingot as example

Lua:
It costs {:d} gold ingot

now open your buyhouse.lua which is placed in data/talkactions

line 39:
Lua:
if not player:removeMoney(price) then

change it to

Lua:
if not player:removeItem(9971, price) then

( 9971 is gold ingot )

and in config.lua you can setup the price as you want :D thats it

Sorry that I had to use "feature" im not sure if its right lol
 
Last edited:
Top