Jump to content
metin2dev

Search the Community

Showing results for tags 'lua'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community
    • Announcements
    • Feedback
  • Metin2
    • General
    • Questions and Answers
    • Guides & HowTo
    • Design
    • Private Servers
    • Services
    • Videos
  • Releases
    • General
    • Tools
    • Programming / Scripts
    • Quests
    • Binaries & Clients/Serverfiles
    • 3D Models
    • 2D Graphics
    • Operating Systems
  • Safe Zone
    • Offtopic
    • Games Talk
    • Music/Videos/Art

Categories

There are no results to display.

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


ICQ


Yahoo


Skype


Location

Found 33 results

  1. hey, i need a new Function to load from account.account field: some_text can someone help? and use on quest like local get_text = pc.get_some_text if get_text = "koxmen" then else end
  2. teschio

    Search Developer

    Search developer python + lua + C++ contact me here or skype: xxdarkwindxx
  3. Hi all! I followed the guide at that link about the connection between client and quest: https://metin2dev.org/board/index.php?/topic/1698-howtooldquest-client-communicationfor-any-version/ But when I press the button in game, nothing happens in the quest! If I do it only on a graphical point of view, the button reacts to the click, but it doesn't get the anti exp active. This is my code added for the quest: game.py: def OnClickBlockExp(self): event.QuestButtonClick(int(constInfo.BLOCK_EXP)) ---------------------------------------------------------------------------------------------------------------- def __ServerCommand_Build(self): serverCommandList={ "blocco_exp" : self.blocco_exp, ---------------------------------------------------------------------------------------------------------------- def blocco_exp(self,value): constInfo.BLOCK_EXP = int(value) quest: quest anti_exp begin state start begin when login begin cmdchat("blocco_exp "..q.getcurrentquestindex()) if pc.getqf("blocco_exp") == 1 then pc.setqf("exp_pc",pc.get_exp()) chat("[Blocco Esperienza] - Attivato!") elseif pc.getqf("blocco_exp") == 0 then chat("[Blocco Esperienza] - Disattivato!") end end when button or info begin if pc.getqf("blocco_exp") == 0 then pc.setqf("blocco_exp", 1) pc.setqf("exp_pc",pc.get_exp()) chat("[Blocco Esperienza] - Attivato!") elseif pc.getqf("blocco_exp") == 1 then pc.setqf("blocco_exp", 0) chat("[Blocco Esperienza] - Disattivato!") end end when kill with not npc.is_pc() begin if pc.getqf("blocco_exp") == 1 then pc.give_exp2(pc.getqf("exp_pc")-pc.get_exp()) end end end end Could someone tell me why it doesn't work please?
  4. masodikbela

    [PyLUA++]Tradehouse

    Hi there Devs, I would like to share my "little" system. If you aren't interested in the introduction/preview etc. and you just want to download it and put in to your server, just scroll down until the "[How-To] Set up" subtitle. The story Firstly let me tell this system's story. I've got an idea one year before, that it would be good if the players would be able to put their items into a "global" system where they could see the other player's items, and they could buy it for DC or gold (that time I worked with the latest vanilla core (not with the source)). Then in the following 8 days I made it (it took about 80-90 working hours). Originally the system was created for one of my friend's server. but this server has never started, and nobody used this system. After some mounts I've decided to publish it on the Hungarian forum, because it won't worth to work on it for long hours if nobody uses it and its just collecting dust on my computer. Then I've published it on the 2nd of December, 2014. After some time I've decided to translate it into English and I've got a new idea for a new feature. This feature was: the trade system (I will explain its working later). This idea inspired by one of the players (from a server where this system was able to use). He told me that it would be better if they could set the gold price via an item (what's value is very high). Then with more than 180 working hours (totally) behind my back I'm here. Overview [How-To] Set up Customizing the tradehouse Questions and Answers Notes changelog: 19th of August, 2015: I publicated the tradehouse here. my toDo list: add logging for the system (the released version don't log the actions in the tradehouse) Thanks for reading the topic, if you have any problem/remark feel free to ask it here or write me a PM. Have a good day!
  5. Hi all! I saw a post on the forum about "[C++]Reload map regens ingame" and I want to ask you a question: can i do that in lua too? I have to reload the regen ingame when I start, for example, the Halloween Event and so to spawn Jack Pumpkin. If I use regen_in_map, when I restart the machine, that NPC will disappears, so I need to have your /reload_regen in lua funcion after a changing on the regen of the village from WinSCP. Thanks in advance!
  6. (Video at the end) Lockpicking is the new system which allows you to train special ability. This ability upgrade your skill of opening new boxes which are on maps(like npc). Every level gives higher chance to open box and probability to get more rewards. To train Lockpicking skill players have to read special books. You can set the level from which players can use this system. Maximum level of skill is 40, but it's configurable. Player can check how many boxes found. System support multilang servers. Missions Additionaly you will get special missions for this sytem, you can easily configure them or add new ones(just add new item to the table). After finished mission player receive reward directly in Quest Scroll. Configuration ItemShop Also you can earn some money from itemshop by this system : ) Magical key rises you chance to open box to 100%, but count of items which you can get from box still depends on skill level. The Key can be used only 10 times. Download & Scan http://www19.zippyshare.com/v/ECjEXsuj/file.html https://www.virustotal.com/#/file/d4fb8b52a8ed74f3a2fbf74efdbd2cc2c042ed82b243fea4d7d18561fa206750/detection
  7. In 17.5 GF update with Talismans GF also introduce new type of bonuses - strong against weapons So here's it! I'm not 100% sure about bonuses numbers cuz in my revision i have also other new bonuses. Server Side open service.h and add: #define ENABLE_BONUS_STRONG_AGAINST_WEAPON open length.h, find APPLY_ANTI_PENETRATE_PCT, (or last of urs bonuses) add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON APPLY_ATTBONUS_SWORD, // 92 APPLY_ATTBONUS_TWOHANDED, // 93 APPLY_ATTBONUS_DAGGER, // 94 APPLY_ATTBONUS_BELL, // 95 APPLY_ATTBONUS_FAN, // 96 APPLY_ATTBONUS_BOW, // 97 #endif open ProtoReader.cpp and find "APPLY_ANTI_PENETRATE_PCT", (or last of urs bonuses) add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON , "APPLY_ATTBONUS_SWORD" "APPLY_ATTBONUS_TWOHANDED", "APPLY_ATTBONUS_DAGGER", "APPLY_ATTBONUS_BELL", "APPLY_ATTBONUS_FAN", "APPLY_ATTBONUS_BOW" #endif open Battle.cpp and inf int CalcAttBonus find: if (pkAttacker->IsNPC() && pkVictim->IsPC()) { iAtk = (iAtk * CHARACTER_MANAGER::instance().GetMobDamageRate(pkAttacker)) / 100; } add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON if (pkVictim->IsPC()) { LPITEM pkWeapon = pkVictim->GetWear(WEAR_WEAPON); if (pkWeapon) { switch (pkWeapon->GetSubType()) { case WEAPON_SWORD: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_SWORD)) / 100; break; case WEAPON_TWO_HANDED: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_TWOHANDED)) / 100; break; case WEAPON_DAGGER: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_DAGGER)) / 100; break; case WEAPON_BELL: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_BELL)) / 100; break; case WEAPON_FAN: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_FAN)) / 100; break; case WEAPON_BOW: iAtk += (iAtk * pkAttacker->GetPoint(POINT_ATTBONUS_BOW)) / 100; break; } } } #endif in char.cpp find: case POINT_ATTBONUS_DEVIL: // 47 add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON case POINT_ATTBONUS_SWORD: case POINT_ATTBONUS_TWOHANDED: case POINT_ATTBONUS_DAGGER: case POINT_ATTBONUS_BELL: case POINT_ATTBONUS_FAN: case POINT_ATTBONUS_BOW: #endif find(in CHARACTER::ApplyPoint): case APPLY_ATTBONUS_MONSTER: // 63 add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON case APPLY_ATTBONUS_SWORD: case APPLY_ATTBONUS_TWOHANDED: case APPLY_ATTBONUS_DAGGER: case APPLY_ATTBONUS_BELL: case APPLY_ATTBONUS_FAN: case APPLY_ATTBONUS_BOW: #endif in char.h find: POINT_RESIST_PENETRATE = 137, add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON POINT_ATTBONUS_SWORD = 138, POINT_ATTBONUS_TWOHANDED = 139, POINT_ATTBONUS_DAGGER = 140, POINT_ATTBONUS_BELL = 141, POINT_ATTBONUS_FAN = 142, POINT_ATTBONUS_BOW = 143, #endif in cmd_general.cpp find: case POINT_RESIST_SHAMAN: return LC_TEXT("ą«´ç°ř°Ýżˇ %d%% ŔúÇ×"); add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON case POINT_ATTBONUS_SWORD: return LC_TEXT("Sword resistance: %d%%"); case POINT_ATTBONUS_TWOHANDED: return LC_TEXT("Two Hand resistance: %d%%"); case POINT_ATTBONUS_DAGGER: return LC_TEXT("Dagger resistance: %d%%"); case POINT_ATTBONUS_BELL: return LC_TEXT("Bell resistance: %d%%"); case POINT_ATTBONUS_FAN: return LC_TEXT("Fan resistance: %d%%"); case POINT_ATTBONUS_BOW: return LC_TEXT("Bow resistance: %d%%"); #endif in constants.cpp find: { POINT_RESIST_PENETRATE, }, // APPLY_ANTI_PENETRATE_PCT, 91 add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON { POINT_ATTBONUS_SWORD, }, { POINT_ATTBONUS_TWOHANDED, }, { POINT_ATTBONUS_DAGGER, }, { POINT_ATTBONUS_BELL, }, { POINT_ATTBONUS_FAN, }, { POINT_ATTBONUS_BOW, }, #endif find: { "MELEE_MAGIC_ATTBONUS_PER", APPLY_MELEE_MAGIC_ATTBONUS_PER }, add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON { "ATT_BONUS_TO_SWORD", APPLY_ATTBONUS_SWORD }, { "ATT_BONUS_TO_TWOHAND", APPLY_ATTBONUS_TWOHANDED }, { "ATT_BONUS_TO_DAGGER", APPLY_ATTBONUS_DAGGER }, { "ATT_BONUS_TO_BELL", APPLY_ATTBONUS_BELL }, { "ATT_BONUS_TO_FAN", APPLY_ATTBONUS_FAN }, { "ATT_BONUS_TO_BOW", APPLY_ATTBONUS_BOW }, #endif let's go into client source side: open Locale_inc.h and add where you want: #define ENABLE_BONUS_STRONG_AGAINST_WEAPON open packet.h and find: POINT_RESIST_PENETRATE = 137, add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON POINT_ATTBONUS_SWORD = 138, POINT_ATTBONUS_TWOHANDED = 139, POINT_ATTBONUS_DAGGER = 140, POINT_ATTBONUS_BELL = 141, POINT_ATTBONUS_FAN = 142, POINT_ATTBONUS_BOW = 143, #endif open Itemdata.h and find: APPLY_ANTI_PENETRATE_PCT, //91 add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON APPLY_ATTBONUS_SWORD, // 92 APPLY_ATTBONUS_TWOHANDED, // 93 APPLY_ATTBONUS_DAGGER, // 94 APPLY_ATTBONUS_BELL, // 95 APPLY_ATTBONUS_FAN, // 96 APPLY_ATTBONUS_BOW, // 97 #endif open PythonItemModule.cpp and find: PyModule_AddIntConstant(poModule, "APPLY_ANTI_PENETRATE_PCT", CItemData::APPLY_ANTI_PENETRATE_PCT); add bellow: #ifdef ENABLE_BONUS_STRONG_AGAINST_WEAPON PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_SWORD", CItemData::APPLY_ATTBONUS_SWORD); PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_TWOHANDED", CItemData::APPLY_ATTBONUS_TWOHANDED); PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_DAGGER", CItemData::APPLY_ATTBONUS_DAGGER); PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_BELL", CItemData::APPLY_ATTBONUS_BELL); PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_FAN", CItemData::APPLY_ATTBONUS_FAN); PyModule_AddIntConstant(poModule, "APPLY_ATTBONUS_BOW", CItemData::APPLY_ATTBONUS_BOW); #endif let's go into Dump Proto source: open ItemCSVReader.cpp and find(in string arApplyType[]): "APPLY_ANTI_PENETRATE_PCT", add after: "APPLY_ATTBONUS_SWORD","APPLY_ATTBONUS_TWOHANDED","APPLY_ATTBONUS_DAGGER","APPLY_ATTBONUS_BELL","APPLY_ATTBONUS_FAN","APPLY_ATTBONUS_BOW", let's go into Client root/locale part: open uiToolTip.py and find: item.APPLY_ANTI_PENETRATE_PCT : locale.TOOLTIP_ANTI_PENETRATE_PCT, add bellow: item.APPLY_ATTBONUS_SWORD : locale.TOOLTIP_ATTBONUS_SWORD, item.APPLY_ATTBONUS_TWOHANDED : locale.TOOLTIP_ATTBONUS_TWOHANDED, item.APPLY_ATTBONUS_DAGGER : locale.TOOLTIP_ATTBONUS_DAGGER, item.APPLY_ATTBONUS_BELL : locale.TOOLTIP_ATTBONUS_BELL, item.APPLY_ATTBONUS_FAN : locale.TOOLTIP_ATTBONUS_FAN, item.APPLY_ATTBONUS_BOW : locale.TOOLTIP_ATTBONUS_BOW, inside locale folder, open locale_game.txt, add in the end: TOOLTIP_ATTBONUS_SWORD Strong Against Sword +%d%% SA TOOLTIP_ATTBONUS_TWOHANDED Strong Against Two-Handed Weapon +%d%% SA TOOLTIP_ATTBONUS_DAGGER Strong Against Dagger +%d%% SA TOOLTIP_ATTBONUS_BELL Strong Against Bell +%d%% SA TOOLTIP_ATTBONUS_FAN Strong Against Fan +%d%% SA TOOLTIP_ATTBONUS_BOW Strong Against Bow +%d%% SA To use new bonuses please use in you item_proto.txt: APPLY_ATTBONUS_SWORD APPLY_ATTBONUS_TWOHANDED APPLY_ATTBONUS_DAGGER APPLY_ATTBONUS_BELL APPLY_ATTBONUS_FAN APPLY_ATTBONUS_BOW
  8. Rainbow1

    lua Emotions for party

    Emotions for party By this system your players now are able to start emotion in same time for all party members. When party leader choose emotion then you will see counter like in image bellow. You will able to open emotion menu in System Options. To open emotions menu player have to be a party leader To start emotions all party members must be near party leader. You can simply add new own emotions, change timer lenght, set own emotion name(in menu) or disable some emotions without deleting them. Download & Scan http://www10.zippyshare.com/v/vjfpebgh/file.html https://www.virustotal.com/#/file/24c3d2b2579ecefa2dda0e783eddd145fa456d97a2d17989246e83f266f19199
  9. xDiiZeRx

    open Deutsch Quests

    Hey! Anyone can you send me, metin2 Deutsch quests, with normale say? I need: Thanks!!
  10. veterano1998

    lua [HELP]Quest Problem

    Hello, I have this problem in this quest. SYSERR: Oct 21 16:30:06 :: HandleEvent: QUEST There's suspended quest state, can't run new quest state (quest: main_quest_lv2_2 pc: Ario) Can somebody help me? quest main_quest_lv2_2 begin state start begin end state run begin when login or levelup or enter with pc.get_level() >= 2 begin set_state ( gotoinfomation ) end end state gotoinfomation begin when letter begin if (pc.get_empire()==2) then local v=find_npc_by_vnum(20355) if (v==0) then else target.vid("__TARGET__", v, "") end elseif pc.get_empire()==1 then local v=find_npc_by_vnum(20355) if (v==0) then else target.vid("__TARGET__", v, "") end elseif pc.get_empire()==3 then local v=find_npc_by_vnum(20355) if (v==0) then else target.vid("__TARGET__", v, "") end end end when __TARGET__.target.click begin target.delete("__TARGET__") say_green("Capitán:") say_white("Hola, ¿quien eres?") say_white("¿No serás un salvaje?, ultimamente han invadido la ciudad.") say_white("") say_gold("Yo:") say_white("No, acabo de llegar a la ciudad, y estoy hablando con") say_white("algunos aldeanos, a sí, el Vendedor de Armaduras me ha.") say_white("dicho que tiene las armaduras terminadas.") say_white("") wait() say_green("Capitán:") say_white("Vale, pues ahora mismo estoy ocupado, ya iré por ellas.") say_white("Bueno pues veo que aun no tienes un arma, ni habilidades.") say_white("ve a visitar a el Vendedor de Armas, el te dará una espada.") say_white("") say_white("Tras eso, dirigete hacia el maestro de habilidades, podrás") say_white("empezar a aprender tus habilidades.") say_white("") pc.give_exp2( 900 ) clear_letter() set_state (__COMPLETE__) set_quest_state("find_squareguard","find") end end state __COMPLETE__ begin end end main_quest_lv2_2.quest
  11. Syreldar

    [QUEST]Boss Library

    Hi, metin2devs and metin2users.Many times i've seen a server use a quest like this one, to notice the kill of the bosses or to trigger special drops/events: That is absolutely obnoxious in my opinion, totally obnoxious.I'm here today to show you the simplest, cleanest and shortest way to deal with something like this: A quest which communicates with a simple library in order to get global notice and eventual drop from a boss/monster or metin kill, the quest is coded to work with bosses, but it's fully ampliable and 100% customizable to your likings.I release this in hope to see less quests like the one i put into a spoiler (no one should see that, it could spread terminal cancer).As always, the library is fully customizable.Each function contains a clear explanation of its structure and what it does.Have fun!Function Library File (.lua): Quest File: How do i use the library file?Make it load by dofile() in your questlib.lua or simply add what's inside it to the questlib.lua as it is, even if it's not exactly the cleanest way to do it.Why should i use it?First of all as i said, it's fully customizable, you can just add new monsters to the main data array and the lib will handle them by itself.Second, the library file contains the full boss and data arrays + documentation and yet it still is only 120 lines of code, the quest contains the checks and the notice/drop functions, nothing else, since the whole is fully managed by the library, so it's less than 20 lines of code. No script i've seen till now is more lightweight and as customizable as this one.
  12. Xerneas

    open Syserr uiinventory

    Good Evening, 0330 18:32:02716 :: Traceback (most recent call last): 0330 18:32:02716 :: File "uiInventory.py", line 557, in OnUpdate 0330 18:32:02716 :: AttributeError 0330 18:32:02716 :: : 0330 18:32:02716 :: 'int' object has no attribute 'DisableSlotCoverImage' 0330 18:32:02716 :: Code: def OnUpdate(self): # self.RefreshBagSlotWindow() for i in xrange(player.INVENTORY_PAGE_SIZE): GlobalSlot = self.__InventoryLocalSlotPosToGlobalSlotPos(i) if player.GetItemLook(GlobalSlot): self.wndItem.EnableSlotCoverImage(i) else: self.wndItem.DisableSlotCoverImage(i) if player.FindActivedChangeLookSlot(0) == GlobalSlot or player.FindActivedChangeLookSlot(1) == GlobalSlot: self.wndItem.ActivateChangeLookSlot(i) else: self.wndItem.DeactivateChangeLookSlot(i) I´ve checked the code, but i didnt found the error.. Any Ideas? o_O
  13. mafianekcek

    Server_timer PROBLEM

    Hello guys, i have problem with server_timer or server_loop_timer, It do not make no signal, it dont work and game going crash after 1 second. QUEST: quest server_timer begin state start begin when 9003.chat."srv_timer" begin server_timer("shit", 1, pc.get_map_index()) --server_timer("shit", 1) say("You have now server timer apply.") end when shit.server_timer begin chat("ok") end end end But after 1 second it dont do nothing, when i use only server_timer("shit", 1) too not work, but when i change server_timer to only timer, it works perfect, but i need use server_timer for dungeons. SOURCE CODE: int _set_server_timer(lua_State* L) { int n = lua_gettop(L); if ((n != 2 || !lua_isnumber(L, 2) || !lua_isstring(L, 1)) && (n != 3 || !lua_isstring(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3))) { sys_err("QUEST set_server_timer argument count wrong."); return 0; } const char * name = lua_tostring(L, 1); double t = lua_tonumber(L, 2); DWORD arg = 0; CQuestManager & q = CQuestManager::instance(); if (lua_isnumber(L, 3)) arg = (DWORD) lua_tonumber(L, 3); int timernpc = q.LoadTimerScript(name); LPEVENT event = quest_create_server_timer_event(name, t, timernpc, false, arg); q.AddServerTimer(name, arg, event); return 0; } Please, can somebody help me? Thank you.
  14. Hello, I have a question. How can i add simple "new" bonus like "strong vs metinstones/boss-monster" It's important for me. =) Thank you.
  15. Hello guys. I have a problem with my quest text. When i open either quest and i click to okay, the quest text is doesnt dissapear.... I attach a pic. Thanks in advance.
  16. Hello everyone I need know if exist the function with attack mob count the hits.
  17. Hi my problem is when i put words with accents in the quest or the client .py files and in game not show I need an function or other same? Can someone help me? Thx
  18. Hello devs, as you may have noticed I'm one of the noobiest devs around here so I need your help today don't worry it's something simple Alright so I need a simple LUA function. I have this array of skills and I want to check if some of them is Perfect Master and if it's not then say("You can't do this until one of these skills are Perfect Master and blah blah blah...") Just that So thank you in advance guys I appreciate every comment I get EDIT: I got it don't worry about it
  19. Sathian

    Pet system state error

    Hello, I have problem with pet system quest. http://pastebin.com/bmEL41P5 If someone uses pet, there is a lot of errors in syserr: WriteRunningStateToSyserr: LUA_ERROR: quest pet_system_pvp.start letter RunState: LUA_ERROR: locale/poland/quest/object/state/pet_system:16: bad argument #1 to `foreach' (table expected, got nil)
  20. [File: Src/Game/common/service.h] #define ENABLE_HIDE_NAME_PLAYER [File: Src/Game/common/length.h] //#1.) Search: enum EOnIdleEvents { ON_IDLE_NONE, ON_IDLE_GENERAL, ON_IDLE_MAX_NUM }; //#2.) Add bellow: #ifdef ENABLE_HIDE_NAME_PLAYER enum ETypeEventOX { EVENT_OX_MAP = 113, EVENT_OX_FLAG = 0, }; #endif [File: Src/Game/affect.h] //#1.) Search: AFFECT_BLEND, //#2.) Add bellow: #ifdef ENABLE_HIDE_NAME_PLAYER AFFECT_HIDE_NAME, #endif [File: Src/game/input_login.cpp] //#1.) Search: if (ch->GetHorseLevel() > 0) { DWORD pid = ch->GetPlayerID(); if (pid != 0 && CHorseNameManager::instance().GetHorseName(pid) == NULL) db_clientdesc->DBPacket(HEADER_GD_REQ_HORSE_NAME, 0, &pid, sizeof(DWORD)); ch->SetHorseLevel(ch->GetHorseLevel()); ch->SkillLevelPacket(); } //#2.) Add bellow: // ------------------------------------------------------------------------ // // This function is loaded when you enter in map ox // // You need to activate loaded functions with /e enable_hide_player 1 // // You need to activate command before start event // // ------------------------------------------------------------------------ // #ifdef ENABLE_HIDE_NAME_PLAYER DWORD dwHidePlayer = quest::CQuestManager::instance().GetEventFlag("enable_hide_player"); // e enable_hide_player value (0 - disable / 1 - activate) if (dwHidePlayer > EVENT_OX_FLAG) { if (ch->GetMapIndex() == EVENT_OX_MAP) { if (!ch->FindAffect(AFFECT_HIDE_NAME)) { ch->ChatPacket(CHAT_TYPE_COMMAND, "hide_player_state"); ch->AddAffect(AFFECT_HIDE_NAME, 0, 0, AFF_NONE, 60*60*24*7, 0, true, false); } } } #endif //#1.) Search: if (ch->GetGMLevel() == GM_PLAYER) ch->WarpSet(EMPIRE_START_X(ch->GetEmpire()), EMPIRE_START_Y(ch->GetEmpire())); //#2.) Delete and replaced with: // ------------------------------------------------------------------------ // // When event ox is finished and teleport you in your home, name players // // will return back ! // // ------------------------------------------------------------------------ // if (ch->GetGMLevel() == GM_PLAYER) #ifdef ENABLE_HIDE_NAME_PLAYER ch->RemoveAffect(AFFECT_HIDE_NAME); ch->ChatPacket(CHAT_TYPE_COMMAND, "show_player_state"); #endif ch->WarpSet(EMPIRE_START_X(ch->GetEmpire()), EMPIRE_START_Y(ch->GetEmpire())); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ [File: Client/root/game.py] //#1.) Search: "ShowMeMallPassword" : self.AskMallPassword, //#2.) Add bellow: "hide_player_state" : self.__Player_HideState, "show_player_state" : self.__Player_ShowState, //#1.) Search: def AskMallPassword(self): self.interface.AskMallPassword() //#2.) Add bellow: def __Player_HideState(self): # Function is loaded when you are start flag enable_hide_player 1 and when you are enter in map ox. import uiGameOption self.szGetVegasModule = uiGameOption.OptionDialog() self.szGetVegasModule.__OnClickAlwaysShowNameOffButton() # Hide player name #self.szGetVegasModule.__OnClickViewChatOffButton() # Hide chat def __Player_ShowState(self): #// Function is loaded when event is finished import uiGameOption self.szGetVegasModule = uiGameOption.OptionDialog() # Show player name self.szGetVegasModule.__OnClickAlwaysShowNameOnButton() #self.szGetVegasModule.__OnClickViewChatOnButton() # Show chat ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Here is loaded function for people have < 40k (no source) quest ox_hide_state begin state start begin when login with pc.get_map_index() == 113 begin if game.get_event_flag("enable_hide_player") > 0 then cmdchat("hide_player_state") end end when logout with pc.get_map_index() == 113 begin if game.get_event_flag("enable_hide_player") > 0 then cmdchat("show_player_state") end end end end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Other thing about block: [File: Client/root/game.py] //#1.) Search: def ShowName(self): self.ShowNameFlag = TRUE self.playerGauge.EnableShowAlways() player.SetQuickPage(self.quickSlotPageIndex+1) //#2.) Delete and replaced with: def ShowName(self): import background if constInfo.ENABLE_HIDE_NAME_PLAYER > 0: if background.GetCurrentMapName() == constInfo.EVENT_OX_MAPNAME: chat.AppendChat(chat.CHAT_TYPE_INFO, constInfo.EVENT_OX_WARNING_ALT) else: self.ShowNameFlag = TRUE self.playerGauge.EnableShowAlways() player.SetQuickPage(self.quickSlotPageIndex+1) [File: Client/root/uiGameOption.py] //#1.) Search: def __OnClickAlwaysShowNameOnButton(self): systemSetting.SetAlwaysShowNameFlag(True) self.RefreshAlwaysShowName() def __OnClickAlwaysShowNameOffButton(self): systemSetting.SetAlwaysShowNameFlag(False) self.RefreshAlwaysShowName() //#2.) Delete and replaced with: def __OnClickAlwaysShowNameOnButton(self): import uiCommon, background if constInfo.ENABLE_HIDE_NAME_PLAYER > 0: if background.GetCurrentMapName() == constInfo.EVENT_OX_MAPNAME: self.wndPopup = uiCommon.PopupDialog() self.wndPopup.SetText(constInfo.EVENT_OX_WARNING_ON) self.wndPopup.Open() else: systemSetting.SetAlwaysShowNameFlag(True) self.RefreshAlwaysShowName() def __OnClickAlwaysShowNameOffButton(self): import uiCommon, background if constInfo.ENABLE_HIDE_NAME_PLAYER > 0: if background.GetCurrentMapName() == constInfo.EVENT_OX_MAPNAME: self.wndPopup = uiCommon.PopupDialog() self.wndPopup.SetText(constInfo.EVENT_OX_WARNING_OFF) self.wndPopup.Open() else: systemSetting.SetAlwaysShowNameFlag(False) self.RefreshAlwaysShowName() [File: Client/root/uiGameOption.py] //#1.) Search: CHRNAME_COLOR_INDEX = 0 //#2.) Add bellow: ################################################## HIDE PLAYER NAME - START ###################################################################### ###################################################################################################################################################### ENABLE_HIDE_NAME_PLAYER = 1 # Enable check [0 - disable / 1 - enabled] EVENT_OX_MAPNAME = "season1/metin2_map_oxevent" # Name map EVENT_OX_WARNING_ALT = "You can not do this during the event!" # Message when you press key [ALT] from keyboard. EVENT_OX_WARNING_ON = "You can display the name of the player during the event ox!" # Message loaded from gameOption when you -> Name Always (Show). EVENT_OX_WARNING_OFF = "You can disable the name of the player during the event ox!" # Message loaded from gameOption when you -> Name Always (Hide). ################################################## HIDE PLAYER NAME - STOP ####################################################################### ###################################################################################################################################################### PS: I not tested, i only write for other friend because he say me to help with this. - http://image.prntscr.com/image/f12be8a99a9647c7a5347d237df31fe4.png
  21. Hello, Like the title says it's a pet system with level effect and experience. If you want to change the max level just change this variable: local MAX_LEVEL = 20 But if you change the max level you have to edit the exp table too.For example I set local MAX_LEVEL = 25 so the exp table should looks like this: local exp_table = {100,200,300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400,2500} for any bugs/problems feel free to ask...
  22. Deadlinex3

    Wom2 searches C++ Developer

    Dear community, WoM2 is currently looking for a C++ developer with experience in working with the game source and a minimum command of the english language. Experience with python and/or lua and other related technical skills are a plus. Integrity and the ability to work in a team are required. We offer a freelance*, part-time or full-time contract, flexible working hours and the chance to be part of an extensive team in one of the most successful projects in the field to date. Financial terms will be discussed privately with the candidates. Depending on your performance, promotion options and higher pay rates are possible. If you are interested in applying for the position, please send an e-mail with your personal details (name, nationality, date of birth, city of residence) as well as a description of your experience with the game as player and developer to hr@wom2.org Shortlisted candidates will be contacted for an online interview within 15 days from the present date. Kind regards, The WoM2 Team
  23. LegolasOfficial

    Quest Error

    Quest Error. Syserr This is the quest. And questlib.lua Please help me.
  24. Hello guys, i made a simple function that allows you to easily manage files. This function let you create, read, write, rewrite or erase lines of text or the hole text. Examples on how to use it: Here is the function: Aditional Information: You can put in line "all" , and the function will erase/add/rewrite all lines. You can put in line "-1" and it will count as the last line of the file. Types: "add", "create", "erase", "rewrite" and "read". I hope it will be usefull , Kind Regards, Frozen
  25. NewWars

    Remove plz, mistake

    #remove
×