Istny
-
Posts
72 -
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 Istny
-
-
Spoiler
portsnap fetch update
cd /usr/ports/devel/gdb
make install cleanthen you have to use gdb711 instead gdb in command line
-
after mysql_query add
Spoilerecho mysql_error();
-
500 days of freebsd 10 uptime, no problems
-
22 minutes ago, Mind Rapist said:
I did it and no general.log file created in /var/db/mysql.. I looked up for broken queries in other logs too, nothing found :S any other ideas please?
create file manulaly, give chmod 666 and restart mysql
-
add into my.cnf
my.cnf file should be int /var/db/mysql by default in freebsd
Spoiler[mysqld]
general_log = on
general_log_file=/var/db/mysql/general.log -
1 hour ago, Mind Rapist said:
Well I got this enum:
enum EWindows
{
RESERVED_WINDOW,
INVENTORY,
EQUIPMENT,
SAFEBOX,
MALL,
DRAGON_SOUL_INVENTORY,
BELT_INVENTORY,
#ifdef __AUCTION__
AUCTION,
#endif
GROUND
};and in SQL I have these:
'INVENTORY','EQUIPMENT','SAFEBOX','MALL','DRAGON_SOUL_INVENTORY','BELT_INVENTORY'
There are some missing is that a thing?
you can try enable general log in mysql, maybe it will log whole wrong query and we will be able to check what's wrong
-
if you use enum as data type in "window" colum (item table in database), you can have window values in wrong order
-
add this to yours CONFIG files
Spoileradminpage_ip: localhost
adminpage_password: change_this_passwordor block p2p ports in firewall
-
game is crashing because of wrong query, you pass out of range value, unsigned int can take −2 147 483 648 — +2 147 483 647
and you are passing 2 150 000 000 -
15 hours ago, BackPlayer said:
no 3
bug you have is identical like 4 inventory pages, CheckSpace() return wrong value
-
so there is a problem with php script, not mysql, you dont have to change everything, only repair fucked up part of current script
-
try run this script http://pastebin.com/kiLECc97
replace in mysql_conn data with your mysql server address, user and password- 1
-
11 minutes ago, charparodar said:
Appears the same thing...
replace in mysqli_query($sql, $con) variables order to
mysqli_query($con, $sql) and add ini_set('display_errors', 'On'); on top of the file -
My bad, i'm not using mysqli from long time, you have to put mysql conection handler inside mysql_error() function like
Spoilermysqli_error($con)
-
50 minutes ago, charparodar said:
This is the code I have on the test page:
$sql = "INSERT INTO account_pvp.account (login, password, social_id, email, create_time, status, coins, ip_registo) VALUES ('" . $benutzername . "', PASSWORD('" . $passwort . "'), '" . $loeschcode . "', '" . $email . "', '" . $zeit . "', '" . $status . "', '" . $registercoins . "', '".$user_ip."')"; $qry = mysqli_query($sql, $con)or die('Erro: ' . mysqli_error());
But no error returns:
I will try...
when you run test page, data are inserted to database ? or the data are not inserted and also there is no error ?
-
you should check error in php script
something like this
if (!execute_query)
echo mysql_error;
-
are you using 4 inventory page ?
check this https://metin2dev.org/board/index.php?/topic/6115-proper-4th-inventory-cexchangecheckspace-function/
-
Spoiler
portsnap fetch update
cd /usr/ports/devel/gdb
make install cleanand after you have to use in command line gdb711 instead gdb
-
install gdb711 and then paste output
-
paste yours makefile
-
Hi,
it's generaly question to owners of server with big player count.
What's yours experience with mysql, are you using innoDB for every table or not ?
In my case i'm using innodb only for couple tables, right now i have 300k characters created with over 20kk items. The size of database is now around 30GB, everything indexed, in peak mysql usage is 10% of 1 cpu core, so there is no problem with performance for now.
If I would convert everything to innodb the size of database will be over 100GB for sure, especially i have over 200kk rows of logs ^.^
So after all, is worthy to upgrade everything to innoDB or not, what's yours experience? maybe someone have here bigger database and can give us some feedback
Regards -
1 hour ago, avertuss said:
Bugged or no?
I'm using this on my server from couple months. no bugs
- 1
-
5 minutes ago, Thorer said:
Its my system and this version is bugged, items will dissapear.
Fucking pieces of shit.
from this what i remember, when i was creating this sytem, when you swapped smaller item into bigger, this bigger item was invisible, after server restart you can see it again
-
So someone published item swap on epvp...
Here is better version from me with background color
It's possible i forget about something so give me a callYou can change background color in OnRenderPickingSlot() function (PythonGridSlotWindow.cpp)
Spoiler
SERVER SIDE:
open char_item.cpp
in function bool CHARACTER::MoveItem replaceSpoilerif (!IsEmptyItemGrid(DestCell, item->GetSize(), Cell.cell)){
}with this
Spoilerif (!IsEmptyItemGrid(DestCell, item->GetSize(), Cell.cell)){
if (INVENTORY == Cell.window_type && INVENTORY == DestCell.window_type && !Cell.IsEquipPosition()){
LPITEM item3 = NULL;
item3 = GetItem(DestCell);
if (!GetItem(DestCell))
return false;if (item3->IsExchanging())
return false;
if (true == item3->isLocked())
return false;
// if equal size
if (item->GetSize() == item3->GetSize()){
item->RemoveFromCharacter();
item3->RemoveFromCharacter();
SetItem(DestCell, item);
SetItem(Cell, item3);
return true;
}
//replace with yours inventory page count
int page_count = 4;
//when swaping items have diferent size
if(item->GetSize() > 1 ){
int j = 0;
int destination_size = 0;
LPITEM check_item = NULL;
do
{
BYTE slot = DestCell.cell + (5 * j);
//if slot is empty
if (!(check_item = GetItem(TItemPos(INVENTORY, slot)))){
if((item->GetSize() -1) == j){
if((DestCell.cell / (INVENTORY_MAX_NUM / page_count)) != ((DestCell.cell + (5 * j)) / (INVENTORY_MAX_NUM / page_count)))
return false;
}
}
else{
check_item = GetItem(TItemPos(INVENTORY, slot));
destination_size += check_item->GetSize();
if((item->GetSize() -1) == j){
//last item must have size 1 to swap
if(check_item->GetSize() > 1)
return false;
if((DestCell.cell / (INVENTORY_MAX_NUM / page_count)) != ((DestCell.cell + (5 * j)) / (INVENTORY_MAX_NUM / page_count)))
return false;
}
}
}
while (++j < item->GetSize());
if((Cell.cell + 5) == DestCell.cell)
return false;
if(item->GetSize() < destination_size)
return false;
item->RemoveFromCharacter();
int k = 0;
check_item = NULL;
do
{
BYTE slot = DestCell.cell + (5 * k);
BYTE slot2 = Cell.cell + (5 * k);
if (!(check_item = GetItem(TItemPos(INVENTORY, slot))))
continue;
else{
check_item->RemoveFromCharacter();
SetItem(TItemPos(INVENTORY, slot2), check_item);
}
}
while (++k < item->GetSize());
SetItem(DestCell, item);
}
else
return false;
}
else
return false;
}
CLIENT SIDE:
open PythonGridSlotWindow.cpp
replace CGridSlotWindow::OnRenderPickingSlot() function with this
Spoilervoid CGridSlotWindow::OnRenderPickingSlot()
{
if (!UI::CWindowManager::Instance().IsAttaching())
return;BYTE byWidth, byHeight;
UI::CWindowManager::Instance().GetAttachingIconSize(&byWidth, &byHeight);std::list<TSlot*> SlotList;
if (GetPickedSlotList(byWidth, byHeight, &SlotList))
{
DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
DWORD dwItemIndex = UI::CWindowManager::Instance().GetAttachingIndex();// UseMode ŔĚ°í..
if (m_isUseMode)
{
// Pick µČ ľĆŔĚĹŰŔĚ ŔÖŔ¸¸é..
TSlot * pSlot = *SlotList.begin();
TSlot * pCenterSlot;
if (GetSlotPointer(pSlot->dwCenterSlotNumber, &pCenterSlot))
if (pCenterSlot->isItem)
{
if (m_isUsableItem)
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 0.0f, 0.5f);
else
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.5f);CPythonGraphic::Instance().RenderBar2d( m_rect.left + pCenterSlot->ixPosition,
m_rect.top + pCenterSlot->iyPosition,
m_rect.left + pCenterSlot->ixPosition + pCenterSlot->byxPlacedItemSize * ITEM_WIDTH,
m_rect.top + pCenterSlot->iyPosition + pCenterSlot->byyPlacedItemSize * ITEM_HEIGHT);
return;
}
}// ľĆ´Ď¸é ±×łÉ żĹ±â±â
if (!CheckMoving(dwSlotNumber, dwItemIndex, SlotList)){
if(m_isUsableItem2)
CPythonGraphic::Instance().SetDiffuseColor(0.0f, 0.55f, 0.55f, 0.5f);//here you can change swapable item color
else
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 0.0f, 0.0f, 0.5f);
}
else
CPythonGraphic::Instance().SetDiffuseColor(1.0f, 1.0f, 1.0f, 0.5f);RECT Rect;
Rect.left = m_rect.right;
Rect.top = m_rect.bottom;
Rect.right = 0;
Rect.bottom = 0;for (std::list<TSlot*>::iterator itor = SlotList.begin(); itor != SlotList.end(); ++itor)
{
TSlot * pSlot = *itor;
Rect.left = min(Rect.left, m_rect.left + pSlot->ixPosition);
Rect.top = min(Rect.top, m_rect.top + pSlot->iyPosition);
Rect.right = max(Rect.right, m_rect.left + pSlot->ixPosition + pSlot->byxPlacedItemSize*ITEM_WIDTH);
Rect.bottom = max(Rect.bottom, m_rect.top + pSlot->iyPosition + pSlot->byxPlacedItemSize*ITEM_HEIGHT);
}CPythonGraphic::Instance().RenderBar2d(Rect.left, Rect.top, Rect.right, Rect.bottom);
}
}Open PythonSlotWindow.cpp
add under void CSlotWindow::SetUsableItem(BOOL bFlag) this function
Spoilervoid CSlotWindow::SetUsableItem2(BOOL bFlag)
{
m_isUsableItem2 = bFlag;
}next add int void CSlotWindow::__Initialize()
Spoilerm_isUsableItem2 = FALSE;
in namespace UI add under BOOL m_isUsableItem
SpoilerBOOL m_isUsableItem2;
open PythonSlotWindow.h
add this under void SetUsableItem(BOOL bFlag);
Spoilervoid SetUsableItem2(BOOL bFlag);
open PythonWindowManagerModule.cpp
add this under PyObject * wndMgrSetUsableItem(PyObject * poSelf, PyObject * poArgs)
SpoilerPyObject * wndMgrSetUsableItem2(PyObject * poSelf, PyObject * poArgs)
{
UI::CWindow * pWin;
if (!PyTuple_GetWindow(poArgs, 0, &pWin))
return Py_BuildException();
int iFlag;
if (!PyTuple_GetInteger(poArgs, 1, &iFlag))
return Py_BuildException();if (!pWin->IsType(UI::CSlotWindow::Type()))
return Py_BuildException();UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
pSlotWin->SetUsableItem2(iFlag);return Py_BuildNone();
}add this under { "SetUsableItem", wndMgrSetUsableItem, METH_VARARGS },
Spoiler{ "SetUsableItem2", wndMgrSetUsableItem2, METH_VARARGS },
PYTHON:
open ui.py and add this functionSpoilerdef SetUsableItem2(self, flag):
wndMgr.SetUsableItem2(self.hWnd, flag)
open uiinventory.py
in function def OverOutItem(self): addSpoilerself.wndItem.SetUsableItem2(FALSE)
replace OverInItem function with this
Spoilerdef OverInItem(self, overSlotPos):
overSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
self.wndItem.SetUsableItem(FALSE)
self.wndItem.SetUsableItem2(FALSE)if mouseModule.mouseController.isAttached():
attachedItemType = mouseModule.mouseController.GetAttachedType()
if player.SLOT_TYPE_INVENTORY == attachedItemType:attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
attachedItemVNum = mouseModule.mouseController.GetAttachedItemIndex()
if self.__CanUseSrcItemToDstItem(attachedItemVNum, attachedSlotPos, overSlotPos):
self.wndItem.SetUsableItem(TRUE)
self.ShowToolTip(overSlotPos)
return
else:
srcItem = player.GetItemIndex(attachedSlotPos)
item.SelectItem(srcItem)
item1_size = str(item.GetItemSize())
dstItem = player.GetItemIndex(overSlotPos)
item.SelectItem(dstItem)
item2_size = str(item.GetItemSize())
if item2_size == item1_size:
if attachedSlotPos != overSlotPos:
self.wndItem.SetUsableItem2(TRUE)
self.ShowToolTip(overSlotPos)
return
if item1_size == "(1, 2)":
if attachedSlotPos != overSlotPos:
if item2_size == "(1, 1)":
second_item = player.GetItemIndex(overSlotPos+5)
item.SelectItem(second_item)
second_item_size = str(item.GetItemSize())
if second_item_size != "(1, 2)" and second_item_size != "(1, 3)":
self.wndItem.SetUsableItem2(TRUE)
self.ShowToolTip(overSlotPos)
return
if item1_size == "(1, 3)":
if attachedSlotPos != overSlotPos:
if item2_size == "(1, 1)":
second_item = player.GetItemIndex(overSlotPos+5)
item.SelectItem(second_item)
second_item_size = str(item.GetItemSize())
if second_item_size != "(1, 3)":
third_item = player.GetItemIndex(overSlotPos+10)
item.SelectItem(third_item)
third_item_size = str(item.GetItemSize())
if third_item_size != "(1, 2)" and third_item_size != "(1, 3)":
self.wndItem.SetUsableItem2(TRUE)
self.ShowToolTip(overSlotPos)
return
elif item2_size == "(1, 2)":
second_item = player.GetItemIndex(overSlotPos+10)
item.SelectItem(second_item)
second_item_size = str(item.GetItemSize())
if second_item_size != "(1, 2)" and second_item_size != "(1, 3)":
self.wndItem.SetUsableItem2(TRUE)
self.ShowToolTip(overSlotPos)
return
self.ShowToolTip(overSlotPos)maybe someone will do better python part ^.^
#######################################################################################################
I don't remember now but this was not working perfect because of overin so i created additional function, let me know is it necessaryADDITIONAL PART:
in PythonGridSlotWindow.cpp
add function
SpoilerBOOL CGridSlotWindow::GetPickedSlotPointer2(TSlot ** ppSlot)
{
if (!UI::CWindowManager::Instance().IsAttaching())
return CSlotWindow::GetPickedSlotPointer(ppSlot);BYTE byWidth, byHeight;
UI::CWindowManager::Instance().GetAttachingIconSize(&byWidth, &byHeight);std::list<TSlot*> SlotList;
if (!GetPickedSlotList(byWidth, byHeight, &SlotList))
return FALSE;
TSlot * pMinSlot = NULL;
//DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();
//DWORD dwAttachingItemIndex = UI::CWindowManager::Instance().GetAttachingIndex();for (std::list<TSlot*>::iterator itor = SlotList.begin(); itor != SlotList.end(); ++itor)
{
TSlot * pSlot = *itor;// NOTE : ÇŃ ˝˝·Ô ŔĚ»ó »çŔĚÁîŔÇ ľĆŔĚĹŰŔÇ °ćżě °ˇŔĺ żŢÂĘ Ŕ§ŔÇ ˝˝·Ô Ć÷ŔÎĹ͸¦ ¸®ĹĎÇŃ´Ů.
// ¸í˝ĂŔűŔĚÁö ¸řÇŃ ÄÚµĺ.. ´ő ÁÁŔş ąćąýŔş ľř´Â°ˇ? - [levites]
if (!pMinSlot)
{
pMinSlot = pSlot;
}
else
{
if (pSlot->dwSlotNumber < pMinSlot->dwSlotNumber)
{
pMinSlot = pSlot;
}
else
{
if (!pMinSlot->isItem && pSlot->isItem)
{
//pMinSlot = pSlot;
}
}
}
}if (!pMinSlot)
{
return FALSE;
}
else
{
TSlot * pCenterSlot;
if (!GetSlotPointer(pMinSlot->dwCenterSlotNumber, &pCenterSlot))
return FALSE;*ppSlot = pCenterSlot;
// ÇöŔç ľĆŔĚĹŰŔ» µé°í ŔÖ´Â ÁßŔĚ°í..
if (UI::CWindowManager::Instance().IsAttaching())
{
DWORD dwSlotNumber = UI::CWindowManager::Instance().GetAttachingSlotNumber();if (dwSlotNumber == pCenterSlot->dwSlotNumber)
{
*ppSlot = pMinSlot;
}
}
}return TRUE;
}in PythonGridSlotWindow.h
add under BOOL GetPickedSlotPointer(TSlot ** ppSlot);
SpoilerBOOL GetPickedSlotPointer2(TSlot ** ppSlot);
in PythonSlotWindow.cpp
replace function OnMouseLeftButtonDown() with thisSpoilerBOOL CSlotWindow::OnMouseLeftButtonDown()
{
TSlot * pSlot;
if (!GetPickedSlotPointer2(&pSlot))
{
UI::CWindowManager::Instance().DeattachIcon();
return TRUE;
}if (pSlot->isItem && !(pSlot->dwState & SLOT_STATE_LOCK))
{
OnSelectItemSlot(pSlot->dwSlotNumber);
}
else
{
OnSelectEmptySlot(pSlot->dwSlotNumber);
}return TRUE;
}
under frunction GetPickedSlotPointer(TSlot ** ppSlot)
add thisSpoilerBOOL CSlotWindow::GetPickedSlotPointer2(TSlot ** ppSlot)
{
long lx, ly;
CWindowManager::Instance().GetMousePosition(lx, ly);int ixLocal = lx - m_rect.left;
int iyLocal = ly - m_rect.top;// NOTE : żŢÂĘ ¸ÇŔ§ »ó´Ü ÇŃ°÷ŔĚ ±âÁŘ Ŕ̶ó´Â ÁˇŔ» ŔĚżëÇŘ żŢÂĘ Ŕ§żˇĽşÎĹÍ żŔ¸ĄÂĘ ľĆ·ˇ·Î
// Â÷·Ę·Î °Ë»öÇŘ °¨Ŕ¸·Î˝á µ¤Çô ŔÖ´Â SlotŔş ŔÚµż ą«˝Ă µČ´Ů´Â ĆŻĽşŔ» ŔĚżëÇŃ´Ů. - [levites]
for (TSlotListIterator itor = m_SlotList.begin(); itor != m_SlotList.end(); ++itor)
{
TSlot & rSlot = *itor;int ixCellSize = rSlot.ixCellSize;
int iyCellSize = rSlot.iyCellSize;// NOTE : ItemŔĚ Hide µÇľîŔÖŔ» °ćżě¸¦ Ŕ§ÇŃ..
if (rSlot.isItem)
{
ixCellSize = max(rSlot.ixCellSize, int(rSlot.byxPlacedItemSize * ITEM_WIDTH));
iyCellSize = max(rSlot.iyCellSize, int(rSlot.byyPlacedItemSize * ITEM_HEIGHT));
}if (ixLocal >= rSlot.ixPosition)
if (iyLocal >= rSlot.iyPosition)
if (ixLocal <= rSlot.ixPosition + ixCellSize)
if (iyLocal <= rSlot.iyPosition + iyCellSize)
{
*ppSlot = &rSlot;
return TRUE;
}
}return FALSE;
}in PythonSlotWindow.h
add under GetPickedSlotPointer(TSlot ** ppSlot); thisSpoilervirtual BOOL GetPickedSlotPointer2(TSlot ** ppSlot);
DONE
- 13
- 1
- 2
- 1
- 10
help hacker in my server
in Community Support - Questions & Answers
Posted
if changing ssh,mysql passwords don't help, you have probably installed webshell, disable dangereous php command in php.ini
after you can delete this shit with this