Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > Online Gaming > ROSE Online Discussion

ROSE Online Discussion All ROSE-Related discussion.


I Found Alot Info On Walking Code!!

ROSE Online Discussion


Closed Thread
 
Thread Tools Display Modes
Old 05-16-2006, 12:34 AM   #1
winer80
Banned
 
Last Online: 08-26-2009 02:18 AM
Join Date: Feb 2006
Posts: 129
Rep Power: 0
Rep Points: 8
winer80 is an unknown quantity at this point
Feedback: (0)
Points: 1,062.00
Bank: 0.00
Total Points: 1,062.00
Cool I Found Alot Info On Walking Code!!

i was reading all the script and i saw something wrong with it!!
This Is what i add and i'm still working on it
Code:
//-------------------------------------------------------------------------
// Moves a Character
//-------------------------------------------------------------------------
bool CWorldServer:akMoveChar( CROSEClientSocket *Client, CPacket *P)
{
     unsigned int long x,y;
     unsigned int status;
          
/////begin copy incoming packet
     STARTPACKET(pak,0x753,46); 
     x = GETDWORD((*P), 0x02 );
     SETDWORD( pak, 0x06, x);
     y = GETDWORD((*P), 0x04 );
     SETDWORD( pak, 0xc, y);
     status = GETWORD((*P), 0x00 );
     SETWORD( pak, 0x2, status);
     if (status) {
     status = 0x6930;
     } else {
     status = GETWORD((*P), 0x2);
     }   
     SETWORD( pak, 0x6, status);
     SETWORD( pak, 0x00, 0x0023 );
     SETWORD( pak, 0x04, 0x01a9 );
     
     Client->SendPacket(&pak);
     
     return true;

}
i'm sure the SETDWORD( pak, 0xc, y);is wrong idk i have to test it!!
This is what someone told me to do
Code:
//-------------------------------------------------------------------------
// Moves a Character
//-------------------------------------------------------------------------
bool CWorldServer:akMoveChar( CROSEClientSocket *Client, CPacket *P)
{
         unsigned int long x,y;
         unsigned int status;
         STARTPACKET(pak,0x79a,0x10);
}
/////begin copy incoming packet
      x = GETDWORD((*P), 0x02 );
      SETDWORD( pak, 0x06, x);
      if (status) {
        status = 0x6930;
     } else {
        status = GETWORD((*P), 0x2);
     }   
     SETWORD( pak, 0x6, status);
     SETWORD( pak, 0x00, 0x0023 );
     SETWORD( pak, 0x04, 0x01a9 );
     Client->SendPacket(&pak);
     
     return true;

}
i also found out that they change the script and post on the forum cuz they hate GZP idk why but i'm on the same side cuz idk what forum they go to..
i'm sure i will have the walking working right and i found out that they dont want us to play on private servers too cuz they want you to play on there servers that piss's me off or make you give them money so they send the right one!! it's just wrong man!!! it is!!
PM me if you know whats wrong on the script. i will read the rest but right now it's 3AM and i'm wake!!
tomorrow i'm going to be testing everything!!
This is Really sad!!

Last edited by winer80; 05-16-2006 at 12:37 AM.
winer80 is offline  
Sponsored Links
Old 05-16-2006, 12:42 AM   #2
jonnybravo
Registered User
 
Last Online: 02-20-2007 01:19 PM
Join Date: Dec 2005
Posts: 116
Rep Power: 0
Rep Points: 9
jonnybravo is an unknown quantity at this point
Feedback: (0)
Points: 31.00
Bank: 0.00
Total Points: 31.00
Re: I Found Alot Info On Walking Code!!

hehe aleast your showing your trying before you know it you will have it...

you close ill fix it in a second and post it.... once i update client....

ok fixed and working out bugs hit up on msn if yah want it..........

Last edited by jonnybravo; 05-16-2006 at 01:30 AM.
jonnybravo is offline  
Old 05-16-2006, 03:47 AM   #3
movieman
Lurker
 
