Author Topic: Score donation script  (Read 1393 times)

checking if the client's score is greater than one is pointless
Read closely. I had it check if their score was less than one.
you want to check if the score they want to donate is greater than 0
I added that in later, realizing they could add points to themselves.
as well as later checking if the score they wish to donate is greater than their current score.
No, That's needed to check if they have enough points to donate. Otherwise they could donate huge amounts of points as long as they have at least one.
having the arguments be target then score makes more sense than score then target.
I might change that when I change what Deathwishez pointed out. Since I already submitted it, I'm going to need to re-submit it.

This is going to look like "103998 has donated 5 to you"
forget.

« Last Edit: March 15, 2011, 05:15:45 PM by Wheatley »

All you need to do to get the name of a client is to echo %client.name instead.

All you need to do to get the name of a client is to echo %client.name instead.
%client.getPlayerName() is the "official" way to do it.

%client.getPlayerName() is the "official" way to do it.
Since when, and why? It's a property on the client.

Read closely. I had it check if their score was less than one
...
No, That's needed to check if they have enough points to donate.
You're missing my point. First off, while just the if statement itself is "do this if points are less that one" the point of the entire if/else is "only donate if the points are greater than one" which is what I was referring to when I said greater than one. Second off, that if is entirely unneeded, as you are also checking if they have enough points to donate. You don't need to say "do I have points and enough points" when you can just say "do I have enough points"


Since when, and why? It's a property on the client.

Maybe a script can change the %client.name variable, but not the outcome in %client.getPlayerName()