mIRC Home    About    Download    Register    News    Help

Print Thread
T
TUSK3N
TUSK3N
T
This is the script I have now

Code:
on $*:text:*just gave you*:*:{
  if ($nick == bot) {
    writeini -n Points.ini $+($1) Points $calc($readini(Points.ini,$+($1),Points) + $5))
    LineCount
    msg # Thank you for investing $1 $+ ! You have invested in total $readini(Points.ini,$+($1),Points) points.
  }
}
on *:text:!invest*:#:{
    if ((%floodpointcheck) || ($($+(%,floodpointcheck.,$2),2))) { return }
    set -u10 %floodpointcheck On
    set -u30 %floodpointcheck. $+ $nick On 
    LineCount
    msg # $nick has invested $readini(Points.ini,$+($nick),Points) total points.
}


So I would like to have a ranking system sort after how many points you have with a placement like 1, 2, 3.

Right now its
[TUSK3N]
Points=100

[Nick2]
Points=200

So it should say that Nick2 is Rank 1 and TUSK3N is Rank 2
Sorting after top points.

!invest
output= TUSK3N is Rank 2 with 100 total points invested.

Also a top3 names "!invest top"
1. Nick2: 200 points. 2. TUSK3N: 100 points.


It is also a problem when someone types !invest that isnt in the points.ini file it will still say the message without the points part. Could it reply that you havent invested any points.

F
Fonic_Artes
Fonic_Artes
F
I'm not sure on the top 3 and all, but this should work for the !invest with 0 points thing.

Code:
on *:text:!invest*:#:{
var %head = $ini(Points.ini,$nick)    
if ((%floodpointcheck) || ($($+(%,floodpointcheck.,$2),2))) { return }
set -u10 %floodpointcheck On
set -u30 %floodpointcheck. $+ $nick On 
LineCount
if (!%head) { halt }
msg # $nick has invested $readini(Points.ini,$+($nick),Points) total points.
}

T
TUSK3N
TUSK3N
T
thank you that works but now top 3 and rank system would be good.


Link Copied to Clipboard