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

House command acces

Bilip

New Member
Joined
Apr 15, 2009
Messages
41
Reaction score
0
I need to make small change in (alevo grav) housebuy command ( required specified item to buy a house)
but, i can't find any file responsible for that.
This I found in talkactions/
Code:
<talkaction words="alevo grav" filter="word-spaced" event="function" value="houseBuy"/>
But there is no file housebuy at all! At least I can't find it.
How can I edit that ?
I know that probably I made most elementary mistake, but anyway don't laught at me :P

Ohh.. by the way:
I have another small unsolved problem:
http://otland.net/f16/exura-sio-heal-only-friend-194266/#post1875147

Thanks :)
 
I don't think there is a seperated file for that, i think its like "function" that has been introduced to server with compiling, if you want to change that you need to modify the sources and recompile, but i might be wrong, i am just telling what i think. Its better to stay without asnwer (has happened to me a lot lately on support boards)
 
talkaction.cpp
[CPP]bool TalkAction::houseBuy(Creature* creature, const std::string&, const std::string&)[/CPP]
 
Indeed it is in source, anyway I need help!
Do you guys know how to put another condition in this simple statement, I'm quite familiar with C++, but I have no idea, how to check if
player has some item or not
Aim: TO buy house player needs money AND item (ex. id=2400) (of cource it disappears after purchace) (It would be v easy in lua, so i'm sure it's also not hard in C++)
Code:
	if((uint32_t)g_game.getMoney(player) < house->getPrice() || !g_game.removeMoney(player, house->getPrice()))
	{
		player->sendCancel("You do not have enough money.");
		g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
		return false;
	}
This is the part of code we should edit!

Please help me As soon as possible!
 
Back
Top