-
Posts
54 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by cjunior2011
-
-
On 6/7/2019 at 11:18 PM, cjunior2011 said:
@Mali61 i have a problem with v2
error:
0607 23:00:06787 :: ui:2291: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 0607 23:00:06789 :: uiInventory.py(line:519) __LoadWindow uiToolTip.py(line:514) AppendTextLine uiToolTip.py(line:207) AppendTextLine uiToolTip.py(line:243) ResizeToolTip ui.py(line:2291) SetSize InventoryWindow.LoadWindow.BindObject - <type 'exceptions.RuntimeError'>:Not yet select item data 0607 23:00:06789 :: ============================================================================================================ 0607 23:00:06789 :: Abort!!!!
up
-
Hello again,
I got tips from all the answers and my final code was this:
elif itemType == item.ITEM_TYPE_COSTUME and itemSubType == item.COSTUME_TYPE_MOUNT: MountVnum = item.GetValue(1) if MountVnum != 0: self.__ModelPreview(itemVnum, 2, MountVnum)
Thanks to all who responded, great day!
#Solved
-
15 hours ago, ѕeмa™ said:
You must send the vnum of the mount.
I dont know if you save that value in Value4 but as i see in your gif is not working.
Maybe you should try to make a dictionary with the vnum of the seals and the mount vnum, i know is not the best solution, but it could work.
Example:
PetsAndMounts = { 53001 : 34001, 53002 : 34002, 53003 : 34003, 53005 : 34004, }
if PetsAndMounts.has_key(itemVnum): renderTarget.SelectModel(2, PetsAndMounts[itemVnum])
I hope this can help you.
I edited his code to look like the code that is already working on costumes and armor and it looks like this:
PetsAndMounts = { 71186 : 20249, } if PetsAndMounts.has_key(itemVnum): self.__ModelPreview(itemVnum, 2, PetsAndMounts[itemVnum])
result.. that's work!!
but is it possible to improve this code so I do not have to add all mounts manually?
btw ty for de help! -
15 hours ago, ѕeмa™ said:
You must send the vnum of the mount.
I dont know if you save that value in Value4 but as i see in your gif is not working.
Maybe you should try to make a dictionary with the vnum of the seals and the mount vnum, i know is not the best solution, but it could work.
Example:
PetsAndMounts = { 53001 : 34001, 53002 : 34002, 53003 : 34003, 53005 : 34004, }
if PetsAndMounts.has_key(itemVnum): renderTarget.SelectModel(2, PetsAndMounts[itemVnum])
I hope this can help you.
my mount system protos with npc nvum value0, right?
Spoiler[...] ADDON_VALUE2 VALUE0 VALUE1 VALUE2 VALUE3 VALUE4 VALUE5 Specular SOCKET ATTU_ADDON
[...] 28800 20114 0 0 0 0 0 0 0 07 hours ago, Meruem said:if you use mounts by value it is better that way.
elif itemType == item.ITEM_TYPE_COSTUME and itemSubType == item.COSTUME_TYPE_MOUNT:
MountVnum = item.GetValue(3)
if MountVnum != 0:
self._ModelPreview(MountVnum )
if not, use the style of the code that showed if you want something better in tec post the complete code.
btw this dont work, nothing happen
-
I have a problem to show the rendering only seals of mounts and pets please
i try this:
elif item.ITEM_TYPE_COSTUME == itemType: if itemSubType == item.COSTUME_TYPE_MOUNT: MountVnum = item.GetValue(4) if MountVnum != 0: self.__ModelPreview(MountVnum)
and this:
elif item.GetItemType() == item.ITEM_COSTUME: if item.GetItemSubType() == item.COSTUME_TYPE_MOUNT: MountVnum = item.GetValue(4) if MountVnum != 0: self.__ModelPreview(MountVnum)
but nothing happen:
-
This worked without any problem, nice work dude, thanks!
Spoiler -
Move this line 1542:
void RegisterGlobalFunctionTable(lua_State* L)
to before this 1620:
{ extern int quest_setstate(lua_State* L); luaL_reg global_functions[] = { { "sys_err", _syserr }, { "sys_log", _syslog }, { "char_log", _char_log }, { "item_log", _item_log }, { "set_state", quest_setstate }, { "set_skin", _set_skin },
like this:
Spoiler//[...] } int _mysql_direct_query(lua_State* L) { // char szQuery[1024]; if (!lua_isstring(L, 1)) //[...] else { lua_pushnumber(L, 0); lua_newtable(L); } // delete pMsg; return 2; } void RegisterGlobalFunctionTable(lua_State* L) { extern int quest_setstate(lua_State* L); luaL_reg global_functions[] = { { "sys_err", _syserr }, { "sys_log", _syslog }, { "char_log", _char_log }, { "item_log", _item_log }, { "set_state", quest_setstate }, //[...]
- 2
-
-
-
-
-
-
-
@Mali61 i have a problem with v2
error:
Spoiler0607 23:00:06787 :: ui:2291: RuntimeWarning: tp_compare didn't return -1 or -2 for exception 0607 23:00:06789 :: uiInventory.py(line:519) __LoadWindow uiToolTip.py(line:514) AppendTextLine uiToolTip.py(line:207) AppendTextLine uiToolTip.py(line:243) ResizeToolTip ui.py(line:2291) SetSize InventoryWindow.LoadWindow.BindObject - <type 'exceptions.RuntimeError'>:Not yet select item data 0607 23:00:06789 :: ============================================================================================================ 0607 23:00:06789 :: Abort!!!!
code:
Spoilersyserr codes:
Spoiler-
what did I do wrong?
- 1
-
21 hours ago, IShungite said:
Try :
def Close(self):
chat.ClearWhisper(self.targetName)if app.ENABLE_WHISPER_RENEWAL:
if self.targetName != 0:
if whisper.IsSended(self.targetName) and self.targetName:
whisper.Remove(self.targetName)#Solved
thank u very much, its solved my problem, @IShungite- 1
-
On 5/25/2019 at 12:00 AM, jeddawee said:
there is other soulbind system with different coding , search for it
i suggest you to delete this system and install the other one
this problem happens with any item after restarting the server, I think it is not because of the soulbind system, I need to do some tests without enabling the system and testing with clean files without any system, thank you anyway!
-
try:
service mysql-server status
and verify that mysql is running
-
Even though it does not change anything, due to the error it is displaying, it is due to an incorrect password.
Test the same id and password set in navicat.- 1
-
-
what's wrong?
Spoilercode:
Spoiler -
3 hours ago, OtherChoice said:
Honestly I can't really figure out whats wrong here I'm sorry man but everything should work fine
All right, thank you anyway!
-
9 hours ago, OtherChoice said:
please show this struct of your client binary (or the second one in case you client uses it). You can check whether is used in bool CPythonNetworkStream::RecvSafeBoxSetPacket() (PythonNetworkStreamPhaseGame.cpp)
typedef struct packet_set_item { BYTE header; TItemPos Cell; DWORD vnum; BYTE count; long alSockets[CItemData::ITEM_SOCKET_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; } TPacketGCItemSet; typedef struct packet_set_item2 { BYTE header; TItemPos Cell; DWORD vnum; BYTE count; DWORD flags; // Ç÷¡±× Ãß°¡ DWORD anti_flags; // Ç÷¡±× Ãß°¡ bool highlight; long alSockets[CItemData::ITEM_SOCKET_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; } TPacketGCItemSet2;
from server/common in tables.h show
typedef struct SPlayerItem { DWORD id; BYTE window; WORD pos; DWORD count; DWORD vnum; long alSockets[ITEM_SOCKET_MAX_NUM]; // 소켓번호 TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM]; DWORD owner; } TPlayerItem;
and from client binary in GameType.h show
typedef struct packet_item { DWORD vnum; BYTE count; DWORD flags; DWORD anti_flags; long alSockets[CItemData::ITEM_SOCKET_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; } TItemData;
Spoilertypedef struct packet_set_item { BYTE header; BYTE pos; DWORD vnum; BYTE count; DWORD flags; // 플래그 추가 long alSockets[ITEM_SOCKET_SLOT_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; #ifdef ENABLE_SOULBIND_SYSTEM long sealbind; #endif } TPacketGCItemSet; typedef struct packet_set_item2 { BYTE header; TItemPos Cell; DWORD vnum; BYTE count; DWORD flags; // 플래그 추가 DWORD anti_flags; // 플래그 추가 bool highlight; long alSockets[ITEM_SOCKET_SLOT_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; #ifdef ENABLE_SOULBIND_SYSTEM long sealbind; #endif } TPacketGCItemSet2;
Spoilertypedef struct SPlayerItem { DWORD id; BYTE window; WORD pos; DWORD count; DWORD vnum; long alSockets[ITEM_SOCKET_MAX_NUM]; // 소켓번호 TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM]; DWORD owner; #ifdef ENABLE_SOULBIND_SYSTEM long sealbind; #endif } TPlayerItem;
Spoilertypedef struct packet_item { DWORD vnum; BYTE count; DWORD flags; DWORD anti_flags; long alSockets[ITEM_SOCKET_SLOT_MAX_NUM]; TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM]; #ifdef ENABLE_SOULBIND_SYSTEM long sealbind; #endif } TItemData;
CPythonNetworkStream::RecvSafeBoxSetPacket(): PythonNetworkStreamPhaseGameItem.cpp*
Spoilerbool CPythonNetworkStream::RecvSafeBoxSetPacket() { TPacketGCItemSet2 kItemSet; if (!Recv(sizeof(kItemSet), &kItemSet)) return false; TItemData kItemData; kItemData.vnum = kItemSet.vnum; kItemData.count = kItemSet.count; kItemData.flags = kItemSet.flags; kItemData.anti_flags = kItemSet.anti_flags; for (int isocket=0; isocket<ITEM_SOCKET_SLOT_MAX_NUM; ++isocket) kItemData.alSockets[isocket] = kItemSet.alSockets[isocket]; for (int iattr=0; iattr<ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++iattr) kItemData.aAttr[iattr] = kItemSet.aAttr[iattr]; #ifdef ENABLE_SOULBIND_SYSTEM kItemData.sealbind = kItemSet.sealbind; #endif CPythonSafeBox::Instance().SetItemData(kItemSet.Cell.cell, kItemData); __RefreshSafeboxWindow(); return true; }
-
On 5/8/2019 at 11:24 AM, WeedHex said:
It's like official.
Item block = Can't go out from the ACCOUNT -> not just from char.
Btw if you want to block there too:
File: input_main.cpp
Find for: "void CInputMain::SafeboxCheckin"
Find this if: "if (true == pkItem->isLocked())"
Add this new check after:
#ifdef ENABLE_SOULBIND_SYSTEM
if (pkItem->IsBind() || pkItem->IsUntilBind())
{
ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
return;
}
#endifNew problem
after reset server items equiped or with bind they looked like this:
equiped item:
https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif
item that was bind / bound / blocked:
https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif
any solution or is it normal to lose the bind after resetting the server?
-
11 hours ago, OtherChoice said:
Did you tried getting back the item from the storage? does it get binding back or is it still lost?
when I take the item out of the warehouse, it continues without the bind/lock.
2 hours ago, WeedHex said:It's like official.
Item block = Can't go out from the ACCOUNT -> not just from char.
Btw if you want to block there too:
File: input_main.cpp
Find for: "void CInputMain::SafeboxCheckin"
Find this if: "if (true == pkItem->isLocked())"
Add this new check after:
#ifdef ENABLE_SOULBIND_SYSTEM
if (pkItem->IsBind() || pkItem->IsUntilBind())
{
ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
return;
}
#endifI'll test this, thx.
edit: I adapted your code to my system and it worked perfectly, thank you @OtherChoice and @WeedHex! #SOLVED
#ifdef ENABLE_SOULBIND_SYSTEM if (pkItem->IsSealed()) { ch->ChatPacket(CHAT_TYPE_INFO, "Can't put sealed items in the warehouse"); return; } #endif
Sort Inventory
in Features & Metin2 Systems
Posted
i have this same problem