Guest Ezrekith Posted October 20, 2017 Share Posted October 20, 2017 (edited) Hi folks! Client source: //ClientSide - Userinterface/Packet.h //Add this after the includes if you don't have: #include "Locale_inc.h" //Search for: HEADER_CG_ITEM_DROP2 = 20, //Add under: #ifdef ENABLE_REMOVE_PACKET HEADER_CG_ITEM_DESTROY = 21, #endif //Search for: } TPacketCGItemDrop2; //Add under: #ifdef ENABLE_REMOVE_PACKET typedef struct command_item_destroy { BYTE header; TItemPos pos; } TPacketCGItemDestroy; #endif //ClientSide - Userinterface/PythonNetworkStreamPhaseGameItem.cpp //Add this after the includes if you don't have: #include "Locale_inc.h" //Search for: bool CPythonNetworkStream::SendItemDropPacketNew(TItemPos pos, DWORD elk, DWORD count) //After the definition of SendItemDropPacketNew add under: #ifdef ENABLE_REMOVE_PACKET bool CPythonNetworkStream::SendItemDestroyPacket(TItemPos pos) { if (!__CanActMainInstance()) return true; TPacketCGItemDestroy itemDestroyPacket; itemDestroyPacket.header = HEADER_CG_ITEM_DESTROY; itemDestroyPacket.pos = pos; if (!Send(sizeof(itemDestroyPacket), &itemDestroyPacket)) { Tracen("SendItemDestroyPacket Error"); return false; } return SendSequence(); } #endif //ClientSide - Userinterface/PythonNetworkStreamModule.cpp //Add this after the includes if you don't have: #include "Locale_inc.h" //Search for: PyObject* netSendItemDropPacket(PyObject* poSelf, PyObject* poArgs) //After the definition of netSendItemDropPacket add under: #ifdef ENABLE_REMOVE_PACKET PyObject* netSendItemDestroyPacket(PyObject* poSelf, PyObject* poArgs) { TItemPos Cell; if (!PyTuple_GetInteger(poArgs, 0, &Cell.cell)) return Py_BuildException(); CPythonNetworkStream& rkNetStream = CPythonNetworkStream::Instance(); rkNetStream.SendItemDestroyPacket(Cell); return Py_BuildNone(); } #endif //Search for this: { "SendItemDropPacketNew", netSendItemDropPacketNew, METH_VARARGS }, //Add under: #ifdef ENABLE_REMOVE_PACKET { "SendItemDestroyPacket", netSendItemDestroyPacket, METH_VARARGS }, #endif //ClientSide - Userinterface/PythonNetworkStream.h //Add this after the includes if you don't have: #include "Locale_inc.h" //Search for: bool SendItemDropPacketNew(TItemPos pos, DWORD elk, DWORD count); //Add under: #ifdef ENABLE_REMOVE_PACKET bool SendItemDestroyPacket(TItemPos pos); #endif //ClientSide - Userinterface/PythonApplicationModule.cpp //Add this after the includes if you don't have: #include "Locale_inc.h" //Search for: PyModule_AddIntConstant(poModule, "CAMERA_STOP", CPythonApplication::CAMERA_STOP); //Add under: #ifdef ENABLE_REMOVE_PACKET PyModule_AddIntConstant(poModule, "DELETE_ITEM_PACKET", 1); #else PyModule_AddIntConstant(poModule, "DELETE_ITEM_PACKET", 0); #endif //ClientSide - Userinterface/Locale_inc.h //Add this: #define ENABLE_REMOVE_PACKET Server source: //Serverside - game/Packet.h //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: HEADER_CG_ITEM_DROP2 = 20, //Add under: #ifdef ENABLE_REMOVE_PACKET HEADER_CG_ITEM_DESTROY = 21, #endif //Search for: } TPacketCGItemDrop2; //Add Under: #ifdef ENABLE_REMOVE_PACKET typedef struct command_item_destroy { BYTE header; TItemPos Cell; } TPacketCGItemDestroy; #endif //Serverside - game/Packet_info.cpp //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: Set(HEADER_CG_ITEM_DROP2, sizeof(TPacketCGItemDrop2), "ItemDrop2", true); //Add under: #ifdef ENABLE_REMOVE_PACKET Set(HEADER_CG_ITEM_DESTROY, sizeof(TPacketCGItemDestroy), "ItemDestroy", true); #endif //Serverside - game/Input_main.cpp //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: void CInputMain::ItemDrop2(LPCHARACTER ch, const char * data) //After the definition of ItemDrop2 add this: #ifdef ENABLE_REMOVE_PACKET void CInputMain::ItemDestroy(LPCHARACTER ch, const char * data) { struct command_item_destroy * pinfo = (struct command_item_destroy *) data; if (ch) ch->DestroyItem(pinfo->Cell); } #endif //Search for: case HEADER_CG_ITEM_DROP2: //Add under: #ifdef ENABLE_REMOVE_PACKET case HEADER_CG_ITEM_DESTROY: if (!ch->IsObserverMode()) ItemDestroy(ch, c_pData); break; #endif //Serverside - game/Char.cpp //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) //After the definition of DropItem add this: #ifdef ENABLE_REMOVE_PACKET bool CHARACTER::DestroyItem(TItemPos Cell) { LPITEM item = NULL; if (!CanHandleItem()) { if (NULL != DragonSoul_RefineWindow_GetOpener()) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("°*E*AcA» ?¬ »óAÂ?!1*´Â 3AAIAUA» ?A±a 1ö 3o1A´I´U.")); return false; } if (IsDead()) return false; if (!IsValidItemPosition(Cell) || !(item = GetItem(Cell))) return false; if (item->IsExchanging()) return false; if (true == item->isLocked()) return false; if (quest::CQuestManager::instance().GetPCForce(GetPlayerID())->IsRunning() == true) return false; if (item->GetCount() <= 0) return false; SyncQuickslot(QUICKSLOT_TYPE_ITEM, Cell.cell, 255); ITEM_MANAGER::instance().RemoveItem(item); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Du hast %s zerstoert."), item->GetName()); return true; } #endif //Serverside - game/Char.h //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: bool DropItem(TItemPos Cell, BYTE bCount=0); //Add Under: #ifdef ENABLE_REMOVE_PACKET bool DestroyItem(TItemPos Cell); #endif //Serverside - game/Input.h //Add this after the includes if you don't have: #include "../../common/service.h" //Search for: void ItemDrop2(LPCHARACTER ch, const char * data); //Add Under: #ifdef ENABLE_REMOVE_PACKET void ItemDestroy(LPCHARACTER ch, const char * data); #endif //Serverside - common/service.h //Add this: #define ENABLE_REMOVE_PACKET Python: #root/uiCommon.py #Search for: class QuestionDialog(ui.ScriptWindow): #Add this above: if app.DELETE_ITEM_PACKET: class QuestionDialogItem(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) self.__CreateDialog() def __del__(self): ui.ScriptWindow.__del__(self) def __CreateDialog(self): pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, "uiscript/newquestiondialogitem.py") self.board = self.GetChild("board") self.textLine = self.GetChild("message") self.acceptButton = self.GetChild("accept") self.destroyButton = self.GetChild("destroy") self.cancelButton = self.GetChild("cancel") def Open(self): self.SetCenterPosition() self.SetTop() self.Show() def Close(self): self.Hide() def SetWidth(self, width): height = self.GetHeight() self.SetSize(width, height) self.board.SetSize(width, height) self.SetCenterPosition() self.UpdateRect() def SAFE_SetAcceptEvent(self, event): self.acceptButton.SAFE_SetEvent(event) def SAFE_SetCancelEvent(self, event): self.cancelButton.SAFE_SetEvent(event) def SetAcceptEvent(self, event): self.acceptButton.SetEvent(event) def SetDestroyEvent(self, event): self.destroyButton.SetEvent(event) def SetCancelEvent(self, event): self.cancelButton.SetEvent(event) def SetText(self, text): self.textLine.SetText(text) def SetAcceptText(self, text): self.acceptButton.SetText(text) def SetCancelText(self, text): self.cancelButton.SetText(text) def OnPressEscapeKey(self): self.Close() return TRUE #root/game.py #Search for this: def __DropItem(self, attachedType, attachedItemIndex, attachedItemSlotPos, attachedItemCount): #After that Search for this: itemDropQuestionDialog = uiCommon.QuestionDialog() #Replace with: if app.DELETE_ITEM_PACKET: itemDropQuestionDialog = uiCommon.QuestionDialogItem() else: itemDropQuestionDialog = uiCommon.QuestionDialog() #Search for this: itemDropQuestionDialog.SetAcceptEvent(lambda arg=TRUE: self.RequestDropItem(arg)) #Add under: if app.DELETE_ITEM_PACKET: itemDropQuestionDialog.SetDestroyEvent(lambda arg=TRUE: self.RequestDestroyItem(arg)) #Search for this: def RequestDropItem(self, answer): #After the definition of RequestDropItem add under: if app.DELETE_ITEM_PACKET: def RequestDestroyItem(self, answer): if not self.itemDropQuestionDialog: return if answer: dropType = self.itemDropQuestionDialog.dropType dropNumber = self.itemDropQuestionDialog.dropNumber if player.SLOT_TYPE_INVENTORY == dropType: if dropNumber == player.ITEM_MONEY: return else: self.__SendDestroyItemPacket(dropNumber) self.itemDropQuestionDialog.Close() self.itemDropQuestionDialog = None constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0) #Search for: def __SendDropItemPacket(self, itemVNum, itemCount, itemInvenType = player.INVENTORY): #After the definition of __SendDropItemPacket add under: if app.DELETE_ITEM_PACKET: def __SendDestroyItemPacket(self, itemVNum, itemInvenType = player.INVENTORY): if uiPrivateShopBuilder.IsBuildingPrivateShop(): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.DROP_ITEM_FAILURE_PRIVATE_SHOP) return net.SendItemDestroyPacket(itemVNum) #locale/ui/locale_interface.txt #Add this: DESTROY Destroy uiscript.rar Edited October 20, 2017 by Ezrekith Link to comment Share on other sites More sharing options...
F-Caneiras Posted February 2, 2019 Share Posted February 2, 2019 (edited) Thanks for sharing Edited February 8, 2019 by Caneiras Link to comment Share on other sites More sharing options...
viperkit Posted April 15, 2019 Share Posted April 15, 2019 Thxx Link to comment Share on other sites More sharing options...
LuizFernando Posted April 16, 2019 Share Posted April 16, 2019 Boa!! Link to comment Share on other sites More sharing options...
Injector Posted April 27, 2019 Share Posted April 27, 2019 still works? Link to comment Share on other sites More sharing options...
DevGames Posted November 23, 2019 Share Posted November 23, 2019 screeen shot? Link to comment Share on other sites More sharing options...
rammad916 Posted November 28, 2019 Share Posted November 28, 2019 txx Link to comment Share on other sites More sharing options...
nãoéstu Posted February 29, 2020 Share Posted February 29, 2020 ;) Link to comment Share on other sites More sharing options...
Marcos Daniel Posted February 29, 2020 Share Posted February 29, 2020 Ty Link to comment Share on other sites More sharing options...
nãoéstu Posted March 1, 2020 Share Posted March 1, 2020 (edited) Alguém que tenha conseguido? Possuo erro no game.py... Syserr: 0301 01:54:16164 :: Traceback (most recent call last): 0301 01:54:16164 :: File "networkModule.py", line 237, in SetGamePhase 0301 01:54:16164 :: File "system.py", line 177, in __hybrid_import 0301 01:54:16164 :: File " 0301 01:54:16164 :: game.py 0301 01:54:16164 :: ", line 0301 01:54:16164 :: 1444 0301 01:54:16164 :: 0301 01:54:16164 :: 0301 01:54:16164 :: if app.DELETE_ITEM_PACKET: 0301 01:54:16164 :: IndentationError 0301 01:54:16164 :: : 0301 01:54:16164 :: unindent does not match any outer indentation level Edited March 1, 2020 by nãoéstu Link to comment Share on other sites More sharing options...
Nukayool Posted March 17, 2020 Share Posted March 17, 2020 Bom conteudo! Link to comment Share on other sites More sharing options...
M2 Supp Posted April 30, 2020 Share Posted April 30, 2020 Nice Link to comment Share on other sites More sharing options...
Lorex2 Posted August 4, 2020 Share Posted August 4, 2020 teşekkürler Link to comment Share on other sites More sharing options...
mertozandugan Posted September 4, 2020 Share Posted September 4, 2020 Thanks Link to comment Share on other sites More sharing options...
TWIX Posted September 5, 2020 Share Posted September 5, 2020 Thanks Link to comment Share on other sites More sharing options...
Fenix Posted September 30, 2020 Share Posted September 30, 2020 ... Link to comment Share on other sites More sharing options...
Stephanie Posted October 17, 2020 Share Posted October 17, 2020 Link to comment Share on other sites More sharing options...
lxMyth Posted April 14, 2021 Share Posted April 14, 2021 . Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now