Beiträge von nazox
-
-
I can't solved, close, thanks for nothing!
-
DatenTypen verglichen?
Thanks for your time and reply, i have the same in src cliente and game, in the same position, and i don't add New or replace packets, so i have te same!
-
Hello people, i have a little problem so i need help. I'm using transmutation system by Mali (BlackDragonx61), and all work great, so mi next objective is adapted system to Great Offline Shop. I can adapte very well, but i have a little problem. When i put shop, my client kick me but server are online, and sysser give me only problem with a packet, but i don't edit packets and don't change old or add new packets.
i see this problem in this post too:
Bitte melden Sie sich an, um diesen Link zu sehen.
but guy don't put solution and doesn't online for ask him.
The problem is like this:
and he have the same problem but he solved, he said:
So, any have any idea to give me for fix it? thanks and sorry for using english.
-
Thanks, I didn't have it installed, but I already managed to fix it by adding certain imports, what exactly will that do for me?
-
-
Hello People, i need a help with a problem. I'm triying to fix but i can't, my problem is this
Bitte melden Sie sich an, um diesen Link zu sehen.
I read other post, this:
Bitte melden Sie sich an, um diesen Link zu sehen.
but i don't undertsand the fix, so, someone can give me any idea?
-
Nothing know?
-
Hello i have
My offline shop work great, but the problem is when i try to create shop.
And i can't create normal shop, my sysser of ch1 say that:
SYSERR: Apr 21 15:06:22 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 960406, 272931, 10001610, 'Priv shop', 'Skill book 1 ', '192.X.X.X', 50300) errno: 1406)
SYSERR: Apr 21 15:06:22 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 1, 960406, 272931, 10001702, 'Priv shop', 'Lectura concentrada 5 ', '192.X.X.X', 71094) errno: 1406)
SYSERR: Apr 21 15:06:22 :: Process: SEQUENCE 29b8d480 mismatch 0xe2 != 0x12 header 55
SYSERR: Apr 21 15:06:22 :: Process: SEQUENCE_LOG [Rain]-------------
[007 : 0x72]
[007 : 0xf7]
[007 : 0x6f]
[007 : 0x84]
[007 : 0xbc]
[007 : 0x37]
[007 : 0x46]
[007 : 0xe3]
[007 : 0x24]
[007 : 0xda]
[007 : 0xa1]
[007 : 0xc8]
[007 : 0xee]
[007 : 0x36]
[007 : 0x7c]
[007 : 0x33]
[007 : 0x2f]
[011 : 0x98]
[011 : 0x76]
[003 : 0x5e]
[055 : 0xe2]
My header 55 is CG_MY_SHOP and i have on packet src game and src binary..
But work:
Bitte melden Sie sich an, um dieses Bild zu sehen.
The problem is, when i try to create normal shop, not work, and when i try to create offline shop, i go back to login, but when i login again i have offline shop, this is my problem:
Bitte melden Sie sich an, um diesen Link zu sehen.
i try to debug my game.core and i have this:
# 0 std :: string :: _ M_data (this = 0x222) es /usr/local/lib/gcc48/include/c++/bits/basic_string.h:293
# 1 std :: string :: _ M_rep (this = 0x222 ) es /usr/local/lib/gcc48/include/c++/bits/basic_string.h:301
# 2 std :: string :: size (this = 0x222) es / usr / local / lib / gcc48 / include / c + + / bits / basic_string.h: 716
# 3 std :: string :: empty (this = 0x222) es /usr/local/lib/gcc48/include/c++/bits/basic_string.h:812
# 4 CHARACTER :: GetName (esto = 0x10) en char.cpp: 632
# 5 0x0815db01 en ITEM_MANAGER :: SaveSingleItem (esto = 0xbfbfbd00, item = 0x2b0d0000) en item_manager.cpp: 431
# 6 0x0815ea53 en load_lotto () en item_manager.cpp: 6900
# 00 ( )
Char.cpp
const char * CHARACTER :: GetName () const <--- line 630 gdb error
{<- line 631
return m_stName.empty ()? (m_pkMobData? m_pkMobData-> m_table.szLocaleName: ""): m_stName.c_str (); <- 632
}
Item_manager.cpp
void ITEM_MANAGER::SaveSingleItem(LPITEM item) <--error gdb
{
if (!item->GetOwner())
{
DWORD dwID = item->GetID();
DWORD dwOwnerID = item->GetLastOwnerPID();
db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_DESTROY, 0, sizeof(DWORD) + sizeof(DWORD));
db_clientdesc->Packet(&dwID, sizeof(DWORD));
db_clientdesc->Packet(&dwOwnerID, sizeof(DWORD));
sys_log(1, "ITEM_DELETE %s:%u", item->GetName(), dwID);
return;
}
sys_log(1, "ITEM_SAVE %s:%d in %s window %d", item->GetName(), item->GetID(), item->GetOwner()->GetName(), item->GetWindow());
TPlayerItem t;
t.id = item->GetID();
t.window = item->GetWindow();
t.pos = t.window == EQUIPMENT ? item->GetCell() - INVENTORY_MAX_NUM : item->GetCell();
t.count = item->GetCount();
t.vnum = item->GetOriginalVnum();
t.owner = (t.window == SAFEBOX t.window == MALL) ? item->GetOwner()->GetDesc()->GetAccountTable().id : item->GetOwner()->GetPlayerID();
thecore_memcpy(t.alSockets, item->GetSockets(), sizeof(t.alSockets));
thecore_memcpy(t.aAttr, item->GetAttributes(), sizeof(t.aAttr));
db_clientdesc->DBPacketHeader(HEADER_GD_ITEM_SAVE, 0, sizeof(TPlayerItem));
db_clientdesc->Packet(&t, sizeof(TPlayerItem));
}
and item_manager.cpp again
std::set<DWORD> g_set_lotto;
void load_lotto() <---- error gdb
{
static int bLoaded = false;
if (bLoaded)
return;
bLoaded = true;
FILE * fp = fopen("lotto.txt", "r");
if (!fp)
return;
char buf[256];
while (fgets(buf, 256, fp))
{
char * psz = strchr(buf, '\n');
if (NULL != psz)
*psz = '\0';
DWORD dw = 0;
str_to_number(dw, buf);
g_set_lotto.insert(dw);
}
fclose(fp);
}
I don't know because i have error on item_manager.cpp because on guide not use item_manager.cpp, and i try to compare others source games with this offline shop but i have the same error. someone can help me? nobody has wanted to help me or can't know the error.. thanks
-
Thanks Volvox i put mi sysser client and mi sysser debug, i hope you can help me, ist the first time use debug, so sorry is wrong!
-
Hello M2D,
I need help with a problem, i try to fix about 2 month but i can't. I try to compare other clients but i have the same lines, and i have the same problem, i try, to add new .py but i have the same problem, i try to change .dds or rutes but i have the same problem..
when you pass the mouse to name character board you can see your rank, if you have 1000 and you are good, or -1000 and you are evil, etc but my problem is when you pass the mouse i can't see that.
that's is my problem:
Bitte melden Sie sich an, um dieses Bild zu sehen.
and this i want to mean:
Bitte melden Sie sich an, um dieses Bild zu sehen.
I have compared more than 10 clients, including the 2004 client, I have edited the uicharacter.py files for root, localeinfo for root, locale_game for ranges, (chivalrick etc), the characterwindow.py for uiscript, I have replaced those files more than 20 times also, I have checked all the lines related to the client and game src, but I don't know what the problem is. I've been thinking that maybe it's the box that covers the text, or it's missing a function type tooltip_text or something like that, or I don't know what else to look at. In source i compare this:
bin/InstanceBase.cpp - GetAlignmentGrade, GetAlignmentType
bin/InstanceBase.h - TITLE_NUM, TITLE_NONE
game/char_battle.cpp - GetAlignment, GetRealAlignment, ShowAlignment, UpdateAlignment
i have everything.. i try to add this function to see if work : chat.AppendChat(chat.CHAT_TYPE_INFO, "client_alignment_test")
and yeah work
Bitte melden Sie sich an, um dieses Bild zu sehen.
And i have alignment before mi name:
Bitte melden Sie sich an, um dieses Bild zu sehen.
i can create a function (different, this supposedly exists), similar to when you hover your mouse over the hp? What does the text show? if so how could i?
Bitte melden Sie sich an, um dieses Bild zu sehen.
someone can help me please!!!!
-
Mmmmmmmmmmm Once I saw a system that allows you to choose the font and size, maybe with that if it could work for you
-
The sysser is because you have something wrong in python, about the text i don't understand...if i use utf-8 i get it like this
example: notepad++ -> estás in game -> est?s or something. but if use ansi get it like this:
example: notepad++-> est?s <- change to "estás" and game-> estás and work great, you understand?
Bitte melden Sie sich an, um diesen Link zu sehen.
when you put ansi, write again work correct and compile
-
If you use notepad++ change code to ansi, and try now to compile and test client!
-
Hello again : Sweat_smile: I want to publish the special storage that I found and was fixing, but there is only one mistake that I have not been able to fix and I would like to know if anyone has any kind of idea, since I don't know much about C ++. The problem is in char_item.cpp when you edit the lines of that file and compile and enter the game, the blacksmith, the blessings, enhancement metals stop working. I was reviewing and I can not understand the error, because i dind't edit "do_refine or improvement items". I think the error is some line that blocks it but I would not know which, otherwise the store works great, and I wanted to publish it, but first I need to fix this error, I would be very grateful.
This is char_item.cpp of system:
//1. Search:
LPITEM CHARACTER::GetInventoryItem(WORD wCell) const
{
return GetItem(TItemPos(INVENTORY, wCell));
}
//1. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
LPITEM CHARACTER::GetUpgradeInventoryItem(WORD wCell) const
{
return GetItem(TItemPos(UPGRADE_INVENTORY, wCell));
}
LPITEM CHARACTER::GetBookInventoryItem(WORD wCell) const
{
return GetItem(TItemPos(BOOK_INVENTORY, wCell));
}
LPITEM CHARACTER::GetStoneInventoryItem(WORD wCell) const
{
return GetItem(TItemPos(STONE_INVENTORY, wCell));
}
#endif
//3. Search: function ( LPITEM CHARACTER::GetItem )
case DRAGON_SOUL_INVENTORY:
if (wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::GetInventoryItem: invalid DS item cell %d", wCell);
return NULL;
}
return m_pointsInstant.pDSItems[wCell];
//2. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
case UPGRADE_INVENTORY:
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::GetInventoryItem: invalid SSU item cell %d", wCell);
return NULL;
}
return m_pointsInstant.pSSUItems[wCell];
case BOOK_INVENTORY:
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::GetInventoryItem: invalid SSB item cell %d", wCell);
return NULL;
}
return m_pointsInstant.pSSBItems[wCell];
case STONE_INVENTORY:
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::GetInventoryItem: invalid SSS item cell %d", wCell);
return NULL;
}
return m_pointsInstant.pSSSItems[wCell];
#endif
//3. Search: function ( void CHARACTER::SetItem )
default:
sys_err ("Invalid Inventory type %d", window_type);
return;
//3. Add before:
#ifdef ENABLE_SPECIAL_STORAGE
case UPGRADE_INVENTORY:
{
LPITEM pOld = m_pointsInstant.pSSUItems[wCell];
if (pOld)
{
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pOld->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
if (m_pointsInstant.pSSUItems[p] && m_pointsInstant.pSSUItems[p] != pOld)
continue;
m_pointsInstant.wSSUItemGrid[p] = 0;
}
}
else
m_pointsInstant.wSSUItemGrid[wCell] = 0;
}
if (pItem)
{
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::SetItem: invalid SSU item cell %d", wCell);
return;
}
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pItem->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
m_pointsInstant.wSSUItemGrid[p] = wCell + 1;
}
}
else
m_pointsInstant.wSSUItemGrid[wCell] = wCell + 1;
}
m_pointsInstant.pSSUItems[wCell] = pItem;
}
break;
case BOOK_INVENTORY:
{
LPITEM pOld = m_pointsInstant.pSSBItems[wCell];
if (pOld)
{
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pOld->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
if (m_pointsInstant.pSSBItems[p] && m_pointsInstant.pSSBItems[p] != pOld)
continue;
m_pointsInstant.wSSBItemGrid[p] = 0;
}
}
else
m_pointsInstant.wSSBItemGrid[wCell] = 0;
}
if (pItem)
{
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::SetItem: invalid SSB item cell %d", wCell);
return;
}
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pItem->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
m_pointsInstant.wSSBItemGrid[p] = wCell + 1;
}
}
else
m_pointsInstant.wSSBItemGrid[wCell] = wCell + 1;
}
m_pointsInstant.pSSBItems[wCell] = pItem;
}
break;
case STONE_INVENTORY:
{
LPITEM pOld = m_pointsInstant.pSSSItems[wCell];
if (pOld)
{
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pOld->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
if (m_pointsInstant.pSSSItems[p] && m_pointsInstant.pSSSItems[p] != pOld)
continue;
m_pointsInstant.wSSSItemGrid[p] = 0;
}
}
else
m_pointsInstant.wSSSItemGrid[wCell] = 0;
}
if (pItem)
{
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
{
sys_err("CHARACTER::SetItem: invalid SSB item cell %d", wCell);
return;
}
if (wCell < SPECIAL_INVENTORY_MAX_NUM)
{
for (int i = 0; i < pItem->GetSize(); ++i)
{
int p = wCell + (i * 5);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
continue;
m_pointsInstant.wSSSItemGrid[p] = wCell + 1;
}
}
else
m_pointsInstant.wSSSItemGrid[wCell] = wCell + 1;
}
m_pointsInstant.pSSSItems[wCell] = pItem;
}
break;
#endif
//4.Search: function ( void CHARACTER::SetItem )
case DRAGON_SOUL_INVENTORY:
pItem->SetWindow(DRAGON_SOUL_INVENTORY);
break;
//4. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
case UPGRADE_INVENTORY:
pItem->SetWindow(UPGRADE_INVENTORY);
break;
case BOOK_INVENTORY:
pItem->SetWindow(BOOK_INVENTORY);
break;
case STONE_INVENTORY:
pItem->SetWindow(STONE_INVENTORY);
break;
#endif
//5. Search: function ( void CHARACTER::ClearItem )
for (i = 0; i < DRAGON_SOUL_INVENTORY_MAX_NUM; ++i)
{
if ((item = GetItem(TItemPos(DRAGON_SOUL_INVENTORY, i))))
{
item->SetSkipSave(true);
ITEM_MANAGER::instance().FlushDelayedSave(item);
item->RemoveFromCharacter();
M2_DESTROY_ITEM(item);
}
}
//5. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
for (i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if ((item = GetItem(TItemPos(UPGRADE_INVENTORY, i))))
{
item->SetSkipSave(true);
ITEM_MANAGER::instance().FlushDelayedSave(item);
item->RemoveFromCharacter();
M2_DESTROY_ITEM(item);
}
}
for (i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if ((item = GetItem(TItemPos(BOOK_INVENTORY, i))))
{
item->SetSkipSave(true);
ITEM_MANAGER::instance().FlushDelayedSave(item);
item->RemoveFromCharacter();
M2_DESTROY_ITEM(item);
}
}
for (i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if ((item = GetItem(TItemPos(STONE_INVENTORY, i))))
{
item->SetSkipSave(true);
ITEM_MANAGER::instance().FlushDelayedSave(item);
item->RemoveFromCharacter();
M2_DESTROY_ITEM(item);
}
}
#endif
//6. Search: function ( bool CHARACTER::IsEmptyItemGrid )
if (m_pointsInstant.bItemGrid[p])
if (m_pointsInstant.wDSItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
}
//6. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
break;
case UPGRADE_INVENTORY:
{
WORD wCell = Cell.cell;
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
return false;
iExceptionCell++;
if (m_pointsInstant.wSSUItemGrid[wCell])
{
if (m_pointsInstant.wSSUItemGrid[wCell] == iExceptionCell)
{
if (bSize == 1)
return true;
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.wSSUItemGrid[p])
if (m_pointsInstant.wSSUItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
else
return false;
}
if (1 == bSize)
return true;
else
{
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.bItemGrid[p]) // old bItemGrid
if (m_pointsInstant.wSSUItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
}
break;
case BOOK_INVENTORY:
{
WORD wCell = Cell.cell;
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
return false;
iExceptionCell++;
if (m_pointsInstant.wSSBItemGrid[wCell])
{
if (m_pointsInstant.wSSBItemGrid[wCell] == iExceptionCell)
{
if (bSize == 1)
return true;
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.wSSBItemGrid[p])
if (m_pointsInstant.wSSBItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
else
return false;
}
if (1 == bSize)
return true;
else
{
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.bItemGrid[p]) // old bItemGrid
if (m_pointsInstant.wSSBItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
}
case STONE_INVENTORY:
{
WORD wCell = Cell.cell;
if (wCell >= SPECIAL_INVENTORY_MAX_NUM)
return false;
iExceptionCell++;
if (m_pointsInstant.wSSSItemGrid[wCell])
{
if (m_pointsInstant.wSSSItemGrid[wCell] == iExceptionCell)
{
if (bSize == 1)
return true;
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.wSSSItemGrid[p])
if (m_pointsInstant.wSSSItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
else
return false;
}
if (1 == bSize)
return true;
else
{
int j = 1;
do
{
int p = wCell + (5 * j);
if (p >= SPECIAL_INVENTORY_MAX_NUM)
return false;
if (m_pointsInstant.bItemGrid[p]) // old bItemGrid
if (m_pointsInstant.wSSSItemGrid[p] != iExceptionCell)
return false;
}
while (++j < bSize);
return true;
}
}
#endif
//7. Search:
void CHARACTER::CopyDragonSoulItemGrid(std::vector<WORD>& vDragonSoulItemGrid) const
{
vDragonSoulItemGrid.resize(DRAGON_SOUL_INVENTORY_MAX_NUM);
std::copy(m_pointsInstant.wDSItemGrid, m_pointsInstant.wDSItemGrid + DRAGON_SOUL_INVENTORY_MAX_NUM, vDragonSoulItemGrid.begin());
}
//7. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
int CHARACTER::GetSameUpgradeInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsUpgradeItem())
return -1;
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (GetUpgradeInventoryItem(i)->GetVnum() == pItem->GetVnum())
return i;
return -1;
}
int CHARACTER::GetSameBookInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsBook())
return -1;
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (GetBookInventoryItem(i)->GetVnum() == pItem->GetVnum() && GetBookInventoryItem(i)->GetSocket(0) == pItem->GetSocket(0))
return i;
return -1;
}
int CHARACTER::GetSameStoneInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsStone())
return -1;
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (GetStoneInventoryItem(i)->GetVnum() == pItem->GetVnum())
return i;
return -1;
}
int CHARACTER::GetEmptyUpgradeInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsUpgradeItem())
return -1;
BYTE bSize = pItem->GetSize();
for ( int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (IsEmptyItemGrid(TItemPos (UPGRADE_INVENTORY, i), bSize))
return i;
return -1;
}
int CHARACTER::GetEmptyBookInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsBook())
return -1;
BYTE bSize = pItem->GetSize();
for ( int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (IsEmptyItemGrid(TItemPos (BOOK_INVENTORY, i), bSize))
return i;
return -1;
}
int CHARACTER::GetEmptyStoneInventory(LPITEM pItem) const
{
if (NULL == pItem !pItem->IsStone())
return -1;
BYTE bSize = pItem->GetSize();
for ( int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
if (IsEmptyItemGrid(TItemPos (STONE_INVENTORY, i), bSize))
return i;
return -1;
}
#endif
//8. Search: function ( bool CHARACTER::MoveItem )
else if (DRAGON_SOUL_INVENTORY == DestCell.window_type)
return false;
//8. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
if (!item->IsUpgradeItem() && UPGRADE_INVENTORY == DestCell.window_type)
return false;
if (!item->IsBook() && BOOK_INVENTORY == DestCell.window_type)
return false;
if (!item->IsStone() && STONE_INVENTORY == DestCell.window_type)
return false;
#endif
//9. Search: function ( bool CHARACTER::PickupItem )
quest::CQuestManager::instance().PickupItem (GetPlayerID(), item2);
return true;
}
}
}
item->SetCount(bCount);
}
//9. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
if (item->IsUpgradeItem() && item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
{
BYTE bCount = item->GetCount();
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM item2 = GetUpgradeInventoryItem(i);
if (!item2)
continue;
if (item2->GetVnum() == item->GetVnum())
{
BYTE bCount2 = MIN(g_bItemCountLimit - item2->GetCount(), bCount);
bCount -= bCount2;
item2->SetCount(item2->GetCount() + bCount2);
if (bCount == 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item2->GetName());
M2_DESTROY_ITEM(item);
return true;
}
}
}
item->SetCount(bCount);
}
else if (item->IsBook() && item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
{
BYTE bCount = item->GetCount();
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM item2 = GetBookInventoryItem(i);
if (!item2)
continue;
if (item2->GetVnum() == item->GetVnum())
{
//SKILL BOOK FIX: ITEM_STACKABLE
int j;
for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
if (item2->GetSocket(j) != item->GetSocket(j))
break;
if (j != ITEM_SOCKET_MAX_NUM)
continue;
/////////////////////////////////
BYTE bCount2 = MIN(g_bItemCountLimit - item2->GetCount(), bCount);
bCount -= bCount2;
item2->SetCount(item2->GetCount() + bCount2);
if (bCount == 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item2->GetName());
M2_DESTROY_ITEM(item);
return true;
}
}
}
item->SetCount(bCount);
}
else if (item->IsStone() && item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
{
BYTE bCount = item->GetCount();
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM item2 = GetStoneInventoryItem(i);
if (!item2)
continue;
if (item2->GetVnum() == item->GetVnum())
{
BYTE bCount2 = MIN(g_bItemCountLimit - item2->GetCount(), bCount);
bCount -= bCount2;
item2->SetCount(item2->GetCount() + bCount2);
if (bCount == 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item2->GetName());
M2_DESTROY_ITEM(item);
return true;
}
}
}
item->SetCount(bCount);
}
#endif
//10. Search: function ( bool CHARACTER::PickupItem )
if (item->IsDragonSoul())
{
if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
{
sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
//10. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
{
if ((iEmptyCell = GetEmptyUpgradeInventory(item)) == -1)
{
sys_log(0, "No empty ssu inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
else if (item->IsBook())
{
if ((iEmptyCell = GetEmptyBookInventory(item)) == -1)
{
sys_log(0, "No empty ssu inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
else if (item->IsStone())
{
if ((iEmptyCell = GetEmptyStoneInventory(item)) == -1)
{
sys_log(0, "No empty ssu inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
#endif
//11. Search: function ( bool CHARACTER::PickupItem )
if (item->IsDragonSoul())
item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
//11. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
item->AddToCharacter(this, TItemPos(UPGRADE_INVENTORY, iEmptyCell));
else if (item->IsBook())
item->AddToCharacter(this, TItemPos(BOOK_INVENTORY, iEmptyCell));
else if (item->IsStone())
item->AddToCharacter(this, TItemPos(STONE_INVENTORY, iEmptyCell));
#endif
//12. Search: function ( bool CHARACTER::PickupItem )
if (item->IsDragonSoul())
{
if (!(owner && (iEmptyCell = owner->GetEmptyDragonSoulInventory(item)) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
}
//12. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
{
if (!(owner && (iEmptyCell = owner->GetEmptyUpgradeInventory(item)) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyUpgradeInventory(item)) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
}
else if (item->IsBook())
{
if (!(owner && (iEmptyCell = owner->GetEmptyBookInventory(item)) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyBookInventory(item)) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
}
else if (item->IsStone())
{
if (!(owner && (iEmptyCell = owner->GetEmptyStoneInventory(item)) != -1))
{
owner = this;
if ((iEmptyCell = GetEmptyStoneInventory(item)) == -1)
{
owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
return false;
}
}
}
#endif
//13. Search: function ( bool CHARACTER::PickupItem )
if (item->IsDragonSoul())
item->AddToCharacter(owner, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
//13. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
item->AddToCharacter(owner, TItemPos(UPGRADE_INVENTORY, iEmptyCell));
else if (item->IsBook())
item->AddToCharacter(owner, TItemPos(BOOK_INVENTORY, iEmptyCell));
else if (item->IsStone())
item->AddToCharacter(owner, TItemPos(STONE_INVENTORY, iEmptyCell));
#endif
//14. Search function : int CHARACTER::CountSpecifyItem
//14. Replace with :
int CHARACTER::CountSpecifyItem(DWORD vnum) const
{
int count = 0;
LPITEM item;
for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
{
item = GetInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
// 개인 상점에 등록된 물건이면 넘어간다.
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
{
continue;
}
else
{
count += item->GetCount();
}
}
}
#ifdef ENABLE_SPECIAL_STORAGE
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetUpgradeInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetBookInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
item = GetStoneInventoryItem(i);
if (NULL != item && item->GetVnum() == vnum)
{
if (m_pkMyShop && m_pkMyShop->IsSellingItem(item->GetID()))
continue;
else
count += item->GetCount();
}
}
#endif
return count;
}
//15. Search: function ( void CHARACTER::RemoveSpecifyItem )
if (vnum >= 80003 && vnum <= 80007)
LogManager::instance().GoldBarLog(GetPlayerID(), GetInventoryItem(i)->GetID(), QUEST, "RemoveSpecifyItem");
if (count >= GetInventoryItem(i)->GetCount())
{
count -= GetInventoryItem(i)->GetCount();
GetInventoryItem(i)->SetCount(0);
if (0 == count)
return;
}
else
{
GetInventoryItem(i)->SetCount(GetInventoryItem(i)->GetCount() - count);
return;
}
}
//15. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
for (UINT i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if (NULL == GetUpgradeInventoryItem(i))
continue;
if (GetUpgradeInventoryItem(i)->GetVnum() != vnum)
continue;
if(m_pkMyShop)
{
bool isItemSelling = m_pkMyShop->IsSellingItem(GetUpgradeInventoryItem(i)->GetID());
if (isItemSelling)
continue;
}
if (count >= GetUpgradeInventoryItem(i)->GetCount())
{
count -= GetUpgradeInventoryItem(i)->GetCount();
GetUpgradeInventoryItem(i)->SetCount(0);
if (0 == count)
return;
}
else
{
GetUpgradeInventoryItem(i)->SetCount(GetUpgradeInventoryItem(i)->GetCount() - count);
return;
}
}
for (UINT i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if (NULL == GetBookInventoryItem(i))
continue;
if (GetBookInventoryItem(i)->GetVnum() != vnum)
continue;
if(m_pkMyShop)
{
bool isItemSelling = m_pkMyShop->IsSellingItem(GetBookInventoryItem(i)->GetID());
if (isItemSelling)
continue;
}
if (count >= GetBookInventoryItem(i)->GetCount())
{
count -= GetBookInventoryItem(i)->GetCount();
GetBookInventoryItem(i)->SetCount(0);
if (0 == count)
return;
}
else
{
GetBookInventoryItem(i)->SetCount(GetBookInventoryItem(i)->GetCount() - count);
return;
}
}
for (UINT i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
if (NULL == GetStoneInventoryItem(i))
continue;
if (GetStoneInventoryItem(i)->GetVnum() != vnum)
continue;
if(m_pkMyShop)
{
bool isItemSelling = m_pkMyShop->IsSellingItem(GetStoneInventoryItem(i)->GetID());
if (isItemSelling)
continue;
}
if (count >= GetStoneInventoryItem(i)->GetCount())
{
count -= GetStoneInventoryItem(i)->GetCount();
GetStoneInventoryItem(i)->SetCount(0);
if (0 == count)
return;
}
else
{
GetStoneInventoryItem(i)->SetCount(GetStoneInventoryItem(i)->GetCount() - count);
return;
}
}
#endif
//16. Search: function ( void CHARACTER::AutoGiveItem )
if (item->IsDragonSoul())
{
cell = GetEmptyDragonSoulInventory(item);
}
//16. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
{
cell = GetEmptyUpgradeInventory(item);
}
else if (item->IsBook())
{
cell = GetEmptyBookInventory(item);
}
else if (item->IsStone())
{
cell = GetEmptyStoneInventory(item);
}
#endif
//17. Search: function ( void CHARACTER::AutoGiveItem )
if (item->IsDragonSoul())
item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, cell));
//17. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
item->AddToCharacter(this, TItemPos(UPGRADE_INVENTORY, cell));
else if (item->IsBook())
item->AddToCharacter(this, TItemPos(BOOK_INVENTORY, cell));
else if (item->IsStone())
item->AddToCharacter(this, TItemPos(STONE_INVENTORY, cell));
#endif
//Search this is function:
LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg)
{
TItemTable * p = ITEM_MANAGER::instance().GetTable(dwItemVnum);
if (!p)
return NULL;
DBManager::instance().SendMoneyLog(MONEY_LOG_DROP, dwItemVnum, bCount);
if (p->dwFlags & ITEM_FLAG_STACKABLE && p->bType != ITEM_BLEND)
{
//Add under:
#ifdef ENABLE_SPECIAL_STORAGE
if (p->bType == ITEM_MATERIAL && p->bSubType == MATERIAL_LEATHER) //upgrade item
{
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM item = GetUpgradeInventoryItem(i);
if (!item)
continue;
if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item))
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(ITEM_MAX_COUNT - item->GetCount(), bCount);
bCount -= bCount2;
item->SetCount(item->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆŔĚĹŰ Čąµć: %s"), item->GetName());
return item;
}
}
}
}
else if (dwItemVnum == 50300) //book item
{
}
else if (p->bType == ITEM_METIN && p->bSubType == METIN_NORMAL) //stone item
{
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM item = GetStoneInventoryItem(i);
if (!item)
continue;
if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item))
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(ITEM_MAX_COUNT - item->GetCount(), bCount);
bCount -= bCount2;
item->SetCount(item->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆŔĚĹŰ Čąµć: %s"), item->GetName());
return item;
}
}
}
}
else
{
#endif
//Search this:
}
LPITEM item = ITEM_MANAGER::instance().CreateItem(dwItemVnum, bCount, 0, true);
//Add before:
#ifdef ENABLE_SPECIAL_STORAGE
}
#endif
//Search this:
LPITEM item = ITEM_MANAGER::instance().CreateItem(dwItemVnum, bCount, 0, true);
if (!item)
{
sys_err("cannot create item by vnum %u (name: %s)", dwItemVnum, GetName());
return NULL;
}
//Add under:
#ifdef ENABLE_SPECIAL_STORAGE
if (dwItemVnum == 50300)
{
for (int i = 0; i < SPECIAL_INVENTORY_MAX_NUM; ++i)
{
LPITEM book = GetBookInventoryItem(i);
if (!book)
continue;
if (book->GetVnum() == dwItemVnum && book->GetSocket(0) == item->GetSocket(0))
{
if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT))
{
if (bCount < p->alValues[1])
bCount = p->alValues[1];
}
BYTE bCount2 = MIN(ITEM_MAX_COUNT - book->GetCount(), bCount);
bCount -= bCount2;
book->SetCount(book->GetCount() + bCount2);
if (bCount == 0)
{
if (bMsg)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆŔĚĹŰ Čąµć: %s"), book->GetName());
M2_DESTROY_ITEM(item);
return book;
}
}
}
}
#endif
//Search this:
int iEmptyCell;
if (item->IsDragonSoul())
{
iEmptyCell = GetEmptyDragonSoulInventory(item);
}
//Add under:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
{
iEmptyCell = GetEmptyUpgradeInventory(item);
}
else if (item->IsBook())
{
iEmptyCell = GetEmptyBookInventory(item);
}
else if (item->IsStone())
{
iEmptyCell = GetEmptyStoneInventory(item);
}
#endif
//Search this:
if (item->IsDragonSoul())
item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
//Add under:
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsUpgradeItem())
{
item->AddToCharacter(this, TItemPos(UPGRADE_INVENTORY, iEmptyCell));
}
else if (item->IsBook())
{
item->AddToCharacter(this, TItemPos(BOOK_INVENTORY, iEmptyCell));
}
else if (item->IsStone())
{
item->AddToCharacter(this, TItemPos(STONE_INVENTORY, iEmptyCell));
}
#endif
//20. Search: function ( bool CHARACTER::IsValidItemPosition )
case DRAGON_SOUL_INVENTORY:
return cell < (DRAGON_SOUL_INVENTORY_MAX_NUM);
//20. Add after:
#ifdef ENABLE_SPECIAL_STORAGE
case UPGRADE_INVENTORY:
case BOOK_INVENTORY:
case STONE_INVENTORY:
return cell < (SPECIAL_INVENTORY_MAX_NUM);
#endif
really thanks someone help me!
-
Necesitas el botón partymatch en uiscript, tal vez te perdiste algo
ese archivo no viene en el sistema, así que intentaré crearlo really thanks!
-
Can you send me now the uiscript line where PartyMatchButton is defined.
Because it doesn't find "PartyMatchButton"
Sorry for late, this is my uiscript, (i add file) in uiscript i don't have partymatchbutton, only partymatchwindow
-
Hello everyone!, i need help some 1 error in my python.. I try to add search group system, this:
Bitte melden Sie sich an, um dieses Bild zu sehen.
but i have this error: MiniMap.LoadWindow.Bind - <type 'exceptions.KeyError'>:'PartyMatchButton'
actually i add function, uiscript, interfacemodule, locale, button function, it's fine, but don't work, someone can help me? really thx!: Triumph:((((
I need more code of the file and line where the errors comes.
Really thanks for your answer!, i add you the system and this it's my line in uiminimap.py
Code- self.MiniMapShowButton = self.GetChild("MiniMapShowButton")
- if app.PARTY_MATCH:
- self.group = self.GetChild("PartyMatchButton")
- self.group_effect = self.GetChild("PartyMatchEffect")
- if app.PARTY_MATCH:
- def open_party_match(self, ayar, index):
- if ayar == "1":
- self.group.Show()
- self.group_effect.Show()
- else:
- self.group.Hide()
- self.group_effect.Hide()
- self.aasindex = index
- def GroupSettings(self):
- import uipartymatch
- self.wndPartyMatch = uipartymatch.PartyMatchWindow()
- self.wndPartyMatch.Open2(self.aasindex)
(Although the code looks messy, it is because I skip lines, just so you see how I have it, also my uiminimap)
Really really thanks you for helpme! you are only the best.
PD: i'm fan 2pac nice potho, have a good day
-
Hello everyone!, i need help some 1 error in my python.. I try to add search group system, this:
Bitte melden Sie sich an, um dieses Bild zu sehen.
but i have this error: MiniMap.LoadWindow.Bind - <type 'exceptions.KeyError'>:'PartyMatchButton'
actually i add function, uiscript, interfacemodule, locale, button function, it's fine, but don't work, someone can help me? really thx!: Triumph:((((