Greg0rz Posted August 21, 2006 Posted August 21, 2006 I've been trying to code a script myself that does the following, but have run into trouble when trying to find out what place the user has recieved in the race, adding the points up, and identifying the users rank: -Gives the 1st place winner of a race 5 points -Gives the 2nd place winner of a race 4 points -Gives the 3rd place winner of a race 3 points -Gives the 4th place winner of a race 2 points -Gives the 5th place winner of a race 1 point -Writes to a .ini file with the users name and the amount of points they have -WHen a user has 0-49 points his title is New User -When a user has 50-99 points his title is User -When the user has 100-299 points his title is Advanced User -When the user gets 300-999 points his title is Super User -When the user gets 1000-Infine points his title is Ultimate User -on *:SIGNAL:mta.join:command, a message comes up saying: "$mta.nick has the title of $mta.title" If someone could please program this for me or at least get me started I would really appreciate it, and if you would like you could recieve administrator abilites on my server if you completely program it. Thanks, Greg0rz
Mania-92 Posted September 19, 2006 Posted September 19, 2006 Nobody ? If it isn't done tomorrow around 3 o clock GMT +1 I will do it. on *:SIGNAL:mta.finish: { ;Parameters: ;$1 = Server ;$2 = ID var %rank = $mta.rank($1,$2) if (%rank == 1) { mta.text $1 $mta.nick($1,$2) came first, points earned: 5 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 5) } elseif (%rank == 2) { mta.text $1 $mta.nick($1,$2) came second, points earned: 4 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 4) } elseif (%rank == 3) { mta.text $1 $mta.nick($1,$2) came third, points earned: 3 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 3) } elseif (%rank == 4) { mta.text $1 $mta.nick($1,$2) came fourth, points earned: 2 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 2) } elseif (%rank == 5) { mta.text $1 $mta.nick($1,$2) came fifth, points earned: 1 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 1) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { $mta.text $1 $mta.nick($1,$2) has the title of New User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 50 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { $mta.text $1 $mta.nick($1,$2) has the title of User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { $mta.text $1 $mta.nick($1,$2) has the title of Advanced User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { $mta.text $1 $mta.nick($1,$2) has the title of Super User! } else { $mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! } It isn't tested so i don't know if it works. But you can get some stuff from it.
Jeremy Posted September 20, 2006 Posted September 20, 2006 you forgot a bracket under mta.join on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { $mta.text $1 $mta.nick($1,$2) has the title of New User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 50 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { $mta.text $1 $mta.nick($1,$2) has the title of User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { $mta.text $1 $mta.nick($1,$2) has the title of Advanced User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { $mta.text $1 $mta.nick($1,$2) has the title of Super User! } else { $mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! } }
eeliottheking Posted September 23, 2006 Posted September 23, 2006 i like this script too, may i use it? also. if i wanted to make another script that works with it so that is someone types !stats it will display the message then what would i do. this is what i have on *:SIGNAL:mta.join: { if ($3 == !stats) { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { $mta.text $1 $mta.nick($1,$2) is a n00b. } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { $mta.text $1 $mta.nick($1,$2) is a Soldier } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { $mta.text $1 $mta.nick($1,$2) is an Assassin } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 1000 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { $mta.text $1 $mta.nick($1,$2) is a General } else { $mta.text $1 $mta.nick($1,$2) is a COLD BLOODED KILLER!!! } } }
lil Toady Posted September 23, 2006 Posted September 23, 2006 i like this script too, may i use it? lol i'm sure you can... if you could not i dont think people'd post it here
Greg0rz Posted September 23, 2006 Author Posted September 23, 2006 * /mta.text: insufficient parameters - * /1: not connected to server (line 42, levelstats.mrc) I keep getting that every time someone joins as an output in mirc. Anybody have a clue why this is happening?
lil Toady Posted September 23, 2006 Posted September 23, 2006 dont use $ in front of mta.text.. busm be just 'mta.text $1 ' not $mta.text
Greg0rz Posted September 23, 2006 Author Posted September 23, 2006 The script has no errors now, but it skips over all the ranks and says everyone is an ultimate user. How should i go about fixing this?
lil Toady Posted September 23, 2006 Posted September 23, 2006 yeh, the prob is that new players have nothing in the points ini, not even 0, so you just need point in the script that if he has nothing in the ini he is new user, if he has more than 1000, he's ultimate if (!$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) mta.text $1 New user bla bla bla..
Greg0rz Posted September 24, 2006 Author Posted September 24, 2006 Thanks for all the help lil Toady. I have one last question. Why does it not announce 192.168.1.100's rank(or any other person who has points in the ini file), when they join the server? Stats Script Code: on *:SIGNAL:mta.finish: { ;Parameters: ;$1 = Server ;$2 = ID var %rank = $mta.rank($1,$2) if (%rank == 1) { mta.text $1 $mta.nick($1,$2) came in first, points earned: 5 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 5) } elseif (%rank == 2) { mta.text $1 $mta.nick($1,$2) came in second, points earned: 4 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 4) } elseif (%rank == 3) { mta.text $1 $mta.nick($1,$2) came in third, points earned: 3 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 3) } elseif (%rank == 4) { mta.text $1 $mta.nick($1,$2) came in fourth, points earned: 2 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 2) } elseif (%rank == 5) { mta.text $1 $mta.nick($1,$2) came in fifth, points earned: 1 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 1) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { mta.text $1 $mta.nick($1,$2) has the title of New User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 50 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { mta.text $1 $mta.nick($1,$2) has the title of User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { mta.text $1 $mta.nick($1,$2) has the title of Advanced User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { mta.text $1 $mta.nick($1,$2) has the title of Super User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 1000 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 10000000000) { mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! else { mta.text $1 $mta.nick($1,$2) has no rank! } } INI Code: [POINTS] 81.41.84.143=5 190.49.20.225=5 201.34.152.58=9 192.168.1.100=3 It doesn't announce that anyone has no rank, or in the case of users who have points, that they are a certain rank. How do I correct this? Thanks again.
Jeremy Posted September 24, 2006 Posted September 24, 2006 Try this. on *:SIGNAL:mta.finish: { var %rank = $mta.rank($1,$2) if (%rank == 1) { mta.text $1 $mta.nick($1,$2) came in first, points earned: 5 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 5) } elseif (%rank == 2) { mta.text $1 $mta.nick($1,$2) came in second, points earned: 4 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 4) } elseif (%rank == 3) { mta.text $1 $mta.nick($1,$2) came in third, points earned: 3 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 3) } elseif (%rank == 4) { mta.text $1 $mta.nick($1,$2) came in fourth, points earned: 2 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 2) } elseif (%rank == 5) { mta.text $1 $mta.nick($1,$2) came in fifth, points earned: 1 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),0) + 1) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 0 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 49) { mta.text $1 $mta.nick($1,$2) has the title of New User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 50 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 99) { mta.text $1 $mta.nick($1,$2) has the title of User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 100 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 299) { mta.text $1 $mta.nick($1,$2) has the title of Advanced User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 300 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 999) { mta.text $1 $mta.nick($1,$2) has the title of Super User! } elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) => 1000 && $readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) =< 10000000000) { mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! } else { mta.text $1 $mta.nick($1,$2) has no rank! } }
lil Toady Posted September 24, 2006 Posted September 24, 2006 here is how i'd have it done on *:SIGNAL:mta.finish: { if ($mta.rank($1,$2) <= 5) { var %score = $replace($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1),%position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth) mta.text $1 $mta.nick($1,$2) came %position $+ , points earned: %score !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) >= 1000) mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) >= 300) mta.nick($1,$2) has the title of Super User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) >= 100) mta.text $1 $mta.nick($1,$2) has the title of Advanced User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) >= 50) mta.text $1 $mta.nick($1,$2) has the title of User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)) >= 1) mta.text $1 $mta.nick($1,$2) has the title of New User! else mta.text $1 $mta.nick($1,$2) has no rank! }
knijn Posted September 30, 2006 Posted September 30, 2006 what command lines do i have to add to make it so that people can see how many points they have. i started like on *:SIGNAL:mta.command:{ if ($3 == !points) { if ($2) { if ($readini($scriptdir $+ points.ini i dont know what to put after points.ini can someone please help me with this?
lil Toady Posted September 30, 2006 Posted September 30, 2006 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getid($1,$4)),$2) if ($3 == !points) { if (%a == -1) mta.text $1 Error - Absent ID else mta.text $1 $mta.nick($1,%a) has $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,%a)),$v1,no) points. } }
knijn Posted October 1, 2006 Posted October 1, 2006 thats so different then i thought it would be. but thanks a lot.
knijn Posted October 1, 2006 Posted October 1, 2006 btw. whenever i join the server and i already have about 300 points. it still keeps saying "knijn has no rank!". it does that to everyone.
kheelo Posted October 4, 2006 Posted October 4, 2006 on *:SIGNAL:mta.finish: { var %rank = $mta.rank($1,$2) if (%rank == 1) { mta.text $1 $mta.nick($1,$2) finished first, points earned: 10 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.nick($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),0) + 10) } elseif (%rank == 2) { mta.text $1 $mta.nick($1,$2) finished second, points earned: 8 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.nick($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),0) + } elseif (%rank == 3) { mta.text $1 $mta.nick($1,$2) finished third, points earned: 6 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.nick($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),0) + 6) } elseif (%rank == 4) { mta.text $1 $mta.nick($1,$2) finished fourth, points earned: 5 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.nick($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),0) + 4) } elseif (%rank == 5) { mta.text $1 $mta.nick($1,$2) finished fifth, points earned: 4 !writeini -n " $+ $scriptdir $+ points.ini" POINTS $mta.nick($1,$2) $calc($iif($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),$readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)),0) + 3) } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1000) mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 20000) mta.text $1 $mta.nick($1,$2) has racing level 20! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 18000) mta.text $1 $mta.nick($1,$2) has racing level 19! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 16000) mta.text $1 $mta.nick($1,$2) has racing level 18! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 14000) mta.text $1 $mta.nick($1,$2) has racing level 17! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 12000) mta.text $1 $mta.nick($1,$2) has racing level 16! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 10000) mta.text $1 $mta.nick($1,$2) has racing level 15! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 8000) mta.text $1 $mta.nick($1,$2) has racing level 14! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 6000) mta.text $1 $mta.nick($1,$2) has racing level 13! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 4000) mta.text $1 $mta.nick($1,$2) has racing level 12! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 2000) mta.text $1 $mta.nick($1,$2) has racing level 11! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1400) mta.text $1 $mta.nick($1,$2) has racing level 10! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 900) mta.text $1 $mta.nick($1,$2) has racing level 9! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 600) mta.text $1 $mta.nick($1,$2) has racing level 8! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 400) mta.text $1 $mta.nick($1,$2) has racing level 7! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 250) mta.text $1 $mta.nick($1,$2) has racing level 6! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 150) mta.text $1 $mta.nick($1,$2) has racing level 5! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 100) mta.text $1 $mta.nick($1,$2) has racing level 4! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 60) mta.text $1 $mta.nick($1,$2) has racing level 3! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 25) mta.text $1 $mta.nick($1,$2) has racing level 2! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1) mta.text $1 $mta.nick($1,$2) has racing level 1! else mta.text $1 $mta.nick($1,$2) has no rank! } 1. so how can i make it say level up? example: i get 60 points and it says :kheelo has now racing level 3 2. how to add command !toplist so it shows top 5 points from points.ini file
Guest Posted October 5, 2006 Posted October 5, 2006 Dunno how to make it automaticly say when your rank is up but i use command to see rank like !rank then it shows you on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getid($1,$4)),$2) if ($3 == !rank) { if ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1000) mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 20000) mta.text $1 $mta.nick($1,$2) has title of The best !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 18000) mta.text $1 $mta.nick($1,$2) has title of Space ship ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 16000) mta.text $1 $mta.nick($1,$2) has title of Rocket !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 14000) mta.text $1 $mta.nick($1,$2) has title of Champion !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 12000) mta.text $1 $mta.nick($1,$2) has title of Co2 feen !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 10000) mta.text $1 $mta.nick($1,$2) has title of Speedking !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 8000) mta.text $1 $mta.nick($1,$2) has title of F1 pilot !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 6000) mta.text $1 $mta.nick($1,$2) has title of Server addict ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 4000) mta.text $1 $mta.nick($1,$2) has title of Burnout king ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 2000) mta.text $1 $mta.nick($1,$2) has title of Dedicated Driver elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1400) mta.text $1 $mta.nick($1,$2) has title of Road king !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 900) mta.text $1 $mta.nick($1,$2) has title of Track addict !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 600) mta.text $1 $mta.nick($1,$2) has title of Pro driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 400) mta.text $1 $mta.nick($1,$2) has title of Exellent driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 250) mta.text $1 $mta.nick($1,$2) has title of Drift king !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 150) mta.text $1 $mta.nick($1,$2) has title of Street racer !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 100) mta.text $1 $mta.nick($1,$2) has title of Road Kill !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 60) mta.text $1 $mta.nick($1,$2) has title of Sunday driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 25) mta.text $1 $mta.nick($1,$2) has title of Novice !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1) mta.text $1 $mta.nick($1,$2) has title of Rookie !!! else mta.text $1 $mta.nick($1,$2) has no rank! }
kheelo Posted October 5, 2006 Posted October 5, 2006 Dunno how to make it automaticly say when your rank is up but i use command to see rank like !rank then it shows you on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getid($1,$4)),$2) if ($3 == !rank) { if ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1000) mta.text $1 $mta.nick($1,$2) has the title of Ultimate User! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 20000) mta.text $1 $mta.nick($1,$2) has title of The best !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 18000) mta.text $1 $mta.nick($1,$2) has title of Space ship ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 16000) mta.text $1 $mta.nick($1,$2) has title of Rocket !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 14000) mta.text $1 $mta.nick($1,$2) has title of Champion !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 12000) mta.text $1 $mta.nick($1,$2) has title of Co2 feen !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 10000) mta.text $1 $mta.nick($1,$2) has title of Speedking !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 8000) mta.text $1 $mta.nick($1,$2) has title of F1 pilot !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 6000) mta.text $1 $mta.nick($1,$2) has title of Server addict ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 4000) mta.text $1 $mta.nick($1,$2) has title of Burnout king ! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 2000) mta.text $1 $mta.nick($1,$2) has title of Dedicated Driver elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1400) mta.text $1 $mta.nick($1,$2) has title of Road king !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 900) mta.text $1 $mta.nick($1,$2) has title of Track addict !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 600) mta.text $1 $mta.nick($1,$2) has title of Pro driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 400) mta.text $1 $mta.nick($1,$2) has title of Exellent driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 250) mta.text $1 $mta.nick($1,$2) has title of Drift king !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 150) mta.text $1 $mta.nick($1,$2) has title of Street racer !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 100) mta.text $1 $mta.nick($1,$2) has title of Road Kill !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 60) mta.text $1 $mta.nick($1,$2) has title of Sunday driver !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 25) mta.text $1 $mta.nick($1,$2) has title of Novice !!! elseif ($readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,$2)) >= 1) mta.text $1 $mta.nick($1,$2) has title of Rookie !!! else mta.text $1 $mta.nick($1,$2) has no rank! } when i type !rank it displays rank name of mine. but i need it to display top 5 players and points behind names like so: i type !toplist it shows: 1.[playername] - [points] 2.[playername] - [points] 3.[playername] - [points] 4.[playername] - [points] 5.[playername] - [points] thx in advance ^^
kheelo Posted October 5, 2006 Posted October 5, 2006 just incase: http://img53.imageshack.us/img53/6311/pointsme3.jpg
BetaDevil Posted October 6, 2006 Posted October 6, 2006 I used lil Toady's script and made this one out of it: on *:SIGNAL:mta.finish: { if ($mta.rank($1,$2) <= 5 && $mta.server($1).players >= 2) { var %score = $replace($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1) var %position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth) mta.text $1 $mta.nick($1,$2) came %position $+ and earned %score points! !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score) } elseif ($mta.rank($1,$2) <= 5 && $mta.server($1).players == 1) { mta.text $1 Playing alone earned you 2 points! !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + 2),2) } }
kheelo Posted October 7, 2006 Posted October 7, 2006 I used lil Toady's script and made this one out of it:on *:SIGNAL:mta.finish: { if ($mta.rank($1,$2) <= 5 && $mta.server($1).players >= 2) { var %score = $replace($mta.rank($1,$2),1,5,2,4,3,3,4,2,5,1) var %position = $replace($mta.rank($1,$2),1,first,2,second,3,third,4,fourth,5,fifth) mta.text $1 $mta.nick($1,$2) came %position $+ and earned %score points! !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + %score),%score) } elseif ($mta.rank($1,$2) <= 5 && $mta.server($1).players == 1) { mta.text $1 Playing alone earned you 2 points! !writeini " $+ $scriptdir $+ points.ini" POINTS $mta.ip($1,$2) $iif($readini($scriptdir $+ points.ini,POINTS,$mta.ip($1,$2)),$calc($v1 + 2),2) } } i dont think that will read points.ini and post top 5 players from there =/
Recommended Posts