• 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!

AAC [Znote AAC] Buy house with shop points

Skylinx

Game Programmer
Joined
Nov 26, 2008
Messages
399
Reaction score
14
Location
TORONTO, CANADA
Hello. I've searched OTLand for this but haven't found anything. Which leads me to believe it's probably really simple and I'm too dumb to figure it out. (I haven't worked with OTs since 2013)

I want to make it possible to buy houses within the points shop. Has a feature like this been done before and I just could not find it? Is there any tricks or tips someone might have to achieve this?
I know ZNote AAC has the possibility to bid on houses. I could make it possible to bid with VIP points, but I want points to be able to straight up buy a house. I've thought of ways of adding something like this but I am afraid because I haven't worked with OT for a long time and I'm not great with PHP.

I'm experienced with LUA and C++ but amateur with PHP and I want to make this system automated and safe.
Does anyone have a general direction I should be taking to implement something like this? Thank you.
 
Last edited:
Solution
Created! This is also considered shop order type 7. Make sure to patch up your in-game shop processing scripts so the ownership gets transferred in-game.


Made it flexible in config.php:
PHP:
$config['houseConfig'] = array(
    'HouseListDefaultTown' => 1, // Default town id to display when visting house list page page.
    'minimumBidSQM' => 200, // minimum bid cost on auction (per SQM)
    'auctionPeriod' => 24 * 60 * 60, // 24 hours auction time.
    'housesPerPlayer' => 1,
    'requirePremium' => false,
    'levelToBuyHouse' => 8,
    // Instant buy with shop points
    'shopPoints' => array(
        'enabled' => true,
        // SQM => points...
How would you calculate house prices?

A static etc 10 shop points for every house. Or a rule like 1 shop points each 10 sqm?
 
How would you calculate house prices?

A static etc 10 shop points for every house. Or a rule like 1 shop points each 10 sqm?

:eek: Hello Znote! So happy to still see you active. I think a static value per house would be awesome. per sqm is not necessary really


what about editing the !buyhouse command to use vip points for selected house IDs?

I have thought about this but integrating it with the php is where I'm having issues. Ultimately if I can't get the webshop to directly buy a house, I had an alternative. Though I'm not sure if it's good. I was going to modify !buyhouse to use points and only modify the current house page to show both the gold price and the points price. The player would have to buy it in game though.
 
Last edited:
Created! This is also considered shop order type 7. Make sure to patch up your in-game shop processing scripts so the ownership gets transferred in-game.


Made it flexible in config.php:
PHP:
$config['houseConfig'] = array(
    'HouseListDefaultTown' => 1, // Default town id to display when visting house list page page.
    'minimumBidSQM' => 200, // minimum bid cost on auction (per SQM)
    'auctionPeriod' => 24 * 60 * 60, // 24 hours auction time.
    'housesPerPlayer' => 1,
    'requirePremium' => false,
    'levelToBuyHouse' => 8,
    // Instant buy with shop points
    'shopPoints' => array(
        'enabled' => true,
        // SQM => points cost
        'cost' => array(
            1 => 10,
            25 => 15,
            60 => 25,
            100 => 30,
            200 => 40,
            300 => 50,
        ),
    ),
);

If you want a static to buy a house, just remove all SQM => PRICE options except the first one.
PHP:
        'cost' => array(
            1 => 10, // Houses with 1+ sqm will cost 10 points.
        ),
 
Solution
Wow. Can't thank you enough. As soon as I get back from work I'll try this out. ❤

*edit: Tested and implemented. Don't see any issues so far, everything seems to be working as it should. Thank you Znote
 
Last edited:
Back
Top