• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Programmer [Compiling] 8.57 - 8.60

Ataro

Member
Joined
Oct 28, 2010
Messages
689
Reaction score
20
Location
Netherlands
Searching someone who can help me compile tfs 0.3.6 8.57 to 8.60
its because of the Pots stack etc its hard to do, you will be rewarded with a high rank position at the ot and if we got over the 50 people also with money :D
 
Go to resources.h and scroll all the way to the bottom and replace your code with this.

Code:
#define CLIENT_VERSION_MIN 861
#define CLIENT_VERSION_MAX 862
#define CLIENT_VERSION_STRING "Only clients with protocol 8.61 and 8.62 are allowed!"

#define STATUS_SERVER_NAME "TheForgottenServer"
#define STATUS_SERVER_VERSION "0.3.5"
#define STATUS_SERVER_CODENAME "Crying Damson"
#define STATUS_SERVER_PROTOCOL "8.62"


Then goto itemloader.h and search for this
CLIENT_VERSION_854 = 16,

When you have found that line replace it with
Code:
	CLIENT_VERSION_854 = 16,
	CLIENT_VERSION_855 = 17,
	CLIENT_VERSION_856 = 18,
	CLIENT_VERSION_857 = 19,
	CLIENT_VERSION_860 = 20,
	CLIENT_VERSION_861 = 21,
        CLIENT_VERSION_862 = 22





items.cpp:
Search for
Code:
else if(Items::dwMinorVersion != CLIENT_VERSION_854)
and


Replace:
Code:
	else if(Items::dwMinorVersion != CLIENT_VERSION_854)
	{
		std::cout << "[Error - Items::loadFromOtb] Another (client) version of items.otb is required." << std::endl;
		return ERROR_INVALID_FORMAT;
	}

WITH

Code:
	else if(Items::dwMinorVersion != [B][COLOR="Red"]19[/COLOR][/B])
	{
		std::cout << "[Error - Items::loadFromOtb] Another (client) version of items.otb is required." << std::endl;
		return ERROR_INVALID_FORMAT;
	}








now go to protocolgame.cpp, and search for
Code:
void ProtocolGame::parseAttack(NetworkMessage& msg)

REPLACE
Code:
void ProtocolGame::parseAttack(NetworkMessage& msg)
{
	uint32_t creatureId = msg.GetU32();
	addGameTask(&Game::playerSetAttackedCreature, player->getID(), creatureId);
}

WITH

Code:
void ProtocolGame::parseAttack(NetworkMessage& msg)
{
	uint32_t creatureId = msg.GetU32();
[B][COLOR="Red"]	msg.GetU32();
	msg.GetU32();[/COLOR][/B]
	addGameTask(&Game::playerSetAttackedCreature, player->getID(), creatureId);
}








Protocolgame.cpp

Search for
Code:
void ProtocolGame::sendCancelTarget()
and

REPLACE
Code:
void ProtocolGame::sendCancelTarget()
{
	NetworkMessage_ptr msg = getOutputBuffer();
	if(msg)
	{
		TRACK_MESSAGE(msg);
		msg->AddByte(0xA3);
	}
}


WITH

Code:
void ProtocolGame::sendCancelTarget()
{
	NetworkMessage_ptr msg = getOutputBuffer();
	if(msg)
	{
		TRACK_MESSAGE(msg);
		msg->AddByte(0xA3);
		[B][COLOR="Red"]msg->AddU32(0);[/COLOR][/B]
	}






In spells.cpp go to
Code:
bool RuneSpell::executeUse(Player* player, Item* item, const PositionEx& posFrom,

and replace:
Code:
g_game.transformItem(item, item->getID(), std::max((int32_t)0, ((int32_t)item->getCharges()) - 1));

with this:

Code:
g_game.transformItem(item, item->getID(), std::max((int32_t)0, ((int32_t)item->getItemCount()) - 1));




Adding the new effects to the game!
tools.cpp

search for
Code:
{"insects",		MAGIC_EFFECT_INSECTS}

and replace
Code:
	{"insects",		MAGIC_EFFECT_INSECTS},
};

With
Code:
	{"insects",		MAGIC_EFFECT_INSECTS},
	{"dragonhead",		MAGIC_EFFECT_DRAGONHEAD}
};






go to const.h and search for
Code:
MAGIC_EFFECT_INSECTS		= 0x44, //68

Replace
Code:
	MAGIC_EFFECT_INSECTS		= 0x44, //68
	MAGIC_EFFECT_LAST		= MAGIC_EFFECT_INSECTS,

With
Code:
	MAGIC_EFFECT_INSECTS		= 0x44, //68
        MAGIC_EFFECT_DRAGONHEAD		= 0x45, //69
	MAGIC_EFFECT_LAST		= MAGIC_EFFECT_DRAGONHEAD,





How to fix bug of npc don't buy items with charges (ex: potions)

In npc.cpp search:

LUA:
li.itemId = intValue;

After add:

LUA:
const ItemType& it = Item::items[li.itemId];

Search:

LUA:
if(readXMLInteger(tmpNode, "subtype", intValue))
li.subType = intValue;

After add:

LUA:
else
{
if(it.stackable)
li.subType = 1;
else if(it.isFluidContainer() || it.isSplash())
li.subType = 0;
}


