Hallo Com ,
Wie fixxe ich /dice?
Mfg Good
Wie fixxe ich /dice?
Mfg Good
// Metin2 rev34083 number_ex alternative fix by Luca Corigliano
// In header
int (*number_ex)(int arg1, int arg2) = (int(*)(int,int))0x08439620;
int (*thecore_random)() = (int(*)())0x08439610;
// Wherever you want
int my_number_ex(int argument1, int argument2)
{
char* error;
int num1 = argument1;
int num2 = argument2;
if(num1 > num2)
{
error = "First argument %d is higher than second argument %d";
goto error_label;
}
unsigned int v1 = (unsigned int)(num2 + 1 - num1);
if(v1 == 0)
{
error = "Attempt to divide by zero! %d %d";
goto error_label;
}
return num1 + thecore_random() % v1;
error_label:
sys_err(__func__ , __LINE__, error, num1, num2);
return 0;
}