<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.soldat.pl/index.php?action=history&amp;feed=atom&amp;title=BGC_Massmod</id>
		<title>BGC Massmod - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.soldat.pl/index.php?action=history&amp;feed=atom&amp;title=BGC_Massmod"/>
		<link rel="alternate" type="text/html" href="https://wiki.soldat.pl/index.php?title=BGC_Massmod&amp;action=history"/>
		<updated>2026-05-26T04:34:33Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.soldat.pl/index.php?title=BGC_Massmod&amp;diff=228&amp;oldid=prev</id>
		<title>Shoozza: Created page with &quot;&lt;source lang=&quot;C&quot;&gt;  #include &lt;iostream&gt; #include &lt;string&gt; #include &lt;algorithm&gt; #include &lt;fstream&gt; #include &lt;iterator&gt; #include &lt;vector&gt;  #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.soldat.pl/index.php?title=BGC_Massmod&amp;diff=228&amp;oldid=prev"/>
				<updated>2012-08-23T20:57:10Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;  #include &amp;lt;iostream&amp;gt; #include &amp;lt;string&amp;gt; #include &amp;lt;algorithm&amp;gt; #include &amp;lt;fstream&amp;gt; #include &amp;lt;iterator&amp;gt; #include &amp;lt;vector&amp;gt;  #include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt; ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;lt;algorithm&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream&amp;gt;&lt;br /&gt;
#include &amp;lt;iterator&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using namespace std;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]){&lt;br /&gt;
&lt;br /&gt;
    WIN32_FIND_DATA findFileData;&lt;br /&gt;
&lt;br /&gt;
    HANDLE hFind = FindFirstFile(&amp;quot;*.pms&amp;quot;, &amp;amp;findFileData);&lt;br /&gt;
    if(hFind  == INVALID_HANDLE_VALUE){&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;No *.PMS files found&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;* make sure you place the application in soldat/maps/ folder&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        FindClose(hFind);&lt;br /&gt;
        return 1;&lt;br /&gt;
    }else{&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Starting...&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if(argc != 7){&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Usage: RED GREEN BLUE RED GREEN BLUE&amp;quot; &amp;lt;&amp;lt; endl&lt;br /&gt;
        &amp;lt;&amp;lt; &amp;quot; values in DEC (0-255), first set top, then bottom&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        return 1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    int filec = 1;&lt;br /&gt;
    fstream file;&lt;br /&gt;
    int length;&lt;br /&gt;
    char *buffer;&lt;br /&gt;
&lt;br /&gt;
    while(FindNextFile(hFind, &amp;amp;findFileData)){&lt;br /&gt;
        cout &amp;lt;&amp;lt; filec &amp;lt;&amp;lt; &amp;quot;. &amp;quot; &amp;lt;&amp;lt; findFileData.cFileName &amp;lt;&amp;lt; &amp;quot;... &amp;quot; &amp;lt;&amp;lt; flush;&lt;br /&gt;
        // get contents&lt;br /&gt;
        file.open(findFileData.cFileName, ios_base:: in | ios_base::binary);&lt;br /&gt;
        file.seekg (0, ios::end);&lt;br /&gt;
        length = file.tellg();&lt;br /&gt;
        file.seekg (0, ios::beg);&lt;br /&gt;
        buffer = new char [length];&lt;br /&gt;
        file.read (buffer,length);&lt;br /&gt;
        file.close();&lt;br /&gt;
        //modify contents&lt;br /&gt;
        // top color&lt;br /&gt;
        buffer[68] = atoi(argv[3]); // B&lt;br /&gt;
        buffer[69] = atoi(argv[2]); // G&lt;br /&gt;
        buffer[70] = atoi(argv[1]); // R&lt;br /&gt;
        buffer[71] = 0;  // A&lt;br /&gt;
        // bottom color&lt;br /&gt;
        buffer[72] = atoi(argv[6]); // B&lt;br /&gt;
        buffer[73] = atoi(argv[5]); // G&lt;br /&gt;
        buffer[74] = atoi(argv[4]); // R&lt;br /&gt;
        buffer[75] = 0;  // A&lt;br /&gt;
        //overwrite with new contents&lt;br /&gt;
        file.open(findFileData.cFileName, ios_base::out | ios_base::binary | ios_base::trunc);&lt;br /&gt;
        file.write (buffer,length);&lt;br /&gt;
        file.close();&lt;br /&gt;
&lt;br /&gt;
        delete[] buffer;&lt;br /&gt;
&lt;br /&gt;
        cout &amp;lt;&amp;lt; &amp;quot;Ok!&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
        filec++;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    FindClose(hFind);&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PHP PMS Background colors mass modifier &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$files = array_merge(glob(&amp;quot;*.PMS&amp;quot;), glob(&amp;quot;*.pms&amp;quot;));;&lt;br /&gt;
&lt;br /&gt;
// these are ctf_Steel's colors, &lt;br /&gt;
// note: alpha is useless&lt;br /&gt;
// C = unsigned char---  B   R   G  A&lt;br /&gt;
$new_top = pack(&amp;quot;CCCC&amp;quot;, 74, 63, 74, 0); // top &lt;br /&gt;
$new_bot = pack(&amp;quot;CCCC&amp;quot;, 39, 39, 22, 0); // bottom&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Found &amp;quot; . count($files) . &amp;quot; file(s) - processing...\n\n&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$i = 1;&lt;br /&gt;
&lt;br /&gt;
foreach($files as $file){&lt;br /&gt;
	echo $i . &amp;quot;. &amp;quot; . $file . &amp;quot; ... &amp;quot;;&lt;br /&gt;
	$contents = file_get_contents($file, FILE_BINARY);&lt;br /&gt;
	// replace that &lt;br /&gt;
	$mod = substr_replace($contents, $new_top, 4+1+38+1+24, 4);&lt;br /&gt;
	$mod = substr_replace($mod, $new_bot, 4+1+38+1+24+4, 4);&lt;br /&gt;
	// overwrite&lt;br /&gt;
	file_put_contents($file, $mod);&lt;br /&gt;
	echo &amp;quot; ... OK!\n&amp;quot;;&lt;br /&gt;
	$i++;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shoozza</name></author>	</entry>

	</feed>