Bot Rating Script [FIXED]

By spitfire3292 on Apr 30, 2006

This is a extremely simple script that can be used if you have a bot on a network. People can rate your bot on a scale of 1-10.

How Other people can use it:

!rate - Gives Instructions
!rate <#1-10> - Rate bot 1-10 (ten being highest in this case)
!botavg - Shows the average of your bot

Fixed it up a tad since I've excelled a bit since 2 years ago in MSL. Changed it to work with INI's which are faster and more organized. The script is now easier to read and more appealing to look at. Enjoy the 'improved' version of this.

on $*:TEXT:/^[@!.]rate/Si:#:{
var %t = $iif($left($1,1) = @,msg $chan,notice $nick)
  if (!$2) { %t Give my bot a rating 1-10 : 10 being the highest. To do so type !rate [1-10] }
    if ($2 !isnum 1-10) { %t Give me a rating between 1 and 10 please.
    if ($readini(rate.ini,People,$address($nick,2)))
      %t Sorry $nick but you have already rated my bot.
else {
      %t Thanks for ratinig my bot $+($nick,.) This information has been stored.
      writeini rate.ini People $address($nick,2) $+($nick,:,$2)
var %x = $readini(rate.ini,Rating,Total)
var %y = $readini(rate.ini,Rating,Voters)      
writeini rate.ini Rating Total $calc($2 + %x)
 writeini rate.ini Rating Voters $calc(%y + 1)
on $*:TEXT:/^[@!.]botavg$/Si:#:{
var %t = $iif($left($1,1) = @,msg $chan,notice $nick)
  %t The average rating for me is: $round($calc($readini(rate.ini,Rating,Total) / $readini(rate.ini,Rating,Voters)),2)


Sign in to comment.
Stewie1k94   -  Oct 31, 2011

You might want to change

$round($calc($readini(rate.ini,Rating,Total) / $readini(rate.ini,Rating,Voters)),2)


$round($calc($readini(rate.ini,Rating,Total))) / $readini(rate.ini,Rating,Voters),2)
CrazyShady   -  Oct 31, 2011

I loaded this into my bot and typed all 3 commands and one of the commands came back with

  • /if: insufficient parameters (line 7, Bot Rating)

Any idea why?

bugboy1028   -  Jan 02, 2010

now it have been 2010, will you rewrite the script?

guest598594   -  Nov 14, 2007

lol i didnt know it was two years ago, i probably have a lot of old snippets w/ silly stuff too

u dont have to change it, but just for reference, use .msg and .notice instead of halting :)

spitfire3292   -  Nov 14, 2007

mountaindew you do realize this was almost 2 years ago. I just began scripting lol. I think I\'m a bit better at scripting now. If you reallly want me to rewrite it i will lol

guest598594   -  Nov 14, 2007

a little advide:

for comments in a script, do

the comments
that you
write in
the script


;The commants 
;that you
;write in
;the script

also, when u do

  /if (!$2) { msg $chan Give my bot a rating 1-10 : 10 being the highest. To do so type !rate &#601;-10> }
  /elseif ($2) {

no need for elseif ($2), just else {
u also dont need the if !$read, jsut else
and u can use isnum to see if its a num 1-10

if ($2 isnum 1-10) {

also, as acid said, u should consider doing a hash table or an ini, but nice idea

Acid-Religion   -  Sep 08, 2006

You could use ini or hashtable instead of the variables and text file. But your idea is good, you should maybe add a comment system as well as the rating?

spitfire3292   -  May 12, 2006

yes...and you put it in remotes and people can rate your bot...thought i didnt have to explain it but o well there yah go

ZabuzaMomochi   -  May 07, 2006

Whats the point of this script? To load it into your remotes with a bot or...

spitfire3292   -  May 06, 2006

I no sas...but i like them there for organization. dont ask lol its just the way i like it.

dave...thanks :D

Sasuke   -  May 05, 2006

_> By cleaning the script, I meant, getting rid of the /\'s, Daveoh.

Daveoh   -  May 05, 2006

Use / at the start of that script and after the comments put / anything within those is a comment
A few tips: all those / are annoying (for me atleast :P), you don\'t need them for commands in a script
Use ini files (/help /writeini), faster, much simpler (easier) and I love it

Sasuke   -  May 04, 2006

Could clean up the script. :/

spitfire3292   -  May 01, 2006

Thats why there is a line there. It separates the usage and credits from the actual code. Thanks for bringing that up so other people dont get confused.

Noutrious   -  May 01, 2006

In the usage lines you should put ; before the text, else the script will be damaged.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.