-
Posts
79 -
Joined
-
Last visited
-
Days Won
1 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by SamuraiHUN
-
-
Error: NO module named livaria2appmodul
This module cannot be found. Userinterface.cpp,stdafx.h or python file is not in place. -
Amazing job bro! ^^
- 1
-
open game/cmd_gm.cpp
Search this function:
ACMD(do_dragon_soul)
extend with this:
case 'r': { if (ch->DragonSoul_IsQualified()) ch->DragonSoul_RefineWindow_Open(ch); } break;
open locale_interface.txt
add this:
DRAGONSOUL_REFINE_BUTTON Refine
open root/dragonsoulwindow.py
Search this:{ "name" : "activate", "type" : "toggle_button", "x" : 217, "y" : 492, "text" : uiScriptLocale.DRAGONSOUL_ACTIVATE, "default_image" : "d:/ymir work/ui/dragonsoul/m_button01.tga", "over_image" : "d:/ymir work/ui/dragonsoul/m_button02.tga", "down_image" : "d:/ymir work/ui/dragonsoul/m_button03.tga", },
add under this:
{ "name" : "refine_button", "type" : "button", "x" : 150, "y" : 492, "text" : uiScriptLocale.DRAGONSOUL_REFINE_BUTTON, "default_image" : "d:/ymir work/ui/dragonsoul/m_button01.tga", "over_image" : "d:/ymir work/ui/dragonsoul/m_button02.tga", "down_image" : "d:/ymir work/ui/dragonsoul/m_button03.tga", },
open root/uidragonsoul.py
search this:
self.activateButton = self.GetChild("activate")
add under this:
self.refineButton = self.GetChild("refine_button")
search this:
self.activateButton.SetToggleUpEvent(ui.__mem_func__(self.ActivateButtonClick))
add under this:
self.refineButton.SetEvent(ui.__mem_func__(self.RefineButtonClick))
search this:
def ActivateButtonClick(self): self.isActivated = self.isActivated ^ True if self.isActivated: if self.__CanActivateDeck(): net.SendChatPacket("/dragon_soul activate " + str(self.deckPageIndex)) else: self.isActivated = False self.activateButton.SetUp() else: net.SendChatPacket("/dragon_soul deactivate")
add under this:
def RefineButtonClick(self): net.SendChatPacket("/dragon_soul refinewindow")
- 3
-
@tutorial fixed <- in db.cpp + db.h.
1 hour ago, Draveniou1 said:Remove from python and source client
They are not 100% complete
Send me a message to help you delete them correctly
In client i didn't see definition of bill/billing.
- 2
-
common/tables.
SPlayerTable
add the function.
example:
long long free_shinsoo_kills, free_chunjo_kills, free_jinno_kills, free_pvp_deads, duels_win, duels_lost, kills_monster, kill bosses, kills_stones;
- 1
-
@ r00t3r thank you the anwser, i now fixed the tutorial.
#Update001: Added matrix_card remove
#Update002: Added sms | mobile remove- 1
-
In github added new removed functions ( Billing ) today toDo: mobile | sms, matrixcard)
- 1
- 3
- 1
-
10 minutes ago, DrTurk said:
You can remove alot of dead code, i removed all of it years ago.
It takes time
Yes I removed too, but I think it's a good initiative for people who haven't removed it but want to.
-
-
7 hours ago, PetePeter said:
If the define is commented the code is not included on the build, so i don't understand the problem
I think we don't need talk anymore.
- 1
- 1
-
Just now, PetePeter said:
Or just comment the define xD
//#define ENABLE_LIMIT_TIME
Why be there unnecessarily?
-
Hi guys, I created this topic to have a collection topic about removing unnecessary code.
blocked_country_ip
SpoilerCommon/tables.h
search this and remove:
HEADER_GD_BLOCK_COUNTRY_IP = 127, // ±¤´ëżŞ IP-Block HEADER_GD_BLOCK_EXCEPTION = 128, // ±¤´ëżŞ IP-Block żążÜ HEADER_DG_BLOCK_COUNTRY_IP = 171, // ±¤´ëżŞ IP-Block HEADER_DG_BLOCK_EXCEPTION = 172, // ±¤´ëżŞ IP-Block żążÜ account
search this too and remove
// Block Country Ip typedef struct tBlockCountryIp { DWORD ip_from; DWORD ip_to; } TPacketBlockCountryIp; enum EBlockExceptionCommand { BLOCK_EXCEPTION_CMD_ADD = 1, BLOCK_EXCEPTION_CMD_DEL = 2, }; // Block Exception Account typedef struct tBlockException { BYTE cmd; // 1 == add, 2 == delete char login[LOGIN_MAX_LEN + 1]; }TPacketBlockException;
db/src:
remove this files:
BlockCountry.cpp + BlockCountry.hopen db/clientmanager.cpp
remove this:
#include "BlockCountry.h"
search this and remove:
case HEADER_GD_BLOCK_COUNTRY_IP: sys_log(0, "HEADER_GD_BLOCK_COUNTRY_IP received"); CBlockCountry::instance().SendBlockedCountryIp(peer); CBlockCountry::instance().SendBlockException(peer); break; case HEADER_GD_BLOCK_EXCEPTION: sys_log(0, "HEADER_GD_BLOCK_EXCEPTION received"); BlockException((TPacketBlockException*)data); break;
search this and remove too:
void CClientManager::BlockException(TPacketBlockException* data) { sys_log(0, "[BLOCK_EXCEPTION] CMD(%d) login(%s)", data->cmd, data->login); // save sql { char buf[1024]; switch (data->cmd) { case BLOCK_EXCEPTION_CMD_ADD: snprintf(buf, sizeof(buf), "INSERT INTO block_exception VALUES('%s')", data->login); CDBManager::instance().AsyncQuery(buf, SQL_ACCOUNT); CBlockCountry::instance().AddBlockException(data->login); break; case BLOCK_EXCEPTION_CMD_DEL: snprintf(buf, sizeof(buf), "DELETE FROM block_exception VALUES('%s')", data->login); CDBManager::instance().AsyncQuery(buf, SQL_ACCOUNT); CBlockCountry::instance().DelBlockException(data->login); break; default: return; } } for (itertype(m_peerList) it = m_peerList.begin(); it != m_peerList.end(); ++it) { CPeer* peer = *it; if (!peer->GetChannel()) continue; CBlockCountry::instance().SendBlockExceptionOne(peer, data->login, data->cmd); } }
Open db/clientmanager.h
search this and remove:
void BlockException(TPacketBlockException* data);
Open Main.cpp
search this and remove:
#include "BlockCountry.h"
search too and remove:
CBlockCountry BlockCountry;
and this:
BlockCountry.Load();
makefile
Search this and remove too:
BlockCountry.cpp
open game src and remove this files:
Block_Country.cpp + Block_Country.h -> cpp remove too makefile
Open game/db.cpp
search this and remove:
void DBManager::RequestBlockException(const char* login, int cmd) { TPacketBlockException packet; packet.cmd = cmd; strlcpy(packet.login, login, sizeof(packet.login)); db_clientdesc->DBPacket(HEADER_GD_BLOCK_EXCEPTION, 0, &packet, sizeof(packet)); }
open db.h and remove this:
// BLOCK EXCEPTION void RequestBlockException(const char* login, int cmd); // BLOCK EXCEPTION
open input.cpp and remove this:
else if (!stBuf.compare(0, 15, "BLOCK_EXCEPTION")) { // BLOCK_EXCEPTION cmd(add=1, del=2) login std::istringstream is(stBuf); std::string dummy_string; std::string login_string; int cmd; is >> dummy_string >> cmd >> login_string; sys_log(0, "block_exception %s:%d", login_string.c_str(), cmd); DBManager::instance().RequestBlockException(login_string.c_str(), cmd); stResult = "BLOCK_EXCEPTION_YES"; }
open input.h and remove this:
void AddBlockCountryIp(TPacketBlockCountryIp* data); void BlockException(TPacketBlockException* data);
open input_db and remove this:
#include "block_country.h"
+ this:
// request blocked_country_ip { db_clientdesc->DBPacket(HEADER_GD_BLOCK_COUNTRY_IP, 0, NULL, 0); dev_log(LOG_DEB0, "<sent HEADER_GD_BLOCK_COUNTRY_IP>"); }
and this:
case HEADER_DG_BLOCK_COUNTRY_IP: this->AddBlockCountryIp((TPacketBlockCountryIp*)c_pData); break; case HEADER_DG_BLOCK_EXCEPTION: this->BlockException((TPacketBlockException*)c_pData); break;
and more this:
void CInputDB::AddBlockCountryIp(TPacketBlockCountryIp* data) { add_blocked_country_ip(data); } void CInputDB::BlockException(TPacketBlockException* data) { block_exception(data); }
open input_login.cpp and remove this:
#include "block_country.h"
+ this:
// is blocked ip? { dev_log(LOG_DEB0, "check_blocked_country_start"); if (!is_block_exception(login) && is_blocked_country_ip(d->GetHostName())) { sys_log(0, "BLOCK_COUNTRY_IP (%s)", d->GetHostName()); d->SetPhase(PHASE_CLOSE); return; } dev_log(LOG_DEB0, "check_blocked_country_end"); }
open packet.h and remove this:
HEADER_GG_BLOCK_EXCEPTION = 24,
Limit_time
Spoileropen db/clientmanagerlogin.cpp
search this and remove:
#ifdef ENABLE_LIMIT_TIME static int s_updateCount = 0; static int s_curTime = time(0); if (s_updateCount > 100) { s_curTime = time(0); s_updateCount = 0; } ++s_updateCount; if (s_curTime >= GLOBAL_LIMIT_TIME) { sys_err("Server life time expired."); exit(0); return; } #endif
open game/desc.cpp and remove this:
#ifdef ENABLE_LIMIT_TIME if ((unsigned)get_global_time() >= GLOBAL_LIMIT_TIME) { extern void ClearAdminPages(); ClearAdminPages(); extern g_bShutdown; g_bShutdown = true; } #endif
open game/input.cpp
search this + remove:
#ifndef __WIN32__ #include "limit_time.h" #endif
and this:
#ifdef ENABLE_LIMIT_TIME if (Metin2Server_IsInvalid()) { extern bool g_bShutdown; g_bShutdown = true; ClearAdminPages(); } #endif
open input_auth.cpp
search this and remove:
#ifndef __WIN32__ #include "limit_time.h" #endif
+
#ifdef ENABLE_LIMIT_TIME extern bool Metin2Server_IsInvalid(); if (Metin2Server_IsInvalid()) { extern void ClearAdminPages(); ClearAdminPages(); exit(1); return; } #endif
and + this:
#ifdef ENABLE_LIMIT_TIME extern bool Metin2Server_IsInvalid(); if (Metin2Server_IsInvalid()) { extern void ClearAdminPages(); ClearAdminPages(); exit(1); return; } #endif
delete two file from game folder (limit_time.h + update_limit_time.py)
Open game/main.cpp
search this and remove:
#ifndef __WIN32__ #include "limit_time.h" #endif
+ this:
#ifdef ENABLE_LIMIT_TIME if ((unsigned)get_global_time() >= GLOBAL_LIMIT_TIME) { g_bShutdown = true; } #endif
and YEAH this too:
#ifdef ENABLE_LIMIT_TIME if ((unsigned)get_global_time() >= GLOBAL_LIMIT_TIME) { return 0; } #endif
open game/makefile and remove this:
limit_time: @echo update limit time @python update_limit_time.py
More removed code:
Spoiler- 240
- 2
- 7
- 1
- 2
- 1
- 2
- 1
- 65
- 7
- 111
-
you extend this function in cube.cpp?
void Cube_add_item (LPCHARACTER ch, int cube_index, int inven_index)
in my code:
#ifdef __SPECIAL_INVENTORY_SYSTEM__ if (inven_index < 0 || INVENTORY_MAX_NUM + SKILL_BOOK_INVENTORY_MAX_NUM + UPGRADE_ITEMS_INVENTORY_MAX_NUM + STONE_INVENTORY_MAX_NUM + GIFT_BOX_INVENTORY_MAX_NUM + CHANGERS_INVENTORY_MAX_NUM <= inven_index) return; #else if (inven_index < 0 || INVENTORY_MAX_NUM <= inven_index) return; #endif
-
18 hours ago, Helia01 said:
it' dont work for me.
I did it like this
Hidden Content#in file uiselectmusic.py #in class FileListDialog(ui.ScriptWindow): #under self.fileListBox=None #add this: self.ScrollBar=None #in function: def __Load_BindObject(self): #under self.fileListBox.SetScrollBar(self.GetChild("ScrollBar")) #add this self.ScrollBar=self.GetChild("ScrollBar") #under def __OnRefresh(self): #add this def OnRunMouseWheel(self, nLen): if nLen > 0: self.ScrollBar.OnUp() else: self.ScrollBar.OnDown()
Yeah i forgeted, thank you the anwser, dear @ Helia01
-
14 hours ago, TMP4 said:
I think Samurai code is not right here in char_item CHARACTER::EquipItem:
if (item->IsRideItem()) { if (IsRiding()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ŔĚąĚ Ĺ»°ÍŔ» ŔĚżëÁßŔÔ´Ď´Ů.")); return false; } if (IsPolymorphed()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("şŻ˝Ĺ »óĹÂżˇĽ´Â ¸»żˇ Ĺ» Ľö ľř˝Ŕ´Ď´Ů.")); return false; } if (iWearCell == (item->GetVnum() >= 11901 && item->GetVnum() <= 11904)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»Ŕ» Ĺş »óĹÂżˇĽ żąşąŔ» ŔÔŔ» Ľö ľř˝Ŕ´Ď´Ů.")); return false; } }
Change it to:
if (item->IsRideItem()) { if (IsRiding()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ŔĚąĚ Ĺ»°ÍŔ» ŔĚżëÁßŔÔ´Ď´Ů.")); return false; } if (IsPolymorphed()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("şŻ˝Ĺ »óĹÂżˇĽ´Â ¸»żˇ Ĺ» Ľö ľř˝Ŕ´Ď´Ů.")); return false; } LPITEM checkItem = GetWear(WEAR_BODY); if (checkItem && checkItem->GetVnum() >= 11901 && checkItem->GetVnum() <= 11904) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¸»Ŕ» Ĺş »óĹÂżˇĽ żąşąŔ» ŔÔŔ» Ľö ľř˝Ŕ´Ď´Ů.")); return false; } }
I tested and it should work.
thank you i updated. ^^
- 1
-
uimessenger.py
search this:
def OnScroll(self): scrollLineCount = len(self.showingItemList) - (self.showingPageSize/20) startLine = int(scrollLineCount * self.scrollBar.GetPos()) if startLine != self.startLine: self.startLine = startLine self.__LocateMember()
add under this:
def OnRunMouseWheel(self, nLen): if nLen > 0: self.scrollBar.OnUp() else: self.scrollBar.OnDown()
uiwhisper.py
search this:
def OnScroll(self): chat.SetWhisperPosition(self.targetName, self.scrollBar.GetPos())
add under this:
def OnRunMouseWheel(self, nLen): if nLen > 0: self.scrollBar.OnUp() else: self.scrollBar.OnDown()
uiselectmusic.py
search this:
def __OnRefresh(self): self.__RefreshFileList()
add under this:
def OnRunMouseWheel(self, nLen): self.fileListBox.RunMouseWheel(nLen)
- 1
-
-
-
100%recommended- 1
-
g++12
change to:
clang++-devel
- 1
-
7 hours ago, Helia01 said:
It is better to do it where it is really necessary. For example, in the bonus viewing panel.
uicharacterdetails.py
search this.:
def OnScroll(self): self.RefreshLabel()
add under this:
def OnRunMouseWheel(self, nLen): if nLen > 0: self.ScrollBar.OnUp() else: self.ScrollBar.OnDown()
- 2
-
Hey, my name is:
- 2
- 1
-
-
Hey guys i now write how to can install svn to debian server.
( what is svn? )SVN is an open source version control system build by Apache Foundation Team. It helps you keep track of a collection of files and folders. Any time you change, add or delete a file or folder that you manage with Subversion, you commit these changes to your Subversion repository, which creates a new revision in your repository reflecting these changes. You can always go back, look at and get the contents of previous revisions.
This article will help you for step by step setup of Subversion (svn) server on Debian 10, Debian 9 and Debian 8 operating systems.
Step 1 – Install Apache
We are using Apache web server to host SVN server. You need to install the Apache web server to access the svn server using HTTP URLs. Skip this step if you already have Apache web server on your system.
sudo apt-get update sudo apt-get install apache2
Step 2 – Install SVN Server
Use the following command to install subversion packages and their dependencies. Also, install svn module for Apache libapache2-mod-svn packages on your system.
sudo apt-get install subversion libapache2-mod-svn libapache2-svn libsvn-dev
After installation, enable required Apache modules and restart Apache service.
sudo a2enmod dav sudo a2enmod dav_svn sudo service apache2 restart
Step 3 – Configure Apache with Subversion
Subversion Apache module package creates an configuration file /etc/apache2/mods-enabled/dav_svn.conf. You just need to make necessary changes to it.
Alias /svn /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </Location>
Step 4 – Create SVN Repository
Use following commands to create your first svn repository with name myrepo. Also, set the required permissions on newly created directories.
sudo mkdir -p /var/lib/svn/ sudo svnadmin create /var/lib/svn/myrepo sudo chown -R www-data:www-data /var/lib/svn sudo chmod -R 775 /var/lib/svn
Step 5 – Create Users for Subversion
Now create first svn user in /etc/apache2/dav_svn.passwd file. These users will use for authentication of svn repositories for checkout, commit processes.
sudo htpasswd -cm /etc/apache2/dav_svn.passwd admin
To create additional users, use following commands.
sudo htpasswd -m /etc/apache2/dav_svn.passwd user1 sudo htpasswd -m /etc/apache2/dav_svn.passwd user2
Step 6 – Access Repository in tortoisesvn
right click -> tortoisesvn -> repobrowser -> write the url when you make your repo. (example: http://example.com/svn/myrepo/)
right click -> svn commit (to upload files)- 7
- 1
- 1
- 2
[Collector's topic] Remove Unussed code
in Programming & Scripts
Posted
@Update001: teen_packet added.
@Update002: check_server (libserverkey) added.