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

Only for Premium..

ekno333

New Member
Joined
Jan 30, 2009
Messages
11
Reaction score
0
Location
Sinaloa
the problem is that I'm using Premium Acc as Vip ACC..
I've changed premmy spells and outfits to free players..
so every player can use premium/free spells, etc.. there's no problem.

It begin when i try tro buy a house with a Free Acc, it says that I need premium account(vip acc in my server) to buy house.. also the same problem while buying promotion..

I need to buying house and promotion dont need pacc..

I'm using theforgottenserver-v0.2.7 GUI (Mystic Spirit)

promotion.lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler: onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler: onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler: onCreatureSay(cid, type, msg) end
function onThink() npcHandler: onThink() end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())

also i have a problem with npc/default.lua:
[26/06/2010 16:39:00] Lua Script Error: [Npc interface]
[26/06/2010 16:39:00] data/npc/scripts/default.lua: onThink
default.lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler: onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler: onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler: onCreatureSay(cid, type, msg) end
function onThink() npcHandler: onThink() end

npcHandler:addModule(FocusModule:new())
 
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler: onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler: onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler: onCreatureSay(cid, type, msg) end
function onThink() npcHandler: onThink() end

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, premium = false, text = 'Congratulations! You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())

And for houses, you would have to edit source code (comamands.cpp) and compile:
Code:
bool Commands::buyHouse(Creature* creature, const std::string& cmd, const std::string& param)
{
	Player* player = creature->getPlayer();
	if(player)
	{
		Position pos = player->getPosition();
		pos = getNextPosition(player->direction, pos);
		for(HouseMap::iterator it = Houses::getInstance().getHouseBegin(); it != Houses::getInstance().getHouseEnd(); it++)
		{
			if(it->second->getHouseOwner() == player->guid)
			{
				player->sendCancel("You are already the owner of a house.");
				return false;
			}
		}
		if(Tile* tile = g_game.getTile(pos.x, pos.y, pos.z))
		{
			if(HouseTile* houseTile = dynamic_cast<HouseTile*>(tile))
			{
				if(House* house = houseTile->getHouse())
				{
					if(house->getDoorByPosition(pos))
					{
						if(!house->getHouseOwner())
						{
[B][COLOR="Red"]							if(player->isPremium())
							{[/COLOR][/B]
								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.");
[B][COLOR="Red"]							}
							else
								player->sendCancelMessage(RET_YOUNEEDPREMIUMACCOUNT);[/COLOR][/B]
						}
						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;
}
 
Ive goy an error when compiling.

22 C:\xxx\xxx\xxx\forgottenserver-0.2.7\0.2.7\actions.cpp In file included from ../actions.cpp
236 C:\xxx\xxx\xxx\forgottenserver-0.2.7\0.2.7\const.h 'uint8_t' does not name a type
264 C:\xxx\xxx\xxx\forgottenserver-0.2.7\0.2.7\const.h 'uint8_t' does not name a type
264 C:\xxx\xxx\xxx\forgottenserver-0.2.7\0.2.7\const.h *** [obj//actions.o] Error 1

what should i do?
 
Back
Top