larsnaslund/Official-OTFans-Distribution — pull request #5 by adakraz (2012-09-19 22:20:59+00:00)
Title: fix syntax errors in data

by commenting out the checks for tibia version and using items.otb from Tibia 9.20 I was able to run it on the data folder fix some errors that prevented it from loading. Still some more remain.

Startup after fixes:
```
:: OTServ Version 0.7.0
:: ============================================================================
::
:: Initializing the random numbers... [done]
:: Loading lua script config.lua... [done]
:: Using data directory data/... [done]
:: Checking Connection to Database db.s3db... [done]
:: NO DATABASE VERSION CHECK, TURN ON AGAIN WHEN SCHEMA IS STABLE!
:: Cleaning online players info... [done]
:: Loading RSA key... [done]
:: Loading data/vocations.xml... [done]
:: Loading data/items/items.otb... Another (client) version of items.otb is required. (is 29
[done]
:: Loading data/items/items.xml... [done]
:: Loading data/monster/monsters.xml... Warning: [CreatureManager::deserializeSpell]. Brimstone Bug_attack_3 - Unknown areaEffect Enum MagicEffect value does not exist (plantattack)
I/O warning : failed to load external entity "data/monster/Bonelords/Bonelord.xml"
Warning: [CreatureManager::deserializeSpell]. Defiler_attack_3 - Unknown areaEffect Enum MagicEffect value does not exist (plantattack)
Warning: [CreatureManager::deserializeSpell]. Defiler_attack_4 - Unknown areaEffect Enum MagicEffect value does not exist (plantattack)
Warning: [CreatureManager::deserializeSpell]. Enlightened of the Cult_attack_2 - Unknown areaEffect Enum MagicEffect value does not exist (holydamage)
Warning: [CreatureManager::deserializeSpell]. Nightstalker_attack_2 - Unknown areaEffect Enum MagicEffect value does not exist (holydamage)
Warning: [CreatureManager::deserializeSpell]. Jagged Earth Elemental_attack_3 - Unknown areaEffect Enum MagicEffect value does not exist (plantattack)
Warning: [CreatureManager::loadMonster]. Unknown immunity blood. data/monster/Draken and Lizards/draken elite.xml
Warning: [CreatureManager::loadMonster]. Unknown immunity blood. data/monster/Draken and Lizards/lizard abomination.xml
Warning: [CreatureManager::deserializeSpell]. Thalas_attack_3 - Unknown areaEffect Enum MagicEffect value does not exist (plantattack)
[done]
:: Loading admin protocol config... [done]
:: Worldtype: PVP
:: Skulls enabled
:: Use plain passwords
:: Loading map from: data/world/ood.otbm OTBM
Map size: 3048x3048
Map description: Saved with Remere's Map Editor 3.0 BETA
Map description: No map description available.
Notice: [OTBM Loader] Loading time : 1.069 s
[Spawn::addMonster] Can not find Beholder
[Spawn::addMonster] Can not find Beholder
[Spawn::addMonster] Can not find Beholder
[Spawn::addMonster] Can not find Beholder
[Spawn::addMonster] Can not find troll legionnaire
Notice: Map load (binary) took : 0 s
::
:: Loading Scripts ...
::
:: Global IP address: 127.0.0.1
::
:: LAN IP address(es): 127.0.1.1
:: Bound ports: 7171 7172
:: Client Protocol 8.70
::
:: Starting Server OTServ... [done]
:: OpenTibia Server Running...

```

place to disable the items.otb check
```
--- a/src/items.cpp
+++ b/src/items.cpp
@@ -202,8 +202,8 @@ int Items::loadFromOtb(std::string file)
return ERROR_INVALID_FORMAT;
}
else if(Items::dwMinorVersion != CLIENT_VERSION_870){
- std::cout << "Another (client) version of items.otb is required." << std::endl;
- return ERROR_INVALID_FORMAT;
+ std::cout << "Another (client) version of items.otb is required. currently is " << Items::dwMinorVersion << std::endl;
+ //return ERROR_INVALID_FORMAT;
}

node = f.getChildNode(node, type);
```