Cookie/cake stats

Published  Aug 01, 2011
Updated  Aug 01, 2011
0  8

Description

My script is a addition for "Food script" users
Link : http://www.hawkee.com/snippet/7997/

U can change/add smth if u need/want it :)

For channel admin (@,&,~ / op , sop , owner )

on *:text:!allstats *:#: {
if ( $2- != $null ) {
  msg $chan All stats of $2 user :
  msg $chan %cookie [ $+ [ $2 ] ]  cookie(s)
  msg $chan %cake [ $+ [ $2 ] ]  cake(s)
  msg $chan %beer [ $+ [ $2 ] ]  beer(s)
  msg $chan %coke [ $+ [ $2 ] ] glasses of coke
  msg $chan %hugs [ $+ [ $2 ] ] hugs
  msg $chan been licked %lick [ $+ [ $2 ] ] times
  msg $chan have %burger [ $+ [ $2 ] ]  Burger(s)
  msg $chan have %pizza [ $+ [ $2 ] ]  pizza(s)
  msg $chan haz been amazed %fun [ $+ [ $2 ] ]  time(s)
  msg $chan haz been raped %rape [ $+ [ $2 ] ]  time(s)
}
else {
elseif ($nick isop $chan) {
msg $chan Plz type user nick  to chek his stats ! (User need to be on channel + u must be  op +)
 }
}

For normal user :

on *:text:!chekstats *:#: {
if ( $2- != $null ) {
  msg $chan Stats of $2 user :
  msg $chan %cookie [ $+ [ $2 ] ]  cookie(s)
  msg $chan %cake [ $+ [ $2 ] ]  cake(s)
  msg $chan %hugs [ $+ [ $2 ] ] hug(s)
  msg $chan been licked %lick [ $+ [ $2 ] ] times
  msg $chan haz been raped %rape [ $+ [ $2 ] ]  time(s)
}
else {
msg $chan Plz type 3user nick1 to chek his stats ! (User need to be on channel)
  }
}

Comments

Sign in to comment.
Jethro   -  Aug 19, 2011

Looks like this snippet is found via google search. It has a visit site button where it links to google.com lol I never saw people post a snippet under script's description space. Now that's new.

 Respond  
Dani_l11   -  Aug 19, 2011

Why is this in scripts and not in snippets?

 Respond  
Annaiidziithaa   -  Aug 02, 2011

napa182 thanks, I'll keep in mind :P

 Respond  
napa182   -  Aug 02, 2011

@Annaiidziithaa if you are going to use regex you may as well put it into the trigger rather than the if line. As well if you are going to use so many triggers ie: ! @ . maybe have the ! message the chan an the rest notice the nick.

Example only:

on $*:text:/^([!.@])checkstats?\s?(\S+)?$/iS:#: {
  if (!%chekstats) { inc -u20 %chekstats
    var %z $iif($regml(1) = !,.msg #,.notice $nick), %u 
    if ($regml(2) && $regml(2) ison #) {
      %u = $v1 
      %z Stats of %u user :
      %z $iif(%cookie [ $+ [ %u ] ],$v1,0)  cookie(s) $iif(%cake [ $+ [ %u ] ],$v1,0)  cake(s)$&
        $iif(%hugs [ $+ [ %u ] ],$v1,0) hug(s) been licked $iif(%lick [ $+ [ %u ] ],$v1,0) times$&
        haz been raped $iif(%rape [ $+ [ %u ] ],$v1,0)  time(s)
    }
    else {
      %z Plz type user nick to chek his stats ! (User need to be on channel) remember$&
        that you must wait 20 seconds between each command!
    }
  }
}
 Respond  
Savage_CL   -  Aug 01, 2011

How about something like this? It's untested, as I don't have mIRC on this computer, but basically it checks if the variables exists, and if so, adds it to the line. It then checks for whether it needs the singular or plural version of the word, and uses the right one. The singular exception being "fun", which I wrote in a replacement with "times amazed". I did not add a check for this one. I was done thinking :P

Finally, I added a replace on the output to add spaces around | , making it more of a separator, so it looks good.

Again, untested, but it should work.

Cheers :)

on *:text:!allstats *:#: {
  var %name $2
  if (!%name) {
    if ($nick isop $chan) {
      notice $nick I'm running the script. Please use this: !allstats $me
    }
    return
  }
  var %variables cookie cake beer coke hugs lick burger pizza fun rape
  var %temp 1
  while (%temp <= $numtok(%variables,32)) {
    var %thing $gettok(%variables,%temp,32)
    if ($eval($+(%,%thing,%name),3) != $null) {
      var %displaything $iif(%thing == fun,times amazed,$iif($v1 != 1,$iif($right(%thing,1) == s,%thing,%thing $+ s),$iif($right(%thing,1) == s,$left(%thing,-1),%thing)))
      var %output $addtok(%output,$v1 %displaything,124)
    }
    inc %temp
  }
  msg $chan Stats for %name $+ : $replace(%output,$chr(124),$+($chr(32),$chr(124),$chr(32)))
}
 Respond  
Annaiidziithaa   -  Aug 01, 2011

problem solved! :P
can do the following:

on *:text:*:#: { if ($regex($left($strip($1),1),(\.|!|@))) && ($right($1,-1) == chekstats) && ($2 == $2) && (!%chekstats) { inc -u20 %chekstats
if ( $2- != $null ) {
  msg $chan Stats of $2 user :
  msg $chan %cookie [ $+ [ $2 ] ]  cookie(s)
  msg $chan %cake [ $+ [ $2 ] ]  cake(s)
  msg $chan %hugs [ $+ [ $2 ] ] hug(s)
  msg $chan been licked %lick [ $+ [ $2 ] ] times
  msg $chan haz been raped %rape [ $+ [ $2 ] ]  time(s)
}
else {
msg $chan Plz type user nick to chek his stats ! (User need to be on channel) remember that you must wait 20 seconds between each command!
  }
}

I hope you like :P
pd; you can also apply to the first fragment!

 Respond  
Annaiidziithaa   -  Aug 01, 2011

verifying a problem

 Respond  
Jethro   -  Aug 01, 2011

At least put a timer on each message so you don't get flooded out or banned possibly; along with a trigger control so you don't get abusive users who try to tamper with you running the code.

 Respond  
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.