Comunidad Game Maker

Ayuda => Desarrollo de Scripts => Mensaje iniciado por: PoSvA en Diciembre 09, 2010, 09:09:04 PM

Título: Detector de trampas (O el uso de Cheat Engine)
Publicado por: PoSvA en Diciembre 09, 2010, 09:09:04 PM
* Nombre del creador: posva (yo)
   * Breve descripci?n de su funci?n: Permite detectar si se han modificado las variables externamente e incluso revertir lo efectos. No es necesario dar creditos, pero se agradecen  :D
   * Versi?n GM utilizada :   :GM8:
   * C?digo del Script : Es un conjunto de scripts, asi que lo incluyo en un archivo GMK. Las funciones disponibles son:
CED_init();
[gml]/*
**Initializate the list where the variables are hosted
**CED_init();
*/

__CED_LIST=ds_list_create(); //the list with the variables
__CED_CRYPT=ds_list_create(); //The list with some security info
__CED_VALUES=ds_list_create(); //The list with the changed values pf the variables
__CED_COUNT=0; //the count of variables in the list[/gml]
CED_free();
[gml]/*
**Free the memory used by the list for the cheat control
**CED_free();
*/

ds_list_destroy(__CED_LIST); //the list with the variables
ds_list_destroy(__CED_CRYPT); //The list with some security info
ds_list_destroy(__CED_VALUES); //The list with the changed values pf the variables[/gml]
CED_addvar(string varname);
[gml]/*
**add a variable to the list
**CED_addvar(variable name);
*/

ds_list_add(__CED_LIST,argument0);
ds_list_add(__CED_CRYPT,choose("2","3","4")+string(floor(random_range(1,10))));
ds_list_add(__CED_VALUES,variable_local_get(argument0));
__CED_COUNT+=1;[/gml]
CED_step();
[gml]/*
**Put this in end step after all variable changing
**It will get the variables value and change them
**CED_step();
*/
var i,c;
for (i=0;i<__CED_COUNT;i+=1)
{
   c=ds_list_find_value(__CED_CRYPT,i);
   ds_list_replace(__CED_VALUES,i,variable_local_get(ds_list_find_value(__CED_LIST,i))*real(string_copy(c,1,1))+real(string_copy(c,2,1)));
}[/gml]
CED_check();
[gml]/*
**Put this inbegin step before variable changing
**Return true if the values have changed
** if (CED_check()) ...
*/
var r;
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
   c=ds_list_find_value(__CED_CRYPT,i);
   v=(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1));
   if (v!=variable_local_get(ds_list_find_value(__CED_LIST,i)))
   return 1;    
}
return 0;[/gml]
CED_restore_all();
[gml]/*
**This will restore all the values to previous one
**It will prevent from variable changing but may not prevent from
**frozen variables, I mean it's not 100% sure to be secure
**CED_restore_all();
*/
var i,v,c;
for (i=0;i<__CED_COUNT;i+=1)
{
   c=ds_list_find_value(__CED_CRYPT,i);
   variable_local_set(ds_list_find_value(__CED_LIST,i),(ds_list_find_value(__CED_VALUES,i)-real(string_copy(c,2,1)))/real(string_copy(c,1,1)));
}[/gml]



Video demostrativo
http://www.youtube.com/watch?v=ZsQDWAaQw24 (http://www.youtube.com/watch?v=ZsQDWAaQw24)

DESCARGA: http://www.mediafire.com/?dybzaadq90hz7cr (http://www.mediafire.com/?dybzaadq90hz7cr)
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: brunoxzx en Diciembre 09, 2010, 09:36:37 PM
Wow hace tiempo yo quer?a algo como esto pero ya no me es necesario, pero si llega a serlo te dar? cr?ditos
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: PoSvA en Diciembre 09, 2010, 10:07:51 PM
Ah es verdad se me olvido indicar eso >.<. No es necesario dar creditos pero se agradecen!
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: lordgeorge en Diciembre 10, 2010, 04:39:25 AM
No lo he probado, pero nunca esta de mas algo como esto, lo mismo que la encripcion de saves xD
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: Wadk en Diciembre 11, 2010, 04:20:53 AM
PoSvA, ten?s que inclu?r todos los scripts en el post. No pueden faltar.
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: PoSvA en Diciembre 11, 2010, 01:47:21 PM
Ok, ahora mismo los a?ado, pero porque son cortos xD, que sino no podria, se montaria un follon. De todos modos es mejor descargarse el ejemplo y ver como funciona
Título: Re: Detector de trampas (O el uso de Cheat Engine)
Publicado por: zerozerito en Marzo 02, 2011, 03:13:34 AM
xd yo queria hacer esto pero con dll aver que tal sale este!
Título: Re:Detector de trampas (O el uso de Cheat Engine)
Publicado por: Creador de juegos GM en Diciembre 09, 2012, 04:06:25 PM
a mi me sirvió muchos,gracias,gracias. 8)