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

Making a non tradeable item.

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,766
Solutions
1
Reaction score
225
Location
Chile, Santiago
Hello, can someone can make a script or teach me how to make a item that can not be traded?

I mean, when you try to "Trade with..." it gives a message that says "This item can not be traded."

Someone?
 
You can do it in sources, game.cpp file

in this function:
Code:
bool Game::playerRequestTrade(uint32_t playerId, const Position& pos, int16_t stackpos,
	uint32_t tradePlayerId, uint16_t spriteId)
{

find:
Code:
	if(player->getPosition().z < tradeItem->getPosition().z)
	{
		player->sendCancelMessage(RET_FIRSTGODOWNSTAIRS);
		return false;
	}

and paste after it:
Code:
	if(tradeItem->getID() == 12345)
	{
		player->sendTextMessage(MSG_INFO_DESCR, "You can not trade this item.");
		return false;
	}

But still they will be able to trade this item in container.
 
Nice, but it cant be on a movements script?
Because I need to make it fully not tradeable... There is a bug with the transforming ring... That if you trade it and the other player doesnt have more space or cap, you get the habilities of the ring while you dont wear it... :S
 
Back
Top