-
Posts
85 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by CORKY
-
-
I've fixed it entirely by creating a separate detached thread for the process function. I've tested it for about 1 hour doing duels/killing mobs, trying to fuck it up.
If you want to try this method, revert the changes done from the main post and do the following:
PythonApplication.cpp// Add #include <thread> if you don't have it already. // Replace CPythonApplication:Loop() with the following: void CPythonApplication::Loop() { static bool m_started = false; while (true) { if (IsMessage()) { if (!MessageProcess()) break; } else { if (!m_started) { std::thread process_thread([this]() { while (1) { if (!Process()) break; } }); m_started = true; process_thread.detach(); } } } }
The result (I've spammed clicks on the window bar, moved it, constantly calling the message):
Spoiler -
Check if your granny is added to linker inside the input field or if there's any pragma comment that adds the lib (such as #pragma comment(lib, "granny2_static.lib").
-
Here's a proof of concept that does what you showed in the gif when using the cloak of courage (70038). You can remove the poly effect from the SetPolymorph function or add an argument so you can control when to spawn it or not.
char_battle.cpp
Spoiler//Modify FuncAggregateMonster as the following: struct FuncAggregateMonster { LPCHARACTER m_ch; FuncAggregateMonster(LPCHARACTER ch) { m_ch = ch; } void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsPC()) return; if (!ch->IsMonster()) return; if (ch->GetVictim()) return; if (number(1, 100) <= 50) // Temporarily attracts enemies with a 50% chance if (DISTANCE_APPROX(ch->GetX() - m_ch->GetX(), ch->GetY() - m_ch->GetY()) < 5000) if (ch->CanBeginFight()) { ch->SetPolymorph(101, true); // Set polymorph to mobs that were attracted to dog (vnum 101) ch->BeginFight(m_ch); } } } };
-
It might be from LOD models. You might've deleted the _lod granny models for the specific armour but you've kept the LOD loading enabled from the client's binary.
Check the following topic first
if it doesn't solve your problem, disable LOD models from the client's source:
SpoilerLocale_inc.h
#define __DISABLE_LOD_LOADING__
GameLib/ActorInstanceData.cpp
// Search inside CActorInstance::SetShape(DWORD eShape, float fSpecular) std::string stLODModelFileName; char szLODModelFileNameEnd[256]; for (UINT uLODIndex=1; uLODIndex<=3; ++uLODIndex) { sprintf(szLODModelFileNameEnd, "_lod_%.2d.gr2", uLODIndex); stLODModelFileName = CFileNameHelper::NoExtension(pkShape->m_stModelFileName) + szLODModelFileNameEnd; if (!rkResMgr.IsFileExist(stLODModelFileName.c_str())) break; CGraphicThing* pLODModelThing = (CGraphicThing *)rkResMgr.GetResourcePointer(stLODModelFileName.c_str()); if (!pLODModelThing) break; RegisterLODThing(0, pLODModelThing); } // Replace it with: #ifndef __DISABLE_LOD_LOADING__ { std::string stLODModelFileName; char szLODModelFileNameEnd[256]; for (UINT uLODIndex=1; uLODIndex<=3; ++uLODIndex) { sprintf(szLODModelFileNameEnd, "_lod_%.2d.gr2", uLODIndex); stLODModelFileName = CFileNameHelper::NoExtension(pkShape->m_stModelFileName) + szLODModelFileNameEnd; if (!rkResMgr.IsFileExist(stLODModelFileName.c_str())) break; CGraphicThing* pLODModelThing = (CGraphicThing *)rkResMgr.GetResourcePointer(stLODModelFileName.c_str()); if (!pLODModelThing) break; RegisterLODThing(0, pLODModelThing); } } #endif
GameLib/RaceData.cpp
// Search inside CGraphicThing * CRaceData::GetLODModelThing() if (!m_pLODModelThing) { std::string strLODFileName = CFileNameHelper::NoExtension(m_strBaseModelFileName) + "_lod_01.gr2"; if (CResourceManager::Instance().IsFileExist(strLODFileName.c_str())) { m_pLODModelThing = (CGraphicThing *)CResourceManager::Instance().GetResourcePointer(strLODFileName.c_str()); } } // Replace it with: #ifndef __DISABLE_LOD_LOADING__ if (!m_pLODModelThing) { std::string strLODFileName = CFileNameHelper::NoExtension(m_strBaseModelFileName) + "_lod_01.gr2"; if (CResourceManager::Instance().IsFileExist(strLODFileName.c_str())) { m_pLODModelThing = (CGraphicThing *)CResourceManager::Instance().GetResourcePointer(strLODFileName.c_str()); } } #endif
-
In your db (you'll enter from navicat for example) you'll have a table inside player called "skill_proto". Search your desired skill from it's vnum (In my example we'll modify Aura of Sword which is the vnum 4) and modify the szDurationPoly column value. In some special cases, you'll need to modify szDurationPoly2, so keep that in mind if it doesn't work for your skill.
Open it up and modify the cooldown values like it:
SpoilerSave the table, then go into your locale folder from the client and sync the skill_table with the new values like the following:
skill_table
Spoiler -
input_main.cpp
if (ch->GetLastPMPulse() < thecore_pulse()) ch->ClearPMCounter(); if (ch->GetPMCounter() > 3 && ch->GetLastPMPulse() > thecore_pulse()) { ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; }
Modify the "3" with your desired limiter, or just remove it if you don't want any kind of limitation.- 1
-
Example of usage is provided in the files. You can extend it and call it from server when a event starts for example, I'm sure you can find a usage for it.
Don't forget to also replace the MSS.H from extern/include, it contains a different name for the C8 define to not interfere with windows's "implements.h" header's templatesFor more details, check out WinToast's official repo:
- 20
- 4
- 1
- 9
-
59 minutes ago, WeedHex said:
People were selling it xD
Indeed, but this is a trivial method. The one which you can buy has probably a better implementation and you have more control over the distance
-
-
Wanted to point out that on device reset, you might get your whole client frozen. That happens because the imgui's objects aren't invalidated & created again.
To fix it, use Imgui's own implementations inside CGraphicDevice::Reset:
bool CGraphicDevice::Reset() { HRESULT hr; if (FAILED(hr = ms_lpd3dDevice->TestCooperativeLevel())) { if (hr == D3DERR_DEVICELOST) return false; if (hr == D3DERR_DEVICENOTRESET) { __DestroyPDTVertexBufferList(); ImGui_ImplDX9_InvalidateDeviceObjects(); if (FAILED(hr = ms_lpd3dDevice->Reset(&ms_d3dPresentParameter))) { TraceError("Failed to reset device"); return false; } m_pStateManager->SetDefaultState(); if (!__CreatePDTVertexBufferList()) return false; ImGui_ImplDX9_CreateDeviceObjects(); } } return true; }
Don't forget to include imgui.h and imgui_impl_dx9.h (or imgui_impl_dx8.h depending on what you're using)- 1
-
These two videos will help a lot, pay attention to every step and practice in the same time you watch. Don't just copy the code but also try to understand it.- 1
-
You might find what you seek inside this topic:
-
14 minutes ago, Amun said:
Actually, it does. I can use the keyboard normally(move, attack, write) while dragging/keeping the window(left click). I've not thought about fixing the right click as well(for some reason). Also, I was extremely busy, so I've not checked to see if Dumita's change will help in that regard.
These being said, however, you can trigger/close the thread when entering and exiting the context menu. I don't see why you wouldn't be able to use the same solution for the right click as well.
Edit: Just noticed(forgot about it) I also have a video of me moving when dragging the client:
Regards,
Amun
What Intel was saying is that if you're holding the left/right click on the bar without moving the mouse at all, the game will still freeze for around 300-500ms.
My post was only related to the context menu (because it was freezing the client while it was opened) so it just removes that option since no one was using it anyway. -
Add OFFLINESHOP_EDIT_SHOPNAME_TOOLTIP inside your locale_interface.txt
-
Great release, but I also want to point out that the freezing will also happen when holding right click on the bar or opening the context menu.
Addingcase WM_CONTEXTMENU: return 0; break;
into the CPythonApplication::WindowProcedure message switch will stop the context menu from opening.
- 2
- 1
-
Thanks for all the contribution you've done for the community! I wish you great success in your other activities.
-
Very nice release, as always quality. Thank you for the time and the contribution you've done to the community, I appreciate you a lot!
- 1
-
They could be original content. I haven't seen them as well.
-
3 minutes ago, petmen021 said:
Its not work for Visual Studio 2013?
I get
"Sharder_ptr" and "std" errors... and etc#include <memory>
add it inside the header files that you receive the error.- 1
-
On 10/26/2022 at 11:25 PM, Tatsumaru said:
Looks awesome! Great work
- 1
-
Try this:
def SetToolTipText(self, text, x = 0, y = -19): if not self.toolTipText: textLine = ui.TextLine() textLine.SetParent(self) textLine.SetHorizontalAlignCenter() textLine.SetSize(0, 0) textLine.SetOutline() textLine.Hide() self.toolTipText = textLine self.toolTipText.SetText(text) w, h = self.toolTipText.GetTextSize() self.toolTipText.SetPosition(max(0, x + self.GetWidth()/2 - w/2), y)
-
Try this:
def ChWindow(self, bc): if self.bg_channel.IsShow(): self.bg_channel.Hide() else: self.bg_Channel.Show()
-
For each object, you need to also make a .mdatr file, which supposedly contains the collision data. This is how dungeons are made basically, at least grotto and such are made from objects
-
[EXPERIMENTAL] Game window freeze when dragging the client
in Bug Fixes
Posted · Edited by CORKY
Added HTSYSMENU
You need to handle manually the min/max/close buttons. You can do it like the following:
Additionally, I've also blocked the HTSYSMENU param, otherwise, the players can click on the application icon that's in the non-client area and it'll pop up the system menu, which will, again, freeze the application.