Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/23/21 in all areas

  1. Why? Why not? Seriously though, why? I was legit just bored. Ok, first of all, we need to indicate to Visual Studio that we wanna compile with the flag /std:c++17. You do so by selecting all the projects on the right and clicking properties: and click on Apply (duh) Then let's fix the first issue, the introduction of std::byte. For some reason (and you should never ever ever ever ever ever do it), there are some: using namespace std; in the code. DELETE. THEM. ALL. Now compile. Yeah, it's not over, because now, we should edit all the std functions (make_pair, string, declarations of maps, vectors etc.) adding std:: before, for ex: operator const string() const { return m_sRaw; } becomes operator const std::string() const { return m_sRaw; } just compile and fix them all whenever you find them. A few of them are more "difficult". Open Stl.h in EterBase and there's gonna be: namespace std { template <class _Ty> class void_mem_fun_t : public unary_function<_Ty *, void> { public: explicit void_mem_fun_t(void (_Ty::*_Pm)()) : _Ptr(_Pm) {} void operator()(_Ty *_P) const {((_P->*_Ptr)()); } private: void (_Ty::*_Ptr)(); }; template<class _Ty> inline void_mem_fun_t<_Ty> void_mem_fun(void (_Ty::*_Pm)()) {return (void_mem_fun_t<_Ty>(_Pm)); } template<class _Ty> class void_mem_fun_ref_t : public unary_function<_Ty, void> { public: explicit void_mem_fun_ref_t(void (_Ty::*_Pm)()) : _Ptr(_Pm) {} void operator()(_Ty& _X) const {return ((_X.*_Ptr)()); } private: void (_Ty::*_Ptr)(); }; template<class _Ty> inline void_mem_fun_ref_t<_Ty> void_mem_fun_ref(void (_Ty::*_Pm)()) {return (void_mem_fun_ref_t< _Ty>(_Pm)); } // TEMPLATE CLASS mem_fun1_t template<class _R, class _Ty, class _A> class void_mem_fun1_t : public binary_function<_Ty *, _A, _R> { public: explicit void_mem_fun1_t(_R (_Ty::*_Pm)(_A)) : _Ptr(_Pm) {} _R operator()(_Ty *_P, _A _Arg) const {return ((_P->*_Ptr)(_Arg)); } private: _R (_Ty::*_Ptr)(_A); }; // TEMPLATE FUNCTION mem_fun1 template<class _R, class _Ty, class _A> inline void_mem_fun1_t<_R, _Ty, _A> void_mem_fun1(_R (_Ty::*_Pm)(_A)) {return (void_mem_fun1_t<_R, _Ty, _A>(_Pm)); } } fucking remove this shit. Then replace all the: std::void_mem_fun with std::mem_fn Then in cipher.cpp replace std::auto_ptr into std::unique_ptr and then boost is gonna come busting our ass, so just upgrade the folder downloading the last version and..nope: Alright, I'd suggest to just disable this error: How to disable by Microsoft (do it for every project causing this error) If you fix boost's code, kudos to you. Then, after a lot of: from Python, it should be compiled. If you have ikarus offline shop, you should recompile libconfig with the same settings (probably cryptopp aswell? Honestly I can't remember)
    5 points
  2. M2 Download Center Download Here ( Internal ) [Hidden Content]
    1 point
  3. alternate static bool FN_check_item_sex(LPCHARACTER ch, LPITEM item) // char_item.cpp { if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_MALE)) return SEX_MALE != GET_SEX(ch); if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_FEMALE)) return SEX_FEMALE != GET_SEX(ch); return true; } //Find if (item->CheckItemUseLevel(ch->GetLevel()) == true ) ///Change if (item->CheckItemUseLevel(ch->GetLevel()) == true && FN_check_item_sex(ch, item) == true) input_db.cpp use with re-login function
    1 point
  4. quest item_change_sex begin state start begin when 71048.use begin say_title(translate().change_empire._50_sayTitle) if (pc.get_level() < 50) then return say_reward(translate().item_change_sex._10_sayReward); elseif (pc.get_wear(19) ~= nil) then return say_reward("You have to unequip your body costume first."); elseif (pc.is_engaged()) then return say_reward(translate().item_change_sex._30_sayReward) elseif (pc.is_married()) then return say_reward(translate().item_change_sex._30_sayReward) elseif (pc.is_polymorphed()) then return say_reward(translate().item_change_sex._60_sayReward) end -- if/elseif say(translate().item_change_sex._130_say) wait() say_title(translate().item_change_sex._120_sayTitle) say(translate().item_change_sex._140_say) if (select(translate().locale.guild.yes, translate().locale.guild.no) == 1) then say_title(translate().item_change_sex._120_sayTitle) say(translate().item_change_sex._150_say) say_reward(translate().change_empire._230_sayReward) pc.remove_item(71048, 1); pc.change_sex(); pc.polymorph(20032); -- So you don't need to relog. end -- if end -- when end -- state end -- quest
    1 point
  5. You’ll need to check the empty space too before using the sex change item.
    1 point
  6. either source or quest, just check before the quest starts if they have something equiped in the Costume slot, If you have you cant use the item.
    1 point
  7. part 1/2 of easter stuff
    1 point
  8. 1 point
  9. The guy asked a totally normal question. The world editor made by Ymir, Marty only improved it. While you will not get the improved one's source i'm sure, you can find the original one's source at kraizy.tgz or here:
    1 point
  10. There are a lot of people which had problem with localeInfo because korean-characters and bad encoding, there's a clean file with refactored code. Removed all the code which isn't used like korean characters < bad encoding [runmain error / crash](editors problem) and more checks. Removed over 500 lines unused. Removed function mapping(**kwargs) and use constructor of dict > dict(**kwarg) which is same (**kwarg let you take arbitrary number of keyword arguments). Removed function CutMoneyString because is used just when locale is HongKong, CIBN. Removed check IsYMIR from function LoadLocaleData which load locale as locale/ymir or locale/we_korea. Removed GUILD_MARK_NOT_ENOUGH_LEVEL, GUILD_HEADQUARTER, GUILD_FACILITY, GUILD_OBJECT, MAP_TRENT02, MAP_WL, MAP_NUSLUCK, MAP_TREE2, LOGIN_FAILURE_WEB_BLOCK, LOGIN_FAILURE_BLOCK_LOGIN, CHANNEL_NOTIFY_FULL, now they're readed directly from locale_game.txt. Removed declared global variables. Removed checks for declaring LOCALE_FILE_NAME, FN_GM_MARK and use current path. Removed korean functions/lists/dictionaries/characters GetAuxiliaryWordType, JOBINFO_DATA_LIST, dictSingleWord, dictDoubleWord, etc. Removed unused things: locale mapping, 'all' list etc. Removed IN_GAME_SHOP_ENABLE declaration, should be declared inside of constInfo directly. Removed checks (locale path) - 949, 932 == app.GetDefaultCodePage(), IsHONGKONG, IsNEWCIBN() or IsCIBN10() from declaration of functions like (NumberToMoneyString, NumberToSecondaryCoinString, ...),now they're declared directly from old style (IsEUROPE() and not IsWE_KOREA() and not IsYMIR()). Added custom string format(format_string, *args, **kwargs) instead of %. (old-style). Added new checks inside of LoadLocaleFile for security: Check if token3 (token1=original_string, token2=return-string, token3=function) function name exist in our types (SA, SNA, SAA, SAN) then try to call it. Check if string line have no tabs. Diff-checker: (856 Removals + 301 Additions) [Hidden Content] [Hidden Content]
    1 point
  11. Default code for SecondToXXX: My extendable version: (I wrote that fast, so, if there's a problem with it, write me a pm, let's don't spam the topic.) [Hidden Content] Results: print sec2time(100000, "DHMS") >>> 1Days 3Hours 46Minutes 40Seconds print sec2time(10000, "HMS") >>> 2Hours 46Minutes 40Seconds print sec2time(1000, "MS") >>> 16Minutes 40Seconds print sec2time(1000, "M") >>> 16Minutes print sec2time(100, "S") >>> 40Seconds print sec2time(3600, "DHMS", True) >>> 0Days 1Hours 0Minutes 0Seconds print sec2time(3600, "DHMS") >>> 1Hours I still don't have the right time to update the module but i'll do it asap.
    1 point
  12. You're right, then let's refactor this shit. Ymir method: def NumberToMoneyString(n) : if n <= 0 : return "0 %s" % (MONETARY_UNIT0) return "%s %s" % ('.'.join([ i-3<0 and str(n)[:i] or str(n)[i-3:i] for i in range(len(str(n))%3, len(str(n))+1, 3) if i ]), MONETARY_UNIT0) def NumberToSecondaryCoinString(n, coinType) : if n <= 0: n = 0 coinTypeString = "" if coinType == shop.SHOP_COIN_TYPE_SECONDARY_COIN: coinTypeString = MONETARY_UNIT_JUN elif coinType == shop.SHOP_COIN_TYPE_BATTLE_POINT: coinTypeString = BATTLE_POINT elif app.ENABLE_10TH_EVENT and coinType == shop.SHOP_COIN_TYPE_10TH_EVENT: coinTypeString = TENTH_COIN else: return "Not Valied" return "%s %s" % ('.'.join([ i-3<0 and str(n)[:i] or str(n)[i-3:i] for i in range(len(str(n))%3, len(str(n))+1, 3) if i ]), coinTypeString) My method: [Hidden Content] And yes, Ymir killed the python for no-reason.
    1 point
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.