Advertisement
C_Volume2 Games #84100

Simple Trainer

Simple Trainer is a small example on how to use WriteProcessMemory to modify a games memory. I was surprised at the lack of source for trainers made in delphi so I whipped this up.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Upload
<?
$docroot = $DOCUMENT_ROOT; //On Windows machines, you'll need to hard code the current path.
$percent = Round(($value/$max)*100, 0);
$rectwidth = $width;
if ($showpercent) {	$width += (imagefontwidth($fontsize) * strlen($percent."%")) + imagefontwidth("%"); }
$image = imagecreate($width, $height);
//Set the colors and calculate font width/height.
$bg_color = imagecolorallocate($image, 0xFF, 0xFF, 0xFF); //white
$bar_color = imagecolorallocate($image, 0xFF, 0x40, 0x40); //red
$border_color = imagecolorallocate($image, 0x00, 0x00, 0x00); //black
$font_color = imagecolorallocate($image, 0x00, 0x00, 0x00); //black
$font_width = imagefontwidth($fontsize) * strlen($percent."%"); 
$font_height = imagefontheight($fontsize);
//Bar Generation Code
imagerectangle($image, 0, 0, $rectwidth-1, $height-1, $border_color);
ImageFilledRectangle($image, 1, 1, $rectwidth*($percent/100)-2, $height-2, $bar_color);
for($a = 0; $a <= $rectwidth-1; $a += ($rectwidth/$max)) {
	imageline($image, $a, 0, $a, $height, $border_color);
}
if ($showpercent) { imagestring($image, $fontsize, $width-$font_width, ($height-$font_height)/2, $percent."%", $font_color); }
// Flush Image 
header("Content-type: image/png");
ImagePNG($image);
ImageDestroy($image);
?>
Původní komentáře (3)
Obnoveno z Wayback Machine