Sonitex
Premium-
Posts
521 -
Joined
-
Days Won
12 -
Feedback
100%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by Sonitex
-
Spider Dungeon Graphics Bug - black screen
Sonitex replied to Traceur3RUN's topic in Community Support - Questions & Answers
Your .raw files are corrupt. -
Server kick out on Any dungeon
Sonitex replied to SukH's topic in Community Support - Questions & Answers
void CQuestManager::CancelServerTimers(DWORD arg) { vector<pair<string, DWORD>> ServerTimersToDelete; for (auto& kv : m_mapServerTimer) { if (kv.first.second == arg) { LPEVENT event = kv.second; event_cancel(&event); ServerTimersToDelete.push_back(kv.first); } } // Delete all the required server timers for (auto &timer : ServerTimersToDelete) m_mapServerTimer.erase(timer); // Clean up ServerTimersToDelete.clear(); } Crash occurs because the game is deleting timers while iterating through them. Code above should fix this issue -
When hovering over a skill, it's recharge duration in tooltip is always the same because it ignores player's casting speed. In PythonSkill.cpp search for : PyObject * skillGetSkillCoolTime(PyObject * poSelf, PyObject * poArgs) Replace with: PyObject * skillGetSkillCoolTime(PyObject * poSelf, PyObject * poArgs) { int iSkillIndex; if (!PyTuple_GetInteger(poArgs, 0, &iSkillIndex)) return Py_BadArgument(); float fSkillPoint; if (!PyTuple_GetFloat(poArgs, 1, &fSkillPoint)) return Py_BadArgument(); CPythonSkill::SSkillData * c_pSkillData; if (!CPythonSkill::Instance().GetSkillData(iSkillIndex, &c_pSkillData)) return Py_BuildException("skill.GetSkillCoolTime - Failed to find skill by %d", iSkillIndex); DWORD dwSkillCoolTime = c_pSkillData->GetSkillCoolTime(fSkillPoint); int iCastingSpeed = CPythonPlayer::Instance().GetStatus(POINT_CASTING_SPEED); int iSpd = 100 - iCastingSpeed; if (iSpd > 0) iSpd = 100 + iSpd; else if (iSpd < 0) iSpd = 10000 / (100 - iSpd); else iSpd = 100; dwSkillCoolTime = dwSkillCoolTime * iSpd / 100; return Py_BuildValue("i", dwSkillCoolTime); }
- 13 replies
-
- 10
-
I need "manufacture" crafting system
Sonitex replied to mavanni1's topic in Paid Support / Searching / Recruiting
section npc 20383 item 11295 1 item 30509 10 item 30516 10 item 30514 10 reward 20000 1 gold 100000 category ARMOR percent 5 end I think it should be clear now that success chance from 5%~50% does not exist and neither does MINDshop Metin2Wiki is often edited by players and you can see the image has been edited since there are 2 different fonts used. -
[REQ] Quests based on translate.lua
Sonitex replied to FlorinMarian's topic in Community Support - Questions & Answers
-
I agree with the idea of moving water texture setting to the map itself. It is much easier to handle and works perfectly fine on my client. Default water texture is no biggie either, one more if statement. Great job and thank you for your contributions with the WorldEditor
-
[Metin2.us] Watery Cavern
Sonitex replied to burakhangunduz66's topic in Community Support - Questions & Answers
This should help you out ? -
Why bother with rewriting a whole system when you can create a new item and make it add and remove affect upon using it. If it is active, set socket(0) to 1 and edit the function that handles active/unactive effect in the inventory and taskbar, you can copy most of it since it is the same for elixirs. For the pet permanent functionality: when you reach 200 days cancel the real time event on the item and add a check so it never starts again if the item has 200 days or more. On the client side modify the code to hide the remaining time if the item has more than 200 days remaning. I hope I could help you :).
-
CGraphicImageInstance m_WaterInstances[30]; Edit this part in the MapOutdoor.h as well . STATEMANAGER.SetTexture(0, m_WaterInstances[((ELTimer_GetMSec() / 70) % 30)].GetTexturePointer()->GetD3DTexture()); And this in the MapOutdoorWater.cpp. And I believe that buffer is used for the path of the texture and not the actual size of the texture.
-
official Pendant System - Elemental Talismans with Bonus
Sonitex replied to Rakancito's topic in Features & Metin2 Systems
If someone has the same issues as me with elements sometimes being shown wrong replace this part of function in char.cpp: for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i *= 2) { int diff = raceFlag - i; if (abs(diff) <= 1024) break; } to this: for (int i = RACE_FLAG_ATT_ELEC; i <= RACE_FLAG_ATT_DARK; i *= 2) { curElementBase++; if (raceFlag & i) break; } -
Moving locale-string to client side
Sonitex replied to Sonitex's topic in Community Support - Questions & Answers
I get this part and it is actually very easy to do. What I am stuck with is sending the arguments from server to client. I don't know how to store them actually, this is the biggest issue for me. -
[Help] How to lower %HP regen from potion
Sonitex replied to Cripplez's topic in Community Support - Questions & Answers
void CHARACTER::AutoRecoveryItemProcess(const EAffectTypes type) char_item.cpp -
Moving locale-string to client side
Sonitex replied to Sonitex's topic in Community Support - Questions & Answers
Thanks for the tips -
Woah, thank you so much! If someone experiences compile errors regarding std::shared_ptr, include <memory> inside Thing.h & ModelInstance.h!
-
KeyError Cheque System
Sonitex replied to OnlyRipper's topic in Community Support - Questions & Answers
You have defined a variable pointing to <Owner_Cheque_Icon> at uiExchange.py at line 43 in the LoadDialog function. It should be loaded from exchangedialog.py or from exchangedialog_new.py as I can see from the tutorial files, but your problem probably lays at exchangedialog.py which was not updated in the tutorial. This is the official code, you will need to change some names but should work just fine import uiScriptLocale import localeInfo import app ROOT = "d:/ymir work/ui/game/" if app.ENABLE_CHEQUE_SYSTEM : BOARD_WIDTH = 290 BOARD_HEIGHT = 189 window = { "name" : "ExchangeDialog", "x" : 0, "y" : 0, "style" : ("movable", "float",), "width" : BOARD_WIDTH, "height" : BOARD_HEIGHT, "children" : ( { "name" : "board", "type" : "board", "style" : ("attach",), "x" : 0, "y" : 0, "width" : BOARD_WIDTH, "height" : BOARD_HEIGHT, "children" : ( ## Title { "name" : "TitleBar", "type" : "titlebar", "style" : ("attach",), "x" : 8, "y" : 8, "width" : 276, "color" : "gray", "children" : ( { "name":"TitleName", "type":"text", "x":133, "y":3, "text":uiScriptLocale.EXCHANGE_TITLE, "text_horizontal_align":"center" }, ), }, ## MiddleBar { "name" : "Middle_Bar", "type" : "expanded_image", "x" : (BOARD_WIDTH / 2) - 3, "y" : 31, "x_scale" : 1.0, "y_scale" : 1.16, "image" : ROOT + "windows/middlebar.sub", }, ## Owner { "name" : "Owner", "type" : "window", "x" : 150, "y" : 33, "width" : 130, "height" : 146, "children" : ( { "name" : "Owner_Slot", "type" : "grid_table", "start_index" : 0, "x" : 0, "y" : 0, "x_count" : 4, "y_count" : 3, "x_step" : 32, "y_step" : 32, "x_blank" : 0, "y_blank" : 0, "image" : "d:/ymir work/ui/public/slot_base.sub", }, { "name" : "Owner_Cheque", "type" : "button", "x" : 0, "y" : 102, #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Owner_Cheque_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Owner_Money", "type" : "button", "x" : 0, "y" : 124, #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Owner_Money_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Owner_Accept_Light", "type" : "button", "x" : 95, "y" : 102, "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub", }, { "name" : "Owner_Accept_Button", "type" : "toggle_button", "x" : 85, "y" : 124, "text" : uiScriptLocale.EXCHANGE_ACCEPT, "default_image" : "d:/ymir work/ui/public/small_button_01.sub", "over_image" : "d:/ymir work/ui/public/small_button_02.sub", "down_image" : "d:/ymir work/ui/public/small_button_03.sub", }, { "name" : "strOwner_Cheque", "type" : "text", "x" : 67, "y" : 104, "text" : localeInfo.CHEQUE_SYSTEM_UNIT_WON, }, { "name" : "strOwner_Yang", "type" : "text", "x" : 67, "y" : 126, "text" : localeInfo.CHEQUE_SYSTEM_UNIT_YANG, }, ), }, ## Target { "name" : "Target", "type" : "window", "x" : 10, "y" : 33, "width" : 130, "height" : 130, "children" : ( { "name" : "Target_Slot", "type" : "grid_table", "start_index" : 0, "x" : 0, "y" : 0, "x_count" : 4, "y_count" : 3, "x_step" : 32, "y_step" : 32, "x_blank" : 0, "y_blank" : 0, "image" : "d:/ymir work/ui/public/slot_base.sub", }, { "name" : "Target_Cheque", "type" : "image", "x" : 0, "y" : 102, "image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Target_Cheque_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Target_Money", "type" : "image", "x" : 0, "y" : 124, "image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Target_Money_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Target_Accept_Light", "type" : "button", "x" : 95, "y" : 102, "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub", }, { "name" : "strTarget_Cheque", "type" : "text", "x" : 67, "y" : 104, "text" : localeInfo.CHEQUE_SYSTEM_UNIT_WON, }, { "name" : "strTarget_Yang", "type" : "text", "x" : 67, "y" : 126, "text" : localeInfo.CHEQUE_SYSTEM_UNIT_YANG, }, ), }, ), }, ), } else : window = { "name" : "ExchangeDialog", "x" : 0, "y" : 0, "style" : ("movable", "float",), "width" : 282, "height" : 167, "children" : ( { "name" : "board", "type" : "board", "style" : ("attach",), "x" : 0, "y" : 0, "width" : 282, "height" : 167, "children" : ( ## Title { "name" : "TitleBar", "type" : "titlebar", "style" : ("attach",), "x" : 8, "y" : 8, "width" : 266, "color" : "gray", "children" : ( { "name":"TitleName", "type":"text", "x":133, "y":3, "text":uiScriptLocale.EXCHANGE_TITLE, "text_horizontal_align":"center" }, ), }, ## MiddleBar { "name" : "Middle_Bar", "type" : "image", "x" : 139, "y" : 31, "image" : ROOT + "windows/middlebar.sub", }, ## Owner { "name" : "Owner", "type" : "window", "x" : 144, "y" : 33, "width" : 130, "height" : 130, "children" : ( { "name" : "Owner_Slot", "type" : "grid_table", "start_index" : 0, "x" : 0, "y" : 0, "x_count" : 4, "y_count" : 3, "x_step" : 32, "y_step" : 32, "x_blank" : 0, "y_blank" : 0, "image" : "d:/ymir work/ui/public/slot_base.sub", }, { "name" : "Owner_Money", "type" : "button", "x" : 0, "y" : 102, #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Owner_Money_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Owner_Accept_Light", "type" : "button", "x" : 62, "y" : 101, "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub", }, { "name" : "Owner_Accept_Button", "type" : "toggle_button", "x" : 85, "y" : 101, "text" : uiScriptLocale.EXCHANGE_ACCEPT, "default_image" : "d:/ymir work/ui/public/small_button_01.sub", "over_image" : "d:/ymir work/ui/public/small_button_02.sub", "down_image" : "d:/ymir work/ui/public/small_button_03.sub", }, ), }, ## Target { "name" : "Target", "type" : "window", "x" : 10, "y" : 33, "width" : 130, "height" : 130, "children" : ( { "name" : "Target_Slot", "type" : "grid_table", "start_index" : 0, "x" : 0, "y" : 0, "x_count" : 4, "y_count" : 3, "x_step" : 32, "y_step" : 32, "x_blank" : 0, "y_blank" : 0, "image" : "d:/ymir work/ui/public/slot_base.sub", }, { "name" : "Target_Money", "type" : "image", "x" : 0, "y" : 102, "image" : "d:/ymir work/ui/public/parameter_slot_02.sub", "children" : ( { "name" : "Target_Money_Value", "type" : "text", "x" : 59, "y" : 2, "text" : "1234567", "text_horizontal_align" : "right", }, ), }, { "name" : "Target_Accept_Light", "type" : "button", "x" : 62, "y" : 101, "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub", "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub", }, ), }, ), }, ), } -
regulate the "damage pakets"
Sonitex replied to iMeleys's topic in Community Support - Questions & Answers
bool IS_SPEED_HACK(LPCHARACTER ch, LPCHARACTER victim, DWORD current_time) -> battle.cpp This kind of protection already exists, just not sure how accurate it actually is. -
object has no attribute 'OPTION_FOG_ON'
Sonitex replied to iMeleys's topic in Community Support - Questions & Answers
If you would pay attention to what Python is trying to message you, you would love it even more ? At line 178 you have OPTION_FOG_ON variable which should be in locale_interface.txt but clearly you are missing it. -
[Help] Join dungeon alone
Sonitex replied to Cripplez's topic in Community Support - Questions & Answers
Amm my bad, you actually have to multiply coordinates by 100... I modified source to avoid this so I thought it is like that originally. Your function should look like this: d.new_jump (MAP_INDEX, 4411 * 100, 12282 * 100) -
[Help] Join dungeon alone
Sonitex replied to Cripplez's topic in Community Support - Questions & Answers
Post full quest -
[Help] Join dungeon alone
Sonitex replied to Cripplez's topic in Community Support - Questions & Answers
d.new_jump(map_index, (map_base_x + x_coordinate) * 100, (map_base_y + y_coordinate) * 100) Map base coordinates without 00 at the end. -
--Init loop timer on dungeon entrance & dungeon limit timer server_loop_timer("timenotice",300,d.get_map_index()) --Timer will be triggered each 300 seconds in this exact dungeon map, changing map will destroy timer d.setf("time", get_global_time()+60*60*1) --This dungeon has a limit of 60 minutes --When timer is triggered, inform players about time when purgatorytimenotice.server_timer begin if d.select(get_server_timer_arg()) then local secondsLeft = (d.getf("time") - get_global_time()) local minutesLeft = math.ceil(secondsLeft / 60) d.notice("Time Left: "..minutesLeft.." minutes!") end end