COMPILE/Rebuild ALL
You're done!



XML Codes & Stuff you need for your server as it has been updated (Inside Server DATA folder)

@Use this Item.otb and Download the Itemx XML Below (It's attached)
  • items.otb: items.rar
    It has all the new items, and attribtes fixed for the old items (potions, runes and empty potions). This items.otb is kind of useless without RME, though. But you can still summon the new items with /i command.



You must remove this row on all runes in your spells.xml.
Code:
	<item id="2261"  name="destroy field rune">
		<attribute key="runeSpellName" value="adito grav" />
		<attribute key="weight" value="120" />
 [B]delete-> [/B] [COLOR="Red"]<attribute key="charges" value="1" />[/COLOR]
	</item>


outfit.xml

LUA:
<?xml version="1.0"?>
<outfits>
	<outfit id="1">
		<list gender="0" lookType="136" name="Citizen"/>
		<list gender="1" lookType="128" name="Citizen"/>
	</outfit>

	<outfit id="2">
		<list gender="0" lookType="137" name="Hunter"/>
		<list gender="1" lookType="129" name="Hunter"/>
	</outfit>

	<outfit id="3">
		<list gender="0" lookType="138" name="Mage"/>
		<list gender="1" lookType="130" name="Mage"/>
	</outfit>

	<outfit id="4">
		<list gender="0" lookType="139" name="Knight"/>
		<list gender="1" lookType="131" name="Knight"/>
	</outfit>

	<outfit id="5" premium="yes">
		<list gender="0" lookType="140" name="Noblewoman"/>
		<list gender="1" lookType="132" name="Nobleman"/>
	</outfit>

	<outfit id="6" premium="yes">
		<list gender="0" lookType="141" name="Summoner"/>
		<list gender="1" lookType="133" name="Summoner"/>
	</outfit>

	<outfit id="7" premium="yes">
		<list gender="0" lookType="142" name="Warrior"/>
		<list gender="1" lookType="134" name="Warrior"/>
	</outfit>

	<outfit id="8" premium="yes">
		<list gender="0" lookType="147" name="Barbarian"/>
		<list gender="1" lookType="143" name="Barbarian"/>
	</outfit>

	<outfit id="9" premium="yes">
		<list gender="0" lookType="148" name="Druid"/>
		<list gender="1" lookType="144" name="Druid"/>
	</outfit>

	<outfit id="10" premium="yes">
		<list gender="0" lookType="149" name="Wizard"/>
		<list gender="1" lookType="145" name="Wizard"/>
	</outfit>

	<outfit id="11" premium="yes">
		<list gender="0" lookType="150" name="Oriental"/>
		<list gender="1" lookType="146" name="Oriental"/>
	</outfit>

	<outfit id="12" premium="yes">
		<list gender="0" lookType="155" name="Pirate"/>
		<list gender="1" lookType="151" name="Pirate"/>
	</outfit>

	<outfit id="13" premium="yes">
		<list gender="0" lookType="156" name="Assassin"/>
		<list gender="1" lookType="152" name="Assassin"/>
	</outfit>

	<outfit id="14" premium="yes">
		<list gender="0" lookType="157" name="Beggar"/>
		<list gender="1" lookType="153" name="Beggar"/>
	</outfit>

	<outfit id="15" premium="yes">
		<list gender="0" lookType="158" name="Shaman"/>
		<list gender="1" lookType="154" name="Shaman"/>
	</outfit>

	<outfit id="16" premium="yes">
		<list gender="0" lookType="252" name="Norsewoman"/>
		<list gender="1" lookType="251" name="Norseman"/>
	</outfit>

	<outfit id="17" premium="yes">
		<list gender="0" lookType="269" name="Nightmare"/>
		<list gender="1" lookType="268" name="Nightmare"/>
	</outfit>

	<outfit id="18" premium="yes">
		<list gender="0" lookType="270" name="Jester"/>
		<list gender="1" lookType="273" name="Jester"/>
	</outfit>

	<outfit id="19" premium="yes">
		<list gender="0" lookType="279" name="Brotherhood"/>
		<list gender="1" lookType="278" name="Brotherhood"/>
	</outfit>

	<outfit id="20" premium="yes">
		<list gender="0" lookType="288" name="Demonhunter"/>
		<list gender="1" lookType="289" name="Demonhunter"/>
	</outfit>

	<outfit id="21" premium="yes">
		<list gender="0" lookType="324" name="Yalaharian"/>
		<list gender="1" lookType="325" name="Yalaharian"/>
	</outfit>

	<outfit id="22" premium="yes">
		<list gender="0" lookType="336" name="Warmaster"/>
		<list gender="1" lookType="335" name="Warmaster"/>
	</outfit>

	<outfit id="23" default="0">
		<list gender="0" lookType="329" name="Wife"/>
		<list gender="1" lookType="328" name="Husband"/>
	</outfit>

	<outfit id="24" premium="yes">
		<list gender="0" lookType="366" name="Wayfarer"/>
		<list gender="1" lookType="367" name="Wayfarer"/>
	</outfit>
</outfits>




REP+ If you want too, because it took alot of time organizing this thread.

NOTE! It's been tested and no bugs found so far..

Known bugs:
None

>.<
 
Back
Top