-
Posts
36 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by DaCookie -Raven
-
-
Thanks for the tool.
I ran into some errors using the locale_string.txt, because mine can not properly be converted into UTF-8.
This is because the korean texts are encoded in cp949 and my local translation has some special characters in ISO-8859-1.
Therefore I wrote a small tool converting the korean texts encoded as CP949 into UTF-8 and some european character set ISO-8859-1 into UTF-8.
Maybe it is useful for you and you can adjust the character sets for your needs.NOTE: You need iconv by GNU to link this application
- 13
- 1
- 6
- 5
-
Reupload please
Thanks
-
After successfully compiling the source I experienced some bugs...
Here is what I changed, may it is useful for you too:
db:
ClientManagerBoot.cpp:747 "sqlMsg" was not directly allocated -> undefined behaviour
game:
config.cpp:675 "g_stAdminPageNoLChost" is always false config.cpp:676 also "strtok_r()" in "FN_add_adminpageIP()" can't handle this, probably because it is trying to modify the "127.0.0.1" string ani.cpp:138 comma missing
- 1
-
very usefull^^
i tried this some years ago but i failed xD
thanks for this tut now i know what to do^^
-
which programm are you using for virtualizaton?
-
?
sorry please write in english i dont want to use always google translator to translate everytime and google translator shows always only crap xD
- 1
-
- invisible bugfix in source is public here
- stunbug is also fixxed here
- editing the exp table is not that difficult to add some new lines or just modify them^^
- kickhack is fixxed in 40k i think because i saw some funtion called sync pos hack
- /level command: doing strg + f "do_level" have fun^^
-
I made a short tut^^:
At first i want to say: this is not compatible with a table_postfix or item_vnum ranges.
[1] open "ClientManagerBoot.cpp"
and make these both if-terms to comments or delete them (in my tree at line 22 - 26 and 34 - 38)
[2] edit the function "CClientManager::InitializeMobTable()" like this:bool CClientManager::InitializeMobTable() { static const char * query = "SELECT vnum, name, locale_name, rank, type, battle_type, level, size, ai_flag+0, mount_capacity," "setRaceFlag+0, setImmuneFlag+0, empire, folder, on_click, st, dx, ht, iq, damage_min, damage_max," "max_hp, regen_cycle, regen_percent, gold_min, gold_max, exp, def, attack_speed, move_speed, aggressive_hp_pct," "aggressive_sight, attack_range, drop_item, resurrection_vnum, enchant_curse, enchant_slow," "enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, resist_sword, resist_twohand," "resist_dagger, resist_bell, resist_fan, resist_bow, resist_fire, resist_elect, resist_magic, resist_wind," "resist_poison, dam_multiply, summon, drain_sp, mob_color, polymorph_item, skill_level0, skill_vnum0," "skill_level1, skill_vnum1, skill_level2, skill_vnum2, skill_level3, skill_vnum3, skill_level4, skill_vnum4," "sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive FROM mob_proto ORDER BY vnum"; std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("No result from Mob_Proto!"); return false; } if (!m_vec_mobTable.empty()) { sys_log(0, "RELOAD: mob_proto"); m_vec_mobTable.clear(); } m_vec_mobTable.reserve(pRes->uiNumRows); MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TMobTable t; memset(&t, 0, sizeof(t)); col = 0; str_to_number(t.dwVnum, data[col++]); strlcpy(t.szName, data[col++], sizeof(t.szName)); strlcpy(t.szLocaleName, data[col++], sizeof(t.szLocaleName)); str_to_number(t.bRank, data[col++]); str_to_number(t.bType, data[col++]); str_to_number(t.bBattleType, data[col++]); str_to_number(t.bLevel, data[col++]); str_to_number(t.bSize, data[col++]); str_to_number(t.dwAIFlag, data[col++]); str_to_number(t.bMountCapacity, data[col++]); str_to_number(t.dwRaceFlag, data[col++]); str_to_number(t.dwImmuneFlag, data[col++]); str_to_number(t.bEmpire, data[col++]); strlcpy(t.szFolder, data[col++], sizeof(t.szFolder)); str_to_number(t.bOnClickType, data[col++]); str_to_number(t.bStr, data[col++]); str_to_number(t.bDex, data[col++]); str_to_number(t.bCon, data[col++]); str_to_number(t.bInt, data[col++]); str_to_number(t.dwDamageRange[0], data[col++]); str_to_number(t.dwDamageRange[1], data[col++]); str_to_number(t.dwMaxHP, data[col++]); str_to_number(t.bRegenCycle, data[col++]); str_to_number(t.bRegenPercent, data[col++]); str_to_number(t.dwGoldMin, data[col++]); str_to_number(t.dwGoldMax, data[col++]); str_to_number(t.dwExp, data[col++]); str_to_number(t.wDef, data[col++]); str_to_number(t.sAttackSpeed, data[col++]); str_to_number(t.sMovingSpeed, data[col++]); str_to_number(t.bAggresiveHPPct, data[col++]); str_to_number(t.wAggressiveSight, data[col++]); str_to_number(t.wAttackRange, data[col++]); str_to_number(t.dwDropItemVnum, data[col++]); str_to_number(t.dwResurrectionVnum, data[col++]); str_to_number(t.cEnchants[0], data[col++]); str_to_number(t.cEnchants[1], data[col++]); str_to_number(t.cEnchants[2], data[col++]); str_to_number(t.cEnchants[3], data[col++]); str_to_number(t.cEnchants[4], data[col++]); str_to_number(t.cEnchants[5], data[col++]); str_to_number(t.cResists[0], data[col++]); str_to_number(t.cResists[1], data[col++]); str_to_number(t.cResists[2], data[col++]); str_to_number(t.cResists[3], data[col++]); str_to_number(t.cResists[4], data[col++]); str_to_number(t.cResists[5], data[col++]); str_to_number(t.cResists[6], data[col++]); str_to_number(t.cResists[7], data[col++]); str_to_number(t.cResists[8], data[col++]); str_to_number(t.cResists[9], data[col++]); str_to_number(t.cResists[10], data[col++]); str_to_number(t.fDamMultiply, data[col++]); str_to_number(t.dwSummonVnum, data[col++]); str_to_number(t.dwDrainSP, data[col++]); str_to_number(t.dwMobColor, data[col++]); str_to_number(t.dwPolymorphItemVnum, data[col++]); str_to_number(t.Skills[0].bLevel, data[col++]); str_to_number(t.Skills[0].dwVnum, data[col++]); str_to_number(t.Skills[1].bLevel, data[col++]); str_to_number(t.Skills[1].dwVnum, data[col++]); str_to_number(t.Skills[2].bLevel, data[col++]); str_to_number(t.Skills[2].dwVnum, data[col++]); str_to_number(t.Skills[3].bLevel, data[col++]); str_to_number(t.Skills[3].dwVnum, data[col++]); str_to_number(t.Skills[4].bLevel, data[col++]); str_to_number(t.Skills[4].dwVnum, data[col++]); str_to_number(t.bBerserkPoint, data[col++]); str_to_number(t.bStoneSkinPoint, data[col++]); str_to_number(t.bGodSpeedPoint, data[col++]); str_to_number(t.bDeathBlowPoint, data[col++]); str_to_number(t.bRevivePoint, data[col++]); sys_log(0, "Monster: %s loaded", t.szLocaleName); m_vec_mobTable.push_back(t); } return true; }
[3] edit the function "CClientManager::InitializeItemTable()" like this:bool CClientManager::InitializeItemTable() { /* I needed to make 2 mysql queries because with only 1 there was always a stackoverflow.... * However^^ It works so idc */ const char * c_ist_doof = "SELECT refined_vnum, refine_set, magic_pct FROM item_proto ORDER BY vnum"; SQLMsg* sqlMsg1 = CDBManager::instance().DirectQuery(c_ist_doof); const char * query = "SELECT vnum, name, locale_name, type, subtype, weight, size, antiflag+0," "flag+0, wearflag+0, immuneflag+0, gold, shop_buy_price, refined_vnum," "refine_set, magic_pct, limittype0, limitvalue0, limittype1, limitvalue1," "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2," "value0, value1, value2, value3, value4, value5, socket0, socket1, socket2," "socket3, socket4, socket5, specular, socket_pct, addon_type FROM item_proto ORDER BY vnum"; SQLMsg* sqlMsg = CDBManager::instance().DirectQuery(query); MYSQL_RES* pRes1 = sqlMsg1->vec_pkResult[0]->pSQLResult; MYSQL_RES* pRes = sqlMsg->vec_pkResult[0]->pSQLResult; if (sizeof(pRes) <= 1 || sizeof(pRes1) <= 1) { sys_err("Kein Ergebnis aus Item_Proto!"); return false; } if (!m_vec_itemTable.empty()) { sys_log(0, "Reloading Item_Proto"); m_vec_itemTable.clear(); } MYSQL_ROW data; MYSQL_ROW data1; while ((data = mysql_fetch_row(pRes)) && (data1 = mysql_fetch_row(pRes1))) { TItemTable t; TItemTable baum; str_to_number(baum.dwRefinedVnum, data1[0]); str_to_number(baum.wRefineSet, data1[1]); str_to_number(baum.bAlterToMagicItemPct, data1[2]); str_to_number(t.dwVnum, data[0]); strlcpy(t.szName, data[1], sizeof(t.szName)); strlcpy(t.szLocaleName, data[2], sizeof(t.szLocaleName)); str_to_number(t.bType, data[3]); str_to_number(t.bSubType, data[4]); str_to_number(t.bWeight, data[5]); str_to_number(t.bSize, data[6]); str_to_number(t.dwAntiFlags, data[7]); str_to_number(t.dwFlags, data[8]); str_to_number(t.dwWearFlags, data[9]); str_to_number(t.dwImmuneFlag, data[10]); str_to_number(t.dwGold, data[11]); str_to_number(t.dwShopBuyPrice,data[12]); str_to_number(t.aLimits[0].bType, data[16]); str_to_number(t.aLimits[0].lValue, data[17]); str_to_number(t.aLimits[1].bType, data[18]); str_to_number(t.aLimits[1].lValue, data[19]); str_to_number(t.aApplies[0].bType, data[20]); str_to_number(t.aApplies[0].lValue, data[21]); str_to_number(t.aApplies[1].bType, data[22]); str_to_number(t.aApplies[1].lValue, data[23]); str_to_number(t.aApplies[2].bType, data[24]); str_to_number(t.aApplies[2].lValue, data[25]); str_to_number(t.alValues[0], data[26]); str_to_number(t.alValues[1], data[27]); str_to_number(t.alValues[2], data[28]); str_to_number(t.alValues[3], data[29]); str_to_number(t.alValues[4], data[30]); str_to_number(t.alValues[5], data[31]); str_to_number(t.alSockets[0], data[32]); str_to_number(t.alSockets[1], data[33]); str_to_number(t.alSockets[2], data[34]); str_to_number(t.alSockets[3], data[35]); str_to_number(t.alSockets[4], data[36]); str_to_number(t.alSockets[5], data[37]); str_to_number(t.bSpecular, data[38]); str_to_number(t.bGainSocketPct, data[39]); str_to_number(t.sAddonType, data[40]); t.cLimitRealTimeFirstUseIndex = -1; t.cLimitTimerBasedOnWearIndex = -1; for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i) { if (LIMIT_REAL_TIME_START_FIRST_USE == t.aLimits[i].bType) t.cLimitRealTimeFirstUseIndex = (char) i; if (LIMIT_TIMER_BASED_ON_WEAR == t.aLimits[i].bType) t.cLimitTimerBasedOnWearIndex = (char) i; } // Conversion t.dwRefinedVnum = baum.dwRefinedVnum; t.wRefineSet = baum.wRefineSet; t.bAlterToMagicItemPct = baum.bAlterToMagicItemPct; //Debug //sys_log(0,"%d %d %d",t.dwRefinedVnum, t.wRefineSet, t.bAlterToMagicItemPct); //sys_log(0,"%d %d %d",baum.dwRefinedVnum, baum.wRefineSet, baum.bAlterToMagicItemPct); m_vec_itemTable.push_back(t); } m_map_itemTableByVnum.clear(); __gnu_cxx::__normal_iterator<SItemTable*, std::vector<SItemTable, std::allocator<SItemTable> > > it = m_vec_itemTable.begin(); while (it != m_vec_itemTable.end()) { TItemTable * item_table = &(*(it++)); sys_log(0,"Item %s geladen", item_table->szLocaleName); m_map_itemTableByVnum.insert(std::map<DWORD, TItemTable *>::value_type(item_table->dwVnum, item_table)); } sort(m_vec_itemTable.begin(), m_vec_itemTable.end(), FCompareVnum()); return true; }
[4] make both functions "bool CClientManager::MirrorMobTableIntoDB()" and "bool CClientManager::MirrorItemTableIntoDB()" to comments or delete them
[5] open "ClientManager.h" and delete or make these functions to comments:
(in my tree they are at line 190 and 191)
Thanks to iMer because i use some lines of his code and he had to stand over my skype spam^^
NOTE: If you have different table structures or more columns you want to use, you have to change the functions- 3
-
Die SuFu hat was ausgespuckt^^
schau mal hier: https://wiki.freebsd.org/amd64/i386Migration
//ENG
found sth
watch this: https://wiki.freebsd.org/amd64/i386Migration
- 1
-
I made a function for mob_proto and i cant find a bug:
bool CClientManager::InitializeMobTable() { static const char * query = "SELECT vnum, name, locale_name, rank, type, battle_type, level, size, ai_flag, mount_capacity," "setRaceFlag, setImmuneFlag, empire, folder, on_click, st, dx, ht, iq, damage_min, damage_max," "max_hp, regen_cycle, regen_percent, gold_min, gold_max, exp, def, attack_speed, move_speed, aggressive_hp_pct," "aggressive_sight, attack_range, drop_item, resurrection_vnum, enchant_curse, enchant_slow," "enchant_poison, enchant_stun, enchant_critical, enchant_penetrate, resist_sword, resist_twohand," "resist_dagger, resist_bell, resist_fan, resist_bow, resist_fire, resist_elect, resist_magic, resist_wind," "resist_poison, dam_multiply, summon, drain_sp, mob_color, polymorph_item, skill_level0, skill_vnum0," "skill_level1, skill_vnum1, skill_level2, skill_vnum2, skill_level3, skill_vnum3, skill_level4, skill_vnum4," "sp_berserk, sp_stoneskin, sp_godspeed, sp_deathblow, sp_revive FROM mob_proto ORDER BY vnum"; std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("No result from Mob_Proto!"); return false; } if (!m_vec_mobTable.empty()) { sys_log(0, "RELOAD: mob_proto"); m_vec_mobTable.clear(); } m_vec_mobTable.reserve(pRes->uiNumRows); MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TMobTable t; memset(&t, 0, sizeof(t)); col = 0; str_to_number(t.dwVnum, data[col++]); strlcpy(t.szName, data[col++], sizeof(t.szName)); strlcpy(t.szLocaleName, data[col++], sizeof(t.szLocaleName)); str_to_number(t.bRank, data[col++]); str_to_number(t.bType, data[col++]); str_to_number(t.bBattleType, data[col++]); str_to_number(t.bLevel, data[col++]); str_to_number(t.bSize, data[col++]); str_to_number(t.dwAIFlag, data[col++]); str_to_number(t.bMountCapacity, data[col++]); str_to_number(t.dwRaceFlag, data[col++]); str_to_number(t.dwImmuneFlag, data[col++]); str_to_number(t.bEmpire, data[col++]); strlcpy(t.szFolder, data[col++], sizeof(t.szFolder)); str_to_number(t.bOnClickType, data[col++]); str_to_number(t.bStr, data[col++]); str_to_number(t.bDex, data[col++]); str_to_number(t.bCon, data[col++]); str_to_number(t.bInt, data[col++]); str_to_number(t.dwDamageRange[0], data[col++]); str_to_number(t.dwDamageRange[1], data[col++]); str_to_number(t.dwMaxHP, data[col++]); str_to_number(t.bRegenCycle, data[col++]); str_to_number(t.bRegenPercent, data[col++]); str_to_number(t.dwGoldMin, data[col++]); str_to_number(t.dwGoldMax, data[col++]); str_to_number(t.dwExp, data[col++]); str_to_number(t.wDef, data[col++]); str_to_number(t.sAttackSpeed, data[col++]); str_to_number(t.sMovingSpeed, data[col++]); str_to_number(t.bAggresiveHPPct, data[col++]); str_to_number(t.wAggressiveSight, data[col++]); str_to_number(t.wAttackRange, data[col++]); str_to_number(t.dwDropItemVnum, data[col++]); str_to_number(t.dwResurrectionVnum, data[col++]); str_to_number(t.cEnchants[0], data[col++]); str_to_number(t.cEnchants[1], data[col++]); str_to_number(t.cEnchants[2], data[col++]); str_to_number(t.cEnchants[3], data[col++]); str_to_number(t.cEnchants[4], data[col++]); str_to_number(t.cEnchants[5], data[col++]); str_to_number(t.cResists[0], data[col++]); str_to_number(t.cResists[1], data[col++]); str_to_number(t.cResists[2], data[col++]); str_to_number(t.cResists[3], data[col++]); str_to_number(t.cResists[4], data[col++]); str_to_number(t.cResists[5], data[col++]); str_to_number(t.cResists[6], data[col++]); str_to_number(t.cResists[7], data[col++]); str_to_number(t.cResists[8], data[col++]); str_to_number(t.cResists[9], data[col++]); str_to_number(t.cResists[10], data[col++]); str_to_number(t.fDamMultiply, data[col++]); str_to_number(t.dwSummonVnum, data[col++]); str_to_number(t.dwDrainSP, data[col++]); str_to_number(t.dwMobColor, data[col++]); str_to_number(t.dwPolymorphItemVnum, data[col++]); str_to_number(t.Skills[0].bLevel, data[col++]); str_to_number(t.Skills[0].dwVnum, data[col++]); str_to_number(t.Skills[1].bLevel, data[col++]); str_to_number(t.Skills[1].dwVnum, data[col++]); str_to_number(t.Skills[2].bLevel, data[col++]); str_to_number(t.Skills[2].dwVnum, data[col++]); str_to_number(t.Skills[3].bLevel, data[col++]); str_to_number(t.Skills[3].dwVnum, data[col++]); str_to_number(t.Skills[4].bLevel, data[col++]); str_to_number(t.Skills[4].dwVnum, data[col++]); str_to_number(t.bBerserkPoint, data[col++]); str_to_number(t.bStoneSkinPoint, data[col++]); str_to_number(t.bGodSpeedPoint, data[col++]); str_to_number(t.bDeathBlowPoint, data[col++]); str_to_number(t.bRevivePoint, data[col++]); sys_log(0, "Monster: %d - %s loaded [Test: Int: %d | Yang-Drop Max: %d | Attack Speed: %d | Movement Speed.: %d]", t.dwVnum, t.szLocaleName, t.bInt, t.dwGoldMax, t.sAttackSpeed, t.sMovingSpeed); m_vec_mobTable.push_back(t); } return true; }
You also have to remove "MirrorMobTableIntoDB" and the call (starting in my ClientManagerBoot.cpp in line 22) and if you want also in the header file
The same i tried with the item_proto but 3 columns are always 0 ....
take a look if you find an error please tell me^^
bool CClientManager::InitializeItemTable() { static const char * query = "SELECT vnum, name, locale_name, type, subtype, weight, size, antiflag," "flag, wearflag, immuneflag, gold, shop_buy_price, refined_vnum," "refine_set, magic_pct, limittype0, limitvalue0, limittype1, limitvalue1," "applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2," "value0, value1, value2, value3, value4, value5, socket0, socket1, socket2," "socket3, socket4, socket5, specular, socket_pct, addon_type FROM item_proto ORDER BY vnum"; std::auto_ptr<SQLMsg> pkMsg(CDBManager::instance().DirectQuery(query)); SQLResult * pRes = pkMsg->Get(); if (!pRes->uiNumRows) { sys_err("Kein Ergebnis aus Item_Proto!"); return false; } if (!m_vec_itemTable.empty()) { sys_log(0, "RELOAD: item_proto"); m_vec_itemTable.clear(); } m_vec_itemTable.reserve(pRes->uiNumRows); MYSQL_ROW data; int col; while ((data = mysql_fetch_row(pRes->pSQLResult))) { TItemTable t; memset(&t, 0, sizeof(t)); col = 0; str_to_number(t.dwVnum, data[col++]); strlcpy(t.szName, data[col++], sizeof(t.szName)); strlcpy(t.szLocaleName, data[col++], sizeof(t.szLocaleName)); str_to_number(t.bType, data[col++]); str_to_number(t.bSubType, data[col++]); str_to_number(t.bWeight, data[col++]); str_to_number(t.bSize, data[col++]); str_to_number(t.dwAntiFlags, data[col++]); str_to_number(t.dwFlags, data[col++]); str_to_number(t.dwWearFlags, data[col++]); str_to_number(t.dwImmuneFlag, data[col++]); str_to_number(t.dwGold, data[col++]); str_to_number(t.dwShopBuyPrice, data[col++]); str_to_number(t.dwRefinedVnum, data[col++]); str_to_number(t.wRefineSet, data[col++]); str_to_number(t.bAlterToMagicItemPct, data[col++]); str_to_number(t.aLimits[0].bType, data[col++]); str_to_number(t.aLimits[0].lValue, data[col++]); str_to_number(t.aLimits[1].bType, data[col++]); str_to_number(t.aLimits[1].lValue, data[col++]); str_to_number(t.aApplies[0].bType, data[col++]); str_to_number(t.aApplies[0].lValue, data[col++]); str_to_number(t.aApplies[1].bType, data[col++]); str_to_number(t.aApplies[1].lValue, data[col++]); str_to_number(t.aApplies[2].bType, data[col++]); str_to_number(t.aApplies[2].lValue, data[col++]); str_to_number(t.alValues[0], data[col++]); str_to_number(t.alValues[1], data[col++]); str_to_number(t.alValues[2], data[col++]); str_to_number(t.alValues[3], data[col++]); str_to_number(t.alValues[4], data[col++]); str_to_number(t.alValues[5], data[col++]); str_to_number(t.alSockets[0], data[col++]); str_to_number(t.alSockets[1], data[col++]); str_to_number(t.alSockets[2], data[col++]); str_to_number(t.alSockets[3], data[col++]); str_to_number(t.alSockets[4], data[col++]); str_to_number(t.alSockets[5], data[col++]); str_to_number(t.bSpecular, data[col++]); str_to_number(t.bGainSocketPct, data[col++]); str_to_number(t.sAddonType, data[col++]); sys_log(0,"%d %s %d %d %d %d",t.dwVnum, t.szLocaleName,t.dwShopBuyPrice, t.dwRefinedVnum, t.wRefineSet, t.bAlterToMagicItemPct); m_vec_itemTable.push_back(t); } return true; }
-
Wow really nice
-
oh sorry... thanks
i dont know how i have come to "**"... i meaned "^"
i edited my post^^
-
Nice idea
But your function:
function math_sqrt_distance(x, y) if math.sqrt(math_sqr(pc.get_local_x() - x + math_sqr(pc.get_local_y() - y))) < 40 then return true end return false end
I would write like this:
function math_sqrt_distance(x, y) if math.sqrt((pc.get_local_x() - x)^2 + (pc.get_local_y() - y)^2) < 40 then return true end return false end
Because this is the general way of getting a distance between two points
and you need the "**2" because without it can come to a negative squirt and this wont work
-
Do you have the right db core?
i mean is this db core also for the new table structures in 40k?
please post the syserr of your db_cache
-
I really want the source doe for the patcher xD
im interested in the offset the patcher uses for the sequence table^^
-
just change your network adpater in the options...
but if you want to use the loopback adapter, you have to install it..
-
Wow really i lost the overwiev...
Thanks to all who helped me^^
-
Thank you that solved this error
Bad news: i got another one...
ostern.quest:640:syntax error : [string "startpc . count_item ( 50160 ) >= 1"]:510: <eof> expected near `else' Error occured on compile ostern.quest
I cant understand the compiler errors...
Why does the compiler expects "end of file"?
I updated the quest in the first post
-
Thanks but this didnt solved the error:
ostern.quest:640:syntax error : [string "startpc . count_item ( 50160 ) >= 1"]:399: `then' expected near `local' Error occured on compile ostern.quest
this is the new error... i deleted the new end on line 400 because it raises nearly the same error..
-
Hey i tried to compile this quest but i got some erros...
The error i get is:
quest ostern begin state start begin when 30129.chat."Die Ostereiersuche" begin ----"0123456789012345678901234567890123456789012345678901234567890" say_title("Die Ostereiersuche") say("") say("Einem mysteriösen Umstand zufolge bin ich hier aufgetaucht.") say("Als ich hier wieder zu mir kam, waren meine ganzen Eier") say("verschwunden. Aber ich habe dafür ganz große Eier gesehen,") say("aus denen Monster raus kommen. Außerdem kommen, wenn man die") say("großen Ostereier besiegt, Körbchen raus. Dort sind meine") say("Ostereier drinne.") wait() say_title("Die Ostereiersuche") say("Ich habe nur nicht die Zeit alle meine Ostereier zurück") say("zu holen. Du siehst aber dafür sehr stark aus und könntest") say("für mich doch bestimmt ein paar Ostereier sammeln.") say("Ich werde mir dann ein paar nette Belohnungen") say("einfallen lassen.") say_reward("Viel Glück beim Ostermetin suchen :)") end when 30129.chat."Ich habe Ostereier gefunden" with pc.count_item(50160) >=1 begin belohnungen = { -- Osterier Anzahl , Item_vnum , Anzahl, Item Name {20,80008,5,"Goldklumpen"}, {20,30219,5,"Schrumpfkopf"}, {20,27987,5,"Muschel"}, {40,27992,25,"Weiße Perle"}, {40,27993,25,"Blaue Perle"}, {40,27994,25,"Rote Perle"}, {40,12121,25,"Marlboro"}, {40,12122,25,"LM"}, {40,12123,25,"Phllip Morris"}, {40,12124,25,"Black Devil"}, {40,12125,25,"Marylong"}, {40,12126,25,"Camel Blue"}, {80,30182,20,"Legendäres Tagebuch"}, {150,52006,1,"Wilder Löwe"}, {150,50021,1,"Wilder Wolf"}, {150,52051,1,"Wilder Tiger"}, {300,53015,1,"Oster Pet"}, } eier = pc.count_item(50160) anz_name = "" vnum = 0 count = 0 full_menu = {} for i = 1, table.getn(belohnungen), 1 do if belohnungen[i][1] <= eier then anz_name = belohnungen[i][1].." "..belohnungen[i][4] -- z.b 2 Schwert+0 (wobei 2 die Anzahl der Ostereier sind) table.insert(full_menu, anz_name) if mod(table.getn(full_menu),5) == 0 then table.insert(full_menu, "Weiter") table.insert(full_menu, "Abbrechen") end end end if mod(table.getn(full_menu),7) == 0 then table.remove(full_menu,(table.getn(full_menu)-1)) else table.insert(full_menu, "Abbrechen") end teil_menu = {} if eier == 1 then s_word = "schon ein Ei gefunden." else s_word = "schon ein paar Eier gefunden." end say_title("Die Ostereier") say("") say("Oh... ich sehe du hast "..s_word) say("Mir ist auch schon eine angemessene Belohnung eingefallen.") say("") say("Du hast "..say_reward(eier.." Ostereier").." gesammelt") say("Du bekommst für eine bestimmte Anzahl an Eiern eine Belohnung.") wait() if table.getn(full_menu) <= 1 then say_title("Tut mir Leid..") say("Du hast noch zu wenig Ostereier für einen") say("Preis gesammelt.") say("Komm wieder. wenn du mehr gesammelt hast.") return end if table.getn(full_menu) > 7 then for i = 1 , 7 , 1 do table.insert(teil_menu,full_menu[i]) table.remove(full_menu,i) end local s=select_table(teil_menu) -- Menü 1 if s == 7 then return elseif s == 1 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 2 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 3 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 4 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 5 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 6 then teil_menu = {} for i = 1 , 7 , 1 do table.insert(teil_menu,full_menu[i]) table.remove(full_menu,i) end local s=select_table(teil_menu) -- Menü 2 if s == 7 then return elseif s == 1 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 2 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 3 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 4 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 5 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 6 then teil_menu = {} for i = 1 , 7 , 1 do table.insert(teil_menu,full_menu[i]) table.remove(full_menu,i) end local s=select_table(teil_menu) -- Menü 3 if s == 7 then return elseif s == 1 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 2 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 3 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 4 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 5 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if (belohnungen[i][4]) == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 6 then teil_menu = {} for i = 1 , 7 , 1 do table.insert(teil_menu,full_menu[i]) table.remove(full_menu,i) end local s=select_table(teil_menu) -- Menü 4 if s == 7 then return elseif s == 1 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 2 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 3 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 4 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 5 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end else return -- Menü 4 end else return -- Menü 3 end else return -- Menü 2 end else return -- Menü 1 end else local s=select_table(full_menu) -- Menü 1 if s == 7 then return elseif s == 1 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 2 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 3 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 4 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end elseif s == 5 and teil_menu[s] != "Abbrechen" then local a,b = string.find(teil_menu[s]," ") local value = tonumber(string.sub(teil_menu[s], 1, (a-1))) local name = string.sub(teil_menu[s],a+1,string.len(teil_menu[s])) local rest = eier-value for i = 1 , table.getn(belohnungen), 1 do if belohnungen[i][4] == name then vnum = tonumber(belohnungen[i][2]) count = tonumber(belohnungen[i][3]) end end say("Möchtest du "..name.." wirklich eintauschen?") say("Dir bleiben danach noch "..rest.." Ostereier.") local r = select("Ja","Nein") if r == 2 then return else pc.remove_item(50160,value) pc.give_item(vnum,count) end else return end end end end end
New Error:
ostern.quest:640:syntax error : [string "startpc . count_item ( 50160 ) >= 1"]:510: <eof> expected near `else' Error occured on compile ostern.quest
-
I downloaded the official gameforge client with help of this gameforge game programm (dont know the exact name)
but then i didnt patched and it works all fine with my 40k binary and 40k serverfiles
But you have to manually add the belt system
-
So its fine i think...
but your encoding was set to ucs-2 big endian... as you can see bottom right...
so try to use ANSI for better conversion..
-
i mean when i compile the serverbinary on freebsd and want to use it on another freebsd server, i have to use some specific libs...
but when i use the official server binarys i dont need to do this...
-
Does someone know how to compile a serverbinary so that its working also only with the "libs" like the official server binarys?
- 1
MS 2 UTF8 - Mass Save To Unicode
in Tools & Programs
Posted
Well I used my IDEs option to convert all server source files to UTF-8.
That's why I ran into problems with locale_string.txt
Because I`m lazy and don't want to copy the korean strings one by one I wrote this tool.
Also it is a nice thing to work with a standard encoding