Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 06:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Chat project source code

Discussion on Chat project source code within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2020
Posts: 86
Received Thanks: 18
Chat project source code

c#: AgentModule

case 0x180C:
var ItemName = INC_LOCAL[i].ReadUnicode();
byte[] ItemInfo = INC_LOCAL[i].ReadUInt8Array(0x1D0);
Packet itemlink = new Packet(0x180C);
itemlink.WriteAscii_Chinese(Charname + $"<{ItemName}>");
itemlink.WriteUInt8Array(ItemInfo);
Utils.BroadCastToClients(itemlink);
----------------------------------------
public void WriteAscii_Chinese(String value)
{
byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(value);
m_writer.Write((ushort)(bytes.Length + 1));
m_writer.Write(bytes);
m_writer.Write((byte)0);
---------------------------------------
C++=DLL

time_t lastClickTime;
LRESULT CALLBACK ImGui_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
BS_DEBUG_LOW("ImGui_WndProc");

// Check if context is already created
if (!ImGui::GetCurrentContext())
return RESULT_PASS;

ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam);
if (KEY_DOWN(VK_LCONTROL)) {
if (KEY_DOWN(VK_LBUTTON)&&(time(NULL)- lastClickTime>1)) {
lastClickTime = time(NULL);
if (!strcmp(g_CurrentIfUnderCursor->GetRuntimeClass()->m_lpszClassName, "CIFSlotWithHelp")) {
CIFSlotWithHelp* CurSlot = (CIFSlotWithHelp*)g_CurrentIfUnderCursor;
byte SlotID = CurSlot->UniqueID() - 100 + 0xD;
if (CurSlot->Type == 70 && CurSlot->ItemInfo) {
CIFChatViewer* chatView = (CIFChatViewer*)g_pCGInterface->m_IRM.GetResObj(1, 1);
if (CGlobalDataManager *g_datamanager = CGlobalDataManager::Get())
{
if (ObjectData *uqdata = g_datamanager->GetObjectData(CurSlot->ItemInfo->ItemID))
{
std::wstring NameStrID128 = g_CTextStringManager->GetStringByNameStrID(&uqdata->ObjNameStrID)->c_str();
wchar_t* NewMsg = new wchar_t[1024];
std::n_wstring ItemNameW = (NameStrID128).c_str();
UINT16 Size = ItemNameW.length();
CSOItem* myitem11=CurSlot->ItemInfo;
if (CIFMainMenu::GlobalLinkGUI->IsVisible())
{
wsprintfW(NewMsg, L"%s<%s>", CIFMainMenu::GlobalLinkGUI->m_edit->GetText(), NameStrID128.c_str());
CIFMainMenu::GlobalLinkGUI->m_edit->SetText(NewMsg);
CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(myitem11->GetObjectData()->AssocFileIcon,0,0);
}
else
{
wsprintfW(NewMsg, L"%s<%s>", chatView->m_InputBox->GetText(), NameStrID128.c_str());
chatView->m_InputBox->SetText(NewMsg);
chatView->SetFocus_MAYBE();
}
NEWMSG(0x180C)
pReq.Write(&Size, 2);
pReq.Write(NameStrID128.c_str(), Size * 2);
pReq << *CurSlot->ItemInfo;
SENDMSG()
} }

}
}
}

}

Shit files-those idiots sold them, I share them~~~

}
if (KEY_DOWN(VK_RBUTTON) && (time(NULL) - lastClickTime > 0)) {
lastClickTime = time(NULL);
if (!strcmp(g_CurrentIfUnderCursor->GetRuntimeClass()->m_lpszClassName, "CIFSlotWithHelp")) {
//??
CIFSlotWithHelp* CurSlot = (CIFSlotWithHelp*)g_CurrentIfUnderCursor;
int SlotID = CurSlot->UniqueID() - 100 + 0xD;
byte slotID2 = SlotID;

if (CurSlot->Type == 70 && CurSlot->ItemInfo) {
NEWMSG(0x180B)
pReq << SlotID << CurSlot->ItemInfo->ItemID;
SENDMSG()
}
if (CurSlot->ItemInfo && (CurSlot->ItemInfo->ItemID == 3851 ||CurSlot->ItemInfo->ItemID == 35592 ||CurSlot->ItemInfo->ItemID == 33887))
{
CIFMainMenu::GlobalLinkGUI->ShowGWnd(true);
CIFMainMenu::GlobalLinkGUI->BringToFront();
CIFMainMenu::GlobalLinkGUI->m_edit->SetFocus_MAYBE();
CIFGlobalLink::SetSlotID(slotID2);
}

}
}

所有代码需要的自己测试
ASKSRO_1 is offline  
Thanks
4 Users
Old 12/16/2021, 05:45   #2
 
elite*gold: 0
Join Date: Dec 2021
Posts: 16
Received Thanks: 5
Thanks bro, but still need The GlobalItemLinkGUI could you share it ?
UnkownW is offline  
Old 12/28/2021, 13:54   #3
 
elite*gold: 0
Join Date: Dec 2021
Posts: 16
Received Thanks: 5
Ok, your code is a 10% of the global chat item link ))
UnkownW is offline  
Old 12/31/2021, 04:18   #4
 
elite*gold: 0
Join Date: Apr 2016
Posts: 289
Received Thanks: 67
Quote:
Originally Posted by UnkownW View Post
Ok, your code is a 10% of the global chat item link ))
Brain is very useful, have you tried it?
We respect anything in this community. Share to grow together!
hoangphan7 is offline  
Old 01/02/2022, 19:56   #5
 
elite*gold: 0
Join Date: Dec 2021
Posts: 16
Received Thanks: 5
Quote:
Originally Posted by hoangphan7 View Post
Brain is very useful, have you tried it?
We respect anything in this community. Share to grow together!
Hahaha, When I said that it's the 10% of the code, i already done it(DevLegendery Helped me a lot with sharing code), I know that's my brain.exe is useful, I already done the reverse and global link by brain.exe and help of elitepvpers community and my friends.
UnkownW is offline  
Reply


Similar Threads Similar Threads
Chat project source code
09/22/2021 - SRO Coding Corner - 2 Replies
I plan to share him!



All times are GMT +1. The time now is 06:16.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.