It would be nice to have a function to set what execute() should execute.
Something like this:
Code:
text execute_allowed_text
{
strings = 5;
string = "function my_function1(v_value, s_string);", // execute my_function1 is allowed
"function my_function2(s_string1, s_string2);", // execute my_function2 is allowed
"function my_function3();", // execute my_function3 is allowed
"skill _health;", // execute manipulations on skill named _health
"var variable1;", // execute manipulations on varible named variable1
"function wait(v_time);"; // execute wait is allowed
}
string test_string = "player._health = 100; player._mana = 50; my_function1(3, \"Hallo World\"); variable1 = 10; my_function5();";
function execute_mod()
{
execute_allowed(execute_allowed_text, test_string);
}
The function execute_allowed(Text, String) should only execute...
player._health = 100;
my_function1(3, "Hallo World");
variable1 = 10;
...and ignore...
player._mana = 50;
my_function5();
This way we could make our games able for modifications without the possibility to cheat.