Evil Mark
Active Member
- Joined
- Nov 23, 2008
- Messages
- 1,707
- Reaction score
- 32
If you can't compile it on your own, I can compile this on your computer with your source folder for you for the price of 15 Euro.
Go to resources.h and scroll all the way to the bottom and replace your code with this.
Then goto itemloader.h and search for this
CLIENT_VERSION_854 = 16,
When you have found that line replace it with
items.cpp:
Search for
and
Replace:
WITH
now go to protocolgame.cpp, and search for
REPLACE
WITH
Protocolgame.cpp
Search for
and
REPLACE
WITH
In spells.cpp go to
and replace:
with this:
Adding the new effects to the game!
tools.cpp
search for
and replace
With
go to const.h and search for
Replace
With
How to fix bug of npc don't buy items with charges (ex: potions)
In npc.cpp search:
After add:
Search:
After add:
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)
You must remove this row on all runes in your spells.xml.
outfit.xml
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
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)
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()
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
Attachments
-
items.rar54.1 KB · Views: 596 · VirusTotal
Last edited: