CLEO Help RPC

CLEO related
Status
Not open for further replies.

PlasticBottle

Active member
Joined
Jul 13, 2016
Messages
162
Reaction score
1
I've recently found some old abandonned project in my pc, but it crashes if I use it, i need a bit of help
PHP:
{$CLEO .cs}
{$INCLUDE SF}
 
0000: NOP
 
 
 
0001: wait 1 ms
 
0BE3: raknet setup_incoming_rpc_hook @RPC_IN
 
 
 
:RPC_IN
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRDISPLAYGAMETEXT 
then 
   0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
   0AC8: 2@ = allocate_memory_size 260
   0C29: 2@ = stristr string1 1@ string2 "Did you get it?"
   0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x1c  //Press the JUMP key (usually LEFT SHIFT)
   
   
end
0BE0: raknet hook_ret TRUE




:FAKE_KEYPRESS
1@ = 0xB73458 
005A: 1@ += 0@  // (int)
0A8C: write_memory 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0

{
Offset        Slot     
+ 0x0        Right                        
+ 0x1        Left                            
+ 0x2        Backwards                    
+ 0x3        Forward                       
+ 0x4        Look right                    
+ 0x5        Look left                    
+ 0x6        Look down                        
+ 0x7        Look up                            
+ 0x8        Action            
+ 0xA        Previous weapon/target                
+ 0xC        Aim weapon                    
+ 0xE        Next weapon/target                
+ 0x10        Group CTRL forward                    
+ 0x12        Group CTRL back                        
+ 0x14        Conversation - NO                    
+ 0x16        Conversation - YES                    
+ 0x1A        Change camera                    
+ 0x1C        Jump                            
+ 0x1E        Enter+exit                        
+ 0x20        Sprint                            
+ 0x22        Fire                            
+ 0x24        Crouch                            
+ 0x26        Look behind                        
+ 0x28        Unused                            
+ 0x2A        Walk                            
}
Whenever I do "/gametext Did you get it?" in game it doesn't jump as expected...
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Probably because of this

0AC8: 2@ = allocate_memory_size 260
0C29: 2@ = stristr string1 1@ string2 "Did you get it?"

You should read the text size first, then read it as an array to a variable.
Then use stristr on it, since it returns a pointer, not the string itself.
 

PlasticBottle

Active member
Joined
Jul 13, 2016
Messages
162
Reaction score
1
So, I read the server's gametext size, then after reading it I put it in like 2@, and I compare 1@ and 2@
Is it basically what i gotta do?
 
Status
Not open for further replies.
Top