Hi !
Thanks for your answer and for the time you took for me !
In my craziest dreams here is how i'd like the things to work (but feel free to give advice if i'am going in a wrong direction) :
Well yet the name data are stored in 2 hash table : rating.hsh and ranking.hsh.
I decided to use hash table because they are very fast.
For both hash table item = name and data = value.
Note : when name is longer than 1 word, text is separated with dots, ex : jean.bernard.durand.
The data are "auto" added by users with an alias like this :
/addname <name.separated.with.dot> <rating> <ranking>
making this :
alias addname {
hadd rating $1 $2
hadd ranking $1 $3
}
This is for the storage of the rating/ranking data
Now for the "rules" for the gifts i didn't do anything yet, was just thinking of creating an .ini file like this :
[gift]
rating_0_to_5=gift1
rating_sup_to_5=gift1;gift2
rating_sup_to_6=gift1;gift2;gift3;gift4;gift5
ranking_0_to_20=gift1
ranking_0_to_50=gift1;gift4;gift2
and so on...
But i think this was is not really clever... maybe have you a better idea ?
My rules are built like that :
gift 1 only if rating>5 and ranking>100
gift 2 only if rating>6 and ranking>500
I wish i can update rules and add new rules easily.
Note :If i decide to add new parameters like <year of birth (xxxx)> will it change the script a lot or is it easily doable ? O do i have to decide it now ?
Ok for the data storage and config.
Now the desired output format would be :
/check <name>
and the script would return :
<name> will be given : gift_x;gift_y;gift_z
I want gift to be separated by ";"
That's it ! Do u need some more precisions ?
Again thank a lot for your precious help !
Have a nice day.
Conscience.