Last Online: 05-01-2007 01:29 PM
Join Date: May 2006
Posts: 8
Rep Power: 0
Rep Points: 10
movieman is on a distinguished road
Feedback: (0)
Points: 195.00
Bank: 0.00
Total Points: 195.00
Talking Re: so you got the good code ?

so if i understand it you guys have the right code ?
could you please send it to [Only registered and activated users can see links. ] ?

greets roy :p
:Banane20:
movieman is offline  
Old 05-16-2006, 09:26 AM   #4
d00bie
Registered User
 
Last Online: 01-03-2010 11:19 AM
Join Date: Dec 2005
Posts: 218
Rep Power: 0
Rep Points: 9
d00bie is an unknown quantity at this point
Feedback: (0)
Points: 25,086.08
Bank: 0.00
Total Points: 25,086.08
Re: I Found Alot Info On Walking Code!!

Quote:
i'm sure the SETDWORD( pak, 0xc, y);is wrong idk i have to test it!!
This is what someone told me to do
Code:
//-------------------------------------------------------------------------
// Moves a Character
//-------------------------------------------------------------------------
bool CWorldServer:akMoveChar( CROSEClientSocket *Client, CPacket *P)
{
         unsigned int long x,y;
         unsigned int status;
         STARTPACKET(pak,0x79a,0x10);
}
/////begin copy incoming packet
      x = GETDWORD((*P), 0x02 );
      SETDWORD( pak, 0x06, x);
      if (status) {
        status = 0x6930;
     } else {
        status = GETWORD((*P), 0x2);
     }   
     SETWORD( pak, 0x6, status);
     SETWORD( pak, 0x00, 0x0023 );
     SETWORD( pak, 0x04, 0x01a9 );
     Client->SendPacket(&pak);
     
     return true;

}
well im not up to scratch really with packets / stream based data transfer but from the logs of movement you will always need to echo the Y coord? simply leaving it out wont work.

:Banane40:
Peace
D00bie
d00bie is offline  
Old 05-16-2006, 01:02 PM   #5
winer80
Banned
 
Last Online: 08-26-2009 02:18 AM
Join Date: Feb 2006
Posts: 129
Rep Power: 0
Rep Points: 8
winer80 is an unknown quantity at this point
Feedback: (0)
Points: 1,062.00
Bank: 0.00
Total Points: 1,062.00
Re: I Found Alot Info On Walking Code!!

