Post: [Release] 1.13 Remote Procedure Calls
07-24-2013, 07:42 PM #1
Choco
Respect my authoritah!!
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys,

This is a new project for BOII I've been working on. This is a DLL for use in a tool that allows you to have RPC and some other functions. This DLL was written in C#, so it will work for any .net applications. For this DLL to work, you need to have the PS3 Target Manager installed on your PC.

What is RPC?

RPC (Remote Procedure Calls) allows you to call a function from inside the BOII elf from your computer. With this, you can do things like give weapons, execute commands, change your model, or even spawn HUD elements. It's extremely useful, and it opens up many possibilities for modding.



How to use this DLL
*I will be explaining how to use this for a C# program.

1. Inside your program project, add BO2RPC.DLL as a reference (in Visual C#, this is done by clicking Project>Add Reference and selecting the DLL).
2. To enable RPC, use this code inside your program:

    BO2RPC.Util.Init();


This will Connect to the default DEX target, attach process, and inject my RPC functions into memory.

This DLL also includes functions for getting and setting memory on your DEX PS3:

    BO2RPC.Util.SetMemory(uint address, byte[] val);

byte[] getMem = BO2RPC.Util.GetMemory(uint address, int length);




How to Call a Function

This RPC supports calling a function using up to 5 arguments. To call a function, use this code:

    BO2RPC.Util.Call(<func address>, <argument 1>, <argument 2>, <argument 3>, <argument 4>, <argument 5>Winky Winky;


If you need to pass a string as an argument, do it like this:

    BO2RPC.Util.Call(<func address>, str_pointer("Argument 1"), <argument 2>, <argument 3>, str_pointer("Argument 4"), <argument 5>Winky Winky;


(Note: If the function you want to call takes less than 5 parameters, you can leave the additional ones out. Also, functions can only be called while in a game.)



Here is the source code for those who are interested: You must login or register to view this content.

And, here is the PPC source for my RPC functions: You must login or register to view this content.

You may use any code from this that you wish. All I ask is that you give credits.



Download the DLL:

Download: You must login or register to view this content.

Virus Scan: You must login or register to view this content.



Credits:
-iMCSx for the DLL import function
-xSonoro for helping me pack it into a DLL



Oh, as an added bonus, I've thrown in some example uses for this. Here's a few functions you all can make use of:

    private void GiveWeapon(int client, int weaponIndex)
{
BO2RPC.Util.Call(0x2A7B14, 0x177BD30 + (client * 0x580Cool Man (aka Tustin), weaponIndex, 0, 0); //G_GivePlayerWeapon
BO2RPC.Util.Call(0x1E6238, 0x16B4D2C + (client * 0x31C), weaponIndex, 0, 0); //G_InitializeAmmo
}

private void ExecuteCommand(string command)
{
BO2RPC.Util.Call(0x3133E8, 0, str_pointer(command));
}

private void SV_GameSendServerCommand(int client, string command)
{
BO2RPC.Util.Call(0x34954C, client, 0, str_pointer(command));
}

SV_GameSendServerCommand(0, "O \"^2Text Here\""); //print text in killfeed

SV_GameSendServerCommand(0, "< \"^2Text Here\""); //print text center of screen

ExecuteCommand("set cg_gun_x 7"); //set cg_gun_x to 7

GiveWeapon(0, 1); //give default weapon



Please do not use this online. You will get banned.


Hopefully this will lead to some new and interesting tools for BOII. Enjoy everyone!
Last edited by Choco ; 07-24-2013 at 07:47 PM.

The following 62 users say thank you to Choco for this useful post:

βounceModz, Eddie Mac, Ansity., BigGucciSosa300, Brag, Bucko, BullyWiiPlaza, Chxii, Crunk, Dan Dactyl, deneo24, ErasedDev, doneo, FruitBurst, FuroowHD, Gay For Satan, Harry, Hmoob_Mods, HosterModz_, II Dave II, Insult, The Epic, Bichote, Jacob-And-Britt, ResistTheJamsha, Jannis96, Mango_Knife, Master Ro, Meow, Mr.Alfredo, Norway-_-1999, NUKES-X-MODS-X, O-H, Dan, Ozy, Pewp, primetime43, ICS Vortex, SC58, Dacoco, Silent Assassin, SnaY, sniper-4Eye, Source Code, St0rM, Taylor, Swifter, Terrorize 420, TheGreatestSyn, TheJaRniBoi, therifboy, Turk_Warrior, Uk_ViiPeR, WeJailbreakYou, worrorfight, xFlavez, xkoeckiiej, xPreeks, zZHackzZ
07-25-2013, 01:37 AM #11
Chxii
Do a barrel roll!
Thanks Choco Smile
07-25-2013, 05:24 PM #12
Choco
Respect my authoritah!!
Originally posted by Master
Very nice Choco! Happy

Just a tip on some of the C#:

Don't hardcode huge byte (or any type) arrays into your program.

It generates unnecessary work for the compiler when it's analyzing & parsing the code. Instead, keep it in an external source (ex: a .resx file).

Just a small tip Smile. This looks very nice otherwise. Nice Job! :p


I only had the one big one, but thanks for the tip :y:
07-25-2013, 06:55 PM #13
can u release or find hud elements for 1.13 HappyD
07-26-2013, 02:55 AM #14
Choco
Respect my authoritah!!
Originally posted by lollo1000 View Post
can u release or find hud elements for 1.13 HappyD


I believe BadLuckBrian posted them, but they will be somewhat glitchy because his functions are a bit sloppy.
07-26-2013, 03:06 AM #15
seb5594
Proud Former Admin
Originally posted by Choco View Post
I believe BadLuckBrian posted them, but they will be somewhat glitchy because his functions are a bit sloppy.


Yeah, they are. And he havnt released for 1.13 Huds yet Smile
07-26-2013, 12:30 PM #16
zZHackzZ
Climbing up the ladder
Originally posted by seb5594 View Post
Yeah, they are. And he havnt released for 1.13 Huds yet Smile


i have Huds for 1.13 Smile
07-26-2013, 12:41 PM #17
FuroowHD
NextGenUpdate Elite
Damn nice!
07-26-2013, 02:47 PM #18
Originally posted by seb5594 View Post
Yeah, they are. And he havnt released for 1.13 Huds yet Smile


Originally posted by Choco View Post
I believe BadLuckBrian posted them, but they will be somewhat glitchy because his functions are a bit sloppy.

I will make the functions for 1.13 using your rpc ^^ it will be way much better haha :p

The following user thanked Bad Luck Brian for this useful post:

therifboy
07-27-2013, 08:09 AM #19
New York BOY !
Service Shop Owner ;
Waiting for video Winky Winky

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo