Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
execute #71812
04/22/06 14:15
04/22/06 14:15
Joined: Aug 2005
Posts: 343
Germany
HPW Offline OP
Senior Member
HPW  Offline OP
Senior Member

Joined: Aug 2005
Posts: 343
Germany
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.

Last edited by HPW; 04/22/06 14:19.

Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: execute [Re: HPW] #71813
04/22/06 15:29
04/22/06 15:29
Joined: Mar 2003
Posts: 569
FRAJO Offline
User
FRAJO  Offline
User

Joined: Mar 2003
Posts: 569
you can do that yourself. Just check if the execute string does not contain any forbidden kewords.


------------------------------------------- ICQ: 242543712 Ich bin nicht hier und bin nicht da. Wo bin ich dann? ".." ("") ^ ^ This is the evil vampire bunny. Copy and paste him into your signiture to help him achieve world domination. Yeah
Re: execute [Re: FRAJO] #71814
04/22/06 18:06
04/22/06 18:06
Joined: Aug 2005
Posts: 343
Germany
HPW Offline OP
Senior Member
HPW  Offline OP
Senior Member

Joined: Aug 2005
Posts: 343
Germany
I have done it before like you said but this is not the same. I have thousands of things are not allowed and only hundert that are allowed. And the String should also execute if anything is not allowed.

Last edited by HPW; 04/22/06 18:07.
Re: execute [Re: HPW] #71815
04/22/06 18:10
04/22/06 18:10
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Then maybe just cut it out

Re: execute [Re: TWO] #71816
04/22/06 18:15
04/22/06 18:15
Joined: Aug 2005
Posts: 343
Germany
HPW Offline OP
Senior Member
HPW  Offline OP
Senior Member

Joined: Aug 2005
Posts: 343
Germany
How can I cut a function without a regular expression if I don't know the parameters?
As example: my_function(8, 7,"string123",str_to_num("1"));
And if I have a function for regular expressions, then I must know what is to cut (thousands of variables and functions).

Last edited by HPW; 04/22/06 18:20.

Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: execute [Re: HPW] #71817
04/22/06 18:44
04/22/06 18:44
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
From the begin of the forbidden func to the next func

Re: execute [Re: TWO] #71818
04/23/06 08:28
04/23/06 08:28
Joined: Aug 2005
Posts: 343
Germany
HPW Offline OP
Senior Member
HPW  Offline OP
Senior Member

Joined: Aug 2005
Posts: 343
Germany
So you mean like counting the "(" and ")"?
Ok, this is possible but there are to many functions, skills and variables to ignore.
It would really better to set the allowed functions, skills and variables instead of the disallowed.
This would make it also better for updateing the scripts. It's less work and you can't forget to ignore skills or variables like "_health" with those the gamers would be able to cheat in the game.

Last edited by HPW; 04/23/06 08:32.

Evil Blood (v. 0.52) RPG
Commport.de (Social Network Community)
Re: execute [Re: HPW] #71819
04/23/06 09:05
04/23/06 09:05
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
T
TWO Offline

Serious User
TWO  Offline

Serious User
T

Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
Key, it would realy a pain to do that by hand. But the func shouldn´t use a text object, it should look like this:
execute_allowed(string_to_execute,"player_health|player_ammo");

Re: execute [Re: HPW] #71820
04/23/06 16:17
04/23/06 16:17
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Quote:

So you mean like counting the "(" and ")"?
Ok, this is possible but there are to many functions, skills and variables to ignore.



simply check for every keyword in your text string array if it's allowed or not. then cut it out. it doesn't matter if there are ten or ten thousand keywords, the work is done by the pc, the script stays the same.

Quote:

It would really better to set the allowed functions, skills and variables instead of the disallowed.
This would make it also better for updateing the scripts. It's less work and you can't forget to ignore skills or variables like "_health" with those the gamers would be able to cheat in the game.



it's the same vice versa. check for the allowed keywords and delete everything else.

joey.

Re: execute [Re: Joey] #71821
04/23/06 16:27
04/23/06 16:27
Joined: Aug 2005
Posts: 343
Germany
HPW Offline OP
Senior Member
HPW  Offline OP
Senior Member

Joined: Aug 2005
Posts: 343
Germany
No, I mean thousands of different functions, skills and variables, not the same!

And if I search for a allowed function and cut all other, then I can't search for the next allowed funtion. How would you do it?

Last edited by HPW; 04/23/06 16:34.
Page 1 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1