i don't know if this game will work. but the only way i found out how you going to get the game working is by hacking the real server and downloading all there scripts. even if you get the walking working theres will be no NCPs to sell items and no quest to do no item spawning and no moster spawning
thats the only way i know how we going to get this junk to work :(

i say get the banana :Banane12: inside of roseonline server and get the our servers to work lol!!!
winer80 is offline  
Old 05-16-2006, 01:40 PM   #6
winer80
Banned
 
Last Online: 08-26-2009 02:18 AM
Join Date: Feb 2006
Posts: 129
Rep Power: 0
Rep Points: 8
winer80 is an unknown quantity at this point
Feedback: (0)
Points: 1,062.00
Bank: 0.00
Total Points: 1,062.00
Re: I Found Alot Info On Walking Code!!

This is how the script look like for all this n00bs asking me on msn and buging me so they can see how the script look like
Code:
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include "../crypt.h"
#include "../log.h"
#include "../world.h"

#define LOG_VERBOSE (Config.Verbose?LOG_PRINT:0)

bool DebugPacket = false;

//-------------------------------------------------------------------------
// Constructor
//-------------------------------------------------------------------------
CWorldServer::CWorldServer( )
{
}
    
//-------------------------------------------------------------------------
// Deconstructor
//-------------------------------------------------------------------------
CWorldServer::~CWorldServer( )
{
}


//-------------------------------------------------------------------------
// Load the configurations from the login.ini
//-------------------------------------------------------------------------
void CWorldServer::LoadConfigurations( void )
{
    Config.SQLServer.pcServer   = ConfigGetString( "worldserv.ini", "mySQL_Server"  , "localhost" );
    Config.SQLServer.pcDatabase = ConfigGetString( "worldserv.ini", "mySQL_Database", "ROSE" );
    Config.SQLServer.pcUserName = ConfigGetString( "worldserv.ini", "mySQL_Username", "root" );
    Config.SQLServer.pcPassword = ConfigGetString( "worldserv.ini", "mySQL_Password", "" );
    Config.uPort                = ConfigGetInt   ( "worldserv.ini", "port", 29200 );
    Config.uEncryptValue        = ConfigGetInt   ( "worldserv.ini", "encrypt_value", 0 );
    DebugPacket                 = (ConfigGetInt  ( "worldserv.ini", "debug_packet", 0 )==1);
}

//-------------------------------------------------------------------------
// Check if the user is allowed to connect
//-------------------------------------------------------------------------
bool CWorldServer::pakDoIdentify( CROSEClientSocket *Client, CPacket *P )
{
    MYSQL_RES *res;
    MYSQL_ROW row;
    char MD5[33];
    char Buffer[300];
    if ( Client->bLoggedIn ) return false;

    // Get infos from the packet    
    unsigned uConnectID = GETDWORD((*P),0);
    memcpy( MD5, &P->Buffer[4], 32 );
    MD5[32] = 0;

    if ( strchr( MD5, '\"' )!=NULL ) return false;
    
    sprintf(Buffer,"SELECT c.login_id, c.connect_mode, c.connect_info FROM connect c INNER JOIN accounts a " \
                   "ON a.login=c.login_id WHERE UPPER(\"%s\")=UPPER(a.password) AND c.connect_id=%u",MD5,uConnectID);
    if ( do_mysql_query( Buffer ) ) return false;
    res = mysql_store_result( &mysql );
    if ( mysql_num_rows( res ) != 1 )
    {
        //Log( LOG_PRINT | LOG_FATAL_ERRORS, NULL, "(SID:%i) User tried invalid login.", Client->Socket );
        mysql_free_result( res );
        return false;
    }
    else
    {
        row = mysql_fetch_row( res );
        mysql_free_result( res );
        Client->pcNickName = strdup( row[0] );
        Client->bLoggedIn  = true;

        // Remove connect info
        
        sprintf(Buffer,"DELETE FROM connect WHERE connect_id=%u",uConnectID);
        if ( do_mysql_query( Buffer ) ) return false;
        if ( *row[1]!='C' ) return false;
        
        Log( LOG_VERBOSE | LOG_THISSERVER, NULL, "(SID:%i) User '%s' logged in to server.", Client->Socket, Client->pcNickName );
        mysql_free_result( res );
        
        unsigned uNewAddValue = rand()^(rand()<<16);
        
        // Send  
        STARTPACKET( pak, 0x070C, 10 );
        SETBYTE    ( pak, 0x00, 0 );
        SETDWORD   ( pak, 0x01, uNewAddValue );
        SETDWORD   ( pak, 0x05, 0x000000 );
        Client->SendPacket( &pak );
        Client->CryptStatus.CurAddValue = uNewAddValue;
        
        
        //other stuff to send..
    
        
    
        sprintf(Buffer,"SELECT x,y,z,curmap,char_name FROM characters where account_name = \"%s\"\x00",Client->pcNickName);
        Log(LOG_VERBOSE | LOG_THISSERVER,NULL, "(SID:%i) Loading x,y,z,curmap,char_name from databse. for '%s'",Client-Socket,Client->pcNickName);
        if(do_mysql_query(Buffer))
        {
            Log(LOG_VERBOSE | LOG_THISSERVER,NULL,"(SID:%i) Failed to mysquery for %s!",Client->Socket,Client->pcNickName);
                                   return false;
        }
        //printf("Stopped at mysql_store_result.\n");
        res  = mysql_store_result(&mysql);
        if(res==0)
          printf("Error. Res = 0.\n");
        row = mysql_fetch_row(res);
        if ( mysql_num_rows( res ) != 1 )
        {
            printf("Number of rows is not euqal to 1,but equals %d\n",mysql_num_rows(res));
            mysql_free_result(res);
            return false;
        }
        mysql_free_result(res);
        
        
        
        int curmap;
        int i,j;
        float x,y,z;
        char char_name[20],buffer;
       // printf("Row[0]: %s",row[0]);
       // printf("Row[1]: %s",row[1]);
       // printf("Row[2]: %s",row[2]);
        printf("Row[0]: %s\n",row[0]);
        printf("Row[1]: %s\n",row[1]);
        printf("Row[2]: %s\n",row[2]);
        printf("Row[3]: %s\n",row[3]);
        printf("Row[4]: %s\n",row[4]);
        x=strtof(row[0],NULL);
        y=strtof(row[1],NULL);
        z=strtof(row[2],NULL);
        curmap=atoi(row[3]);

        strncpy(char_name,row[4],20);
        
        printf("Info for %s\n\tx:%f\n\tf:%f\n\tz:%f\n\tcurmap:%d\n\tchar_name: %s\n",Client->pcNickName,x,y,z,curmap,char_name);
     
     
     STARTPACKET(pak2, 0x715, 0x300 );
        FILE *packet = fopen("packet.txt","r");
        if(packet==NULL)
        {
            printf("Error opening packet.txt for 715!\n");
        }
        i=0;
        while((fscanf(packet,"%c",&buffer))!=EOF)
        {
          printf("%c",buffer);
          SETBYTE(pak2,i,buffer);
          i++;
          
        }
        printf("\n");
        fclose(packet);
        Client->SendPacket(&pak2);
        printf("Packet sent!\n");
        
        STARTPACKET(pak3,0x0716,0x350);
        FILE *packet1 = fopen("packet1.txt","r");
        if(packet==NULL)
        {
            printf("Error opening packet1.txt for 716!\n");
        }
        i=0;
        while((fscanf(packet1,"%c",&buffer))!=EOF)
        {
          printf("%c",buffer);
          SETBYTE(pak3,i,buffer);
          i++;
          
        }
        printf("\n");
        fclose(packet1);
        Client->SendPacket(&pak3);
        printf("Packet1 sent!\n");
        
        STARTPACKET(pak4,0x071b,0x3ba);
        FILE *packet2 = fopen("packet2.txt","r");
        if(packet==NULL)
        {
            printf("Error opening packet2.txt for 71B!\n");
        }
        i=0;
        while((fscanf(packet2,"%c",&buffer))!=EOF)
        {
          printf("%c",buffer);
          SETBYTE(pak4,i,buffer);
          i++;
          
        }
        printf("\n");
        fclose(packet2);
        Client->SendPacket(&pak4);
        printf("Packet2 sent!\n");
        
        }
    
    return true;
}
//-------------------------------------------------------------------------
// Moves a Character
//-------------------------------------------------------------------------
bool CWorldServer::pakMoveChar( CROSEClientSocket *Client, CPacket *P)
{    
     unsigned int x, y;
     unsigned status;
            
     STARTPACKET(pak,0x79a,0x10);
     x = GETDWORD((*P), 0x4 );
     SETDWORD( pak, 0x8, x);
     y = GETDWORD((*P), 0x8 );
     SETDWORD( pak, 0xc, y);
     status = GETWORD((*P), 0x00 );
     SETWORD( pak, 0x2, status);
     if (status) {
        status = 0x6930;
     } else {
        status = GETWORD((*P), 0x2);
     }   
     SETWORD( pak, 0x6, status);      
     SETWORD( pak, 0x00, 0x0023 );
     SETBYTE( pak, 0x04, 0x01a9 );
     
     Client->SendPacket(&pak);
     
     return true;

}

//give an identifier value
bool CWorldServer::pakDoId( CROSEClientSocket *Client, CPacket *P)
{    

     STARTPACKET(pak0,0x721,6);
     SETWORD( pak0, 0x00, 0x0022 );
     SETWORD( pak0, 0x02, 0x0002 );
     SETWORD( pak0, 0x04, 0x0000 );
     Client->SendPacket(&pak0);
     
     STARTPACKET(pak1,0x730,6);
     SETWORD( pak1, 0x00, 0x0005 );
     SETWORD( pak1, 0x02, 0xa24d );
     SETWORD( pak1, 0x04, 0x40b3 );
     Client->SendPacket(&pak1);

     STARTPACKET(pak,0x753,46);      
     SETWORD( pak, 0x00, 0x0023 );
     SETWORD( pak, 0x02, 0x0064 );
     SETWORD( pak, 0x04, 0x0064 );   
     SETWORD( pak, 0x06, 0x0000 );
     SETWORD( pak, 0x08, 0x0000 );
     SETWORD( pak, 0x0a, 0x0000 );
     SETWORD( pak, 0x0c, 0x0000 );
     SETWORD( pak, 0x0e, 0x0064 );
     SETWORD( pak, 0x10, 0xc8b5 );
     SETWORD( pak, 0x12, 0x5e6c );
     SETWORD( pak, 0x14, 0x0064 );
     SETWORD( pak, 0x16, 0xcd50 );
     SETWORD( pak, 0x18, 0x3232 );
     SETWORD( pak, 0x1a, 0x322d );
     SETWORD( pak, 0x1c, 0x3232 );
     SETWORD( pak, 0x1e, 0x3232 );
     SETWORD( pak, 0x20, 0x2d32 );
     SETWORD( pak, 0x22, 0x0000 );
     SETWORD( pak, 0x24, 0x0000 );
     SETWORD( pak, 0x26, 0x1834 );
     SETWORD( pak, 0x28, 0x001a );
     SETWORD( pak, 0x2a, 0x0002 );
     SETWORD( pak, 0x2c, 0x0000 );

     Client->SendPacket(&pak);

     STARTPACKET(pak2,0x762,3);   
     SETWORD( pak2, 0x00, 0x0023 );
     SETBYTE( pak2, 0x02, 0x01 );
     
     Client->SendPacket(&pak2);

     return true;

}
//-------------------------------------------------------------------------
// Incoming packet
//-------------------------------------------------------------------------
bool CWorldServer::pakannoucement( CROSEClientSocket *Client, CPacket *P )
{
     STARTPACKET(pak,0x702, 16 );
     SETBYTE    (pak, 0x00, 0x5765 );
     SETBYTE    (pak, 0x02, 0x6c63 );
     SETBYTE    (pak, 0x04, 0x6f6d );
     SETBYTE    (pak, 0x06, 0x2074 );
     SETBYTE    (pak, 0x08, 0x6f20 );
     SETBYTE    (pak, 0x10, 0x526f );
     SETBYTE    (pak, 0x12, 0x7365 );
     SETBYTE    (pak, 0x14, 0x49 );
     
     Client->SendPacket(&pak);

     return true;

}       


//-------------------------------------------------------------------------
// Incoming packet
//-------------------------------------------------------------------------
bool CWorldServer::OnReceivePacket( CROSEClientSocket *Client, CPacket *P )
{
    // Debugging
    if ( DebugPacket )
    {
        FILE *fh = fopen( LOG_DIRECTORY "worldpacket.log", "a+" );
        fprintf( fh, "(SID:%08u) IN  %04x: ", Client->Socket, P->Command );
        for ( int i=0; i<P->Size-6; ++i ) fprintf( fh, "%02x ", (unsigned char)P->Buffer[i] );
        fprintf( fh, "\n" );
        fclose( fh );
    }
    
    // Control incomming packets
    switch( P->Command )
    {
    //-----------------------------------------
    // Coming from login
    case 0x070B: return pakDoIdentify          ( Client, P );
    case 0x0753: return pakDoId                ( Client, P );
    case 0x079a: return pakMoveChar            ( Client, P );
    case 0x0763: return pakannoucement         ( Client, P );
    case 0x0756: break;
    //-----------------------------------------

    //-----------------------------------------
    default:
        // Received unknown packet from client
        
        Log( LOG_PRINT | LOG_THISSERVER, NULL, "(SID:%i) Received unknown packet. Command:%04x Size:%04x", Client->Socket, P->Command, P->Size );
        break;
    }
    return true;
}

//-------------------------------------------------------------------------
// Send a mySQL query
//-------------------------------------------------------------------------
bool do_mysql_query( char *qry )
{
    if ( mysql_query( &mysql, qry ) )
    {
        Log( LOG_PRINT | LOG_FATAL_ERRORS, NULL, "Error with mySQL query: '%s' (%s)", qry, mysql_error(&mysql) );
        return true;
    }
    return false;
}

//-------------------------------------------------------------------------
// Returns the current time/date
//-------------------------------------------------------------------------
unsigned __int64 GetServerTime( )
{
    // Get time/date and write it to the beginning of the row
    time_t rawtime;                            // For time
    struct tm* timeinfo;                    //    "
    char *timestr;

    time      ( &rawtime );
    timeinfo  = localtime( &rawtime );
    
    u64 uCurTime = 0;
    uCurTime += (timeinfo->tm_sec         * 1         );
    uCurTime += (timeinfo->tm_min         * 60        );
    uCurTime += (timeinfo->tm_hour        * 3600      ); 
    uCurTime += (timeinfo->tm_yday        * 86400     );
    uCurTime += ((timeinfo->tm_year-2000) * 86400*366 );
    
    return uCurTime;
}

//-------------------------------------------------------------------------

Last edited by winer80; 05-16-2006 at 01:43 PM.
winer80 is offline  
Old 05-16-2006, 01:59 PM   #7
raul514
Registered User
 
Last Online: 05-05-2009 11:08 AM
Join Date: Mar 2006
Posts: 65
Rep Power: 4
Rep Points: 10
raul514 is on a distinguished road
Feedback: (0)
Points: 600.00
Bank: 0.00
Total Points: 600.00
Re: I Found Alot Info On Walking Code!!

Pointless to post this code this is a **** original gzp server file.
raul514 is offline  
Old 05-16-2006, 02:14 PM   #8
winer80
Banned
 
Last Online: 08-26-2009 02:18 AM
Join Date: Feb 2006
Posts: 129
Rep Power: 0
Rep Points: 8
winer80 is an unknown quantity at this point
Feedback: (0)
Points: 1,062.00
Bank: 0.00
Total Points: 1,062.00
Re: I Found Alot Info On Walking Code!!

Code:
Pointless to post this code this is a **** original gzp server file.
well you ass hole can you see i'm not going to add the code i add they can add them selfs i'm not posting here what i add. do it your self!!!
gosh!!
what i add i post here dumb people!!
winer80 is offline  
Old 05-16-2006, 03:05 PM   #9
r3dbull
Registered User
 
Last Online: 03-10-2010 11:01 AM
Join Date: Nov 2005
Location: Italy
Posts: 603
Rep Power: 5
Rep Points: 11
r3dbull is on a distinguished road
Feedback: (0)
Points: 5,707.00
Bank: 0.00
Total Points: 5,707.00
Re: I Found Alot Info On Walking Code!!

winer80
First: Start learn some English
Second: Start learn some C++

Then u can talk again about this.
Now stop bothering us with always same things...
r3dbull is offline  
Old 05-16-2006, 03:34 PM   #10
winer80
Banned
 
Last Online: 08-26-2009 02:18 AM
Join Date: Feb 2006
Posts: 129
Rep Power: 0
Rep Points: 8
winer80 is an unknown quantity at this point
Feedback: (0)
Points: 1,062.00
Bank: 0.00
Total Points: 1,062.00
Re: I Found Alot Info On Walking Code!!

wtf is wrong with you people i dont give a shit about my english!!
so STFU
winer80 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

All times are GMT -7. The time now is 03:27 PM.

 

Copyright ©2010, GamerzPlanet.Net
Visits: