Register for your free account! | Forgot your password?

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

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

Advertisement



Show notifications via dll

Discussion on Show notifications via dll within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 117
Show notifications via dll

i'm trying add to dll , but crash .
what wrong ?
thx for any help
Code:
	const DWORD Blue = 0x0077B580;
	const DWORD Blue2 = 0x008C9C30;
	const DWORD Blue3 = 0x00EEDE90;

	void Game::Blue(const wchar_t* msg)
	{
		void* _ecx = SroPP::detail::MemoryHack::RefPtr<void*>(0x110F80C);
		__asm
		{
			push msg;
			mov ecx, Blue3;
			call Blue2;
			mov ecx, _ecx;
			push eax;
			call Blue;
		}
	}
sonzenbi is offline  
Old 05/05/2020, 23:33   #2
 
elite*gold: 1792
Join Date: Mar 2010
Posts: 562
Received Thanks: 226
PHP Code:
void CGInterface::ShowPinkNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x00777BF0)(thismsg);
}

void CGInterface::ShowBlueNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(thismsg);
}

void CGInterface::ShowGreenNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B5B0)(thismsg);

PHP Code:
    void ShowPinkNotify(std::wstringmsg);
    
void ShowBlueNotify(std::wstringmsg);
    
void ShowGreenNotify(std::wstringmsg); 
Laag#82 is offline  
Thanks
1 User
Old 05/06/2020, 00:28   #3
 
elite*gold: 0
Join Date: Apr 2016
Posts: 201
Received Thanks: 47
Quote:
Originally Posted by khaleed2010 View Post
PHP Code:
void CGInterface::ShowPinkNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x00777BF0)(thismsg);
}

void CGInterface::ShowBlueNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B580)(thismsg);
}

void CGInterface::ShowGreenNotify(std::wstringmsg)
{
    
reinterpret_cast<void(__thiscall *)(CGInterface*, std::wstring*)>(0x0077B5B0)(thismsg);

PHP Code:
    void ShowPinkNotify(std::wstringmsg);
    
void ShowBlueNotify(std::wstringmsg);
    
void ShowGreenNotify(std::wstringmsg); 
@ebi you may find @ 's
interesting
Piskota is offline  
Thanks
1 User
Old 05/06/2020, 06:46   #4
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 117
thanks for helping me, but i want to know something wrong with my code .
sonzenbi is offline  
Old 05/06/2020, 08:52   #5
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,465
Quote:
Originally Posted by sonzenbi View Post
thanks for helping me, but i want to know something wrong with my code .
The code doesn't look wrong, just not pretty.

Blue = CGInterface::ShowMessage_Warning
Blue2 = CTextStringManager::GetString
Blue3 = g_CTextStringManager
_ecx = g_pCGInterface

Code:
push msg;
mov ecx, g_tsm;
call GetString;
mov ecx, g_interface;
push eax;
call ShowMessage_Warning;
1. How are you calling it? What string are you putting into it? GetString only works for these UIIT_BLAH_BLAH-translation-tokens.

2. Can you run it in a debugger and check where it crashes (address and stack)?
florian0 is offline  
Thanks
1 User
Old 05/06/2020, 11:00   #6
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 117
Quote:
Originally Posted by florian0 View Post
The code doesn't look wrong, just not pretty.

Blue = CGInterface::ShowMessage_Warning
Blue2 = CTextStringManager::GetString
Blue3 = g_CTextStringManager
_ecx = g_pCGInterface

Code:
push msg;
mov ecx, g_tsm;
call GetString;
mov ecx, g_interface;
push eax;
call ShowMessage_Warning;
1. How are you calling it? What string are you putting into it? GetString only works for these UIIT_BLAH_BLAH-translation-tokens.

2. Can you run it in a debugger and check where it crashes (address and stack)?
Sadly, I have no knowledge of C ++ maybe a little bit
The only thing I can do was try again and again
I sent the source code to you via private messenger, it would be better if you see it.
Thank you for spending the time helping me
sonzenbi is offline  
Old 05/06/2020, 12:21   #7
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,465
GetString only works with these UIIT_BLAH_BLAH. You are passing a string that should be displayed to it. Thats not going to work.

Code:
const wchar_t* killmsg = Convert(" [ " + killname + " ] " + " §ˇ KŐt LiÔu " + " [ " + Mobname + " ] ");
SroPP::Game::Blue((killmsg));
If the string given to GetString is not found in the translation database, an empty string is returned. But that shouldn't crash your client. No idea why it happens unless you open your client in x32dbg and check where it crashes.

Anyhow: ShowMessage_Warning expects a std::wstring in VC80's ABI format. You need to put your message into that structure and pass it to ShowMessage_Warning. Using GetString is not going work for you in this case.
florian0 is offline  
Thanks
1 User
Old 05/06/2020, 16:33   #8
 
sonzenbi's Avatar
 
elite*gold: 0
Join Date: Feb 2017
Posts: 186
Received Thanks: 117
It seems, i'm having trouble with the basic knowledge
I will try to take advantage of your suggestions
sonzenbi is offline  
Old 05/06/2020, 18:46   #9
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,465
Quote:
Originally Posted by sonzenbi View Post
It seems, i'm having trouble with the basic knowledge
I will try to take advantage of your suggestions
I made a guide for handling strings in Silkroad:

Maybe this helps you understanding strings.
florian0 is offline  
Thanks
3 Users
Reply


Similar Threads Similar Threads
Show in-game notifications - by writing code
07/28/2022 - SRO Hacks, Bots, Cheats & Exploits - 15 Replies
Hello beloved, dead community, i recently achieved something i want to share with you. Video demonstration: https://www.youtube.com/watch?v=AEr1UM2_Tjk Behind the scenes: https://florian0.wordpress.com/2017/12/07/silkroad -online-simple-access-to-ui-elements/ Sending notifications by code
[HOW TO] MSVCR110.dll fehlt BEHEBEN | [MSVCR120.dll MSVCP110.dll MSVCP100.dll etc]
03/25/2014 - Tutorials - 2 Replies
Hier ist ein Youtube Video: MSVCR100.dll feht BEHEBEN / MSVCR110.dll fehlt MSVCR120.dll MSVCP110.dll MSVCP100.dll MSVCP120.dll - YouTube Aber den ganzen Kram könnt ihr auch als Text haben: Viele von euch kennen bestimmt das Problem das ne dll auf dem PC fehlt und das Programme dann nicht laufen. Hier ist die Lösung: Schaut erstmal nach, welche Microsoft Redistributables auf eurem PC installiert sind. Geht hierzu auf Start > Sytemsteuerung > Programme > Programme und Funktionen und...



All times are GMT +2. The time now is 23:00.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.