Post: [RELEASE] MW2 MOTD Changer SOURCE Code
06-17-2013, 02:21 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hi Guys this is just one more program I did to my Programming Notepad and I want to share the source code with you guys Happy ...
There might be some problems while using the Enable more characters than usual feature on a save game that has never got his MOTD changed by a Mod Menu...
The normal MOTD Function works fine, but the Allow more characters one might only work with a save that has been MOTD modded via .CFG Menu or something like that...

So here is a picture to guide you with the source code : You must login or register to view this content.

And here is the source code .. Enjoy!
*NOTE : YOU WILL NEED PACKAGE.IO DLL FILE!
Package.IO Download : You must login or register to view this content.

Source :
    
//Credits to MW2TopTenWORLD for making and releasing
//This Source Code!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PackageIO;

namespace Programming_NotePad
{
public partial class motdchanger : DevComponents.DotNetBar.Metro.MetroForm
{
string path;
string motd;

public motdchanger()
{
InitializeComponent();
}

private void motdchanger_Load(object sender, EventArgs e)
{
MessageBox.Show("Program made as part of Programming Notepad!");
textBox1.MaxLength = 28;
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
textBox1.MaxLength = 300;
}
if (checkBox1.Checked == false)
{
textBox1.MaxLength = 28;
}
}

private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openmotd = new OpenFileDialog();
openmotd.Title = "Open your GPAD0_MP.PRF FILE!";
openmotd.Filter = "GPAD0_MP Files | *.prf";
if (openmotd.ShowDialog() == DialogResult.OK)
{
path = openmotd.FileName;
Reader readmotd = new Reader(openmotd.FileName , Endian.Little , 0L);
readmotd.ReadString(2Cool Man (aka Tustin);
readmotd.Position = 78;
label2.Text = readmotd.ReadString(2Cool Man (aka Tustin);
}
}

private void button2_Click(object sender, EventArgs e)
{
motd = textBox1.Text;
Writer writemotd = new Writer(path, Endian.Little, 0L);
writemotd.Position = 78;
writemotd.WriteString(motd);
MessageBox.Show("The New MOTD has been sucessfully inputed!");

}
}
}


Enjoy!!
-MW2TopTenWORLD
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to MW2TopTenWORLD for this useful post:

*xActionMods*, ImGsus
06-17-2013, 02:20 PM #2
OmGRhys-x
Are you high?
Originally posted by MW2TopTenWORLD View Post
Hi Guys this is just one more program I did to my Programming Notepad and I want to share the source code with you guys Happy ...
There might be some problems while using the Enable more characters than usual feature on a save game that has never got his MOTD changed by a Mod Menu...
The normal MOTD Function works fine, but the Allow more characters one might only work with a save that has been MOTD modded via .CFG Menu or something like that...

So here is a picture to guide you with the source code : You must login or register to view this content.

And here is the source code .. Enjoy!
*NOTE : YOU WILL NEED PACKAGE.IO DLL FILE!

Source :
    
//Credits to MW2TopTenWORLD for making and releasing
//This Source Code!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PackageIO;

namespace Programming_NotePad
{
public partial class motdchanger : DevComponents.DotNetBar.Metro.MetroForm
{
string path;
string motd;

public motdchanger()
{
InitializeComponent();
}

private void motdchanger_Load(object sender, EventArgs e)
{
MessageBox.Show("Program made as part of Programming Notepad!");
textBox1.MaxLength = 28;
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
textBox1.MaxLength = 300;
}
if (checkBox1.Checked == false)
{
textBox1.MaxLength = 28;
}
}

private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openmotd = new OpenFileDialog();
openmotd.Title = "Open your GPAD0_MP.PRF FILE!";
openmotd.Filter = "GPAD0_MP Files | *.prf";
if (openmotd.ShowDialog() == DialogResult.OK)
{
path = openmotd.FileName;
Reader readmotd = new Reader(openmotd.FileName , Endian.Little , 0L);
readmotd.ReadString(2Cool Man (aka Tustin);
readmotd.Position = 78;
label2.Text = readmotd.ReadString(2Cool Man (aka Tustin);
}
}

private void button2_Click(object sender, EventArgs e)
{
motd = textBox1.Text;
Writer writemotd = new Writer(path, Endian.Little, 0L);
writemotd.Position = 78;
writemotd.WriteString(motd);
MessageBox.Show("The New MOTD has been sucessfully inputed!");

}
}
}


Enjoy!!
-MW2TopTenWORLD


why would you release 2 diffrent source codes when you could just make it all in one to change the clan tag and motd!
but all in all not 2 bad :P

also you can add this to your thread for the people who dont have the Package.IO.dll Smile

You must login or register to view this content.
06-17-2013, 02:50 PM #3
Originally posted by x View Post
why would you release 2 diffrent source codes when you could just make it all in one to change the clan tag and motd!
but all in all not 2 bad :P

also you can add this to your thread for the people who dont have the Package.IO.dll Smile

You must login or register to view this content.


Thanks just added the Package.IO and I didnt released All in One because I only had the MOTD idea later after the Clan Tag Happy
06-17-2013, 03:07 PM #4
Master0wn3r
I’m too L33T
Originally posted by MW2TopTenWORLD View Post
Thanks just added the Package.IO and I didnt released All in One because I only had the MOTD idea later after the Clan Tag Happy


