i working on a script and need some help - 30/06/06 05:01 AM
So this is my first script that I'm actually working on. I will explain everything.
So I am trying to make a points system for my chat where people earn points for doing different things. Right now, I am in the process of manually adding points to different users. Here's what I have so far:
The !give command gives a user points.
Example:
[23:05:03] <@Sableye> !give Haseo 30
[23:05:04] <@[PN]Bot> Haseo was given 30 points
The !take command does the opposite. It takes points from a user.
Example:
[23:57:15] <@Sableye> !take Abhishek 4
[23:57:16] <@[PN]Bot> 4 points was taken away from Abhishek
A few things that I need help with. How can I get it so that only ops can use the commands? How can I make it so that a user can find out the total amount of points that he/she has? Lastly, am I even on the right track? :tongue:
So I am trying to make a points system for my chat where people earn points for doing different things. Right now, I am in the process of manually adding points to different users. Here's what I have so far:
Code:
on *:text:*!give*:#: { if ($1 == %c $+ !give) { .inc %$2 $3 | msg $chan $2 was given $3 points } } on *:text:*!take*:#: { if ($1 == %c $+ !take) { .dec %$2 $3 | msg $chan $3 points was taken away from $2 } }
The !give command gives a user points.
Example:
[23:05:03] <@Sableye> !give Haseo 30
[23:05:04] <@[PN]Bot> Haseo was given 30 points
The !take command does the opposite. It takes points from a user.
Example:
[23:57:15] <@Sableye> !take Abhishek 4
[23:57:16] <@[PN]Bot> 4 points was taken away from Abhishek
A few things that I need help with. How can I get it so that only ops can use the commands? How can I make it so that a user can find out the total amount of points that he/she has? Lastly, am I even on the right track? :tongue: