[FilterScript] Maths Riddle
#1

Maths Riddle v3.0

What is Maths Riddle script?
Maths Riddle it's a simple my script for you server for attraction. Players can guess the result of mathematical operations like:
45 + 25,45 - 25,45 / 5,45 * 25.
Just install and your players can get some award* for current result! You only must configure how often riddle start! (in minutes)

Maths Riddle - operations
adding,
subtraction,
multiplication,
division

All this operations it's tested and all works! Never happen to share a number which can not be divided, subtract the smaller number from the larger.

Maths Riddle - commands, award
Only one command for admin:
/riddle - start the math riddle without wait time
How to add award? In OnPlayerText callback after this:
Код:
format(str, sizeof(str),"{00AAFF}%s{FFFFFF} guessed the riddle of mathematical. (result: {00AAFF}%d{FFFFFF})",name,result);
SendClientMessageToAll(-1, str);
example:
Код:
format(str, sizeof(str),"{00AAFF}%s{FFFFFF} guessed the riddle of mathematical. (result: {00AAFF}%d{FFFFFF})",name,result);
SendClientMessageToAll(-1, str);
GivePlayerMoney(playerid, 10000);
Maths Riddle - How to configure, and add new operations?
Код:
#define TIME 5 // edit this line to set how often riddle start! (in minutes)
#define RAND 4 // number of mathematical operations (LOOK in line: 28)
How to add new operation?

You must change (#define RAND) and after there:

Код:
case 3: {
do
{
result = (numbers[0]=random(1000)+1) / (numbers[1]=random(600)+1);
} while(numbers[0] % numbers[1]);
format(str, sizeof(str),"New maths riddle is: {00AAFF}%d{FFFFFF} / {00AAFF}%d{FFFFFF} = ?",numbers[0], numbers[1]);
SendClientMessageToAll(-1, str);
isnow = true;
}
add operation with this model:
Код:
case 4: { // 4 is the next operation
result = (numbers[0]=random(1000)) + (numbers[1]=random(840)); // change this example: result = (numbers[0]=random(30)) * (numbers[1]=random(10) + (numbers[2]=random(30));
format(str, sizeof(str),"New maths riddle is: {00AAFF}%d{FFFFFF} * {00AAFF}%d{FFFFFF} + {00AAFF}%d{FFFFFF} = ?",numbers[0], numbers[1], numbers[2]); 
SendClientMessageToAll(-1, str); // no change
isnow = true; // no change
}
Maths Riddle - credits
Programming:
Gorniczek (www.truck-spd.pl) for this script

Maths Riddle - download
http://www.solidfiles.com/d/bcd3dbfae9/
Reply
#2

Nice and simple
Reply
#3

I fixed most of the errors.
Reply
#4

Good work dude
Reply
#5

Thanks.
Reply
#6

Nice.
Repped +.
Reply
#7

Can anyone have any ideas for new activities?
Reply
#8

Usefull
Reply
#9

New version, added:
* involution:
- square,
- cube
* root


Link: http://www.solidfiles.com/d/bcd3dbfae9/ (and in first post)
Reply
#10

Awesome :O
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)