Cool Meter

By Anon_Lewy on Mar 17, 2012

This is another Trigger script i made the trigger is !Swagtest Just load into Remotes and Enjoy :)

==== Cool Meter By Anon_Lewy=====

on *:Text:*:#: {
  set %trigger !
  if ($+(%trigger,Swagtest) == $Strip($1)) {
    Msg $chan 1,4***** Collecting $nick's swag Data
    timer 1 1 Msg $chan 1,4*******this my take a while if $nick doesnt have much swagger
    Set %ST $rand(1,20)
    If (%ST == 1) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|9,1|||||||||||||||||||6,1 5% out of 100% Your Lame }
    If (%ST == 2) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||9,1||||||||||||||||||6,1 10% out of 100% }
    If (%ST == 3) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||9,1|||||||||||||||||6,1 15% out of 100% }
    If (%ST == 4) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||9,1||||||||||||||||6,1 20% out of 100% }
    If (%ST == 5) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||9,1|||||||||||||||6,1 25% out of 100% }
    If (%ST == 6) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||9,1||||||||||||||6,1 30% out of 100% }
    If (%ST == 7) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||9,1|||||||||||||6,1 35% out of 100% }
    If (%ST == 8) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||9,1||||||||||||6,1 40% out of 100% }
    If (%ST == 9) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||9,1|||||||||||6,1 45% out of 100% }
    If (%ST == 10) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||||9,1||||||||||6,1 50% out of 100% }
    If (%ST == 11) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||9,1|||||||||6,1 55% out of 100% }
    If (%ST == 12) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||||||9,1||||||||6,1 60% out of 100% }
    If (%ST == 13) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||||9,1|||||||6,1 65% out of 100% }
    If (%ST == 14) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||||||||9,1||||||6,1 70% out of 100% }
    If (%ST == 15) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||||||9,1|||||6,1 75% out of 100% }
    If (%ST == 16) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||||||||||9,1||||6,1 80% out of 100% }
    If (%ST == 17) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||||||||9,1|||6,1 85% out of 100% }
    If (%ST == 18) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1||||||||||||||||||9,1||6,1 90% out of 100%  }
    If (%ST == 19) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||||||||||9,1|6,1 95% out of 100% }
    If (%ST == 20) { timer 1 3 Msg $chan 6,1The results are in and $nick You have 4,1|||||||||||||||||||| 100%6,1 out of 100% Your AWESOME }
  }
}
Sign in to comment.
blackvenomm666   -  Mar 18, 2012

abcdefmonkey as good as the way you showed him is. he is obviously a bit new at coding hence he said the one her posted here was his first one he ever did. the regex could confuse him. maybe explain it so he could take it apart and your explanation would help him figure out how to mod it and change it to suit different needs. but still as a new person coding regex can be a bit confusing. i don't use it much because i still am not that good at it and i've been doing msl for a while now.

 Respond  
Abcdefmonkey   -  Mar 17, 2012

Again, I see this. Not that it's wrong, but as SunnyD commented in another snippet of yours setting a variable each time someone types isn't necessary. This would be the ideal way to come about it, in my opinion.

on $*:TEXT:/^[!]SwagTest/Si:#: {

Using the above you can add more ways to trigger it by adding more special characters inside the [ ]'s.. also, there's no need for the $strip because the /S switch strips it automatically.

Also, I'd like to add that this can be shortened to just 4 lines - since the results don't require anything more than a mere timer. You could just load the results into a text file and do it this way

on $*:TEXT:/^[!]SwagTest/Si:#: {
Msg $chan 1,4***** Collecting $nick's swag Data
timer 1 1 Msg $chan 1,4*******this my take a while if $nick doesnt have much swagger
timer 1 3 msg $chan $read(SwagResults.txt)
}

This eliminates the need to set random variables each time. Reading from the text file will randomly pull a result and message the channel. :)

Not that your coding is wrong by any means. Just offering some constructive criticism. Good work, it does as it should.

 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.