how do i add packageIO to C# (noob question sorry xD)
and i also get error:
Originally posted by another user
Error 2 The type or namespace name 'Awesome faceevComponents' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Raoul\AppData\Local\Temporary Projects\MOTD changer\Form1.cs 15 40 MOTD changer
Warning 16 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:

motdchanger --- The base class 'System.Object' cannot be designed. 0 0
06-17-2013, 03:20 PM #5
*xActionMods*
I’m too L33T
Originally posted by MW2TopTenWORLD View Post
Hi Guys this is just one more program I did to my Programming Notepad and I want to share the source code with you guys Happy ...
There might be some problems while using the Enable more characters than usual feature on a save game that has never got his MOTD changed by a Mod Menu...
The normal MOTD Function works fine, but the Allow more characters one might only work with a save that has been MOTD modded via .CFG Menu or something like that...

So here is a picture to guide you with the source code : You must login or register to view this content.

And here is the source code .. Enjoy!
*NOTE : YOU WILL NEED PACKAGE.IO DLL FILE!
Package.IO Download : You must login or register to view this content.

Source :
    
//Credits to MW2TopTenWORLD for making and releasing
//This Source Code!
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PackageIO;

namespace Programming_NotePad
{
public partial class motdchanger : DevComponents.DotNetBar.Metro.MetroForm
{
string path;
string motd;

public motdchanger()
{
InitializeComponent();
}

private void motdchanger_Load(object sender, EventArgs e)
{
MessageBox.Show("Program made as part of Programming Notepad!");
textBox1.MaxLength = 28;
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
{
textBox1.MaxLength = 300;
}
if (checkBox1.Checked == false)
{
textBox1.MaxLength = 28;
}
}

private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openmotd = new OpenFileDialog();
openmotd.Title = "Open your GPAD0_MP.PRF FILE!";
openmotd.Filter = "GPAD0_MP Files | *.prf";
if (openmotd.ShowDialog() == DialogResult.OK)
{
path = openmotd.FileName;
Reader readmotd = new Reader(openmotd.FileName , Endian.Little , 0L);
readmotd.ReadString(2Cool Man (aka Tustin);
readmotd.Position = 78;
label2.Text = readmotd.ReadString(2Cool Man (aka Tustin);
}
}

private void button2_Click(object sender, EventArgs e)
{
motd = textBox1.Text;
Writer writemotd = new Writer(path, Endian.Little, 0L);
writemotd.Position = 78;
writemotd.WriteString(motd);
MessageBox.Show("The New MOTD has been sucessfully inputed!");

}
}
}


Enjoy!!
-MW2TopTenWORLD


am quite impressed, well done for making this
06-17-2013, 03:24 PM #6
Originally posted by master0wn3r View Post
how do i add packageIO to C# (noob question sorry xD)
and i also get error:


Dont do Copy and Paste because that way it will get alot of errors and when you fix those the buttons wont work...
So to the PackageIO make this : You must login or register to view this content. <-- Right click there and click Add Reference...
To Fix the DevComponents error go where it says motdchanger : DevComponents.DotNetBar.Metro.MetroForm and put motdchanger : Form

It will fix it, and then delete the code you pasted for the buttons make the Design on the Designer and add the code for the buttons Individually ..

Here is a pic to guide you with the source code and the Design : You must login or register to view this content. ...

It should fix it, please give credit cuz I spent a few time to find the Hex Writer and Reader position ... Thanks Happy

---------- Post added at 03:24 PM ---------- Previous post was at 03:22 PM ----------

[QUOTE='[Chief Keef];5308263']am quite impressed, well done for making this[/QUOTE]

It was easy Happy , the hardest part was finding the HeX String and Offset position of the MOTD :|

Also ... are you ActionMods?
06-17-2013, 03:25 PM #7
Master0wn3r
I’m too L33T
Originally posted by MW2TopTenWORLD View Post
Dont do Copy and Paste because that way it will get alot of errors and when you fix those the buttons wont work...
So to the PackageIO make this : You must login or register to view this content. <-- Right click there and click Add Reference...
To Fix the DevComponents error go where it says motdchanger : DevComponents.DotNetBar.Metro.MetroForm and put motdchanger : Form

It will fix it, and then delete the code you pasted for the buttons make the Design on the Designer and add the code for the buttons Individually ..

Here is a pic to guide you with the source code and the Design : You must login or register to view this content. ...

It should fix it, please give credit cuz I spent a few time to find the Hex Writer and Reader position ... Thanks Happy

---------- Post added at 03:24 PM ---------- Previous post was at 03:22 PM ----------



It was easy Happy , the hardest part was finding the HeX String and Offset position of the MOTD :|

Also ... are you ActionMods?


i will! im now trying to get it working thanks for the reply
06-17-2013, 03:26 PM #8
Originally posted by master0wn3r View Post
i will! im now trying to get it working thanks for the reply


No problem, I always reply Winky Winky
06-17-2013, 03:33 PM #9
*xActionMods*
I’m too L33T
Originally posted by MW2TopTenWORLD View Post
It was easy , the hardest part was finding the HeX String and Offset position of the MOTD :|

Also ... are you ActionMods?


yh bish Winky Winky
06-17-2013, 03:35 PM #10
Master0wn3r
I’m too L33T
Originally posted by MW2TopTenWORLD View Post
No problem, I always reply Winky Winky


nice!, i might have some trouble later because im not coding C# very long Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo