Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 13:06

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

Advertisement



[Release] Functions SendMsg - Halloween Gift

Discussion on [Release] Functions SendMsg - Halloween Gift within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
[Release] Functions SendMsg - Halloween Gift

Hello friends

MsgStreamBuffer, Functions To Use:


PHP Code:
#pragma once

#include <new>
#include <string>

class CMsgStreamBuffer
{
protected:
    
struct SMsgStreamNode
    
{
        
SMsgStreamNode *next_node//0x0000
        
char N00012EE8[4096]; //0x0004
        
char *N00012EE9//0x1004
        
char pad_1008[4]; //0x1008

        
SMsgStreamNode()
        {
            
next_node 0;
            
N00012EE9 = &N00012EE8[0];
        }

        
voidoperator new(std::size_t sz)
        {
            return 
reinterpret_cast<void*(__thiscall*)(int)>(0x425400)(0x00EECD98);
        }
    }; 
//Size: 0x100C


public:
    
CMsgStreamBuffer(short msgid)
        : 
msgid(msgid), field3(0), _begin(0), _end(0)
    {
        
buffer node_current = new SMsgStreamNode;
    }

    
virtual ~CMsgStreamBuffer()
    {
        
/*
        CheckMsgNotCompletelyUsed();

        while (node_current) {
            SMsgStreamNode *node = node_current;
            node_current = node_current->next_node;

            delete node;
            node->next_node = 0xFEEEFEEE;
        }
        */

        
reinterpret_cast<void(__thiscall*)(CMsgStreamBuffer*)>(0x005097A0)(this);
    }


    
void FlushRemaining()
    {
        
_begin _end;
    }

    
template <typename T>
    
CMsgStreamBufferoperator>>(Tvalue)
    {
        
Read(value);
        return *
this;
    }


    
template <typename T>
    
void Read(Tvalue)
    {
        
Read(&valuesizeof(T));
    }


    
void Read(voidvaluesize_t numBytes)
    {
        
reinterpret_cast<void(__thiscall*)(CMsgStreamBuffer*, void*, size_t)>(0x004F7220)(thisvaluenumBytes);

#if 0
        
if ((buffer_end current_buffer_ptr) < numBytes)
        {
            
requireBytes(numBytes);
        }

        
// Copy bytes
        
memcpy(valuecurrent_buffer_ptrnumBytes);

        
// Move buffer forward
        
current_buffer_ptr += numBytes;
#endif
    
}



    
/*
     *++++++ WRITE +++++++++++++
     */

    
template <typename T>
    
void Write(const T* const datasize_t size)
    {
        
reinterpret_cast<void(__thiscall*)(CMsgStreamBuffer*, const void* const, size_t)>(0x00508FE0)(thisreinterpret_cast<const void* const>(data), size);
    }

    
template <typename T>
    
void Write(const Tvalue)
    {
        
Write(&valuesizeof(T));
    }

    
template <typename T>
    
CMsgStreamBufferoperator<<(const Tvalue)
    {
        
Write(value);
        return *
this;
    }

    
CMsgStreamBufferoperator<<(const std::stringstr)
    {
        *
this << static_cast<short>(str.length());
        
Write(str.c_str(), str.length());

        return *
this;
    }


public:
    
int _begin;
    
int _end;
    
int field3;
    
SMsgStreamNodebuffer;
    
SMsgStreamNodenode_current;
    
unsigned short msgid;
    
char _gap[4];

}; 

PHP Code:
#define SendMsg(x) reinterpret_cast<void (__cdecl *)(CMsgStreamBuffer&)>(0x008418D0)(x) 

Example:-

PHP Code:
CMsgStreamBuffer buf(0x7001);
buf << std::string(Charname); // CharName
SendMsg(buf); 


Special thanks to: florian0
Laag#82 is offline  
Thanks
2 Users
Old 11/09/2019, 22:03   #2
 
elite*gold: 0
Join Date: Aug 2017
Posts: 121
Received Thanks: 9
What is features ?!
modyuasty3 is offline  
Old 11/10/2019, 07:11   #3
 
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
Quote:
Originally Posted by modyuasty3 View Post
What is features ?!
Hi

You can send any packet from client to server (C-> S)
Laag#82 is offline  
Old 11/10/2019, 19:43   #4
 
kanift's Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 62
Received Thanks: 78
hmm this was how i used to communicate with client from server side and im pretty sure that the structure is same for client also

CMsg
CNetEngine

also on server side there are functions in CGObjPC that u can create & send msg to targeted user

kanift is offline  
Thanks
5 Users
Reply


Similar Threads Similar Threads
All Quest Functions Over 670 functions
06/08/2013 - Metin2 PServer Guides & Strategies - 21 Replies
Gretings this is very simple tut ther is all organized quest functions based on last pub rev 2089 If you know some quest functions is not ther let me know "if valid function of corse" addimage addmapsignal add_bgm_info
[Release] Halloween Map ~ by Sora [Happy Halloween]
11/07/2012 - Metin2 PServer Guides & Strategies - 57 Replies
Heyho! Das bald Halloween ist, wollte ich mit euch meine vor über einem Jahr erstellte Map teilen! Bitte beachtet, das ich für diese Map keinen Mapeditor oder Hilfen/Vorlagen hatte. IDs von Objecten/Bäumen wurden zum Großteil selbst herausgefunden! Für die damalige Zeit war das in meinen Augen schon eine Leistung. Um genauer zu werden, handelt es sich um eine extrem Detailreich veränderte Version des Roten Reiches! Jedes und damit meine ich wirklich jedes Object wurde verändert! Einige...
Halloween Event Quest <3 ~ Have a Good Halloween
11/01/2011 - Metin2 PServer Guides & Strategies - 12 Replies
Thats : quest halloween begin state start begin when enter_halloween_npc_code.chat."Halloween <3" with pc.is_gm() begin say("Do you want to start halloween event ???") say_reward("Halloween event : When you kill devils catacomb bigboss,") say_reward("You get special item and when you bring it to me") say_reward("I give you halloween hair style.") say("")



All times are GMT +1. The time now is 13:07.


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